inline variables that are used only once
Signed-off-by: Florian Thienel <florian@thienel.org>
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/cursor/Cursor.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/cursor/Cursor.java
index 11d2b28..64fc818 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/cursor/Cursor.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/cursor/Cursor.java
@@ -400,10 +400,8 @@
return;
}
- final ColorResource foregroundColor = graphics.getColor(CARET_FOREGROUND_COLOR);
- final ColorResource backgroundColor = graphics.getColor(CARET_BACKGROUND_COLOR);
- graphics.setForeground(foregroundColor);
- graphics.setBackground(backgroundColor);
+ graphics.setForeground(graphics.getColor(CARET_FOREGROUND_COLOR));
+ graphics.setBackground(graphics.getColor(CARET_BACKGROUND_COLOR));
final int x = area.getX();
final int y = area.getY();
@@ -441,10 +439,8 @@
return;
}
- final ColorResource foregroundColor = graphics.getColor(CARET_FOREGROUND_COLOR);
- final ColorResource backgroundColor = graphics.getColor(CARET_BACKGROUND_COLOR);
- graphics.setForeground(foregroundColor);
- graphics.setBackground(backgroundColor);
+ graphics.setForeground(graphics.getColor(CARET_FOREGROUND_COLOR));
+ graphics.setBackground(graphics.getColor(CARET_BACKGROUND_COLOR));
final int x = area.getX();
final int y = area.getY();
@@ -482,10 +478,8 @@
return;
}
- final ColorResource foregroundColor = graphics.getColor(CARET_FOREGROUND_COLOR);
- final ColorResource backgroundColor = graphics.getColor(CARET_BACKGROUND_COLOR);
- graphics.setForeground(foregroundColor);
- graphics.setBackground(backgroundColor);
+ graphics.setForeground(graphics.getColor(CARET_FOREGROUND_COLOR));
+ graphics.setBackground(graphics.getColor(CARET_BACKGROUND_COLOR));
final int x = getX();
final int y = area.getY();
@@ -525,10 +519,8 @@
return;
}
- final ColorResource foregroundColor = graphics.getColor(CARET_FOREGROUND_COLOR);
- final ColorResource backgroundColor = graphics.getColor(CARET_BACKGROUND_COLOR);
- graphics.setForeground(foregroundColor);
- graphics.setBackground(backgroundColor);
+ graphics.setForeground(graphics.getColor(CARET_FOREGROUND_COLOR));
+ graphics.setBackground(graphics.getColor(CARET_BACKGROUND_COLOR));
final int x = getX();
final int y = area.getY();
@@ -566,10 +558,8 @@
return;
}
- final ColorResource foregroundColor = graphics.getColor(CARET_FOREGROUND_COLOR);
- final ColorResource backgroundColor = graphics.getColor(CARET_BACKGROUND_COLOR);
- graphics.setForeground(foregroundColor);
- graphics.setBackground(backgroundColor);
+ graphics.setForeground(graphics.getColor(CARET_FOREGROUND_COLOR));
+ graphics.setBackground(graphics.getColor(CARET_BACKGROUND_COLOR));
final int x = area.getX();
final int y = area.getY() + area.getHeight();