diff options
author | Alexander Kurtakov | 2014-01-22 04:56:49 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2014-01-22 07:45:46 +0000 |
commit | 3628d8e07610e6805c6d41a1fefc09b8ec9e2695 (patch) | |
tree | a4153f0b14632c452cf6383d213c712853840c5c /systemtap/org.eclipse.linuxtools.callgraph | |
parent | 4257bd77af307d56334c36c95dc56e29828dcf50 (diff) | |
download | org.eclipse.linuxtools-3628d8e07610e6805c6d41a1fefc09b8ec9e2695.tar.gz org.eclipse.linuxtools-3628d8e07610e6805c6d41a1fefc09b8ec9e2695.tar.xz org.eclipse.linuxtools-3628d8e07610e6805c6d41a1fefc09b8ec9e2695.zip |
systemtap: Move all to Java 7.
Change-Id: I9070558de0d928c50d2fef8b547e641288a0d1ca
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/20917
Tested-by: Hudson CI
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.callgraph')
11 files changed, 158 insertions, 72 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/.classpath b/systemtap/org.eclipse.linuxtools.callgraph/.classpath index ad32c83a78..098194ca4b 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/.classpath +++ b/systemtap/org.eclipse.linuxtools.callgraph/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> diff --git a/systemtap/org.eclipse.linuxtools.callgraph/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.callgraph/.settings/org.eclipse.jdt.core.prefs index 81816d5f6f..d03a4f42dc 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/.settings/org.eclipse.jdt.core.prefs +++ b/systemtap/org.eclipse.linuxtools.callgraph/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,99 @@ -#Mon Sep 21 12:35:29 EDT 2009 eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF index b9ecb425cd..c559fbf31f 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF +++ b/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF @@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.zest.layouts;bundle-version="1.1.0", org.eclipse.zest.core;bundle-version="1.2.0" Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: org.eclipse.linuxtools.internal.callgraph, org.eclipse.linuxtools.internal.callgraph.graphlisteners Import-Package: org.eclipse.cdt.core.model, diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/AggregateLayoutAlgorithm.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/AggregateLayoutAlgorithm.java index ac3bef9606..c739f5680a 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/AggregateLayoutAlgorithm.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/AggregateLayoutAlgorithm.java @@ -40,7 +40,7 @@ public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{ public AggregateLayoutAlgorithm(int styles, TreeSet<Entry<String, Long>> entries, Long time, int width){ super(styles); - list = new ArrayList<Long>(); + list = new ArrayList<>(); for (Entry<String, Long> ent : entries) { list.add(ent.getValue()); } diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java index 42d5d390ed..a23719777a 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java @@ -14,7 +14,6 @@ package org.eclipse.linuxtools.internal.callgraph; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; @@ -280,10 +279,10 @@ public class CallgraphView extends SystemTapView { if (g.aggregateTime == null) { - g.aggregateTime = new HashMap<String, Long>(); + g.aggregateTime = new HashMap<>(); } if (g.aggregateCount == null) { - g.aggregateCount = new HashMap<String, Integer>(); + g.aggregateCount = new HashMap<>(); } g.aggregateCount.putAll(parser.countMap); @@ -312,13 +311,13 @@ public class CallgraphView extends SystemTapView { private IStatus finishLoad(IProgressMonitor monitor) { if (g.aggregateCount == null) { - g.aggregateCount = new HashMap<String, Integer>(); + g.aggregateCount = new HashMap<>(); } g.aggregateCount.putAll(parser.countMap); if (g.aggregateTime == null) { - g.aggregateTime = new HashMap<String, Long>(); + g.aggregateTime = new HashMap<>(); } g.aggregateTime.putAll(parser.aggregateTimeMap); @@ -1059,8 +1058,7 @@ public class CallgraphView extends SystemTapView { return; } - try { - BufferedWriter out = new BufferedWriter(new FileWriter(f)); + try (BufferedWriter out = new BufferedWriter(new FileWriter(f))) { StringBuilder build = new StringBuilder(""); //$NON-NLS-1$ out.write("digraph stapgraph {\n"); //$NON-NLS-1$ @@ -1091,9 +1089,6 @@ public class CallgraphView extends SystemTapView { } out.write("}"); //$NON-NLS-1$ out.flush(); - out.close(); - } catch (FileNotFoundException e) { - e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapData.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapData.java index bf37cf5e83..5cb58c17e2 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapData.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapData.java @@ -50,8 +50,8 @@ public class StapData { this.time = time; this.style = style; this.timesCalled = called; - children = new ArrayList<Integer>(); - collapsedChildren = new ArrayList<Integer>(); + children = new ArrayList<>(); + collapsedChildren = new ArrayList<>(); this.id = currentID; this.name = txt; this.graph = graphModel; @@ -109,7 +109,7 @@ public class StapData { * Sort the list of callees according to time */ public void sortByTime(){ - TreeMap<Long,ArrayList<StapData>> tempList = new TreeMap<Long,ArrayList<StapData>>(); + TreeMap<Long,ArrayList<StapData>> tempList = new TreeMap<>(); //INDEX ALL THE STAPDATA INTO AN ARRAY AT THE CALCULATED INDEX //SCATTERED INDICES : 0,1,...,5,..,10 for (int val : collapsedChildren){ diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java index b8cf28d099..fc29532022 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java @@ -165,15 +165,15 @@ public class StapGraph extends Graph { //-------------Initialize variables thumbCanvas = tCanvas; - nodeMap = new HashMap<Integer, StapNode>(); - levels = new HashMap<Integer, List<Integer>>(); - nodeDataMap = new HashMap<Integer, StapData>(); - aggregateTime = new HashMap<String, Long>(); - aggregateCount = new HashMap<String, Integer>(); - currentPositionInLevel = new HashMap<Integer, Integer>(); - collapsedLevelSize = new HashMap<Integer, Integer>(); - markedNodes = new ArrayList<Integer>(); - markedCollapsedNodes = new ArrayList<Integer>(); + nodeMap = new HashMap<>(); + levels = new HashMap<>(); + nodeDataMap = new HashMap<>(); + aggregateTime = new HashMap<>(); + aggregateCount = new HashMap<>(); + currentPositionInLevel = new HashMap<>(); + collapsedLevelSize = new HashMap<>(); + markedNodes = new ArrayList<>(); + markedCollapsedNodes = new ArrayList<>(); animation_mode = 1; idOfLastNode = 0; rootVisibleNodeNumber=0; @@ -459,7 +459,7 @@ public class StapGraph extends Graph { private void drawAggregateView(){ if (aggregateNodes == null){ - aggregateNodes = new ArrayList<GraphNode>(); + aggregateNodes = new ArrayList<>(); }else{ aggregateNodes.clear(); } @@ -487,8 +487,8 @@ public class StapGraph extends Graph { //TEMPORARY STORAGE OF THE ENTRIES //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE - TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER); - HashMap<String, Long> tempMap = new HashMap<String, Long>(); + TreeSet<Entry<String, Long>> sortedValues = new TreeSet<>(StapGraph.VALUE_ORDER); + HashMap<String, Long> tempMap = new HashMap<>(); tempMap.putAll(aggregateTime); for (String key : tempMap.keySet()) { @@ -1331,13 +1331,13 @@ public class StapGraph extends Graph { // Name, id - HashMap<String, Integer> newNodeMap = new HashMap<String, Integer>(); + HashMap<String, Integer> newNodeMap = new HashMap<>(); for (int collapsedID : nodeDataMap.get(id).collapsedChildren) { newNodeMap.put(getNodeData(collapsedID).name, collapsedID); } // id of 'collapsed' node, id of its uncollapsed twin - HashMap<Integer, Integer> collapsedNodesWithOnlyOneNodeInThem = new HashMap<Integer, Integer>(); + HashMap<Integer, Integer> collapsedNodesWithOnlyOneNodeInThem = new HashMap<>(); int size = nodeDataMap.get(id).children.size(); diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java index 5deb09b4be..dbae453cfc 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java @@ -55,7 +55,7 @@ public class StapGraphParser extends SystemTapParser { private static final String DELIM = ",,"; //$NON-NLS-1$ private boolean encounteredMain = false; - private ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>(); + private ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <>(); private HashMap<Integer, ArrayList<String>> nameMaps; private HashMap<Integer, ArrayList<Integer>> idMaps; @@ -69,17 +69,17 @@ public class StapGraphParser extends SystemTapParser { @Override protected void initialize() { //INITIALIZE MAPS - neighbourMaps = new HashMap<Integer, HashMap<Integer, ArrayList<Integer>>>(); - timeMap = new HashMap<Integer, Long>(); - serialMap = new TreeMap<Integer, String>(); - aggregateTimeMap = new HashMap<String, Long>(); - countMap = new HashMap<String, Integer>(); + neighbourMaps = new HashMap<>(); + timeMap = new HashMap<>(); + serialMap = new TreeMap<>(); + aggregateTimeMap = new HashMap<>(); + countMap = new HashMap<>(); endingTimeInNS = 0l; - callOrderList = new ArrayList<Integer>(); - markedMap = new HashMap<Integer, String>(); - lastFunctionMap = new HashMap<Integer, Integer>(); - nameMaps = new HashMap<Integer, ArrayList<String>>(); - idMaps = new HashMap<Integer, ArrayList<Integer>>(); + callOrderList = new ArrayList<>(); + markedMap = new HashMap<>(); + lastFunctionMap = new HashMap<>(); + nameMaps = new HashMap<>(); + idMaps = new HashMap<>(); project = null; startTime = -1; } @@ -233,17 +233,17 @@ public class StapGraphParser extends SystemTapParser { ArrayList<String> nameList = nameMaps.get(tid); if (nameList == null) { - nameList = new ArrayList<String>(); + nameList = new ArrayList<>(); } ArrayList<Integer> idList = idMaps.get(tid); if (idList == null) { - idList = new ArrayList<Integer>(); + idList = new ArrayList<>(); } HashMap<Integer, ArrayList<Integer>> outNeighbours = neighbourMaps.get(tid); if (outNeighbours == null) { - outNeighbours = new HashMap<Integer, ArrayList<Integer>>(); + outNeighbours = new HashMap<>(); } if (startTime < 1) { @@ -320,12 +320,12 @@ public class StapGraphParser extends SystemTapParser { nameList = nameMaps.get(tid); if (nameList == null) { - nameList = new ArrayList<String>(); + nameList = new ArrayList<>(); } idList = idMaps.get(tid); if (idList == null) { - idList = new ArrayList<Integer>(); + idList = new ArrayList<>(); } @@ -401,9 +401,9 @@ public class StapGraphParser extends SystemTapParser { BufferedReader buff = (BufferedReader) internalData; - HashMap <Integer, ArrayList<Integer>> outNeighbours= new HashMap<Integer, ArrayList<Integer>>(); - ArrayList<String> nameList = new ArrayList<String>(); - ArrayList<Integer> idList = new ArrayList<Integer>(); + HashMap <Integer, ArrayList<Integer>> outNeighbours= new HashMap<>(); + ArrayList<String> nameList = new ArrayList<>(); + ArrayList<Integer> idList = new ArrayList<>(); endingTimeInNS =0l; totalTime=10000l; try { @@ -442,7 +442,7 @@ public class StapGraphParser extends SystemTapParser { //Set neighbour ArrayList<Integer> tmpList = outNeighbours.get(ids[0]); if (tmpList == null) { - tmpList = new ArrayList<Integer>(); + tmpList = new ArrayList<>(); } for (int i = 0; i < called; i++) { diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeContentProvider.java index b0981d9e26..25ecd278d7 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeContentProvider.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeContentProvider.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Red Hat - initial API and implementation *******************************************************************************/ @@ -21,10 +21,10 @@ import org.eclipse.linuxtools.internal.callgraph.StapGraph; public class StapTreeContentProvider implements ITreeContentProvider{ private StapGraph graph; - + @Override public Object[] getChildren(Object parentElement) { - List<StapData> empty = new ArrayList<StapData>(); + List<StapData> empty = new ArrayList<>(); if (parentElement instanceof StapData) { StapData parent = ((StapData) parentElement); List<Integer> childrenIDs = parent.collapsedChildren; @@ -48,7 +48,7 @@ public class StapTreeContentProvider implements ITreeContentProvider{ @Override public boolean hasChildren(Object element) { if (element instanceof StapData) { - return element == null ? false : + return element == null ? false : ((StapData) element).children.size() > 0; } return false; @@ -60,14 +60,14 @@ public class StapTreeContentProvider implements ITreeContentProvider{ } @Override - public void dispose() { - + public void dispose() { + } @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } - + public void setGraph(StapGraph graph) { this.graph = graph; } diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeLabelProvider.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeLabelProvider.java index 4b052ca2fd..dcacf43395 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeLabelProvider.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeLabelProvider.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Red Hat - initial API and implementation *******************************************************************************/ @@ -39,7 +39,7 @@ public class StapTreeLabelProvider implements ILabelProvider { public void addListener(ILabelProviderListener listener) { } - + @Override public void dispose() { } @@ -50,7 +50,7 @@ public class StapTreeLabelProvider implements ILabelProvider { } @Override - public void removeListener(ILabelProviderListener listener) { + public void removeListener(ILabelProviderListener listener) { } } diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeListener.java index c84b710ca5..42ab297ee0 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeListener.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeListener.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Red Hat - initial API and implementation *******************************************************************************/ @@ -26,11 +26,11 @@ public class StapTreeListener implements ITreeViewerListener{ private ScrollBar scrollbar; private HashMap<Integer, List<Integer>> highestLevelNodes; //Level of recursion, list of nodes at that level currently displayed in tree - - + + /** * Autoscroll the horizontal scrollbar when there is a collapse event. - * + * */ @Override public void treeCollapsed(TreeExpansionEvent event) { @@ -40,12 +40,12 @@ public class StapTreeListener implements ITreeViewerListener{ scrollbar.setSelection(scrollbar.getSelection() - INCREMENT); highestLevelOfExpansion--; } - + } /** * Autoscroll the horizontal scrollbar when there is an expand event. - * + * */ @Override public void treeExpanded(TreeExpansionEvent event) { @@ -54,7 +54,7 @@ public class StapTreeListener implements ITreeViewerListener{ scrollbar.setSelection(scrollbar.getSelection() + INCREMENT); highestLevelOfExpansion = ((StapData) event.getElement()).levelOfRecursion; } - + int lvl = d.levelOfRecursion; if (highestLevelNodes.get(lvl) == null) { highestLevelNodes.put(lvl, new ArrayList<Integer>()); @@ -65,6 +65,6 @@ public class StapTreeListener implements ITreeViewerListener{ public StapTreeListener(ScrollBar bar) { this.highestLevelOfExpansion=0; this.scrollbar = bar; - highestLevelNodes = new HashMap<Integer, List<Integer>>(); + highestLevelNodes = new HashMap<>(); } } |