Commits

Anonymous committed af7b38f

(no commit message)

Comments (0)

Files changed (6)

src/messages.properties

+###############################################################################
+# Copyright (c) 2005, 2007 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+AddCommand_Label=Add command
+AlignmentAction_AlignSubmenu_ActionLabelText=&Align
+CellEditorValidator_NotANumberMessage=Not a number
+CloneCommand_Label=Clone Object
+ConnectionCommand_Description=Connection change
+ConnectionCommand_Label=wire connection
+CreateCommand_Label=Create Object
+CreateGuideCommand_Label=Create Guide
+CreateLimePage1_Description=Create a new LIME file resource.
+#CreateLimePage1_ModelNames_EmptyModelName=E&mpty Model
+#CreateLimePage1_ModelNames_FourBitAdderModelName=F&our-bit Adder Model
+CreateLimePage1_ModelNames_GroupName=Lime Model Samples
+CreateLimePage1_Title=Create LIME File
+Default_Diagram_File_Name=LIME_Diagram
+Default_Font=Arial
+DeleteCommand_Label=Delete Object
+DeleteGuideCommand_Label=Delete Guide
+Diagram_File_Extension=.gxf
+DimensionPropertySource_Property_Height_Label=Height
+DimensionPropertySource_Property_Width_Label=Width
+GraphicalEditor_CLOSE_BUTTON_UI = Close
+GraphicalEditor_FILE_DELETED_TITLE_UI = File Deleted
+GraphicalEditor_FILE_DELETED_WITHOUT_SAVE_INFO= The file has been deleted from the file system.  Do you want to save your changes or close the editor without saving?
+GraphicalEditor_SAVE_BUTTON_UI = Save
+LimeContainerEditPolicy_OrphanCommandLabelText=Orphan children
+LimeDiagram_LabelText=Lime Diagram
+LimeElementEditPolicy_OrphanCommandLabelText=Reparenting LimeSubpart
+
+#LIME label texts
+Arc_LabelText=Arc
+Association_LabelText=Association
+Input_Port_LabelText=Input Port
+Output_Port_LabelText=Output Port
+Component_LabelText=Component
+
+
+#LIME based defined
+LimePlugin_Category_Components_Label=Components
+LimePlugin_Category_ControlGroup_Label=Control Group
+LimePlugin_Arc_Tool_Description=Arc tool can be used to connect output ports to input ports
+LimePlugin_Arc_Tool_Label=Arc
+LimePlugin_Association_Tool_Description=Association tool can be used to association similar ports
+LimePlugin_Association_Tool_Label=Association
+LimePlugin_Tool_CreationTool_Component_Description=Creates a component.  It can contain other components and edges, and it can connect the other components via ports and can have an intricate design as well.
+LimePlugin_Tool_CreationTool_Component_Label=Component
+LimePlugin_Tool_CreationTool_Input_Port_Description=Create an input port
+LimePlugin_Tool_CreationTool_Input_Port_Label=Input Port
+LimePlugin_Tool_CreationTool_Label_Label=Code Fragment
+LimePlugin_Tool_CreationTool_Label_Description=Creates a box in which you can define code fragments for a component (it supports text edit, resizing, dragging in a text, cut and paste, etc.)
+LimePlugin_Tool_CreationTool_LimeLabel=Type your code fragment here
+LimePlugin_Tool_CreationTool_Output_Port_Description=Creates an output port
+LimePlugin_Tool_CreationTool_Output_Port_Label=Output Port
+LimeXYLayoutEditPolicy_AddCommandLabelText=Reparenting Lime Subpart
+LimeXYLayoutEditPolicy_CreateCommandLabelText=Creating Lime Subpart
+Marquee_Both=Both
+Marquee_Only_Nodes=Only Nodes
+Marquee_Only_Arcs=Only Arcs
+Marquee_Stack=Marquee Tools
+MoveGuideCommand_Label=Move Guide
+OrphanChildCommand_Label=Orphan LimeSubpart
+PasteAction_ActionLabelText=&Paste
+PrintDialog_Height=Fit Height
+PrintDialog_Page=Fit Page
+PrintDialog_Tile=Tile
+PrintDialog_Title=Select Print Mode
+PrintDialog_Width=Fit Width
+ReorderPartCommand_Label=Reorder Subpart
+SetLocationCommand_Label_Location=Move Object
+SetLocationCommand_Label_Resize=Resize Object
+ViewMenu_LabelText=&View
+Wire_LabelText=Wire
+LimeEditor_outline_show_outline=Show Outline
+LimeEditor_outline_show_overview=Show Overview
+#########
+# icons #
+#########
+#normal
+
+
+
+
+####################
+# shape properties #
+####################
+LocationPropertySource_Property_X_Label=X
+LocationPropertySource_Property_Y_Label=Y
+PropertyDescriptor_Arc_Type=Arc Type
+PropertyDescriptor_Label_Text=Text
+PropertyDescriptor_LED_Value=Value
+PropertyDescriptor_Location=Location
+PropertyDescriptor_Diagram_ConnectionRouter=Connection Router
+PropertyDescriptor_Diagram_Manual=Manual
+PropertyDescriptor_Diagram_Manhattan=Manhattan
+PropertyDescriptor_Diagram_ShortestPath=Shortest Path
+PropertyDescriptor_FIFO=FIFO
+PropertyDescriptor_LIFO=LIFO
+PropertyDescriptor_Size=Size
+
+

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

     public static final String XML_Format_Not_Correct = "The XML file used doesn't have the correct format";
 
     static {
-        NLS.initializeMessages("nl.tudelft.lime.messages", LimeMessages.class); //$NON-NLS-1$
+        NLS.initializeMessages("messages", LimeMessages.class); //$NON-NLS-1$
     }
 }

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

  */
 package nl.tudelft.lime.constants;
 
