Commits

Anonymous committed 9aca2fa

arcs are corrected imports are organized

Comments (0)

Files changed (74)

src/nl/tudelft/lime/LimeContextMenuProvider.java

 import org.eclipse.gef.EditPartViewer;
 import org.eclipse.gef.ui.actions.ActionRegistry;
 import org.eclipse.gef.ui.actions.GEFActionConstants;
-
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
-
 import org.eclipse.ui.actions.ActionFactory;
 
 

src/nl/tudelft/lime/LimeCreationWizard.java

 
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
-
 import org.eclipse.ui.INewWizard;
 import org.eclipse.ui.IWorkbench;
 

src/nl/tudelft/lime/actions/FlyoutChangeLayoutAction.java

 import nl.tudelft.lime.model.component.LimeDiagram;
 
 import org.eclipse.jface.action.Action;
-
 import org.eclipse.ui.IEditorPart;
 
 

src/nl/tudelft/lime/actions/LimeActionBarContributor.java

 import nl.tudelft.lime.model.component.LimeComponent;
 
 import org.eclipse.draw2d.PositionConstants;
-
 import org.eclipse.gef.editparts.ZoomManager;
 import org.eclipse.gef.internal.GEFMessages;
 import org.eclipse.gef.ui.actions.ActionBarContributor;
 import org.eclipse.gef.ui.actions.ZoomComboContributionItem;
 import org.eclipse.gef.ui.actions.ZoomInRetargetAction;
 import org.eclipse.gef.ui.actions.ZoomOutRetargetAction;
-
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.resource.ImageDescriptor;
-
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.actions.ActionFactory;

src/nl/tudelft/lime/actions/LimePasteTemplateAction.java

 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.GraphicalEditPart;
-
 import org.eclipse.ui.IEditorPart;
 
 

src/nl/tudelft/lime/actions/LimePrintAction.java

  *******************************************************************************/
 package nl.tudelft.lime.actions;
 
+import java.io.InputStream;
+
 import nl.tudelft.lime.edit.GraphicalPartFactory;
 
 import org.eclipse.core.resources.IFile;
-
 import org.eclipse.gef.DefaultEditDomain;
 import org.eclipse.gef.GraphicalViewer;
 import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
 import org.eclipse.gef.print.PrintGraphicalViewerOperation;
 import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
-
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.printing.PrintDialog;
 import org.eclipse.swt.printing.Printer;
 import org.eclipse.swt.printing.PrinterData;
 import org.eclipse.swt.widgets.Shell;
-
 import org.eclipse.ui.IObjectActionDelegate;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.PlatformUI;
 
-import java.io.InputStream;
-
 
 /**
  * @author Eric Bordeau

src/nl/tudelft/lime/actions/PasteTemplateAction.java

  *******************************************************************************/
 package nl.tudelft.lime.actions;
 
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.gef.commands.Command;
 import org.eclipse.gef.requests.CreateRequest;
 import org.eclipse.gef.requests.CreationFactory;
 import org.eclipse.gef.ui.actions.Clipboard;
 import org.eclipse.gef.ui.actions.SelectionAction;
-
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.actions.ActionFactory;
 
-import java.util.List;
-
 
 /**
  * If the current object on the clipboard is a valid template, this action will paste

src/nl/tudelft/lime/actions/PrintModeDialog.java

 import nl.tudelft.lime.constants.LimeMessages;
 
 import org.eclipse.draw2d.PrintFigureOperation;
-
 import org.eclipse.jface.dialogs.Dialog;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;

src/nl/tudelft/lime/constants/SystemSettings.java

   public static final String PropertyDescriptor_Port_Const_ID = "PortConstID";
   public static final String PropertyDescriptor_Port_Constp_ID = "PortConstpID";
   public static final String PropertyDescriptor_Location_ID = "LocationID";
-  public static final String PropertyDescriptor_Label_Context_ID = "ContextID";
+  public static final String PropertyDescriptor_Code_Fragment_Context_ID = "ContextID";
   public static final String PropertyDescriptor_Port_Restrict_ID = "RestrictID";
   public static final String PropertyDescriptor_Port_Size_ID = "PortSizeID";
   public static final String PropertyDescriptor_Port_Static_ID = "StaticID";
   public static String DIMENSION_TAG;
   public static String ID_ATTRIBUTE;
   public static String VALUE_ATTRIBUTE;
+
+  public static String CODE_FRAGMENT_DEFAULT_CONTEXT;
+  public static String ARC_DEFAULT_TYPE;
+  public static String PORT_DEFAULT_SIZE;
   //Normal Icons Path
   public static String Component_Normal_Icon_Path;
   public static String Input_Port_Normal_Icon_Path;

src/nl/tudelft/lime/dnd/FileTransferDragSourceListener.java

 import nl.tudelft.lime.edit.editpart.LimeCodeFragmentEditPart;
 
 import org.eclipse.gef.EditPartViewer;
-
 import org.eclipse.swt.dnd.DragSourceEvent;
 import org.eclipse.swt.dnd.TextTransfer;
 import org.eclipse.swt.dnd.Transfer;

src/nl/tudelft/lime/dnd/TextTransferDropTargetListener.java

 import org.eclipse.gef.EditPartViewer;
 import org.eclipse.gef.Request;
 import org.eclipse.gef.dnd.AbstractTransferDropTargetListener;
-
 import org.eclipse.swt.dnd.Transfer;
 
 

src/nl/tudelft/lime/edit/CodeFragmentCellEditorLocator.java

  *******************************************************************************/
 package nl.tudelft.lime.edit;
 
