Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2014-04-30 06:13:42 +0000
committerAlexander Kurtakov2014-04-30 07:33:09 +0000
commitca725d47dc4316bf434534ba43f0428322fcc028 (patch)
tree54ef02502f640ed4b7cf84d992e26cb443b92069 /systemtap
parent633404bb1c87db9fcd02af7939b1a5417b95b10f (diff)
downloadorg.eclipse.linuxtools-ca725d47dc4316bf434534ba43f0428322fcc028.tar.gz
org.eclipse.linuxtools-ca725d47dc4316bf434534ba43f0428322fcc028.tar.xz
org.eclipse.linuxtools-ca725d47dc4316bf434534ba43f0428322fcc028.zip
Cleanups.
* Member to variable. * String.isEmpty usage. * Unnecessary local before return. * Naming conventions * Integer instantiation * Dead store to local variable Change-Id: I96b495245a2505fcbd608965319b3565edf513ff Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/25766 Tested-by: Hudson CI
Diffstat (limited to 'systemtap')
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java6
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java18
2 files changed, 12 insertions, 12 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java
index e5aa28bd49..52f9bb5e96 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java
@@ -113,9 +113,9 @@ public class SystemTapTextView extends SystemTapView {
// Create a colour based on the 3 integers (if there are any
// more integers, just ignore)
- int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int R = Integer.valueOf(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int G = Integer.valueOf(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int B = Integer.valueOf(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
if (R > 255) R = 255;
if (G > 255) G = 255;
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 0fa53d6bd9..feaf58c917 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
@@ -751,7 +751,7 @@ public class StapGraph extends Graph {
}
private void drawFromBottomToTop(int level, int height,
- int MaxLevelPixelWidth) {
+ int maxLevelPixelWidth) {
// FINISHED DRAWING THE ROOT IN THE LAST RECURSIVE CALL
if (level == 0 || level < topLevelToDraw) {
@@ -793,7 +793,7 @@ public class StapGraph extends Graph {
n.setLocation(150 + (nodeMap.get(getRootVisibleNodeNumber())
.getLocation().x),
nodeMap.get(getRootVisibleNodeNumber()).getLocation().y);
- n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),
+ n.setLocation(150 + (maxLevelPixelWidth / (total + 1) * count),
height);
if (counter <= ANIMATION_TIME) {
@@ -802,7 +802,7 @@ public class StapGraph extends Graph {
}
} else {
- n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),
+ n.setLocation(150 + (maxLevelPixelWidth / (total + 1) * count),
height);
}
@@ -837,7 +837,7 @@ public class StapGraph extends Graph {
// DRAW THE NEXT LEVEL UP
drawFromBottomToTop(level - 1, height
- (3 * (int) (CONSTANT_VERTICAL_INCREMENT / scale)),
- MaxLevelPixelWidth);
+ maxLevelPixelWidth);
}
/*
@@ -956,18 +956,18 @@ public class StapGraph extends Graph {
* - node to recenter with
*/
- public void setTopLevelTo(int new_topLevelToDraw) {
- changeLevelLimits(new_topLevelToDraw);
+ public void setTopLevelTo(int newTopLevelToDraw) {
+ changeLevelLimits(newTopLevelToDraw);
- int new_bottomLevelToDraw = new_topLevelToDraw + levelBuffer;
+ int new_bottomLevelToDraw = newTopLevelToDraw + levelBuffer;
if (new_bottomLevelToDraw > lowestLevelOfNodesAdded) {
new_bottomLevelToDraw = lowestLevelOfNodesAdded;
}
- deleteLevelsFromTop(new_topLevelToDraw - topLevelToDraw);
+ deleteLevelsFromTop(newTopLevelToDraw - topLevelToDraw);
deleteLevelsFromBottom(bottomLevelToDraw - new_bottomLevelToDraw);
- topLevelToDraw = new_topLevelToDraw;
+ topLevelToDraw = newTopLevelToDraw;
bottomLevelToDraw = new_bottomLevelToDraw;
}

Back to the top