+import org.eclipse.osgi.util.NLS;
+
 
 /**
  * System settings should be kept in this message file
  *
  */
 public class SystemSettings {
-    public static final String PropertyDescriptor_Component_Type_ID = "ComponentTypeID";
-    public static final String PropertyDescriptor_Component_Ret_ID = "ComponentRetID";
-    public static final String PropertyDescriptor_Name_ID = "NameID";
-    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_Port_Restrict_ID = "RestrictID";
-    public static final String PropertyDescriptor_Port_Size_ID = "PortSizeID";
-    public static final String PropertyDescriptor_Port_Static_ID = "StaticID";
-    public static final String PropertyDescriptor_Port_Type_ID = "PortTypeID";
-    public static final String PropertyDescriptor_Port_Volatile_ID = "VolatileID";
-    public static final String PropertyDescriptor_Port_VolatileP_ID = "VolatilepID";
-    public static final String PropertyDescriptor_Size_ID = "SizeID";
+  public static final String PropertyDescriptor_Component_Type_ID = "ComponentTypeID";
+  public static final String PropertyDescriptor_Component_Ret_ID = "ComponentRetID";
+  public static final String PropertyDescriptor_Name_ID = "NameID";
+  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_Port_Restrict_ID = "RestrictID";
+  public static final String PropertyDescriptor_Port_Size_ID = "PortSizeID";
+  public static final String PropertyDescriptor_Port_Static_ID = "StaticID";
+  public static final String PropertyDescriptor_Port_Type_ID = "PortTypeID";
+  public static final String PropertyDescriptor_Port_Volatile_ID = "VolatileID";
+  public static final String PropertyDescriptor_Port_VolatileP_ID = "VolatilepID";
+  public static final String PropertyDescriptor_Size_ID = "SizeID";
 
-    //Normal Icons Path
-    public static final String Component_Normal_Icon_Path = "/modelicons/normal/component.gif";
-    public static final String Input_Port_Normal_Icon_Path = "/modelicons/normal/input.gif";
-    public static final String Output_Port_Normal_Icon_Path = "/modelicons/normal/output.gif";
-    public static final String Arc_Normal_Icon_Path = "/modelicons/normal/connection.gif";
-    public static final String Association_Normal_Icon_Path = "/modelicons/normal/association.gif";
-    public static final String Code_Fragment_Normal_Icon_Path = "/modelicons/normal/code_fragment.gif";
+  //Arcs which their endpoints (the two ports which are connected) are inside a component hierarchy are intra_arcs
+  public static final String DUMMY_INTRA_ARCS_TAG = "dummyIntraArcs";
 
-    //Big Icons Path
-    public static final String Component_Big_Icon_Path = "/modelicons/big/component.gif";
-    public static final String Input_Port_Big_Icon_Path = "/modelicons/big/input.gif";
-    public static final String Output_Port_Big_Icon_Path = "/modelicons/big/output.gif";
-    public static final String Arc_Big_Icon_Path = "/modelicons/big/connection.gif";
-    public static final String Association_Big_Icon_Path = "/modelicons/big/association.gif";
-    public static final String Code_Fragment_Big_Icon_Path = "/modelicons/big/code_fragment.gif";
+  //Arcs which their endpoints (the two ports which are connected) are not inside a component hierarchy are intra_arcs
+  public static final String DUMMY_INTER_ARCS_TAG = "dummyInterArcs";
+  public static final String DUMMY_ASSOCIATIONS_TAG = "dummyAssociations";
+  public static final String DUMMY_ROOT_ARCS_TAG = "dummy-root-arcs";
+  public static final String DUMMY_ROOT_ASSOCIATIONS_TAG = "dummy-root-associations";
 
-    //other Icons
-    public static final String Component_Menu_Icon_Path = "/modelicons/others/comp.gif";
-    public static final String Layout_Normal_Icon_Path = "/modelicons/others/layout.gif";
-    public static final String Layout_Disabled_Icon_Path = "/modelicons/others/layout_disabled.gif";
+  //hardcoded tags (TODO: they should be moved to SystemSettings) 
+  public static String XLINK_TYPE_ATTRIBUTE;
+  public static String XLINK_LABEL_ATTRIBUTE;
+  public static String XLINK_HREF_ATTRIBUTE;
+  public static String XLINK_TO_ATTRIBUTE;
+  public static String XLINK_FROM_ATTRIBUTE;
+  public static String BOUND_TO_TAG;
+  public static String CODE_TAG;
+  public static String CONTEXT_TAG;
+  public static String ENDPOINT_TAG;
+  public static String EDGE_TAG;
+  public static String EDGES_TAG;
+  public static String TYPE_TAG;
+  public static String META_TAG;
+  public static String NODE_TAG;
+  public static String PORT_TAG;
+  public static String GXF_URL;
+  public static String ID_TAG;
+  public static String TO_TAG;
+  public static String FROM_TAG;
+  public static String TO_NODE_TAG;
+  public static String FROM_NODE_TAG;
+  public static String PORT_ID_TAG;
+  public static String META_TAG_VISUAL_ID;
+  public static String META_TAG_CODE_ID;
+  public static String SIZE_TAG;
+  public static String LOCATION_TAG;
+  public static String DIMENSION_TAG;
+  public static String ID_ATTRIBUTE;
+  public static String VALUE_ATTRIBUTE;
+  //Normal Icons Path
+  public static String Component_Normal_Icon_Path;
+  public static String Input_Port_Normal_Icon_Path;
+  public static String Output_Port_Normal_Icon_Path;
+  public static String Arc_Normal_Icon_Path;
+  public static String Association_Normal_Icon_Path;
+  public static String Code_Fragment_Normal_Icon_Path;
 
-    //XML
-    public static final String Default_XML_DTD_Entry = "gxf.dtd";
-    public static final String Correct_XML_DTD_Path = "/xmldtd/gxf.dtd";
+  //Big Icons Path
+  public static String Component_Big_Icon_Path;
+  public static String Input_Port_Big_Icon_Path;
+  public static String Output_Port_Big_Icon_Path;
+  public static String Arc_Big_Icon_Path;
+  public static String Association_Big_Icon_Path;
+  public static String Code_Fragment_Big_Icon_Path;
+
+  //other Icons
+  public static String Component_Menu_Icon_Path;
+  public static String Layout_Normal_Icon_Path;
+  public static String Layout_Disabled_Icon_Path;
+
+  //XML
+  public static String Default_XML_DTD_Entry;
+  public static String Correct_XML_DTD_Path;
+
+  static {
+    NLS.initializeMessages("system", SystemSettings.class); //$NON-NLS-1$
+  }
 }