-import nl.tudelft.lime.figures.StickyNoteFigure;
+import nl.tudelft.lime.figures.codefragment.CodeFragmentFigure;
 
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.tools.CellEditorLocator;
-
 import org.eclipse.jface.viewers.CellEditor;
-
 import org.eclipse.swt.widgets.Text;
 
 
 final public class CodeFragmentCellEditorLocator implements CellEditorLocator {
-    private StickyNoteFigure stickyNote;
+    private CodeFragmentFigure stickyNote;
 
-    public CodeFragmentCellEditorLocator(StickyNoteFigure stickyNote) {
+    public CodeFragmentCellEditorLocator(CodeFragmentFigure stickyNote) {
         setLabel(stickyNote);
     }
 
     /**
      * Returns the stickyNote figure.
      */
-    protected StickyNoteFigure getLabel() {
+    protected CodeFragmentFigure getLabel() {
         return stickyNote;
     }
 
      * Sets the Sticky note figure.
      * @param stickyNote The stickyNote to set
      */
-    protected void setLabel(StickyNoteFigure stickyNote) {
+    protected void setLabel(CodeFragmentFigure stickyNote) {
         this.stickyNote = stickyNote;
     }
 }

src/nl/tudelft/lime/edit/GraphicalPartFactory.java

 import nl.tudelft.lime.edit.editpart.ArcEditPart;
 import nl.tudelft.lime.edit.editpart.AssociationEditPart;
 import nl.tudelft.lime.edit.editpart.ComponentEditPart;
+import nl.tudelft.lime.edit.editpart.LimeCodeFragmentEditPart;
 import nl.tudelft.lime.edit.editpart.LimeDiagramEditPart;
-import nl.tudelft.lime.edit.editpart.LimeCodeFragmentEditPart;
 import nl.tudelft.lime.edit.editpart.PortEditPart;
 import nl.tudelft.lime.model.codefragment.LimeCodeFragment;
 import nl.tudelft.lime.model.component.LimeComponent;

src/nl/tudelft/lime/edit/LimeCodeFragmentEditManager.java

  *******************************************************************************/
 package nl.tudelft.lime.edit;
 
-import nl.tudelft.lime.figures.StickyNoteFigure;
+import nl.tudelft.lime.figures.codefragment.CodeFragmentFigure;
 
 import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.gef.editparts.ZoomListener;
 import org.eclipse.gef.editparts.ZoomManager;
 import org.eclipse.gef.tools.CellEditorLocator;
 import org.eclipse.gef.tools.DirectEditManager;
-
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.TextCellEditor;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
-
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.ActionFactory;
 
     protected void initCellEditor() {
         // update text
-        StickyNoteFigure stickyNote = (StickyNoteFigure) getEditPart()
+        CodeFragmentFigure stickyNote = (CodeFragmentFigure) getEditPart()
                                                              .getFigure();
         getCellEditor().setValue(stickyNote.getText());
 

src/nl/tudelft/lime/edit/editpart/ArcEditPart.java

 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+
 import nl.tudelft.lime.figures.FigureFactory;
 import nl.tudelft.lime.figures.connection.ArcFigure;
 import nl.tudelft.lime.model.connection.Arc;
 
 import org.eclipse.draw2d.IFigure;
 
-import java.beans.PropertyChangeEvent;
-
 
 /**
  * Implements a Connection Editpart to represnt a arclike

src/nl/tudelft/lime/edit/editpart/ComponentEditPart.java

  *******************************************************************************/
 package nl.tudelft.lime.edit.editpart;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+
 import nl.tudelft.lime.edit.policy.ContainerHighlightEditPolicy;
 import nl.tudelft.lime.edit.policy.LimeXYLayoutEditPolicy;
 import nl.tudelft.lime.figures.FigureFactory;
 import org.eclipse.draw2d.XYLayout;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.AccessibleAnchorProvider;
 import org.eclipse.gef.AutoexposeHelper;
 import org.eclipse.gef.EditPolicy;
 import org.eclipse.gef.editparts.ViewportExposeHelper;
 import org.eclipse.gef.editparts.ViewportMouseWheelHelper;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
 
 /**
  * Holds a circuit, which is a container capable of

src/nl/tudelft/lime/edit/editpart/ConnectionEditPart.java

  */
 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.edit.policy.ArcBendpointEditPolicy;
 import nl.tudelft.lime.edit.policy.ArcEditPolicy;
 
 import org.eclipse.draw2d.ManhattanConnectionRouter;
 import org.eclipse.draw2d.RelativeBendpoint;
-
 import org.eclipse.gef.AccessibleEditPart;
 import org.eclipse.gef.EditPolicy;
 import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-
 import org.eclipse.swt.accessibility.AccessibleEvent;
 
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import java.util.ArrayList;
-import java.util.List;
-
 
 /**
  * @author af08018

src/nl/tudelft/lime/edit/editpart/LimeCodeFragmentEditPart.java

  *******************************************************************************/
 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.edit.CodeFragmentCellEditorLocator;
 import nl.tudelft.lime.edit.LimeCodeFragmentEditManager;
 import nl.tudelft.lime.edit.policy.CodeFragmentDirectEditPolicy;
 import nl.tudelft.lime.edit.policy.CodeFragmentEditPolicy;
-import nl.tudelft.lime.figures.StickyNoteFigure;
+import nl.tudelft.lime.figures.codefragment.CodeFragmentFigure;
 import nl.tudelft.lime.model.codefragment.LimeCodeFragment;
 
 import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-
 import org.eclipse.gef.AccessibleEditPart;
 import org.eclipse.gef.EditPolicy;
 import org.eclipse.gef.Request;
 import org.eclipse.gef.RequestConstants;
-
 import org.eclipse.swt.accessibility.AccessibleControlEvent;
 import org.eclipse.swt.accessibility.AccessibleEvent;
 
-import java.beans.PropertyChangeEvent;
-
 
 public class LimeCodeFragmentEditPart extends LimeEditPart {
     protected AccessibleEditPart createAccessible() {
     }
 
     protected IFigure createFigure() {
-        StickyNoteFigure label = new StickyNoteFigure();
-        label.setSize(new Dimension(150, 50));
-
+        CodeFragmentFigure label = new CodeFragmentFigure();
         return label;
     }
 
 
     private void performDirectEdit() {
         new LimeCodeFragmentEditManager(this,
-            new CodeFragmentCellEditorLocator((StickyNoteFigure) getFigure())).show();
+            new CodeFragmentCellEditorLocator((CodeFragmentFigure) getFigure())).show();
     }
 
     public void performRequest(Request request) {
     }
 
     protected void refreshVisuals() {
-        ((StickyNoteFigure) getFigure()).setText(getLimeLabel()
+        ((CodeFragmentFigure) getFigure()).setText(getLimeLabel()
                                                      .getLabelContents());
         super.refreshVisuals();
     }

src/nl/tudelft/lime/edit/editpart/LimeContainerEditPart.java

 package nl.tudelft.lime.edit.editpart;
 
+import java.util.List;
+
 import nl.tudelft.lime.edit.policy.LimeContainerEditPolicy;
 import nl.tudelft.lime.model.component.LimeDiagram;
 
 import org.eclipse.gef.AccessibleEditPart;
 import org.eclipse.gef.EditPolicy;
-
 import org.eclipse.swt.accessibility.AccessibleEvent;
 
-import java.util.List;
-
 
 /**
  * Provides support for Container EditParts.

src/nl/tudelft/lime/edit/editpart/LimeContainerTreeEditPart.java

  *******************************************************************************/
 package nl.tudelft.lime.edit.editpart;
 
+import java.util.List;
+
 import nl.tudelft.lime.edit.policy.LimeContainerEditPolicy;
 import nl.tudelft.lime.edit.policy.LimeTreeContainerEditPolicy;
 import nl.tudelft.lime.model.component.LimeDiagram;
 import org.eclipse.gef.RootEditPart;
 import org.eclipse.gef.editpolicies.RootComponentEditPolicy;
 
-import java.util.List;
-
 
 /**
  * Tree EditPart for the Container.

src/nl/tudelft/lime/edit/editpart/LimeDiagramEditPart.java

  *******************************************************************************/
 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.edit.policy.LimeXYLayoutEditPolicy;
 import nl.tudelft.lime.layout.DelegatingLayoutManager;
 import org.eclipse.draw2d.MarginBorder;
 import org.eclipse.draw2d.ShortestPathConnectionRouter;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.AccessibleEditPart;
 import org.eclipse.gef.CompoundSnapToHelper;
 import org.eclipse.gef.ConnectionEditPart;
 import org.eclipse.gef.rulers.RulerProvider;
 import org.eclipse.gef.tools.DeselectAllTracker;
 import org.eclipse.gef.tools.MarqueeDragTracker;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.AccessibleEvent;
 
-import java.beans.PropertyChangeEvent;
-
-import java.util.ArrayList;
-import java.util.EventObject;
-import java.util.List;
-
 
 /**
  * Holds all other LimeEditParts under this. It is

src/nl/tudelft/lime/edit/editpart/LimeEditPart.java

 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.List;
+
 import nl.tudelft.lime.edit.policy.ElementEditPolicy;
 import nl.tudelft.lime.edit.policy.LimeNodeEditPolicy;
 import nl.tudelft.lime.figures.NodeFigure;
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.AccessibleEditPart;
 import org.eclipse.gef.ConnectionEditPart;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
 import org.eclipse.gef.requests.DropRequest;
 
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import java.util.List;
-
 
 /**
  * Porvides support for

src/nl/tudelft/lime/edit/editpart/LimeTreeEditPart.java

  *******************************************************************************/
 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Collections;
+import java.util.List;
+
 import nl.tudelft.lime.edit.policy.ElementEditPolicy;
 import nl.tudelft.lime.edit.policy.LimeTreeEditPolicy;
 import nl.tudelft.lime.model.LimeSubpart;
 
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.EditPolicy;
-
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;
 
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import java.util.Collections;
-import java.util.List;
-
 
 /**
  * EditPart for Lime components in the Tree.

src/nl/tudelft/lime/edit/editpart/PortEditPart.java

 package nl.tudelft.lime.edit.editpart;
 
+import java.beans.PropertyChangeEvent;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+
 import nl.tudelft.lime.figures.FigureFactory;
 import nl.tudelft.lime.model.port.Port;
 
 import org.eclipse.draw2d.ConnectionAnchor;
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.gef.AccessibleAnchorProvider;
 import org.eclipse.gef.AccessibleEditPart;
-
 import org.eclipse.swt.accessibility.AccessibleEvent;
 
-import java.beans.PropertyChangeEvent;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
 
 /**
  * EditPart which is used in Ports

src/nl/tudelft/lime/edit/policy/ArcBendpointEditPolicy.java

 
 import org.eclipse.draw2d.Connection;
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.gef.commands.Command;
 import org.eclipse.gef.requests.BendpointRequest;
 

src/nl/tudelft/lime/edit/policy/CodeFragmentDirectEditPolicy.java

 package nl.tudelft.lime.edit.policy;
 
 import nl.tudelft.lime.edit.editpart.LimeCodeFragmentEditPart;
-import nl.tudelft.lime.figures.StickyNoteFigure;
+import nl.tudelft.lime.figures.codefragment.CodeFragmentFigure;
 import nl.tudelft.lime.model.codefragment.LimeCodeFragment;
 import nl.tudelft.lime.model.commands.LimeCodeFragmentCommand;
 
      */
     protected void showCurrentEditValue(DirectEditRequest request) {
         String value = (String) request.getCellEditor().getValue();
-        ((StickyNoteFigure) getHostFigure()).setText(value);
+        ((CodeFragmentFigure) getHostFigure()).setText(value);
         //hack to prevent async layout from placing the cell editor twice.
         getHostFigure().getUpdateManager().performUpdate();
     }

src/nl/tudelft/lime/edit/policy/ConnectionWhileEditingEditPolicy.java

 
 import org.eclipse.draw2d.Graphics;
 import org.eclipse.draw2d.PolylineConnection;
-
 import org.eclipse.gef.GraphicalEditPart;
 
 

src/nl/tudelft/lime/edit/policy/ContainerHighlightEditPolicy.java

 import nl.tudelft.lime.figures.LimeColorConstants;
 
 import org.eclipse.draw2d.IFigure;
-
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.Request;
 import org.eclipse.gef.RequestConstants;
-
 import org.eclipse.swt.graphics.Color;
 
 

src/nl/tudelft/lime/edit/policy/LimeContainerEditPolicy.java

 package nl.tudelft.lime.edit.policy;
 
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.model.LimeSubpart;
 import nl.tudelft.lime.model.commands.OrphanChildCommand;
 import org.eclipse.gef.requests.CreateRequest;
 import org.eclipse.gef.requests.GroupRequest;
 
-import java.util.List;
-
 
 public class LimeContainerEditPolicy extends ContainerEditPolicy {
     protected Command getCreateCommand(CreateRequest request) {

src/nl/tudelft/lime/edit/policy/LimeDiagramXYLayoutPolicy.java

 
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.gef.Request;

src/nl/tudelft/lime/edit/policy/LimeNodeEditPolicy.java

 import org.eclipse.draw2d.ConnectionAnchor;
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.PolylineConnection;
-
 import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.gef.LayerConstants;
 import org.eclipse.gef.Request;

src/nl/tudelft/lime/edit/policy/LimeTreeContainerEditPolicy.java

 package nl.tudelft.lime.edit.policy;
 
+import java.util.List;
+
 import nl.tudelft.lime.model.LimeSubpart;
 import nl.tudelft.lime.model.commands.CreateCommand;
 import nl.tudelft.lime.model.commands.ReorderPartCommand;
 
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.commands.Command;
 import org.eclipse.gef.commands.CompoundCommand;
 import org.eclipse.gef.requests.ChangeBoundsRequest;
 import org.eclipse.gef.requests.CreateRequest;
 
-import java.util.List;
-
 
 /**
  * Displays the outline tree in the outline view

src/nl/tudelft/lime/edit/policy/LimeXYLayoutEditPolicy.java

 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.edit.editpart.LimeCodeFragmentEditPart;
 import nl.tudelft.lime.figures.LimeColorConstants;
-import nl.tudelft.lime.figures.StickyNoteFigure;
+import nl.tudelft.lime.figures.codefragment.CodeFragmentFigure;
 import nl.tudelft.lime.figures.component.ComponentFigure;
 import nl.tudelft.lime.model.LimeGuide;
 import nl.tudelft.lime.model.LimeSubpart;
         if (createRequest.getNewObject() instanceof LimeComponent) {
             figure = new ComponentFigure();
         } else if (createRequest.getNewObject() instanceof LimeCodeFragment) {
-            figure = new StickyNoteFigure();
+            figure = new CodeFragmentFigure();
         } else {
             figure = new RectangleFigure();
             ((RectangleFigure) figure).setXOR(true);

src/nl/tudelft/lime/edit/policy/WhileDraggingEditPolicy.java

 
 import nl.tudelft.lime.figures.LimeColorConstants;
 import nl.tudelft.lime.figures.NodeFigure;
-import nl.tudelft.lime.figures.StickyNoteFigure;
+import nl.tudelft.lime.figures.codefragment.CodeFragmentFigure;
 import nl.tudelft.lime.figures.component.ComponentFigure;
 import nl.tudelft.lime.figures.port.InputPortFigure;
 import nl.tudelft.lime.figures.port.OutputPortFigure;
         if (modelPart instanceof LimeComponent) {
             figure = new ComponentFigure();
         } else if (modelPart instanceof LimeCodeFragment) {
-            figure = new StickyNoteFigure();
+            figure = new CodeFragmentFigure();
         } else if (modelPart instanceof InputPort) {
             figure = new InputPortFigure();
         } else if (modelPart instanceof OutputPort) {

src/nl/tudelft/lime/figures/BentCornerFigure.java

-/**
- * Based on Logic Diagram Example from IBM
- */
-package nl.tudelft.lime.figures;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
-
-
-/**
- * A figure that has a bent corner in the top right hand. Typically used for sticky notes.
- */
-public class BentCornerFigure extends Figure {
-    /**
-     * The default amount of pixels subtracted from the figure's height and width to determine
-     * the size of the corner.
-     */
-    protected static int DEFAULT_CORNER_SIZE = 10;
-    private int cornerSize;
-
-    /**
-     * Constructs an empty BentCornerFigure with default background color of
-     * ColorConstants.tooltipBackground and default corner size.
-     */
-    public BentCornerFigure() {
-        setBackgroundColor(ColorConstants.tooltipBackground);
-        setForegroundColor(ColorConstants.tooltipForeground);
-        setCornerSize(DEFAULT_CORNER_SIZE);
-    }
-
-    /**
-     * Returns the size, in pixels, that the figure should use to draw its bent corner.
-     *
-     * @return size of the corner
-     */
-    public int getCornerSize() {
-        return cornerSize;
-    }
-
-    /**
-     * @see org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)
-     */
-    protected void paintFigure(Graphics graphics) {
-        Rectangle rect = getBounds().getCopy();
-
-        graphics.translate(getLocation());
-
-        // fill the note
-        PointList outline = new PointList();
-
-        outline.addPoint(0, 0);
-        outline.addPoint(rect.width - cornerSize, 0);
-        outline.addPoint(rect.width - 1, cornerSize);
-        outline.addPoint(rect.width - 1, rect.height - 1);
-        outline.addPoint(0, rect.height - 1);
-
-        graphics.fillPolygon(outline);
-
-        // draw the inner outline
-        PointList innerLine = new PointList();
-
-        innerLine.addPoint(rect.width - cornerSize - 1, 0);
-        innerLine.addPoint(rect.width - cornerSize - 1, cornerSize);
-        innerLine.addPoint(rect.width - 1, cornerSize);
-        innerLine.addPoint(rect.width - cornerSize - 1, 0);
-        innerLine.addPoint(0, 0);
-        innerLine.addPoint(0, rect.height - 1);
-        innerLine.addPoint(rect.width - 1, rect.height - 1);
-        innerLine.addPoint(rect.width - 1, cornerSize);
-
-        graphics.drawPolygon(innerLine);
-
-        graphics.translate(getLocation().getNegated());
-    }
-
-    /**
-     * Sets the size of the figure's corner to the given offset.
-     *
-     * @param newSize the new size to use.
-     */
-    public void setCornerSize(int newSize) {
-        cornerSize = newSize;
-    }
-}

src/nl/tudelft/lime/figures/FigureUtility.java

 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Font;
 
         int xLoc = r.getCenter().x - ((textGraphicalSize.width) / 2);
         int yLoc = r.getCenter().y - (textGraphicalSize.height / 2);
 
+        if (xLoc < 0) xLoc = 0;
+        if (yLoc < 0) yLoc = 0;
         return new Point(xLoc, yLoc);
     }
 
      * @param textLength
      * @return
      */
-    static Dimension getTextSize(Graphics g, int textLength) {
+    public static Dimension getTextSize(Graphics g, int textLength) {
         final int SINGLE_CHAR_WIDTH = g.getFontMetrics().getAverageCharWidth();
         final int SINGLE_CHAR_HEIGHT = g.getFontMetrics().getHeight();
 
     public static void setDefaultFont(Font newFont) {
         DEFAULT_FONT = newFont;
     }
+
 }

src/nl/tudelft/lime/figures/NodeFigure.java

 package nl.tudelft.lime.figures;
 
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
 import org.eclipse.draw2d.ConnectionAnchor;
 import org.eclipse.draw2d.Figure;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
 
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
 
 public class NodeFigure extends Figure {
     public static final String BOUNDS = "BOUNDS";

src/nl/tudelft/lime/figures/StickyNoteFigure.java

-package nl.tudelft.lime.figures;
-
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.text.FlowPage;
-import org.eclipse.draw2d.text.ParagraphTextLayout;
-import org.eclipse.draw2d.text.TextFlow;
-
-
-/**
- * A Figure with a bent corner and an embedded TextFlow within a FlowPage that contains
- * text.
- */
-public class StickyNoteFigure extends BentCornerFigure {
-    /** The inner TextFlow **/
-    private TextFlow textFlow;
-
-    /**
-     *  Creates a new StickyNoteFigure with a default MarginBorder size of DEFAULT_CORNER_SIZE
-     *  - 3 and a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
-     */
-    public StickyNoteFigure() {
-        this(BentCornerFigure.DEFAULT_CORNER_SIZE - 3);
-    }
-
-    /**
-     * Creates a new StickyNoteFigure with a MarginBorder that is the given size and a
-     * FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
-     *
-     * @param borderSize the size of the MarginBorder
-     */
-    public StickyNoteFigure(int borderSize) {
-        setBorder(new MarginBorder(borderSize));
-
-        FlowPage flowPage = new FlowPage();
-
-        textFlow = new TextFlow();
-
-        textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
-                ParagraphTextLayout.WORD_WRAP_SOFT));
-
-        flowPage.add(textFlow);
-
-        setLayoutManager(new StackLayout());
-        add(flowPage);
-    }
-
-    /**
-     * Returns the text inside the TextFlow.
-     *
-     * @return the text flow inside the text.
-     */
-    public String getText() {
-        return textFlow.getText();
-    }
-
-    /**
-     * Sets the text of the TextFlow to the given value.
-     *
-     * @param newText the new text value.
-     */
-    public void setText(String newText) {
-        textFlow.setText(newText);
-    }
-}

src/nl/tudelft/lime/figures/codefragment/BentCornerFigure.java

+/**
+ * Based on Logic Diagram Example from IBM
+ */
+package nl.tudelft.lime.figures.codefragment;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+/**
+ * A figure that has a bent corner in the top right hand. Typically used for sticky notes.
+ */
+public class BentCornerFigure extends Figure {
+    /**
+     * The default amount of pixels subtracted from the figure's height and width to determine
+     * the size of the corner.
+     */
+    protected static int DEFAULT_CORNER_SIZE = 10;
+    private int cornerSize;
+
+    /**
+     * Constructs an empty BentCornerFigure with default background color of
+     * ColorConstants.tooltipBackground and default corner size.
+     */
+    public BentCornerFigure() {
+        setBackgroundColor(ColorConstants.tooltipBackground);
+        setForegroundColor(ColorConstants.tooltipForeground);
+        setCornerSize(DEFAULT_CORNER_SIZE);
+    }
+
+    /**
+     * Returns the size, in pixels, that the figure should use to draw its bent corner.
+     *
+     * @return size of the corner
+     */
+    public int getCornerSize() {
+        return cornerSize;
+    }
+
+    /**
+     * @see org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)
+     */
+    protected void paintFigure(Graphics graphics) {
+        Rectangle rect = getBounds().getCopy();
+
+        graphics.translate(getLocation());
+
+        // fill the note
+        PointList outline = new PointList();
+
+        outline.addPoint(0, 0);
+        outline.addPoint(rect.width - cornerSize, 0);
+        outline.addPoint(rect.width - 1, cornerSize);
+        outline.addPoint(rect.width - 1, rect.height - 1);
+        outline.addPoint(0, rect.height - 1);
+
+        graphics.fillPolygon(outline);
+
+        // draw the inner outline
+        PointList innerLine = new PointList();
+
+        innerLine.addPoint(rect.width - cornerSize - 1, 0);
+        innerLine.addPoint(rect.width - cornerSize - 1, cornerSize);
+        innerLine.addPoint(rect.width - 1, cornerSize);
+        innerLine.addPoint(rect.width - cornerSize - 1, 0);
+        innerLine.addPoint(0, 0);
+        innerLine.addPoint(0, rect.height - 1);
+        innerLine.addPoint(rect.width - 1, rect.height - 1);
+        innerLine.addPoint(rect.width - 1, cornerSize);
+
+        graphics.drawPolygon(innerLine);
+
+        graphics.translate(getLocation().getNegated());
+    }
+
+    /**
+     * Sets the size of the figure's corner to the given offset.
+     *
+     * @param newSize the new size to use.
+     */
+    public void setCornerSize(int newSize) {
+        cornerSize = newSize;
+    }
+}

src/nl/tudelft/lime/figures/codefragment/CodeFragmentFigure.java

+package nl.tudelft.lime.figures.codefragment;
+
+
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.draw2d.text.ParagraphTextLayout;
+import org.eclipse.draw2d.text.TextFlow;
+
+
+/**
+ * A Figure with a bent corner and an embedded TextFlow within a FlowPage that contains
+ * text.
+ */
+public class CodeFragmentFigure extends BentCornerFigure {
+    protected static final Dimension SIZE = new Dimension(150, -1);
+    /** The inner TextFlow **/
+    private TextFlow textFlow;
+
+    /**
+     *  Creates a new StickyNoteFigure with a default MarginBorder size of DEFAULT_CORNER_SIZE
+     *  - 3 and a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
+     */
+    public CodeFragmentFigure() {
+        this(BentCornerFigure.DEFAULT_CORNER_SIZE - 3);
+        setSize(SIZE);
+    }
+
+    /**
+     * Creates a new StickyNoteFigure with a MarginBorder that is the given size and a
+     * FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
+     *
+     * @param borderSize the size of the MarginBorder
+     */
+    public CodeFragmentFigure(int borderSize) {
+        setBorder(new MarginBorder(borderSize));
+
+        FlowPage flowPage = new FlowPage();
+
+        textFlow = new TextFlow();
+
+        textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
+                ParagraphTextLayout.WORD_WRAP_SOFT));
+
+        flowPage.add(textFlow);
+
+        setLayoutManager(new StackLayout());
+        add(flowPage);
+    }
+
+    
+    /**
+     * Returns the text inside the TextFlow.
+     *
+     * @return the text flow inside the text.
+     */
+    public String getText() {
+        return textFlow.getText();
+    }
+
+    /**
+     * Sets the text of the TextFlow to the given value.
+     *
+     * @param newText the new text value.
+     */
+    public void setText(String newText) {
+        textFlow.setText(newText);
+    }
+}

src/nl/tudelft/lime/figures/component/ComponentFigure.java

 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Insets;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.handles.HandleBounds;
 
 

src/nl/tudelft/lime/figures/connection/ArcFigure.java

 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.PointList;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.swt.graphics.Color;
 
 
     @Override
     public void paintFigure(Graphics graphics) {
         super.paintFigure(graphics);
-
         PointList points = getPoints();
-
         //we have at least two points - we assume that we would use the last two points as text show
         Point firstPoint = points.getPoint(points.size() - 2);
         Point secondPoint = points.getPoint(points.size() - 1);
 
         graphics.setFont(FigureUtility.DEFAULT_FONT);
 
+        Dimension textSize = FigureUtility.getTextSize(graphics, this.typeName.length());
+        //padding for the text compartment
+        textSize.height += 2;
+        textSize.width += 5;
+        
+        if (getBounds().width < textSize.width)
+        	getBounds().expand(textSize.width - getBounds().width, 0);
+
         Point p = FigureUtility.centeredTextLocation(graphics, r,
                 this.typeName.length());
-
+        if (p.x < getBounds().x) p.x = getBounds().x;
+        
+//		Dimension prefferedSize = textSize.union(bounds.getSize());
+//        setBounds(new Rectangle(bounds.getLocation(), prefferedSize));
+        
         graphics.setBackgroundColor(new Color(null, 255, 255, 255));
-        graphics.drawString(this.typeName, p);
+        graphics.fillRectangle(new Rectangle(p, textSize));
+        graphics.drawRectangle((new Rectangle(p, textSize.shrink(1, 0))));
+        graphics.drawString(this.typeName, p.x + 4, p.y);
         invalidate();
     }
 }

src/nl/tudelft/lime/figures/connection/AssociationFigure.java

 
 import org.eclipse.draw2d.PolygonDecoration;
 import org.eclipse.draw2d.PolylineConnection;
-
 import org.eclipse.swt.SWT;
 
 

src/nl/tudelft/lime/figures/port/OutputPortFigure.java

 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.swt.SWT;
 
 

src/nl/tudelft/lime/layout/ClusterEdgeCreator.java

  */
 package nl.tudelft.lime.layout;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 import org.eclipse.draw2d.graph.DirectedGraph;
 import org.eclipse.draw2d.graph.Edge;
 import org.eclipse.draw2d.graph.EdgeList;
 import org.eclipse.draw2d.graph.Node;
 import org.eclipse.draw2d.graph.NodeList;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 
 /**
  * Creates dummy edges between nodes, to be used with NodeJoiningDirectedGraphLayout

src/nl/tudelft/lime/layout/DelegatingLayoutManager.java

 package nl.tudelft.lime.layout;
 
+import java.util.Map;
+
 import nl.tudelft.lime.edit.editpart.LimeDiagramEditPart;
 import nl.tudelft.lime.model.component.LimeDiagram;
 
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Rectangle;
 
-import java.util.Map;
-
 
 /**
  * Used to delegate between the GraphyLayoutManager and the GraphXYLayout classes

src/nl/tudelft/lime/layout/DummyEdgeCreator.java

  */
 package nl.tudelft.lime.layout;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
 import org.eclipse.draw2d.graph.DirectedGraph;
 import org.eclipse.draw2d.graph.Edge;
 import org.eclipse.draw2d.graph.EdgeList;
 import org.eclipse.draw2d.graph.Node;
 import org.eclipse.draw2d.graph.NodeList;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
 
 /**
  * Creates dummy edges between nodes, to be used with NodeJoiningDirectedGraphLayout

src/nl/tudelft/lime/layout/GraphAnimation.java

  */
 package nl.tudelft.lime.layout;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 import org.eclipse.draw2d.Connection;
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.Viewport;
 import org.eclipse.draw2d.geometry.PointList;
 import org.eclipse.draw2d.geometry.Rectangle;
 
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Common Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 
 /**
  * GraphAnimation class lifted directly from the GEF flow example. The only

src/nl/tudelft/lime/layout/GraphLayoutManager.java

  */
 package nl.tudelft.lime.layout;
 
+import java.util.List;
+
 import nl.tudelft.lime.edit.editpart.LimeDiagramEditPart;
 
 import org.eclipse.draw2d.AbstractLayout;
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Rectangle;
 
-import java.util.List;
-
 
 /**
  * Uses the LimeDiagramDirectedGraphLayoutVisitor to automatically lay out figures on diagramEditPart

src/nl/tudelft/lime/layout/LimeDiagramDirectedGraphLayoutVisitor.java

     /**
      * Public method for reading graph nodes
      */
-    @SuppressWarnings("unchecked")
     public void layoutDiagram(LimeDiagramEditPart diagram) {
 
         Map<AbstractGraphicalEditPart, Object> partToNodesMap = new HashMap<AbstractGraphicalEditPart, Object>();

src/nl/tudelft/lime/model/LimeElement.java

  *******************************************************************************/
 package nl.tudelft.lime.model;
 
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
-
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.Serializable;
 
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
 
 abstract public class LimeElement implements IPropertySource, Cloneable,
     Serializable {

src/nl/tudelft/lime/model/LimeGuide.java

 package nl.tudelft.lime.model;
 
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.requests.ChangeBoundsRequest;
 
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-import java.io.Serializable;
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Set;
-
 
 /**
  * Model object representing a guide.

src/nl/tudelft/lime/model/LimeRuler.java

  *******************************************************************************/
 package nl.tudelft.lime.model;
 
-import org.eclipse.gef.rulers.RulerProvider;
-
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
-
 import java.io.Serializable;
-
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.gef.rulers.RulerProvider;
+
 
 /**
  * @author Pratik Shah

src/nl/tudelft/lime/model/codefragment/LimeCodeFragment.java

             SystemSettings.Code_Fragment_Normal_Icon_Path);
     private static int count;
     private String text = LimeMessages.LimePlugin_Tool_CreationTool_LimeLabel;
-    public static final String Property_ID_Label_Context = SystemSettings.PropertyDescriptor_Label_Context_ID;
-    public static final String LABEL_DEFAULT_CONTEXT = "iterative";
-    private String context = LABEL_DEFAULT_CONTEXT;
+    public static final String Property_ID_Label_Context = SystemSettings.PropertyDescriptor_Code_Fragment_Context_ID;
+    private String context = SystemSettings.CODE_FRAGMENT_DEFAULT_CONTEXT;
     protected static IPropertyDescriptor[] newDescriptors = null;
 
     static {

src/nl/tudelft/lime/model/commands/AddCommand.java

 package nl.tudelft.lime.model.commands;
 
 import nl.tudelft.lime.constants.LimeMessages;
-import nl.tudelft.lime.model.LimeElement;
 import nl.tudelft.lime.model.LimeSubpart;
 import nl.tudelft.lime.model.codefragment.LimeCodeFragment;
 import nl.tudelft.lime.model.component.LimeComponent;
 import nl.tudelft.lime.model.port.InputPort;
 import nl.tudelft.lime.model.port.OutputPort;
 
-import java.util.List;
-
 
 public class AddCommand extends org.eclipse.gef.commands.Command {
     private LimeSubpart child;

src/nl/tudelft/lime/model/commands/BendpointCommand.java

 
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.gef.commands.Command;
 
 

src/nl/tudelft/lime/model/commands/CloneCommand.java

 package nl.tudelft.lime.model.commands;
 
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.model.LimeElement;
 import nl.tudelft.lime.model.LimeGuide;
 import nl.tudelft.lime.model.port.OutputPort;
 
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.commands.Command;
 
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
 
 public class CloneCommand extends Command {
     private List<LimeSubpart> parts;

src/nl/tudelft/lime/model/commands/ContainerMoveCommand.java

 import nl.tudelft.lime.figures.NodeFigure;
 
 import org.eclipse.draw2d.geometry.Rectangle;
-
 import org.eclipse.gef.commands.Command;
 
 

src/nl/tudelft/lime/model/commands/CreateCommand.java

 package nl.tudelft.lime.model.commands;
 
 import nl.tudelft.lime.constants.LimeMessages;
-import nl.tudelft.lime.model.LimeElement;
 import nl.tudelft.lime.model.LimeSubpart;
 import nl.tudelft.lime.model.codefragment.LimeCodeFragment;
 import nl.tudelft.lime.model.component.LimeComponent;
 import org.eclipse.draw2d.geometry.Insets;
 import org.eclipse.draw2d.geometry.Rectangle;
 
-import java.util.List;
-
 
 public class CreateCommand extends org.eclipse.gef.commands.Command {
     private LimeSubpart child;

src/nl/tudelft/lime/model/commands/DeleteCommand.java

 package nl.tudelft.lime.model.commands;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.model.LimeElement;
 import nl.tudelft.lime.model.LimeGuide;
 
 import org.eclipse.gef.commands.Command;
 
-import java.util.ArrayList;
-import java.util.List;
-
 
 public class DeleteCommand extends Command {
     private LimeSubpart child;

src/nl/tudelft/lime/model/commands/DeleteGuideCommand.java

 package nl.tudelft.lime.model.commands;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.model.LimeGuide;
 import nl.tudelft.lime.model.LimeRuler;
 
 import org.eclipse.gef.commands.Command;
 
-import java.util.HashMap;
-import java.util.Map;
-
 
 /**
  * @author Pratik Shah

src/nl/tudelft/lime/model/commands/MoveGuideCommand.java

 package nl.tudelft.lime.model.commands;
 
+import java.util.Set;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.model.LimeGuide;
 import nl.tudelft.lime.model.LimeSubpart;
 
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.gef.commands.Command;
 
-import java.util.Set;
-
 
 /**
  * @author Pratik Shah

src/nl/tudelft/lime/model/commands/OrphanChildCommand.java

  *******************************************************************************/
 package nl.tudelft.lime.model.commands;
 
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.model.LimeElement;
 import nl.tudelft.lime.model.LimeSubpart;
 import nl.tudelft.lime.model.component.LimeDiagram;
 
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.gef.commands.Command;
 
-import java.util.List;
-
 
 public class OrphanChildCommand extends Command {
     private Point oldLocation;

src/nl/tudelft/lime/model/common/DimensionPropertySource.java

 import nl.tudelft.lime.model.LimeNumberCellEditorValidator;
 
 import org.eclipse.draw2d.geometry.Dimension;
-
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
 import org.eclipse.ui.views.properties.PropertyDescriptor;

src/nl/tudelft/lime/model/common/LocationPropertySource.java

 import nl.tudelft.lime.model.LimeNumberCellEditorValidator;
 
 import org.eclipse.draw2d.geometry.Point;
-
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
 import org.eclipse.ui.views.properties.PropertyDescriptor;

src/nl/tudelft/lime/model/component/LimeDiagram.java

 package nl.tudelft.lime.model.component;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 import nl.tudelft.lime.constants.LimeMessages;
 import nl.tudelft.lime.constants.SystemSettings;
 import nl.tudelft.lime.model.LimeElement;
 
 import org.eclipse.draw2d.PositionConstants;
 import org.eclipse.draw2d.geometry.Dimension;
-
 import org.eclipse.swt.graphics.Image;
-
 import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 
-import java.io.IOException;
-
-import java.util.ArrayList;
-import java.util.List;
-
 
 public class LimeDiagram extends LimeSubpart {
     static final long serialVersionUID = 1;

src/nl/tudelft/lime/model/connection/Arc.java

     //it might be added in future again, therefore the code is kept here
 
     //holds arc model's 'arc type' value  
-    protected String arcType = "FIFO"; //$NON-NLS-1$
+    protected String arcType = SystemSettings.ARC_DEFAULT_TYPE; //$NON-NLS-1$
 
     /**
     * Returns <code>null</code> for this model. Returns

src/nl/tudelft/lime/model/connection/ArcBendpoint.java

 package nl.tudelft.lime.model.connection;
 
+import java.io.Serializable;
+
 import org.eclipse.draw2d.Bendpoint;
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Point;
 
-import java.io.Serializable;
-
 
 public class ArcBendpoint implements Serializable, Bendpoint {
     private static final long serialVersionUID = 1L;

src/nl/tudelft/lime/model/connection/Connection.java

  */
 package nl.tudelft.lime.model.connection;
 
+import java.util.ArrayList;