diff options
author | Roland Grunberg | 2012-03-08 19:42:19 +0000 |
---|---|---|
committer | Roland Grunberg | 2012-03-08 19:43:43 +0000 |
commit | 14aa627bc033facdcd00d59dcc56554c329528b5 (patch) | |
tree | 6899a3880938dcfd83ee3f19179afce8c05088c1 | |
parent | c2878535beecb7c11a478dfc8df0b5b74638bc41 (diff) | |
download | org.eclipse.linuxtools-14aa627bc033facdcd00d59dcc56554c329528b5.tar.gz org.eclipse.linuxtools-14aa627bc033facdcd00d59dcc56554c329528b5.tar.xz org.eclipse.linuxtools-14aa627bc033facdcd00d59dcc56554c329528b5.zip |
Fix high priority FindBugs Warnings in OProfile and Callgraph.
Fix instantiation of Activator classes in OProfile to occur when the
bundle is started. Remove unused methods, and remove static qualifier
where unnecessary.
5 files changed, 6 insertions, 11 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java index fd7f739915..9a17eb308e 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java @@ -65,11 +65,11 @@ public class OprofileLaunchPlugin extends AbstractUIPlugin { * The constructor. */ public OprofileLaunchPlugin() { - plugin = this; } public void start(BundleContext context) throws Exception { super.start(context); + plugin = this; } public void stop(BundleContext context) throws Exception { diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java index 8be340e608..a6e5c067de 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java @@ -49,7 +49,7 @@ public class OprofileSetupTab extends AbstractLaunchConfigurationTab { // protected Button _checkSeparateThread; // protected Button _checkSeparateCpu; - protected static LaunchOptions _options = null; + protected LaunchOptions _options = null; public String getName() { return OprofileLaunchMessages.getString("tab.global.name"); //$NON-NLS-1$ diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java index addd19eea3..fd3d12b349 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java @@ -61,7 +61,6 @@ public class OprofileUiPlugin extends AbstractUIPlugin { * The constructor. */ public OprofileUiPlugin() { - plugin = this; } /** @@ -69,6 +68,7 @@ public class OprofileUiPlugin extends AbstractUIPlugin { */ public void start(BundleContext context) throws Exception { super.start(context); + plugin = this; } /** diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java index 5fa2ac76e5..c53dc79242 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java @@ -71,8 +71,8 @@ public class StapGraph extends Graph { private int topLevelToDraw; private int bottomLevelToDraw; private int topLevelOnScreen; - public static int levelBuffer = 30; - private static int maxNodes = 150; + public int levelBuffer = 30; + private int maxNodes = 150; private Projectionist proj; @@ -1706,11 +1706,6 @@ public class StapGraph extends Graph { return levels.get(level); } - - public void setTreeViewer(TreeViewer treeview) { - StapGraph.treeViewer = treeview; - } - public TreeViewer getTreeViewer() { return treeViewer; diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java index 8e4d020b52..5551cf38e8 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java @@ -35,7 +35,7 @@ public class AutoScrollHelper { public static void scrollDown(StapGraph graph) { if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) { - if (graph.getTopLevel() + StapGraph.levelBuffer < + if (graph.getTopLevel() + graph.levelBuffer < graph.getLowestLevelOfNodesAdded()) { int newLevel = graph.getTopLevel() + 1; if (graph.levels.get(newLevel).get(0) == null) |