Code cleanup: use regular SWT constants

 Use constants from RWT, instead of Draw2d Compatibility SWT
diff --git a/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/draw2d/rap/swt/SWT.java b/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/draw2d/rap/swt/SWT.java
index 9f8d721..2252e3c 100644
--- a/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/draw2d/rap/swt/SWT.java
+++ b/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/draw2d/rap/swt/SWT.java
@@ -39,55 +39,6 @@
   //RAP [ar] - The following are ADDED functionality for GEF port
   
   /**
-   * The mouse wheel event type (value is 37).
-   * 
-   * @see org.eclipse.swt.widgets.Widget#addListener
-   * @see org.eclipse.swt.widgets.Display#addFilter
-   * @see org.eclipse.swt.widgets.Event
-   * 
-   * @since 3.1
-   */
-  public static final int MouseWheel = 37;
-  
-  /**
-  * The mouse exit event type (value is 7).
-  *
-  * @see org.eclipse.swt.widgets.Widget#addListener
-  * @see org.eclipse.swt.widgets.Display#addFilter
-  * @see org.eclipse.swt.widgets.Event
-  *
-  * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
-  * @see org.eclipse.swt.events.MouseTrackListener#mouseExit
-  * @see org.eclipse.swt.events.MouseEvent
-  */
-  public static final int MouseExit = 7;
-  
-  /**
-   * Style constant to indicate coordinate mirroring (value is 1<<27).
-   * <p>
-   * <b>Used By:</b>
-   * <ul>
-   * <li><code>Control</code></li>
-   * <li><code>Menu</code></li>
-   * </ul>
-   * </p>
-   * 
-   * @since 2.1.2
-   */
-  public static final int MIRRORED = 1 << 27;
-  
-  /**
-   * System resize north-east-south-west cursor (value is 6).
-   */
-  public static final int CURSOR_SIZENESW = 6;
-  
-  
-  /**
-   * System resize north-west-south-east cursor (value is 8).
-   */
-  public static final int CURSOR_SIZENWSE = 8;
-  
-  /**
    * Input Method Editor style constant for native input behavior (value is
    * 1&lt;&lt;3).
    */
@@ -298,42 +249,6 @@
   public static final int MOVEMENT_WORD_START = 1 << 4;
   
   /**
-   * Path constant that represents a "move to" operation (value is 1).
-   * 
-   * @since 3.1
-   */
-  public static final int PATH_MOVE_TO = 1;
-  
-  /**
-   * Path constant that represents a "line to" operation (value is 2).
-   * 
-   * @since 3.1
-   */
-  public static final int PATH_LINE_TO = 2;
-  
-  /**
-   * Path constant that represents a "quadratic curve to" operation (value is
-   * 3).
-   * 
-   * @since 3.1
-   */
-  public static final int PATH_QUAD_TO = 3;
-  
-  /**
-   * Path constant that represents a "cubic curve to" operation (value is 4).
-   * 
-   * @since 3.1
-   */
-  public static final int PATH_CUBIC_TO = 4;
-  
-  /**
-   * Path constant that represents a "close" operation (value is 5).
-   * 
-   * @since 3.1
-   */
-  public static final int PATH_CLOSE = 5;
-  
-  /**
    * Even odd rule for filling operations (value is 1).
    * 
    * @since 3.1
@@ -348,21 +263,6 @@
   public static final int FILL_WINDING = 2;
   
   /**
-   * The <code>Image</code> constructor argument indicating that the new image
-   * should have the appearance of a "disabled" (using the platform's rules for
-   * how this should look) copy of the image provided as an argument (value is
-   * 1).
-   */
-  public static final int IMAGE_DISABLE = 1;
-  
-  /**
-   * The <code>Image</code> constructor argument indicating that the new image
-   * should have the appearance of a "gray scaled" copy of the image provided as
-   * an argument (value is 2).
-   */
-  public static final int IMAGE_GRAY = 2;
-  
-  /**
    * Constants to indicate line scrolling (value is 1).
    * <p>
    * <b>Used By:</b>
@@ -398,40 +298,6 @@
    */
   public static final int MeasureItem = 41;
   
-  /**
-   * Style constant for right to left orientation (value is 1&lt;&lt;26).
-   * <p>
-   * When orientation is not explicitly specified, orientation is inherited.
-   * This means that children will be assigned the orientation of their parent.
-   * To override this behavior and force an orientation for a child, explicitly
-   * set the orientation of the child when that child is created. <br>
-   * Note that this is a <em>HINT</em>.
-   * </p>
-   * <p>
-   * <b>Used By:</b>
-   * <ul>
-   * <li><code>Control</code></li>
-   * <li><code>Menu</code></li>
-   * <li><code>GC</code></li>
-   * </ul>
-   * </p>
-   * 
-   * @since 2.1.2
-   */
-  public static final int RIGHT_TO_LEFT = 1 << 26;
-  
-  /**
-   * The paint event type (value is 9).
-   * 
-   * @see org.eclipse.swt.widgets.Widget#addListener
-   * @see org.eclipse.swt.widgets.Display#addFilter
-   * @see org.eclipse.swt.widgets.Event
-   * 
-   * @see org.eclipse.swt.widgets.Control#addPaintListener
-   * @see org.eclipse.swt.events.PaintListener#paintControl
-   * @see org.eclipse.swt.events.PaintEvent
-   */
-  public static final int Paint = 9; 
   //ENDRAP
 
 }