src/nl/tudelft/lime/messages.properties

-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-AddCommand_Label=Add command
-AlignmentAction_AlignSubmenu_ActionLabelText=&Align
-CellEditorValidator_NotANumberMessage=Not a number
-CloneCommand_Label=Clone Object
-ConnectionCommand_Description=Connection change
-ConnectionCommand_Label=wire connection
-CreateCommand_Label=Create Object
-CreateGuideCommand_Label=Create Guide
-CreateLimePage1_Description=Create a new LIME file resource.
-#CreateLimePage1_ModelNames_EmptyModelName=E&mpty Model
-#CreateLimePage1_ModelNames_FourBitAdderModelName=F&our-bit Adder Model
-CreateLimePage1_ModelNames_GroupName=Lime Model Samples
-CreateLimePage1_Title=Create LIME File
-Default_Diagram_File_Name=LIME_Diagram
-Default_Font=Arial
-DeleteCommand_Label=Delete Object
-DeleteGuideCommand_Label=Delete Guide
-Diagram_File_Extension=.gxf
-DimensionPropertySource_Property_Height_Label=Height
-DimensionPropertySource_Property_Width_Label=Width
-GraphicalEditor_CLOSE_BUTTON_UI = Close
-GraphicalEditor_FILE_DELETED_TITLE_UI = File Deleted
-GraphicalEditor_FILE_DELETED_WITHOUT_SAVE_INFO= The file has been deleted from the file system.  Do you want to save your changes or close the editor without saving?
-GraphicalEditor_SAVE_BUTTON_UI = Save
-LimeContainerEditPolicy_OrphanCommandLabelText=Orphan children
-LimeDiagram_LabelText=Lime Diagram
-LimeElementEditPolicy_OrphanCommandLabelText=Reparenting LimeSubpart
-
-#LIME label texts
-Arc_LabelText=Arc
-Association_LabelText=Association
-Input_Port_LabelText=Input Port
-Output_Port_LabelText=Output Port
-Component_LabelText=Component
-
-
-#LIME based defined
-LimePlugin_Category_Components_Label=Components
-LimePlugin_Category_ControlGroup_Label=Control Group
-LimePlugin_Arc_Tool_Description=Arc tool can be used to connect output ports to input ports
-LimePlugin_Arc_Tool_Label=Arc
-LimePlugin_Association_Tool_Description=Association tool can be used to association similar ports
-LimePlugin_Association_Tool_Label=Association
-LimePlugin_Tool_CreationTool_Component_Description=Creates a component.  It can contain other components and edges, and it can connect the other components via ports and can have an intricate design as well.
-LimePlugin_Tool_CreationTool_Component_Label=Component
-LimePlugin_Tool_CreationTool_Input_Port_Description=Create an input port
-LimePlugin_Tool_CreationTool_Input_Port_Label=Input Port
-LimePlugin_Tool_CreationTool_Label_Label=Code Fragment
-LimePlugin_Tool_CreationTool_Label_Description=Creates a box in which you can define code fragments for a component (it supports text edit, resizing, dragging in a text, cut and paste, etc.)
-LimePlugin_Tool_CreationTool_LimeLabel=Type your code fragment here
-LimePlugin_Tool_CreationTool_Output_Port_Description=Creates an output port
-LimePlugin_Tool_CreationTool_Output_Port_Label=Output Port
-LimeXYLayoutEditPolicy_AddCommandLabelText=Reparenting Lime Subpart
-LimeXYLayoutEditPolicy_CreateCommandLabelText=Creating Lime Subpart
-Marquee_Both=Both
-Marquee_Only_Nodes=Only Nodes
-Marquee_Only_Arcs=Only Arcs
-Marquee_Stack=Marquee Tools
-MoveGuideCommand_Label=Move Guide
-OrphanChildCommand_Label=Orphan LimeSubpart
-PasteAction_ActionLabelText=&Paste
-PrintDialog_Height=Fit Height
-PrintDialog_Page=Fit Page
-PrintDialog_Tile=Tile
-PrintDialog_Title=Select Print Mode
-PrintDialog_Width=Fit Width
-ReorderPartCommand_Label=Reorder Subpart
-SetLocationCommand_Label_Location=Move Object
-SetLocationCommand_Label_Resize=Resize Object
-ViewMenu_LabelText=&View
-Wire_LabelText=Wire
-LimeEditor_outline_show_outline=Show Outline
-LimeEditor_outline_show_overview=Show Overview
-#########
-# icons #
-#########
-#normal
-
-
-
-
-####################
-# shape properties #
-####################
-LocationPropertySource_Property_X_Label=X
-LocationPropertySource_Property_Y_Label=Y
-PropertyDescriptor_Arc_Type=Arc Type
-PropertyDescriptor_Label_Text=Text
-PropertyDescriptor_LED_Value=Value
-PropertyDescriptor_Location=Location
-PropertyDescriptor_Diagram_ConnectionRouter=Connection Router
-PropertyDescriptor_Diagram_Manual=Manual
-PropertyDescriptor_Diagram_Manhattan=Manhattan
-PropertyDescriptor_Diagram_ShortestPath=Shortest Path
-PropertyDescriptor_FIFO=FIFO
-PropertyDescriptor_LIFO=LIFO
-PropertyDescriptor_Size=Size
-
-

src/nl/tudelft/lime/xml/XMLFactory.java

 package nl.tudelft.lime.xml;
 
