From bbeafe9d1f2c90eab02ab2bdbd00a78345652465 Mon Sep 17 00:00:00 2001 From: Francois Chouinard Date: Mon, 18 Jan 2010 18:56:57 +0000 Subject: [PATCH] Commented out the code that used Arrays.copyOf (a Java6 feature). This part is needed for trace streaming which is not enabled yet. --- .../widgets/TmfTimeStatesCtrl.java | 56 ++++++++++--------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/timeAnalysis/widgets/TmfTimeStatesCtrl.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/timeAnalysis/widgets/TmfTimeStatesCtrl.java index a89a066ce8..cf148e96ba 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/timeAnalysis/widgets/TmfTimeStatesCtrl.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/timeAnalysis/widgets/TmfTimeStatesCtrl.java @@ -2071,33 +2071,35 @@ class ItemData { // Find the Trace item within the current list TraceItem item = findTraceItem(parent); - if (item == null) { - // If the parent item is not found, make room for it in the current - // array - int length = 1; - Object[] traces; - if (_traces != null) { - length = _traces.length + 1; - traces = Arrays.copyOf(_traces, length); - } else { - traces = new Object[length]; - } - - // Add the new parent element to the end of the array. - traces[length - 1] = parent; - - // update the filter array to accomodate a postion to the new - // element - traceFilter = new boolean[traces.length]; - java.util.Arrays.fill(traceFilter, true); - - // rebuild internal data - _traces = traces; - refreshData(); - - // item must be there - item = findTraceItem(parent); - } +// This method is not used (yet) so this code can be commented out for now +// FIXME: Arrays.copyOf is a Java6 feature +// if (item == null) { +// // If the parent item is not found, make room for it in the current +// // array +// int length = 1; +// Object[] traces; +// if (_traces != null) { +// length = _traces.length + 1; +// traces = Arrays.copyOf(_traces, length); +// } else { +// traces = new Object[length]; +// } +// +// // Add the new parent element to the end of the array. +// traces[length - 1] = parent; +// +// // update the filter array to accomodate a postion to the new +// // element +// traceFilter = new boolean[traces.length]; +// java.util.Arrays.fill(traceFilter, true); +// +// // rebuild internal data +// _traces = traces; +// refreshData(); +// +// // item must be there +// item = findTraceItem(parent); +// } ITmfTimeAnalysisEntry localTraceItem = item._trace; // Local trace found -- 2.34.1