diff --git a/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/swt/graphics/TextLayout.java
index d3ab8d6..884f7cb 100644
--- a/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.rap.draw2d.compatibility/src/org/eclipse/swt/graphics/TextLayout.java
@@ -856,7 +856,7 @@
 
 public void setOrientation (int orientation) {
 	checkLayout();
-	int mask = SWT.LEFT_TO_RIGHT | org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT;
+	int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
 	orientation &= mask;
 	if (orientation == 0) return;
 	if ((orientation & SWT.LEFT_TO_RIGHT) != 0) orientation = SWT.LEFT_TO_RIGHT;
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/BufferedGraphicsSource.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/BufferedGraphicsSource.java
index ea2944b..b53d64b 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/BufferedGraphicsSource.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/BufferedGraphicsSource.java
@@ -104,11 +104,11 @@
 		}
 
 		controlGC = new GC(control, control.getStyle()
-				& (org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
+				& (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
 		Graphics graphics;
 		if (imageBuffer != null) {
 			imageGC = new GC(imageBuffer.getDevice(), control.getStyle()
-					& (org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
+					& (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
 			imageGC.setBackground(controlGC.getBackground());
 			imageGC.setForeground(controlGC.getForeground());
 			imageGC.setFont(controlGC.getFont());
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FigureCanvas.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FigureCanvas.java
index 871a82a..1affd5e 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FigureCanvas.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/FigureCanvas.java
@@ -57,7 +57,7 @@
  */
 public class FigureCanvas extends Composite {
 
-	private static final int ACCEPTED_STYLES = org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT
+	private static final int ACCEPTED_STYLES = SWT.RIGHT_TO_LEFT
 			| SWT.LEFT_TO_RIGHT
 			| SWT.V_SCROLL
 			| SWT.H_SCROLL
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/LightweightSystem.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/LightweightSystem.java
index 0228b2b..545d601 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/LightweightSystem.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/LightweightSystem.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.draw2d;
 
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.AccessibleControlEvent;
 import org.eclipse.swt.accessibility.AccessibleControlListener;
 import org.eclipse.swt.accessibility.AccessibleEvent;
@@ -51,7 +52,6 @@
 import org.eclipse.ui.presentations.PresentationUtil;
 
 import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.swt.SWT;
 
 /**
  * The LightweightSystem is the link between SWT and Draw2d. It is the component
@@ -117,8 +117,8 @@
 		canvas.addDisposeListener(handler);
 		// HACK: for DND in RAP
 		PresentationUtil.addDragListener(canvas, handler);
-		DragSource dragSource = new DragSource(canvas, DND.DROP_MOVE
-				| DND.DROP_COPY | DND.DROP_LINK);
+		DragSource dragSource = new DragSource(canvas,
+				DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
 		final DragSourceListener listener = new DragSourceListener() {
 
 			public void dragStart(DragSourceEvent event) {
@@ -139,7 +139,7 @@
 
 		dragSource.addDragListener(listener);
 
-		canvas.addListener(org.eclipse.draw2d.rap.swt.SWT.MouseWheel, handler);
+		canvas.addListener(SWT.MouseWheel, handler);
 
 		canvas.addControlListener(new ControlAdapter() {
 			public void controlResized(ControlEvent e) {
@@ -271,11 +271,11 @@
 			return;
 		canvas = c;
 		if ((c.getStyle() & SWT.DOUBLE_BUFFERED) != 0)
-			getUpdateManager().setGraphicsSource(
-					new NativeGraphicsSource(canvas));
+			getUpdateManager()
+					.setGraphicsSource(new NativeGraphicsSource(canvas));
 		else
-			getUpdateManager().setGraphicsSource(
-					new BufferedGraphicsSource(canvas));
+			getUpdateManager()
+					.setGraphicsSource(new BufferedGraphicsSource(canvas));
 		getEventDispatcher().setControl(c);
 		addListeners();
 
@@ -376,7 +376,8 @@
 		 * @see IFigure#isMirrored()
 		 */
 		public boolean isMirrored() {
-			return (LightweightSystem.this.canvas.getStyle() & org.eclipse.draw2d.rap.swt.SWT.MIRRORED) != 0;
+			return (LightweightSystem.this.canvas.getStyle()
+					& SWT.MIRRORED) != 0;
 		}
 
 		/** @see Figure#isShowing() */
@@ -419,8 +420,8 @@
 										}
 										Event ev = new Event();
 										ev.display = display;
-										Point loc = canvas.toControl(display
-												.getCursorLocation());
+										Point loc = canvas.toControl(
+												display.getCursorLocation());
 										ev.type = SWT.DragDetect;
 										ev.widget = widget;
 										ev.button = 1;
@@ -604,7 +605,7 @@
 		 */
 		public void handleEvent(Event event) {
 			// Mouse wheel events
-			if (event.type == org.eclipse.draw2d.rap.swt.SWT.MouseWheel)
+			if (event.type == SWT.MouseWheel)
 				getEventDispatcher().dispatchMouseWheelScrolled(event);
 			// HACK: for DND in RAP
 			else if (event.type == SWT.DragDetect) {
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java
index c2164c5..d661cca 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/PrintFigureOperation.java
@@ -83,7 +83,7 @@
 	 * @see org.eclipse.draw2d.PrintOperation#getGraphicsOrientation()
 	 */
 	int getGraphicsOrientation() {
-		return getPrintSource().isMirrored() ? org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT
+		return getPrintSource().isMirrored() ? SWT.RIGHT_TO_LEFT
 				: SWT.LEFT_TO_RIGHT;
 	}
 
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScaledGraphics.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScaledGraphics.java
index 5e5ee8c..a7d7e00 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScaledGraphics.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/ScaledGraphics.java
@@ -16,11 +16,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
 import org.eclipse.swt.SWT;
-import org.eclipse.draw2d.rap.swt.graphics.LineAttributes;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
@@ -33,6 +29,11 @@
 import org.eclipse.swt.graphics.TextStyle;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.draw2d.rap.swt.graphics.LineAttributes;
+
 /**
  * A Graphics object able to scale all operations based on the current scale
  * factor.
@@ -57,7 +58,8 @@
 		}
 
 		public boolean equals(Object obj) {
-			return (((FontKey) obj).font.equals(font) && ((FontKey) obj).height == height);
+			return (((FontKey) obj).font.equals(font)
+					&& ((FontKey) obj).height == height);
 		}
 
 		public int hashCode() {
@@ -242,26 +244,26 @@
 		for (int i = 0; i < p.types.length; i++) {
 			byte type = p.types[i];
 			switch (type) {
-			case org.eclipse.draw2d.rap.swt.SWT.PATH_MOVE_TO:
+			case SWT.PATH_MOVE_TO:
 				scaledPath.moveTo(p.points[index], p.points[index + 1]);
 				index += 2;
 				break;
-			case org.eclipse.draw2d.rap.swt.SWT.PATH_LINE_TO:
+			case SWT.PATH_LINE_TO:
 				scaledPath.lineTo(p.points[index], p.points[index + 1]);
 				index += 2;
 				break;
-			case org.eclipse.draw2d.rap.swt.SWT.PATH_CUBIC_TO:
+			case SWT.PATH_CUBIC_TO:
 				scaledPath.cubicTo(p.points[index], p.points[index + 1],
 						p.points[index + 2], p.points[index + 3],
 						p.points[index + 4], p.points[index + 5]);
 				index += 6;
 				break;
-			case org.eclipse.draw2d.rap.swt.SWT.PATH_QUAD_TO:
+			case SWT.PATH_QUAD_TO:
 				scaledPath.quadTo(p.points[index], p.points[index + 1],
 						p.points[index + 2], p.points[index + 3]);
 				index += 4;
 				break;
-			case org.eclipse.draw2d.rap.swt.SWT.PATH_CLOSE:
+			case SWT.PATH_CLOSE:
 				scaledPath.close();
 				break;
 			}
@@ -308,7 +310,9 @@
 				(int) (Math.floor((size.height * zoom + fractionalY))));
 	}
 
-	/** @see Graphics#drawImage(Image, int, int, int, int, int, int, int, int) */
+	/**
+	 * @see Graphics#drawImage(Image, int, int, int, int, int, int, int, int)
+	 */
 	public void drawImage(Image srcImage, int sx, int sy, int sw, int sh,
 			int tx, int ty, int tw, int th) {
 		// "t" == target rectangle, "s" = source
@@ -880,7 +884,8 @@
 		double dyFloat = dy * zoom + fractionalY;
 		fractionalX = dxFloat - Math.floor(dxFloat);
 		fractionalY = dyFloat - Math.floor(dyFloat);
-		graphics.translate((int) Math.floor(dxFloat), (int) Math.floor(dyFloat));
+		graphics.translate((int) Math.floor(dxFloat),
+				(int) Math.floor(dyFloat));
 	}
 
 	/** @see Graphics#translate(float, float) */
@@ -889,7 +894,8 @@
 		double dyFloat = dy * zoom + fractionalY;
 		fractionalX = dxFloat - Math.floor(dxFloat);
 		fractionalY = dyFloat - Math.floor(dyFloat);
-		graphics.translate((int) Math.floor(dxFloat), (int) Math.floor(dyFloat));
+		graphics.translate((int) Math.floor(dxFloat),
+				(int) Math.floor(dyFloat));
 	}
 
 	private Rectangle zoomClipRect(Rectangle r) {
@@ -915,8 +921,8 @@
 	Font zoomFont(Font f) {
 		if (f == null) {
 			Font localFont = getLocalFont();
-			f = localFont != null ? localFont : Display.getCurrent()
-					.getSystemFont();
+			f = localFont != null ? localFont
+					: Display.getCurrent().getSystemFont();
 		}
 		FontData data = getCachedFontData(f);
 		int zoomedFontHeight = zoomFontHeight(data.getHeight());
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/Thumbnail.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/Thumbnail.java
index efd575f..ed0e756 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/Thumbnail.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/parts/Thumbnail.java
@@ -282,7 +282,7 @@
 
 			//tileGC = new GC(tileImage,
 			tileGC = new GC(tileImage.getDevice(),
-					sourceFigure.isMirrored() ? org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT : SWT.NONE);
+					sourceFigure.isMirrored() ? SWT.RIGHT_TO_LEFT : SWT.NONE);
 			tileGCGraphics = new SWTGraphics(tileGC);
 			tileGraphics = new ScaledGraphics(tileGCGraphics);
 
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java
index 87c9df6..3d13456 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java
@@ -162,7 +162,7 @@
 			parent = parent.getParent();
 		if (parent != null)
 			return ((BlockFlow) parent).getOrientation();
-		return isMirrored() ? org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
+		return isMirrored() ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
 	}
 
 	int getRightMargin() {
@@ -281,7 +281,7 @@
 	 * @since 3.1
 	 */
 	public void setOrientation(int orientation) {
-		orientation &= SWT.LEFT_TO_RIGHT | org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT;
+		orientation &= SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
 		if (this.orientation == orientation)
 			return;
 		this.orientation = orientation;
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java
index 6cd2d88..99b044b 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/text/TextFlow.java
@@ -635,7 +635,7 @@
 		} else {
 			TextLayout tl = FlowUtilities.INSTANCE().getTextLayout();
 			if (isMirrored())
-				tl.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+				tl.setOrientation(SWT.RIGHT_TO_LEFT);
 			tl.setFont(g.getFont());
 			tl.setText(draw);
 			g.drawTextLayout(tl, x, y);
diff --git a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java
index 7c19019..e9d780f 100644
--- a/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java
+++ b/bundles/org.eclipse.rap.draw2d/src/org/eclipse/draw2d/widgets/MultiLineLabel.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.draw2d.widgets;
 
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.ACC;
 import org.eclipse.swt.accessibility.AccessibleAdapter;
 import org.eclipse.swt.accessibility.AccessibleControlAdapter;
@@ -29,7 +30,6 @@
 import org.eclipse.draw2d.MarginBorder;
 import org.eclipse.draw2d.Viewport;
 import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.swt.SWT;
 import org.eclipse.draw2d.text.FlowPage;
 import org.eclipse.draw2d.text.TextFlow;
 
@@ -93,8 +93,8 @@
 	}
 
 	private void addAccessibility() {
-		getAccessible().addAccessibleControlListener(
-				new AccessibleControlAdapter() {
+		getAccessible()
+				.addAccessibleControlListener(new AccessibleControlAdapter() {
 					public void getRole(AccessibleControlEvent e) {
 						e.detail = ACC.ROLE_LABEL;
 					}
@@ -113,7 +113,7 @@
 				Point p = getViewport().getViewLocation();
 				int dy = getFont().getFontData()[0].getHeight();
 				int dx = dy * 3 / 2;
-				boolean mirrored = (e.widget.getStyle() & org.eclipse.draw2d.rap.swt.SWT.MIRRORED) != 0;
+				boolean mirrored = (e.widget.getStyle() & SWT.MIRRORED) != 0;
 				if (e.keyCode == SWT.ARROW_DOWN) {
 					scrollToY(p.y + dy / 2);
 					scrollToY(p.y + dy);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/BidiBlockExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/BidiBlockExample.java
index 2d763a4..3d8ed0b 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/BidiBlockExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/BidiBlockExample.java
@@ -66,31 +66,31 @@
 
 	para = new BlockFlow();
 	page.add(para);
-	para.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	para.setOrientation(SWT.RIGHT_TO_LEFT);
 	para.setHorizontalAligment(PositionConstants.LEFT);
 	para.add(new TextFlow(s));
 
 	para = new BlockFlow();
 	page.add(para);
-	para.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	para.setOrientation(SWT.RIGHT_TO_LEFT);
 	para.setHorizontalAligment(PositionConstants.RIGHT);
 	para.add(new TextFlow(s));
 
 	para = new BlockFlow();
 	page.add(para);
-	para.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	para.setOrientation(SWT.RIGHT_TO_LEFT);
 	para.setHorizontalAligment(PositionConstants.ALWAYS_LEFT);
 	para.add(new TextFlow(s));
 
 	para = new BlockFlow();
 	page.add(para);
-	para.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	para.setOrientation(SWT.RIGHT_TO_LEFT);
 	para.setHorizontalAligment(PositionConstants.ALWAYS_RIGHT);
 	para.add(new TextFlow(s));
 
 	para = new BlockFlow();
 	page.add(para);
-	para.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	para.setOrientation(SWT.RIGHT_TO_LEFT);
 	para.add(new TextFlow(s));
 
 	return page;
@@ -106,7 +106,7 @@
 
 	fc = new FigureCanvas(shell);
 	fc.setContents(getContents());
-	cf = new FigureCanvas(shell, org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	cf = new FigureCanvas(shell, SWT.RIGHT_TO_LEFT);
 	cf.setContents(getContents());
 	
 	fc.getViewport().setContentsTracksWidth(true);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java
index 1425f83..60e39eb 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/draw2d/examples/text/TextSurroundingFigureExample.java
@@ -90,7 +90,7 @@
 	TextFlow flow = new TextFlow();
 	flow.setText("Text inside a proxy figure with BiDi: \u0634\u0637\u0635 \u0639\u0633\u0640 \u0632\u0638\u0635.");
 	FlowPage innerPage = new FlowPage();
-	innerPage.setOrientation(org.eclipse.draw2d.rap.swt.SWT.RIGHT_TO_LEFT);
+	innerPage.setOrientation(SWT.RIGHT_TO_LEFT);
 	innerPage.add(flow);
 	proxy2.add(innerPage);
 	page.add(proxy2);
diff --git a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicDiagramEditPart.java b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicDiagramEditPart.java
index 529665a..1f124db 100644
--- a/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicDiagramEditPart.java
+++ b/bundles/org.eclipse.rap.gef.demo/src/org/eclipse/gef/examples/logicdesigner/edit/LogicDiagramEditPart.java
@@ -186,7 +186,7 @@
 	protected void refreshVisuals() {
 		Animation.markBegin();
 		ConnectionLayer cLayer = (ConnectionLayer) getLayer(CONNECTION_LAYER);
-		if ((getViewer().getControl().getStyle() & org.eclipse.draw2d.rap.swt.SWT.MIRRORED) == 0)
+		if ((getViewer().getControl().getStyle() & SWT.MIRRORED) == 0)
 			cLayer.setAntialias(SWT.ON);
 
 		if (getLogicDiagram().getConnectionRouter().equals(
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/ToolbarDropdownContributionItem.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/ToolbarDropdownContributionItem.java
index d375784..06b73aa 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/ToolbarDropdownContributionItem.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/internal/ui/palette/ToolbarDropdownContributionItem.java
@@ -126,8 +126,7 @@
 			if (entry.grayImage == null) {
 				Image image = getImage(desc);
 				if (image != null) {
-					entry.grayImage = new Image(null, image,
-							org.eclipse.draw2d.rap.swt.SWT.IMAGE_GRAY);
+					entry.grayImage = new Image(null, image, SWT.IMAGE_GRAY);
 				}
 			}
 			return entry.grayImage;
@@ -135,8 +134,8 @@
 
 		Image getMissingImage() {
 			if (missingImage == null) {
-				missingImage = getImage(ImageDescriptor
-						.getMissingImageDescriptor());
+				missingImage = getImage(
+						ImageDescriptor.getMissingImageDescriptor());
 			}
 			return missingImage;
 		}
@@ -434,8 +433,8 @@
 					if (m != null) {
 						// position the menu below the drop down item
 						Rectangle b = ti.getBounds();
-						Point p = ti.getParent().toDisplay(
-								new Point(b.x, b.y + b.height));
+						Point p = ti.getParent()
+								.toDisplay(new Point(b.x, b.y + b.height));
 						m.setLocation(p.x, p.y); // waiting for SWT 0.42
 						m.setVisible(true);
 						return; // we don't fire the action
@@ -524,12 +523,11 @@
 			boolean tooltipTextChanged = propertyName == null
 					|| propertyName.equals(Action.TOOL_TIP_TEXT);
 			boolean enableStateChanged = propertyName == null
-					|| propertyName.equals(Action.ENABLED)
-					|| propertyName
+					|| propertyName.equals(Action.ENABLED) || propertyName
 							.equals(IContributionManagerOverrides.P_ENABLED);
 			boolean checkChanged = (action.getStyle() == IAction.AS_CHECK_BOX)
-					&& (propertyName == null || propertyName
-							.equals(Action.CHECKED));
+					&& (propertyName == null
+							|| propertyName.equals(Action.CHECKED));
 
 			if (widget instanceof ToolItem) {
 				ToolItem ti = (ToolItem) widget;
@@ -666,8 +664,8 @@
 		if (widget instanceof ToolItem) {
 			Image image = cache.getImage(action.getImageDescriptor());
 			Image hoverImage = cache.getImage(action.getHoverImageDescriptor());
-			Image disabledImage = cache.getImage(action
-					.getDisabledImageDescriptor());
+			Image disabledImage = cache
+					.getImage(action.getDisabledImageDescriptor());
 
 			// If there is no regular image, but there is a hover image,
 			// convert the hover image to gray and use it as the regular image.
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/AbstractTool.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/AbstractTool.java
index 8119c03..2f9d439 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/AbstractTool.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/tools/AbstractTool.java
@@ -90,6 +90,7 @@
 	private static final int FLAG_HOVER = 2;
 	private static final int FLAG_PAST_THRESHOLD = 1;
 	private static final int FLAG_UNLOAD = 4;
+
 	{
 		setFlag(FLAG_UNLOAD, true);
 	}
@@ -266,8 +267,8 @@
 		getCurrentInput().verifyMouseButtons = true;
 		setState(STATE_INITIAL);
 		setFlag(FLAG_ACTIVE, true);
-		getDomain().getCommandStack().addCommandStackEventListener(
-				commandStackListener);
+		getDomain().getCommandStack()
+				.addCommandStackEventListener(commandStackListener);
 	}
 
 	/**
@@ -311,8 +312,8 @@
 			return;
 
 		try {
-			PropertyDescriptor[] descriptors = Introspector.getBeanInfo(
-					getClass(), Introspector.IGNORE_ALL_BEANINFO)
+			PropertyDescriptor[] descriptors = Introspector
+					.getBeanInfo(getClass(), Introspector.IGNORE_ALL_BEANINFO)
 					.getPropertyDescriptors();
 			PropertyDescriptor property = null;
 			for (int i = 0; i < descriptors.length; i++) {
@@ -396,8 +397,8 @@
 		setState(STATE_TERMINAL);
 		operationSet = null;
 		current = null;
-		getDomain().getCommandStack().removeCommandStackEventListener(
-				commandStackListener);
+		getDomain().getCommandStack()
+				.removeCommandStackEventListener(commandStackListener);
 	}
 
 	/**
@@ -419,13 +420,13 @@
 	 *            the command to execute
 	 */
 	protected void executeCommand(Command command) {
-		getDomain().getCommandStack().removeCommandStackEventListener(
-				commandStackListener);
+		getDomain().getCommandStack()
+				.removeCommandStackEventListener(commandStackListener);
 		try {
 			getDomain().getCommandStack().execute(command);
 		} finally {
-			getDomain().getCommandStack().addCommandStackEventListener(
-					commandStackListener);
+			getDomain().getCommandStack()
+					.addCommandStackEventListener(commandStackListener);
 		}
 	}
 
@@ -840,10 +841,9 @@
 	}
 
 	/**
-	 * Override to process a traverse event. If the event's
-	 * {@link KeyEvent#doit doit} field is set to <code>false</code>, the
-	 * traversal will be prevented from occurring. Otherwise, a traverse will
-	 * occur.
+	 * Override to process a traverse event. If the event's {@link KeyEvent#doit
+	 * doit} field is set to <code>false</code>, the traversal will be prevented
+	 * from occurring. Otherwise, a traverse will occur.
 	 * 
 	 * @param event
 	 *            the SWT traverse event
@@ -944,7 +944,7 @@
 	}
 
 	boolean isCurrentViewerMirrored() {
-		return (getCurrentViewer().getControl().getStyle() & org.eclipse.draw2d.rap.swt.SWT.MIRRORED) != 0;
+		return (getCurrentViewer().getControl().getStyle() & SWT.MIRRORED) != 0;
 	}
 
 	/**
@@ -957,8 +957,8 @@
 	}
 
 	boolean isInDragInProgress() {
-		return isInState(STATE_DRAG_IN_PROGRESS
-				| STATE_ACCESSIBLE_DRAG_IN_PROGRESS);
+		return isInState(
+				STATE_DRAG_IN_PROGRESS | STATE_ACCESSIBLE_DRAG_IN_PROGRESS);
 	}
 
 	/*
@@ -967,11 +967,16 @@
 	 */
 	private boolean isInputSynched(MouseEvent event) {
 		Input input = getCurrentInput();
-		return input.isMouseButtonDown(1) == ((event.stateMask & SWT.BUTTON1) != 0)
-				&& input.isMouseButtonDown(2) == ((event.stateMask & SWT.BUTTON2) != 0)
-				&& input.isMouseButtonDown(3) == ((event.stateMask & SWT.BUTTON3) != 0)
-				&& input.isMouseButtonDown(4) == ((event.stateMask & SWT.BUTTON4) != 0)
-				&& input.isMouseButtonDown(5) == ((event.stateMask & SWT.BUTTON5) != 0);
+		return input
+				.isMouseButtonDown(1) == ((event.stateMask & SWT.BUTTON1) != 0)
+				&& input.isMouseButtonDown(
+						2) == ((event.stateMask & SWT.BUTTON2) != 0)
+				&& input.isMouseButtonDown(
+						3) == ((event.stateMask & SWT.BUTTON3) != 0)
+				&& input.isMouseButtonDown(
+						4) == ((event.stateMask & SWT.BUTTON4) != 0)
+				&& input.isMouseButtonDown(
+						5) == ((event.stateMask & SWT.BUTTON5) != 0);
 	}
 
 	/**
@@ -1240,7 +1245,8 @@
 	 * @see org.eclipse.gef.Tool#nativeDragFinished(DragSourceEvent,
 	 *      EditPartViewer)
 	 */
-	public void nativeDragFinished(DragSourceEvent event, EditPartViewer viewer) {
+	public void nativeDragFinished(DragSourceEvent event,
+			EditPartViewer viewer) {
 		if (!isViewerImportant(viewer))
 			return;
 		setViewer(viewer);
@@ -1251,7 +1257,8 @@
 	 * @see org.eclipse.gef.Tool#nativeDragStarted(DragSourceEvent,
 	 *      EditPartViewer)
 	 */
-	public void nativeDragStarted(DragSourceEvent event, EditPartViewer viewer) {
+	public void nativeDragStarted(DragSourceEvent event,
+			EditPartViewer viewer) {
 		if (!isViewerImportant(viewer))
 			return;
 		setViewer(viewer);
@@ -1270,9 +1277,8 @@
 	 * @since 3.1
 	 */
 	protected void performViewerMouseWheel(Event event, EditPartViewer viewer) {
-		MouseWheelHandler handler = (MouseWheelHandler) viewer
-				.getProperty(MouseWheelHandler.KeyGenerator
-						.getKey(event.stateMask));
+		MouseWheelHandler handler = (MouseWheelHandler) viewer.getProperty(
+				MouseWheelHandler.KeyGenerator.getKey(event.stateMask));
 		if (handler != null)
 			handler.handleMouseWheel(event, viewer);
 	}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java
index 001e9e3..d67dcca 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java
@@ -303,8 +303,8 @@
 	}
 
 	private Composite createPaletteContainer() {
-		return new PaletteComposite(this, SWT.NO_BACKGROUND
-				| SWT.NO_REDRAW_RESIZE | SWT.DOUBLE_BUFFERED);
+		return new PaletteComposite(this,
+				SWT.NO_BACKGROUND | SWT.NO_REDRAW_RESIZE | SWT.DOUBLE_BUFFERED);
 	}
 
 	// RAP [am] not working in RAP use a real sash instead
@@ -383,7 +383,7 @@
 	}
 
 	private boolean isMirrored() {
-		return (getStyle() & org.eclipse.draw2d.rap.swt.SWT.MIRRORED) != 0;
+		return (getStyle() & SWT.MIRRORED) != 0;
 	}
 
 	/**
@@ -433,7 +433,8 @@
 		update();
 	}
 
-	private void layoutComponentsEast(Rectangle area, int sashWidth, int pWidth) {
+	private void layoutComponentsEast(Rectangle area, int sashWidth,
+			int pWidth) {
 		if (isInState(STATE_COLLAPSED)) {
 			paletteContainer.setVisible(false);
 			sash.setBounds(area.x + area.width - sashWidth, area.y, sashWidth,
@@ -459,18 +460,19 @@
 					pWidth, area.height);
 			sash.setVisible(true);
 			paletteContainer.setVisible(true);
-			graphicalControl.setBounds(area.x, area.y, area.width - sashWidth
-					- pWidth, area.height);
+			graphicalControl.setBounds(area.x, area.y,
+					area.width - sashWidth - pWidth, area.height);
 		}
 	}
 
-	private void layoutComponentsWest(Rectangle area, int sashWidth, int pWidth) {
+	private void layoutComponentsWest(Rectangle area, int sashWidth,
+			int pWidth) {
 		if (isInState(STATE_COLLAPSED)) {
 			paletteContainer.setVisible(false);
 			sash.setBounds(area.x, area.y, sashWidth, area.height);
 			sash.setVisible(true);
-			graphicalControl.setBounds(area.x + sashWidth, area.y, area.width
-					- sashWidth, area.height);
+			graphicalControl.setBounds(area.x + sashWidth, area.y,
+					area.width - sashWidth, area.height);
 		} else if (isInState(STATE_EXPANDED)) {
 			paletteContainer.setVisible(true);
 			paletteContainer.moveAbove(graphicalControl);
@@ -478,8 +480,8 @@
 			sash.setBounds(area.x + pWidth, area.y, sashWidth, area.height);
 			paletteContainer.setBounds(area.x, area.y, pWidth, area.height);
 			sash.setVisible(true);
-			graphicalControl.setBounds(area.x + sashWidth, area.y, area.width
-					- sashWidth, area.height);
+			graphicalControl.setBounds(area.x + sashWidth, area.y,
+					area.width - sashWidth, area.height);
 		} else if (isInState(STATE_PINNED_OPEN)) {
 			paletteContainer.setVisible(true);
 			sash.setBounds(area.x + pWidth, area.y, sashWidth, area.height);
@@ -500,7 +502,8 @@
 		});
 	}
 
-	private boolean restorePaletteState(PaletteViewer newPalette, IMemento state) {
+	private boolean restorePaletteState(PaletteViewer newPalette,
+			IMemento state) {
 		if (state != null) {
 			try {
 				return newPalette.restoreState(state);
@@ -803,7 +806,8 @@
 			// });
 
 			helper.addPaintListener(new PaintListener() {
-				public void paintControl(org.eclipse.swt.events.PaintEvent event) {
+				public void paintControl(
+						org.eclipse.swt.events.PaintEvent event) {
 					paintSash(event.gc);
 				};
 			});
@@ -882,18 +886,19 @@
 				gc.setForeground(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
 				gc.drawLine(1, 0, 1, bounds.height);
 
-				gc.setForeground(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+				gc.setForeground(
+						PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
 				gc.drawLine(2, 0, 2, bounds.height);
 			}
 		}
 
 		private void updateState() {
-			setCursor(isInState(STATE_EXPANDED | STATE_PINNED_OPEN) ? SharedCursors.SIZEWE
-					: null);
+			setCursor(isInState(STATE_EXPANDED | STATE_PINNED_OPEN)
+					? SharedCursors.SIZEWE : null);
 		}
 
-		private class SashDragManager extends MouseAdapter implements
-				MouseMoveListener {
+		private class SashDragManager extends MouseAdapter
+				implements MouseMoveListener {
 			protected boolean dragging = false;
 			protected boolean correctState = false;
 			protected boolean mouseDown = false;
@@ -972,8 +977,8 @@
 		}
 	}
 
-	private class TitleDragManager extends MouseAdapter implements Listener,
-			MouseTrackListener {
+	private class TitleDragManager extends MouseAdapter
+			implements Listener, MouseTrackListener {
 		protected boolean switchDock = false;
 		protected boolean dragging = false;
 		protected int threshold;
@@ -1012,7 +1017,10 @@
 																			// evt.y
 							Point pt = flyout.toControl(location.x, location.y);
 							switchDock = isDescendantOf(graphicalControl, ctrl)
-									&& ((dock == PositionConstants.WEST && pt.x > threshold - 10) || (dock == PositionConstants.EAST && pt.x < threshold + 10));
+									&& ((dock == PositionConstants.WEST
+											&& pt.x > threshold - 10)
+											|| (dock == PositionConstants.EAST
+													&& pt.x < threshold + 10));
 							boolean invalid = false;
 							if (!switchDock)
 								invalid = !isDescendantOf(
@@ -1032,12 +1040,14 @@
 							if (switchDock) {
 								if (dock == PositionConstants.EAST)
 									placeHolder = new Rectangle(0, 0,
-											origBounds.width, origBounds.height);
+											origBounds.width,
+											origBounds.height);
 								else
 									placeHolder = new Rectangle(
 											flyoutBounds.width
-													- origBounds.width, 0,
-											origBounds.width, origBounds.height);
+													- origBounds.width,
+											0, origBounds.width,
+											origBounds.height);
 								placeHolder = display.map(flyout, null,
 										placeHolder);
 							}
@@ -1045,8 +1055,10 @@
 							int cursor;
 							if (invalid)
 								cursor = DragCursors.INVALID;
-							else if ((!switchDock && dock == PositionConstants.EAST)
-									|| (switchDock && dock == PositionConstants.WEST))
+							else if ((!switchDock
+									&& dock == PositionConstants.EAST)
+									|| (switchDock
+											&& dock == PositionConstants.WEST))
 								cursor = DragCursors.RIGHT;
 							else
 								cursor = DragCursors.LEFT;
@@ -1059,7 +1071,8 @@
 							tracker.setCursor(DragCursors.getCursor(cursor));
 							// update the rectangle only if it has changed
 							if (!tracker.getRectangles()[0].equals(placeHolder))
-								tracker.setRectangles(new Rectangle[] { placeHolder });
+								tracker.setRectangles(
+										new Rectangle[] { placeHolder });
 						}
 					});
 				}
@@ -1140,8 +1153,8 @@
 				public void propertyChange(PropertyChangeEvent evt) {
 					if (evt.getPropertyName().equals(PROPERTY_STATE))
 						updateState();
-					else if (evt.getPropertyName().equals(
-							PROPERTY_DOCK_LOCATION))
+					else if (evt.getPropertyName()
+							.equals(PROPERTY_DOCK_LOCATION))
 						if (getVisible())
 							layout(true);
 				}
@@ -1215,8 +1228,8 @@
 				0, 2);
 
 		public TitleLabel(boolean isHorizontal) {
-			super(GEFMessages.get().Palette_Label, InternalImages
-					.get(InternalImages.IMG_PALETTE));
+			super(GEFMessages.get().Palette_Label,
+					InternalImages.get(InternalImages.IMG_PALETTE));
 			setLabelAlignment(PositionConstants.LEFT);
 			setBorder(BORDER);
 			Label tooltip = new Label(getText());
@@ -1238,14 +1251,15 @@
 			org.eclipse.draw2d.geometry.Rectangle r = org.eclipse.draw2d.geometry.Rectangle
 					.getSINGLETON();
 			r.setBounds(getBounds());
-			graphics.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+			graphics.setForegroundColor(
+					PaletteColorUtil.WIDGET_LIST_BACKGROUND);
 			graphics.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND);
 			graphics.fillGradient(r, true);
 
 			// draw bottom border
 			graphics.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
-			graphics.drawLine(r.getBottomLeft().getTranslated(0, -1), r
-					.getBottomRight().getTranslated(0, -1));
+			graphics.drawLine(r.getBottomLeft().getTranslated(0, -1),
+					r.getBottomRight().getTranslated(0, -1));
 
 			graphics.popState();
 
@@ -1258,8 +1272,8 @@
 				// We reduce the width by 1 because FigureUtilities grows it by
 				// 1 unnecessarily
 				textBounds.width--;
-				graphics.drawFocus(bounds.getResized(-1, -1).intersect(
-						textBounds.getExpanded(getInsets())));
+				graphics.drawFocus(bounds.getResized(-1, -1)
+						.intersect(textBounds.getExpanded(getInsets())));
 			}
 		}
 	}
@@ -1282,11 +1296,11 @@
 		private int getArrowDirection() {
 			int direction = PositionConstants.EAST;
 			if (isInState(STATE_EXPANDED | STATE_PINNED_OPEN))
-				direction = dock == PositionConstants.WEST ? PositionConstants.WEST
-						: PositionConstants.EAST;
+				direction = dock == PositionConstants.WEST
+						? PositionConstants.WEST : PositionConstants.EAST;
 			else
-				direction = dock == PositionConstants.WEST ? PositionConstants.EAST
-						: PositionConstants.WEST;
+				direction = dock == PositionConstants.WEST
+						? PositionConstants.EAST : PositionConstants.WEST;
 			if (isMirrored()) {
 				if (direction == PositionConstants.WEST)
 					direction = PositionConstants.EAST;
@@ -1323,8 +1337,8 @@
 					if (evt.getPropertyName().equals(PROPERTY_STATE)) {
 						b.setDirection(getArrowDirection());
 						setToolTipText(getButtonTooltipText());
-					} else if (evt.getPropertyName().equals(
-							PROPERTY_DOCK_LOCATION))
+					} else if (evt.getPropertyName()
+							.equals(PROPERTY_DOCK_LOCATION))
 						b.setDirection(getArrowDirection());
 				}
 			});
@@ -1370,8 +1384,10 @@
 
 				triangle = new Triangle();
 				triangle.setOutline(true);
-				triangle.setBackgroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
-				triangle.setForegroundColor(PaletteColorUtil.WIDGET_DARK_SHADOW);
+				triangle.setBackgroundColor(
+						PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+				triangle.setForegroundColor(
+						PaletteColorUtil.WIDGET_DARK_SHADOW);
 				setContents(triangle);
 			}
 
@@ -1398,15 +1414,17 @@
 				org.eclipse.draw2d.geometry.Rectangle r = org.eclipse.draw2d.geometry.Rectangle
 						.getSINGLETON();
 				r.setBounds(getBounds());
-				graphics.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+				graphics.setForegroundColor(
+						PaletteColorUtil.WIDGET_LIST_BACKGROUND);
 				graphics.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND);
 				graphics.fillGradient(r, true);
 				graphics.popState();
 
 				// draw bottom border
-				graphics.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
-				graphics.drawLine(r.getBottomLeft().getTranslated(0, -1), r
-						.getBottomRight().getTranslated(0, -1));
+				graphics.setForegroundColor(
+						PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+				graphics.drawLine(r.getBottomLeft().getTranslated(0, -1),
+						r.getBottomRight().getTranslated(0, -1));
 			}
 		}
 	}
diff --git a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalViewerKeyHandler.java b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalViewerKeyHandler.java
index fee0c40..deb23f7 100644
--- a/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalViewerKeyHandler.java
+++ b/bundles/org.eclipse.rap.gef/src/org/eclipse/gef/ui/parts/GraphicalViewerKeyHandler.java
@@ -124,9 +124,11 @@
 
 	boolean acceptScroll(KeyEvent event) {
 		return ((event.stateMask & SWT.CTRL) != 0
-				&& (event.stateMask & SWT.SHIFT) != 0 && (event.keyCode == SWT.ARROW_DOWN
-				|| event.keyCode == SWT.ARROW_LEFT
-				|| event.keyCode == SWT.ARROW_RIGHT || event.keyCode == SWT.ARROW_UP));
+				&& (event.stateMask & SWT.SHIFT) != 0
+				&& (event.keyCode == SWT.ARROW_DOWN
+						|| event.keyCode == SWT.ARROW_LEFT
+						|| event.keyCode == SWT.ARROW_RIGHT
+						|| event.keyCode == SWT.ARROW_UP));
 	}
 
 	/**
@@ -156,8 +158,8 @@
 		while (counter < 0)
 			counter += connections.size();
 		counter %= connections.size();
-		return (ConnectionEditPart) connections.get(counter
-				% connections.size());
+		return (ConnectionEditPart) connections
+				.get(counter % connections.size());
 	}
 
 	private List getValidNavigationTargets(List candidateEditParts) {
@@ -279,7 +281,7 @@
 	 * @since 3.4
 	 */
 	protected boolean isViewerMirrored() {
-		return (viewer.getControl().getStyle() & org.eclipse.draw2d.rap.swt.SWT.MIRRORED) != 0;
+		return (viewer.getControl().getStyle() & SWT.MIRRORED) != 0;
 	}
 
 	/**
@@ -316,15 +318,13 @@
 
 		switch (event.keyCode) {
 		case SWT.ARROW_LEFT:
-			if (navigateNextSibling(event,
-					isViewerMirrored() ? PositionConstants.EAST
-							: PositionConstants.WEST))
+			if (navigateNextSibling(event, isViewerMirrored()
+					? PositionConstants.EAST : PositionConstants.WEST))
 				return true;
 			break;
 		case SWT.ARROW_RIGHT:
-			if (navigateNextSibling(event,
-					isViewerMirrored() ? PositionConstants.WEST
-							: PositionConstants.EAST))
+			if (navigateNextSibling(event, isViewerMirrored()
+					? PositionConstants.WEST : PositionConstants.EAST))
 				return true;
 			break;
 		case SWT.ARROW_UP:
@@ -364,9 +364,8 @@
 		GraphicalEditPart node = getCachedNode();
 		if (focus instanceof ConnectionEditPart) {
 			current = (ConnectionEditPart) focus;
-			if (node == null
-					|| (node != current.getSource() && node != current
-							.getTarget())) {
+			if (node == null || (node != current.getSource()
+					&& node != current.getTarget())) {
 				node = (GraphicalEditPart) current.getSource();
 				counter = 0;
 			}