+import nl.tudelft.lime.constants.SystemSettings;
 import nl.tudelft.lime.model.LimeDiagram;
 import nl.tudelft.lime.model.LimeElement;
 import nl.tudelft.lime.model.LimeCodeFragment;
  *
  */
 public class XMLFactory {
-    //Arcs which their endpoints (the two ports which are connected) are inside a component hierarchy are intra_arcs
-    private static final String DUMMY_INTRA_ARCS_TAG = "dummyIntraArcs";
-
-    //Arcs which their endpoints (the two ports which are connected) are not inside a component hierarchy are intra_arcs
-    private static final String DUMMY_INTER_ARCS_TAG = "dummyInterArcs";
-    private static final String DUMMY_ASSOCIATIONS_TAG = "dummyAssociations";
-    private static final String DUMMY_ROOT_ARCS_TAG = "dummy-root-arcs";
-    private static final String DUMMY_ROOT_ASSOCIATIONS_TAG = "dummy-root-associations";
-
-    //hardcoded tags (TODO: they should be moved to SystemSettings) 
-    private static final String XLINK_TYPE_ATTRIBUTE = "xlink:type";
-    private static final String XLINK_LABEL_ATTRIBUTE = "xlink:label";
-    private static final String XLINK_HREF_ATTRIBUTE = "xlink:href";
-    private static final String XLINK_TO_ATTRIBUTE = "to";
-    private static final String XLINK_FROM_ATTRIBUTE = "from";
-    private static final String BOUND_TO_TAG = "bound-to";
-    private static final String CODE_TAG = "code";
-    private static final String CONTEXT_TAG = "context";
-    private static final String ENDPOINT_TAG = "endpoint";
-    private static final String EDGE_TAG = "edge";
-    private static final String EDGES_TAG = "edges";
-    private static final String TYPE_TAG = "type";
-    private static final String META_TAG = "meta";
-    private static final String NODE_TAG = "node";
-    private static final String PORT_TAG = "port";
-    private static final String GXF_URL = "http://bitbucket.org/pjotr/lime/raw/tip/doc/gxf.dtd";
-    private static final String ID_TAG = "id";
-    private static final String TO_TAG = "to";
-    private static final String FROM_TAG = "from";
-    private static final String TO_NODE_TAG = "to-node";
-    private static final String FROM_NODE_TAG = "from-node";
-    private static final String PORT_ID_TAG = "port-id";
-    private static final String META_TAG_VISUAL_ID = "visual";
-    private static final String META_TAG_CODE_ID = "passthrough";
-    private static final String SIZE_TAG = "size";
-    private static final String LOCATION_TAG = "location";
-    private static final String DIMENSION_TAG = "dimension";
-    private static final String ID_ATTRIBUTE = "id";
-    private static final String VALUE_ATTRIBUTE = "value";
-
     /**
      * <b>Note</b> <br>
      * The assumption is that all the elements inside each component have unique
         // if it is the root element or it is a node, then it might have some
         // edge elements
         if ("gxf".equals(element.getName()) ||
-                NODE_TAG.equals(element.getName())) {
+        		SystemSettings.NODE_TAG.equals(element.getName())) {
             // for these elements first create all the arcs inside them, and
             // then
             // call the same for their children
-            Element edges = element.element(EDGES_TAG);
+            Element edges = element.element(SystemSettings.EDGES_TAG);
 
             if (edges != null) {
-                List<Element> arcs = (List<Element>) edges.elements(EDGE_TAG);
+                List<Element> arcs = (List<Element>) edges.elements(SystemSettings.EDGE_TAG);
 
                 for (Element arcElement : arcs) {
                     try {
                         Arc arc = new Arc();
                         String fromOutput = "";
                         String toInput = "";
-                        arc.setArcType(arcElement.element(TYPE_TAG).getText());
+                        arc.setArcType(arcElement.element(SystemSettings.TYPE_TAG).getText());
 
                         // use QName to resolve xlink attributes, but it means
                         // defining a
 
                         //TODO: the convention should be kept in one place...
                         //now the convention is to use ${node's name}:${port's name}
-                        Element fromElement = arcElement.element(FROM_NODE_TAG);
+                        Element fromElement = arcElement.element(SystemSettings.FROM_NODE_TAG);
 
                         if (fromElement != null) {
-                            fromOutput = fromElement.elementText(ID_TAG) + ":" +
-                                fromElement.elementText(PORT_ID_TAG);
+                            fromOutput = fromElement.elementText(SystemSettings.ID_TAG) + ":" +
+                                fromElement.elementText(SystemSettings.PORT_ID_TAG);
                         } else {
-                            fromElement = arcElement.element(FROM_TAG);
-                            fromOutput = fromElement.element(NODE_TAG)
-                                                    .elementText(ID_TAG) + ":" +
-                                fromElement.element(NODE_TAG).element(PORT_TAG)
-                                           .elementText(ID_TAG);
+                            fromElement = arcElement.element(SystemSettings.FROM_TAG);
+                            fromOutput = fromElement.element(SystemSettings.NODE_TAG)
+                                                    .elementText(SystemSettings.ID_TAG) + ":" +
+                                fromElement.element(SystemSettings.NODE_TAG).element(SystemSettings.PORT_TAG)
+                                           .elementText(SystemSettings.ID_TAG);
                         }
 
                         if ((fromOutput == null) || fromOutput.equals("")) {
 
                         // if the attribute is empty get edge -> node -> port ->
                         // id instead
-                        Element toElement = arcElement.element(TO_NODE_TAG);
+                        Element toElement = arcElement.element(SystemSettings.TO_NODE_TAG);
 
                         if (toElement != null) {
-                            toInput = toElement.elementText(ID_TAG) + ":" +
-                                toElement.elementText(PORT_ID_TAG);
+                            toInput = toElement.elementText(SystemSettings.ID_TAG) + ":" +
+                                toElement.elementText(SystemSettings.PORT_ID_TAG);
                         } else {
-                            toElement = arcElement.element(TO_TAG);
-                            toInput = toElement.element(NODE_TAG)
-                                               .elementText(ID_TAG) + ":" +
-                                toElement.element(NODE_TAG).element(PORT_TAG)
-                                         .elementText(ID_TAG);
+                            toElement = arcElement.element(SystemSettings.TO_TAG);
+                            toInput = toElement.element(SystemSettings.NODE_TAG)
+                                               .elementText(SystemSettings.ID_TAG) + ":" +
+                                toElement.element(SystemSettings.NODE_TAG).element(SystemSettings.PORT_TAG)
+                                         .elementText(SystemSettings.ID_TAG);
                         }
 
                         if ((toInput == null) || toInput.equals("")) {
         for (Element arcElement : associations) {
             try {
                 Association association = new Association();
-                String fromPort = arcElement.attribute(XLINK_FROM_ATTRIBUTE)
+                String fromPort = arcElement.attribute(SystemSettings.XLINK_FROM_ATTRIBUTE)
                                             .getValue();
-                String toPort = arcElement.attribute(XLINK_TO_ATTRIBUTE)
+                String toPort = arcElement.attribute(SystemSettings.XLINK_TO_ATTRIBUTE)
                                           .getValue();
 
                 // use QName to resolve xlink attributes, but it means
         }
 
         //do it for its children
-        List<Element> nodes = (List<Element>) element.elements(NODE_TAG);
+        List<Element> nodes = (List<Element>) element.elements(SystemSettings.NODE_TAG);
 
         for (Element node : nodes) {
             addAssociations(node, diagram);
         // "http://www.w3.org/1999/xlink");
         // Element root = DocumentFactory.getInstance().createElement(rootName);
         // xmlDocument.add(root);
-        xmlDocument.addDocType("gxf", "", GXF_URL);
+        xmlDocument.addDocType("gxf", "", SystemSettings.GXF_URL);
 
         try {
             xmlDocument.add(getXML(limeDiagram));
                 }
 
                 // only get nodes - nodes are the ones which should be traversed
-                List<Element> children = (List<Element>) element.elements(NODE_TAG);
+                List<Element> children = (List<Element>) element.elements(SystemSettings.NODE_TAG);
 
                 for (Element child : children) {
                     // add parent child relationship to the items
                 }
 
                 //for port children just add them
-                List<Element> portChildren = (List<Element>) element.elements(PORT_TAG);
+                List<Element> portChildren = (List<Element>) element.elements(SystemSettings.PORT_TAG);
 
                 for (Element child : portChildren) {
                     //it is obviously getting a port and obviously it doesn't need to fill in associations
         Element element) {
         subpart.setName(element.element("id").getText());
 
-        List<Element> metaElements = element.elements(META_TAG);
+        List<Element> metaElements = element.elements(SystemSettings.META_TAG);
 
         //for meta elements only two elements should be treated in different way
         //1. meta tag with id = "visual" : which determines size and location of a LimeElement
         //2. meta tag with id = "passthrough" : which would be the code part
         for (Element metaElement : metaElements) {
             //if it is the first case
-            if ((metaElement.attribute(ID_ATTRIBUTE) != null && metaElement.attributeValue(ID_ATTRIBUTE).equals(META_TAG_VISUAL_ID)) || 
-                (metaElement.element(ID_TAG) != null && metaElement.elementText(ID_TAG).equals(META_TAG_VISUAL_ID))) {
+            if ((metaElement.attribute(SystemSettings.ID_ATTRIBUTE) != null && metaElement.attributeValue(SystemSettings.ID_ATTRIBUTE).equals(SystemSettings.META_TAG_VISUAL_ID)) || 
+                (metaElement.element(SystemSettings.ID_TAG) != null && metaElement.elementText(SystemSettings.ID_TAG).equals(SystemSettings.META_TAG_VISUAL_ID))) {
             	subpart.setSizeByMap(getDimensionsListMap(metaElement.element(
-                            SIZE_TAG)));
+            			SystemSettings.SIZE_TAG)));
                 subpart.setLocationByMap(getDimensionsListMap(
-                        metaElement.element(LOCATION_TAG)));
+                        metaElement.element(SystemSettings.LOCATION_TAG)));
             }
             //if it is a code fragment
             else if (subpart instanceof LimeComponent &&
-                    (metaElement.attribute(ID_ATTRIBUTE) != null && metaElement.attributeValue(ID_ATTRIBUTE).equals(META_TAG_CODE_ID)) || 
-                    (metaElement.element(ID_TAG) != null && metaElement.elementText(ID_TAG).equals(META_TAG_CODE_ID))) {
+                    (metaElement.attribute(SystemSettings.ID_ATTRIBUTE) != null && metaElement.attributeValue(SystemSettings.ID_ATTRIBUTE).equals(SystemSettings.META_TAG_CODE_ID)) || 
+                    (metaElement.element(SystemSettings.ID_TAG) != null && metaElement.elementText(SystemSettings.ID_TAG).equals(SystemSettings.META_TAG_CODE_ID))) {
                 //create a label and make it as a child of this component
-                List<Element> codeElements = metaElement.elements(CODE_TAG);
+                List<Element> codeElements = metaElement.elements(SystemSettings.CODE_TAG);
                 
                 for (Element codeElement : codeElements){
                     LimeCodeFragment codeFragment = new LimeCodeFragment();
 	                codeFragment.setLabelContents((String) codeElement.getData());
-	                if (codeElement.attribute(CONTEXT_TAG) != null)
-	                	codeFragment.setContext((String) codeElement.attributeValue(CONTEXT_TAG));
+	                if (codeElement.attribute(SystemSettings.CONTEXT_TAG) != null)
+	                	codeFragment.setContext((String) codeElement.attributeValue(SystemSettings.CONTEXT_TAG));
 	                else
-	                	codeFragment.setContext((String) codeElement.elementText(CONTEXT_TAG));
+	                	codeFragment.setContext((String) codeElement.elementText(SystemSettings.CONTEXT_TAG));
 	                ((LimeComponent) subpart).addChild(codeFragment);
                 }
             }
     }
 
     private static boolean isNormalPortTag(String name) {
-        return name.equals(LOCATION_TAG) || name.equals(SIZE_TAG) ||
-        name.equals(META_TAG) || name.equals(DUMMY_INTRA_ARCS_TAG);
+        return name.equals(SystemSettings.LOCATION_TAG) || name.equals(SystemSettings.SIZE_TAG) ||
+        name.equals(SystemSettings.META_TAG) || name.equals(SystemSettings.DUMMY_INTRA_ARCS_TAG);
     }
 
     /**
             return dimensionMap;
         }
 
-        List<Element> elements = (List<Element>) element.elements(DIMENSION_TAG);
+        List<Element> elements = (List<Element>) element.elements(SystemSettings.DIMENSION_TAG);
 
         for (Element dimension : elements) {
-            dimensionMap.put(dimension.attribute(ID_ATTRIBUTE).getText(),
-                Integer.valueOf(dimension.attribute(VALUE_ATTRIBUTE).getText()));
+            dimensionMap.put(dimension.attribute(SystemSettings.ID_ATTRIBUTE).getText(),
+                Integer.valueOf(dimension.attribute(SystemSettings.VALUE_ATTRIBUTE).getText()));
         }
 
         return dimensionMap;
             return new LimeDiagram();
         }
 
-        if (NODE_TAG.equals(name)) {
+        if (SystemSettings.NODE_TAG.equals(name)) {
             return new LimeComponent();
         }
 
-        if (PORT_TAG.equals(name)) {
+        if (SystemSettings.PORT_TAG.equals(name)) {
             // if it has 'const' modifier then it is an input port
             if (element.element("const") != null) {
                 return new InputPort();
      */
     private static String getPartName(LimeElement part) {
         if (part instanceof LimeComponent) {
-            return NODE_TAG;
+            return SystemSettings.NODE_TAG;
         } else if (part instanceof Arc) {
-            return EDGE_TAG;
+            return SystemSettings.EDGE_TAG;
         } else if (part instanceof Port) {
-            return PORT_TAG;
+            return SystemSettings.PORT_TAG;
         } else if (part instanceof LimeDiagram) {
             return "gxf";
         }
         } else {
             root.add(new DefaultAttribute("xmlns:xlink",
                     "http://www.w3.org/1999/xlink"));
-            root.add(new DefaultAttribute(XLINK_TYPE_ATTRIBUTE, "extended"));
+            root.add(new DefaultAttribute(SystemSettings.XLINK_TYPE_ATTRIBUTE, "extended"));
         }
 
         // to be compatible with the example XML, we have to stick to a
 
             //this variable is used to keep arcs and associations and add them when all the
             //child elements are added
-            Element rootArcs = new DefaultElement(DUMMY_ROOT_ARCS_TAG);
-            Element rootAssociations = new DefaultElement(DUMMY_ROOT_ASSOCIATIONS_TAG);
-            Element rootArcsToBePulledUp = new DefaultElement(DUMMY_INTRA_ARCS_TAG);
+            Element rootArcs = new DefaultElement(SystemSettings.DUMMY_ROOT_ARCS_TAG);
+            Element rootAssociations = new DefaultElement(SystemSettings.DUMMY_ROOT_ASSOCIATIONS_TAG);
+            Element rootArcsToBePulledUp = new DefaultElement(SystemSettings.DUMMY_INTRA_ARCS_TAG);
 
             for (LimeElement element : children) {
                 //if it is a code fragment (label) ignore it,
                 //the arc should be added to source's parent
                 //the exception is when both components are the in the same level 
                 //like ports which are used for state variables of a node
-                if (item.elements(DUMMY_INTRA_ARCS_TAG).size() != 0) {
-                    final Element dummyArc = (Element) (item.elements(DUMMY_INTRA_ARCS_TAG)).get(0);
+                if (item.elements(SystemSettings.DUMMY_INTRA_ARCS_TAG).size() != 0) {
+                    final Element dummyArc = (Element) (item.elements(SystemSettings.DUMMY_INTRA_ARCS_TAG)).get(0);
 
                     // in fact arc information is related to a port not to a
                     // container directly,
                 // intercomponent arcs, otherwise it is not well readable)
                 //to make it easy, we set inter_arcs as intra_arcs of the current element,
                 //it causes it to be pulled up by its parent automatically
-                if (item.elements(DUMMY_INTER_ARCS_TAG).size() != 0) {
-                    final Element dummyInterComponentArc = (Element) (item.elements(DUMMY_INTER_ARCS_TAG)).get(0);
+                if (item.elements(SystemSettings.DUMMY_INTER_ARCS_TAG).size() != 0) {
+                    final Element dummyInterComponentArc = (Element) (item.elements(SystemSettings.DUMMY_INTER_ARCS_TAG)).get(0);
 
                     //pull up the contents one level more up if it is an inter-component arc
                     //(an arc between two component which are not in the same hierarchy)
                     item.remove(dummyInterComponentArc);
                 }
 
-                if (item.elements(DUMMY_ASSOCIATIONS_TAG).size() != 0) {
-                    final Element dummyAssociation = (Element) (item.elements(DUMMY_ASSOCIATIONS_TAG)).get(0);
+                if (item.elements(SystemSettings.DUMMY_ASSOCIATIONS_TAG).size() != 0) {
+                    final Element dummyAssociation = (Element) (item.elements(SystemSettings.DUMMY_ASSOCIATIONS_TAG)).get(0);
 
                     // in fact arc information is related to a port in the object model not to a
                     // container directly,
             }
             //second the edges - add the arcs which correspond to this component
             if (rootArcs.elements().size() != 0) {
-            	Element edgesElement = new DefaultElement(EDGES_TAG);
+            	Element edgesElement = new DefaultElement(SystemSettings.EDGES_TAG);
                 for (Element element : (List<Element>) rootArcs.elements()) {
                 		edgesElement.add(element.createCopy());
                 }
         // we keep the rule that we only write outgoing arcs,
         // so there are no duplicate entries
         if ((intraComponentArcs != null) && (intraComponentArcs.size() != 0)) {
-            DefaultElement DUMMY_INTRA_ARC = new DefaultElement(DUMMY_INTRA_ARCS_TAG);
+            DefaultElement DUMMY_INTRA_ARC = new DefaultElement(SystemSettings.DUMMY_INTRA_ARCS_TAG);
             root.add(getArcsXML(DUMMY_INTRA_ARC, intraComponentArcs));
         }
 
         if ((interComponentArcs != null) && (interComponentArcs.size() != 0)) {
-            DefaultElement DUMMY_INTER_ARC = new DefaultElement(DUMMY_INTER_ARCS_TAG);
+            DefaultElement DUMMY_INTER_ARC = new DefaultElement(SystemSettings.DUMMY_INTER_ARCS_TAG);
             root.add(getArcsXML(DUMMY_INTER_ARC, interComponentArcs));
         }
 
         // then create the edge (that's a bit funny convention)
         // 1. create end points for all from connections
         for (Arc arc : arcs) {
-            Element arcElement = new DefaultElement(ENDPOINT_TAG);
+            Element arcElement = new DefaultElement(SystemSettings.ENDPOINT_TAG);
             //define source endpoint 
-            arcElement.add(new DefaultAttribute(XLINK_TYPE_ATTRIBUTE, "locator"));
-            arcElement.add(new DefaultAttribute(XLINK_LABEL_ATTRIBUTE,
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_TYPE_ATTRIBUTE, "locator"));
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_LABEL_ATTRIBUTE,
                     getParentChildPath(arc.getSource())));
-            arcElement.add(new DefaultAttribute(XLINK_HREF_ATTRIBUTE,
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_HREF_ATTRIBUTE,
                     "#" + getParentChildPath(arc.getSource())));
             root.add(arcElement);
             //define target endpoint
-            arcElement = new DefaultElement(ENDPOINT_TAG);
+            arcElement = new DefaultElement(SystemSettings.ENDPOINT_TAG);
 
-            arcElement.add(new DefaultAttribute(XLINK_TYPE_ATTRIBUTE, "locator"));
-            arcElement.add(new DefaultAttribute(XLINK_LABEL_ATTRIBUTE,
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_TYPE_ATTRIBUTE, "locator"));
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_LABEL_ATTRIBUTE,
                     getParentChildPath(arc.getTarget())));
-            arcElement.add(new DefaultAttribute(XLINK_HREF_ATTRIBUTE,
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_HREF_ATTRIBUTE,
                     "#" + getParentChildPath(arc.getTarget())));
             root.add(arcElement);
         }
         for (Arc arc : arcs) {
             Element arcElement = new DefaultElement(getPartName(arc));
 
-            arcElement.add(new DefaultAttribute(XLINK_TYPE_ATTRIBUTE, "arc"));
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_TYPE_ATTRIBUTE, "arc"));
 
             LimeSubpart source = arc.getSource();
             LimeSubpart target = arc.getTarget();
-            arcElement.add(new DefaultAttribute(XLINK_FROM_ATTRIBUTE,
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_FROM_ATTRIBUTE,
                     getParentChildPath(source)));
-            arcElement.add(new DefaultAttribute(XLINK_TO_ATTRIBUTE,
+            arcElement.add(new DefaultAttribute(SystemSettings.XLINK_TO_ATTRIBUTE,
                     getParentChildPath(target)));
 
-            DefaultElement typeElement = new DefaultElement(TYPE_TAG);
+            DefaultElement typeElement = new DefaultElement(SystemSettings.TYPE_TAG);
             typeElement.setText(arc.getArcTypeName());
 
             arcElement.add(typeElement);
 
             // adding from and port embedded nodes
             // I. adding 'from' node
-            DefaultElement fromElement = new DefaultElement(FROM_NODE_TAG);
-            DefaultElement fromNodeIdElement = new DefaultElement(ID_TAG);
-            DefaultElement fromPortIdElement = new DefaultElement(PORT_ID_TAG);
+            DefaultElement fromElement = new DefaultElement(SystemSettings.FROM_NODE_TAG);
+            DefaultElement fromNodeIdElement = new DefaultElement(SystemSettings.ID_TAG);
+            DefaultElement fromPortIdElement = new DefaultElement(SystemSettings.PORT_ID_TAG);
 
             String parentName = source.getParent().getName();
 
             fromElement.add(fromNodeIdElement);
 
             // II. adding 'to' node
-            DefaultElement toElement = new DefaultElement(TO_NODE_TAG);
-            DefaultElement toNodeIdElement = new DefaultElement(ID_TAG);
-            DefaultElement toPortIdElement = new DefaultElement(PORT_ID_TAG);
+            DefaultElement toElement = new DefaultElement(SystemSettings.TO_NODE_TAG);
+            DefaultElement toNodeIdElement = new DefaultElement(SystemSettings.ID_TAG);
+            DefaultElement toPortIdElement = new DefaultElement(SystemSettings.PORT_ID_TAG);
 
             parentName = target.getParent().getName();
 
      * @return an element containing all the arcs
      */
     private static Element getAssociationsXML(Vector<Association> associations) {
-        DefaultElement root = new DefaultElement(DUMMY_ASSOCIATIONS_TAG);
+        DefaultElement root = new DefaultElement(SystemSettings.DUMMY_ASSOCIATIONS_TAG);
 
         // for each from connection, create its endpoints,
         // then create the edge (that's a bit funny convention)
         // <bound-to xlink:type='arc' xlink:from='w11a_r_source:in'
         // xlink:to='w11a_r_source:process:in'></bound-to>
         for (Association association : associations) {
-            Element associationElement = new DefaultElement(BOUND_TO_TAG);
+            Element associationElement = new DefaultElement(SystemSettings.BOUND_TO_TAG);
 
-            associationElement.add(new DefaultAttribute(XLINK_TYPE_ATTRIBUTE,
+            associationElement.add(new DefaultAttribute(SystemSettings.XLINK_TYPE_ATTRIBUTE,
                     "arc"));
 
             LimeSubpart source = association.getSource();
             LimeSubpart target = association.getTarget();
-            associationElement.add(new DefaultAttribute(XLINK_FROM_ATTRIBUTE,
+            associationElement.add(new DefaultAttribute(SystemSettings.XLINK_FROM_ATTRIBUTE,
                     getParentChildPath(source)));
-            associationElement.add(new DefaultAttribute(XLINK_TO_ATTRIBUTE,
+            associationElement.add(new DefaultAttribute(SystemSettings.XLINK_TO_ATTRIBUTE,
                     getParentChildPath(target)));
             root.add(associationElement);
         }
 
         if (codeFragments.size() != 0){
         	for (LimeCodeFragment codeFragment : codeFragments){
-	            DefaultElement metaCode = new DefaultElement(META_TAG);
-	            metaCode.add(new DefaultAttribute(ID_ATTRIBUTE, META_TAG_CODE_ID));
+	            DefaultElement metaCode = new DefaultElement(SystemSettings.META_TAG);
+	            metaCode.add(new DefaultAttribute(SystemSettings.ID_ATTRIBUTE, SystemSettings.META_TAG_CODE_ID));
 	
-	            DefaultElement codeFragmentElement = new DefaultElement(CODE_TAG);
+	            DefaultElement codeFragmentElement = new DefaultElement(SystemSettings.CODE_TAG);
 	            metaCode.add(codeFragmentElement);
 	
 	            codeFragmentElement.add(new DefaultCDATA(codeFragment.getLabelContents()));
-	            codeFragmentElement.add(new DefaultAttribute(CONTEXT_TAG, codeFragment.getContext()));
+	            codeFragmentElement.add(new DefaultAttribute(SystemSettings.CONTEXT_TAG, codeFragment.getContext()));
 	            root.add(metaCode);
         	}
         }
     private static void addDefaultAttributes(Element root,
         LimeSubpart limeSubpart) {
         DefaultElement metaVisual = new DefaultElement("meta");
-        metaVisual.add(new DefaultAttribute("id", META_TAG_VISUAL_ID));
-        metaVisual.add(createDimensionList(SIZE_TAG, limeSubpart.getSizeMap()));
-        metaVisual.add(createDimensionList(LOCATION_TAG,
+        metaVisual.add(new DefaultAttribute("id", SystemSettings.META_TAG_VISUAL_ID));
+        metaVisual.add(createDimensionList(SystemSettings.SIZE_TAG, limeSubpart.getSizeMap()));
+        metaVisual.add(createDimensionList(SystemSettings.LOCATION_TAG,
                 limeSubpart.getLocationMap()));
 
         root.add(metaVisual);
 
         root.add(new DefaultAttribute("id", getParentChildPath(limeSubpart)));
 
-        root.add(new DefaultAttribute(XLINK_TYPE_ATTRIBUTE, "resource"));
+        root.add(new DefaultAttribute(SystemSettings.XLINK_TYPE_ATTRIBUTE, "resource"));
 
-        root.add(new DefaultAttribute(XLINK_LABEL_ATTRIBUTE,
+        root.add(new DefaultAttribute(SystemSettings.XLINK_LABEL_ATTRIBUTE,
                 limeSubpart.getRevisedName()));
 
         // if it goes beyond two-dimension we should still be able to define it
         Element element = new DefaultElement(nodeName);
 
         for (String item : dimensions.keySet()) {
-            Element dimensionElement = new DefaultElement(DIMENSION_TAG);
+            Element dimensionElement = new DefaultElement(SystemSettings.DIMENSION_TAG);
             dimensionElement.addAttribute("id", item);
             dimensionElement.addAttribute("value",
                 String.valueOf(dimensions.get(item)));

src/system.properties

+XLINK_TYPE_ATTRIBUTE=xlink:type
+XLINK_LABEL_ATTRIBUTE=xlink:label
+XLINK_HREF_ATTRIBUTE=xlink:href
+XLINK_TO_ATTRIBUTE=to
+XLINK_FROM_ATTRIBUTE=from
+BOUND_TO_TAG=bound-to
+CODE_TAG=code
+CONTEXT_TAG=context
+ENDPOINT_TAG=endpoint
+EDGE_TAG=edge
+EDGES_TAG=edges
+TYPE_TAG=type
+META_TAG=meta
+NODE_TAG=node
+PORT_TAG=port
+GXF_URL=http://bitbucket.org/pjotr/lime/raw/tip/doc/gxf.dtd
+ID_TAG=id
+TO_TAG=to
+FROM_TAG=from
+TO_NODE_TAG=to-node
+FROM_NODE_TAG=from-node
+PORT_ID_TAG=port-id
+META_TAG_VISUAL_ID=visual
+META_TAG_CODE_ID=passthrough
+SIZE_TAG=size
+LOCATION_TAG=location
+DIMENSION_TAG=dimension
+ID_ATTRIBUTE=id
+VALUE_ATTRIBUTE=value
+#Normal Icons Path
+Component_Normal_Icon_Path=/modelicons/normal/component.gif
+Input_Port_Normal_Icon_Path=/modelicons/normal/input.gif
+Output_Port_Normal_Icon_Path=/modelicons/normal/output.gif
+Arc_Normal_Icon_Path=/modelicons/normal/connection.gif
+Association_Normal_Icon_Path=/modelicons/normal/association.gif
+Code_Fragment_Normal_Icon_Path=/modelicons/normal/code_fragment.gif
+
+#Big Icons Path
+Component_Big_Icon_Path=/modelicons/big/component.gif
+Input_Port_Big_Icon_Path=/modelicons/big/input.gif
+Output_Port_Big_Icon_Path=/modelicons/big/output.gif
+Arc_Big_Icon_Path=/modelicons/big/connection.gif
+Association_Big_Icon_Path=/modelicons/big/association.gif
+Code_Fragment_Big_Icon_Path=/modelicons/big/code_fragment.gif
+
+#other Icons
+Component_Menu_Icon_Path=/modelicons/others/comp.gif
+Layout_Normal_Icon_Path=/modelicons/others/layout.gif
+Layout_Disabled_Icon_Path=/modelicons/others/layout_disabled.gif
+
+#XML
+Default_XML_DTD_Entry=gxf.dtd
+Correct_XML_DTD_Path=/xmldtd/gxf.dtd"