Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2008-07-31 08:17:13 -0400
committerdstadnik2008-07-31 08:17:13 -0400
commitdfe1345ea63ad9c3e344674699ff36f6d0a268fc (patch)
tree9e9e8877e49b4aee9763a37f410520229bbd3123
parent5f8fd1e4bc35dbc5db23ad420a88009fae4429ee (diff)
downloadorg.eclipse.gmf-tooling-dfe1345ea63ad9c3e344674699ff36f6d0a268fc.tar.gz
org.eclipse.gmf-tooling-dfe1345ea63ad9c3e344674699ff36f6d0a268fc.tar.xz
org.eclipse.gmf-tooling-dfe1345ea63ad9c3e344674699ff36f6d0a268fc.zip
[234668] support svg figures in gmfgraph
-rw-r--r--plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore17
-rw-r--r--plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel16
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java18
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java384
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGFigure.java71
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGProperty.java192
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGPropertyType.java212
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java46
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java229
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGFigureImpl.java225
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGPropertyImpl.java438
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java36
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java46
13 files changed, 1925 insertions, 5 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore
index 6af34126a..328b48a8f 100644
--- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore
+++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore
@@ -510,4 +510,21 @@
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="StackLayout" eSuperTypes="#//Layout"/>
+ <eClassifiers xsi:type="ecore:EClass" name="SVGFigure" eSuperTypes="#//RealFigure">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="documentURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
+ eType="#//SVGProperty" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SVGProperty">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="query" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="attribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//SVGPropertyType"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="getter" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="setter" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="callSuper" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="SVGPropertyType">
+ <eLiterals name="STRING"/>
+ <eLiterals name="COLOR" value="1"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel
index e9d0b857a..691b88a1b 100644
--- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel
+++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel
@@ -58,6 +58,10 @@
<genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//Alignment/END"/>
<genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//Alignment/FILL"/>
</genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="gmfgraph.ecore#//SVGPropertyType">
+ <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//SVGPropertyType/STRING"/>
+ <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//SVGPropertyType/COLOR"/>
+ </genEnums>
<genClasses ecoreClass="gmfgraph.ecore#//Canvas">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Canvas/figures"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Canvas/nodes"/>
@@ -292,5 +296,17 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//XYLayoutData/size"/>
</genClasses>
<genClasses ecoreClass="gmfgraph.ecore#//StackLayout"/>
+ <genClasses ecoreClass="gmfgraph.ecore#//SVGFigure">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGFigure/documentURI"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//SVGFigure/properties"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgraph.ecore#//SVGProperty">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/query"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/attribute"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/type"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/getter"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/setter"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/callSuper"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java
index 5a5fb1f39..bc98a158b 100644
--- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java
@@ -494,6 +494,24 @@ public interface GMFGraphFactory extends EFactory {
StackLayout createStackLayout();
/**
+ * Returns a new object of class '<em>SVG Figure</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>SVG Figure</em>'.
+ * @generated
+ */
+ SVGFigure createSVGFigure();
+
+ /**
+ * Returns a new object of class '<em>SVG Property</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>SVG Property</em>'.
+ * @generated
+ */
+ SVGProperty createSVGProperty();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java
index 6986773d7..2462669b7 100644
--- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java
@@ -4514,7 +4514,7 @@ public interface GMFGraphPackage extends EPackage {
* @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getFontStyle()
* @generated
*/
- int FONT_STYLE = 70;
+ int FONT_STYLE = 72;
/**
* The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.PointImpl <em>Point</em>}' class.
@@ -6098,6 +6098,251 @@ public interface GMFGraphPackage extends EPackage {
int STACK_LAYOUT_FEATURE_COUNT = LAYOUT_FEATURE_COUNT + 0;
/**
+ * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.SVGFigureImpl <em>SVG Figure</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.gmfgraph.impl.SVGFigureImpl
+ * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getSVGFigure()
+ * @generated
+ */
+ int SVG_FIGURE = 69;
+
+ /**
+ * The feature id for the '<em><b>Layout Data</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__LAYOUT_DATA = REAL_FIGURE__LAYOUT_DATA;
+
+ /**
+ * The feature id for the '<em><b>Layout</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__LAYOUT = REAL_FIGURE__LAYOUT;
+
+ /**
+ * The feature id for the '<em><b>Descriptor</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__DESCRIPTOR = REAL_FIGURE__DESCRIPTOR;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__FOREGROUND_COLOR = REAL_FIGURE__FOREGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Background Color</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__BACKGROUND_COLOR = REAL_FIGURE__BACKGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Maximum Size</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__MAXIMUM_SIZE = REAL_FIGURE__MAXIMUM_SIZE;
+
+ /**
+ * The feature id for the '<em><b>Minimum Size</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__MINIMUM_SIZE = REAL_FIGURE__MINIMUM_SIZE;
+
+ /**
+ * The feature id for the '<em><b>Preferred Size</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__PREFERRED_SIZE = REAL_FIGURE__PREFERRED_SIZE;
+
+ /**
+ * The feature id for the '<em><b>Font</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__FONT = REAL_FIGURE__FONT;
+
+ /**
+ * The feature id for the '<em><b>Insets</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__INSETS = REAL_FIGURE__INSETS;
+
+ /**
+ * The feature id for the '<em><b>Border</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__BORDER = REAL_FIGURE__BORDER;
+
+ /**
+ * The feature id for the '<em><b>Location</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__LOCATION = REAL_FIGURE__LOCATION;
+
+ /**
+ * The feature id for the '<em><b>Size</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__SIZE = REAL_FIGURE__SIZE;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__NAME = REAL_FIGURE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__CHILDREN = REAL_FIGURE__CHILDREN;
+
+ /**
+ * The feature id for the '<em><b>Document URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__DOCUMENT_URI = REAL_FIGURE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Properties</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__PROPERTIES = REAL_FIGURE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>SVG Figure</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE_FEATURE_COUNT = REAL_FIGURE_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl <em>SVG Property</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl
+ * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getSVGProperty()
+ * @generated
+ */
+ int SVG_PROPERTY = 70;
+
+ /**
+ * The feature id for the '<em><b>Query</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY__QUERY = 0;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY__ATTRIBUTE = 1;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY__TYPE = 2;
+
+ /**
+ * The feature id for the '<em><b>Getter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY__GETTER = 3;
+
+ /**
+ * The feature id for the '<em><b>Setter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY__SETTER = 4;
+
+ /**
+ * The feature id for the '<em><b>Call Super</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY__CALL_SUPER = 5;
+
+ /**
+ * The number of structural features of the '<em>SVG Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_PROPERTY_FEATURE_COUNT = 6;
+
+ /**
* The meta object id for the '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -6105,7 +6350,7 @@ public interface GMFGraphPackage extends EPackage {
* @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getColorConstants()
* @generated
*/
- int COLOR_CONSTANTS = 69;
+ int COLOR_CONSTANTS = 71;
/**
* The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Direction <em>Direction</em>}' enum.
@@ -6115,7 +6360,7 @@ public interface GMFGraphPackage extends EPackage {
* @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getDirection()
* @generated
*/
- int DIRECTION = 71;
+ int DIRECTION = 73;
/**
* The meta object id for the '{@link org.eclipse.gmf.gmfgraph.LineKind <em>Line Kind</em>}' enum.
@@ -6125,7 +6370,7 @@ public interface GMFGraphPackage extends EPackage {
* @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLineKind()
* @generated
*/
- int LINE_KIND = 72;
+ int LINE_KIND = 74;
/**
@@ -6136,7 +6381,18 @@ public interface GMFGraphPackage extends EPackage {
* @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getAlignment()
* @generated
*/
- int ALIGNMENT = 73;
+ int ALIGNMENT = 75;
+
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.SVGPropertyType <em>SVG Property Type</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.gmfgraph.SVGPropertyType
+ * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getSVGPropertyType()
+ * @generated
+ */
+ int SVG_PROPERTY_TYPE = 76;
/**
@@ -8160,6 +8416,114 @@ public interface GMFGraphPackage extends EPackage {
EClass getStackLayout();
/**
+ * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.SVGFigure <em>SVG Figure</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>SVG Figure</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGFigure
+ * @generated
+ */
+ EClass getSVGFigure();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGFigure#getDocumentURI <em>Document URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Document URI</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGFigure#getDocumentURI()
+ * @see #getSVGFigure()
+ * @generated
+ */
+ EAttribute getSVGFigure_DocumentURI();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.SVGFigure#getProperties <em>Properties</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Properties</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGFigure#getProperties()
+ * @see #getSVGFigure()
+ * @generated
+ */
+ EReference getSVGFigure_Properties();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.SVGProperty <em>SVG Property</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>SVG Property</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty
+ * @generated
+ */
+ EClass getSVGProperty();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getQuery <em>Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Query</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty#getQuery()
+ * @see #getSVGProperty()
+ * @generated
+ */
+ EAttribute getSVGProperty_Query();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Attribute</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty#getAttribute()
+ * @see #getSVGProperty()
+ * @generated
+ */
+ EAttribute getSVGProperty_Attribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty#getType()
+ * @see #getSVGProperty()
+ * @generated
+ */
+ EAttribute getSVGProperty_Type();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getGetter <em>Getter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Getter</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty#getGetter()
+ * @see #getSVGProperty()
+ * @generated
+ */
+ EAttribute getSVGProperty_Getter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getSetter <em>Setter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Setter</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty#getSetter()
+ * @see #getSVGProperty()
+ * @generated
+ */
+ EAttribute getSVGProperty_Setter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGProperty#isCallSuper <em>Call Super</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Call Super</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty#isCallSuper()
+ * @see #getSVGProperty()
+ * @generated
+ */
+ EAttribute getSVGProperty_CallSuper();
+
+ /**
* Returns the meta object for enum '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -8200,6 +8564,16 @@ public interface GMFGraphPackage extends EPackage {
EEnum getAlignment();
/**
+ * Returns the meta object for enum '{@link org.eclipse.gmf.gmfgraph.SVGPropertyType <em>SVG Property Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>SVG Property Type</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGPropertyType
+ * @generated
+ */
+ EEnum getSVGPropertyType();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGFigure.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGFigure.java
new file mode 100644
index 000000000..87e03f291
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGFigure.java
@@ -0,0 +1,71 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SVGFigure.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ */
+package org.eclipse.gmf.gmfgraph;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>SVG Figure</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGFigure#getDocumentURI <em>Document URI</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGFigure#getProperties <em>Properties</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGFigure()
+ * @model
+ * @generated
+ */
+public interface SVGFigure extends RealFigure {
+ /**
+ * Returns the value of the '<em><b>Document URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Document URI</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Document URI</em>' attribute.
+ * @see #setDocumentURI(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGFigure_DocumentURI()
+ * @model
+ * @generated
+ */
+ String getDocumentURI();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGFigure#getDocumentURI <em>Document URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Document URI</em>' attribute.
+ * @see #getDocumentURI()
+ * @generated
+ */
+ void setDocumentURI(String value);
+
+ /**
+ * Returns the value of the '<em><b>Properties</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.gmf.gmfgraph.SVGProperty}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Properties</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Properties</em>' containment reference list.
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGFigure_Properties()
+ * @model containment="true"
+ * @generated
+ */
+ EList<SVGProperty> getProperties();
+
+} // SVGFigure
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGProperty.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGProperty.java
new file mode 100644
index 000000000..13c68a593
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGProperty.java
@@ -0,0 +1,192 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SVGProperty.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ */
+package org.eclipse.gmf.gmfgraph;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>SVG Property</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGProperty#getQuery <em>Query</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGProperty#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGProperty#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGProperty#getGetter <em>Getter</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGProperty#getSetter <em>Setter</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGProperty#isCallSuper <em>Call Super</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty()
+ * @model
+ * @generated
+ */
+public interface SVGProperty extends EObject {
+ /**
+ * Returns the value of the '<em><b>Query</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Query</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Query</em>' attribute.
+ * @see #setQuery(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty_Query()
+ * @model
+ * @generated
+ */
+ String getQuery();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getQuery <em>Query</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Query</em>' attribute.
+ * @see #getQuery()
+ * @generated
+ */
+ void setQuery(String value);
+
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute</em>' attribute.
+ * @see #setAttribute(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty_Attribute()
+ * @model
+ * @generated
+ */
+ String getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getAttribute <em>Attribute</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' attribute.
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(String value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.gmf.gmfgraph.SVGPropertyType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see org.eclipse.gmf.gmfgraph.SVGPropertyType
+ * @see #setType(SVGPropertyType)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty_Type()
+ * @model
+ * @generated
+ */
+ SVGPropertyType getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see org.eclipse.gmf.gmfgraph.SVGPropertyType
+ * @see #getType()
+ * @generated
+ */
+ void setType(SVGPropertyType value);
+
+ /**
+ * Returns the value of the '<em><b>Getter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Getter</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Getter</em>' attribute.
+ * @see #setGetter(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty_Getter()
+ * @model
+ * @generated
+ */
+ String getGetter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getGetter <em>Getter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Getter</em>' attribute.
+ * @see #getGetter()
+ * @generated
+ */
+ void setGetter(String value);
+
+ /**
+ * Returns the value of the '<em><b>Setter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Setter</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Setter</em>' attribute.
+ * @see #setSetter(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty_Setter()
+ * @model
+ * @generated
+ */
+ String getSetter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGProperty#getSetter <em>Setter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Setter</em>' attribute.
+ * @see #getSetter()
+ * @generated
+ */
+ void setSetter(String value);
+
+ /**
+ * Returns the value of the '<em><b>Call Super</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Call Super</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Call Super</em>' attribute.
+ * @see #setCallSuper(boolean)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGProperty_CallSuper()
+ * @model
+ * @generated
+ */
+ boolean isCallSuper();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGProperty#isCallSuper <em>Call Super</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Call Super</em>' attribute.
+ * @see #isCallSuper()
+ * @generated
+ */
+ void setCallSuper(boolean value);
+
+} // SVGProperty
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGPropertyType.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGPropertyType.java
new file mode 100644
index 000000000..22e059e71
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGPropertyType.java
@@ -0,0 +1,212 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SVGPropertyType.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ */
+package org.eclipse.gmf.gmfgraph;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>SVG Property Type</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGPropertyType()
+ * @model
+ * @generated
+ */
+public enum SVGPropertyType implements Enumerator {
+ /**
+ * The '<em><b>STRING</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #STRING_VALUE
+ * @generated
+ * @ordered
+ */
+ STRING(0, "STRING", "STRING"),
+
+ /**
+ * The '<em><b>COLOR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #COLOR_VALUE
+ * @generated
+ * @ordered
+ */
+ COLOR(1, "COLOR", "COLOR");
+
+ /**
+ * The '<em><b>STRING</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>STRING</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #STRING
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int STRING_VALUE = 0;
+
+ /**
+ * The '<em><b>COLOR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>COLOR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #COLOR
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int COLOR_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>SVG Property Type</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final SVGPropertyType[] VALUES_ARRAY =
+ new SVGPropertyType[] {
+ STRING,
+ COLOR,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>SVG Property Type</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<SVGPropertyType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>SVG Property Type</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SVGPropertyType get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ SVGPropertyType result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SVG Property Type</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SVGPropertyType getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ SVGPropertyType result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SVG Property Type</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SVGPropertyType get(int value) {
+ switch (value) {
+ case STRING_VALUE: return STRING;
+ case COLOR_VALUE: return COLOR;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private SVGPropertyType(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //SVGPropertyType
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java
index 3f1d59507..b5f78c4c0 100644
--- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java
@@ -110,6 +110,8 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory
case GMFGraphPackage.XY_LAYOUT: return createXYLayout();
case GMFGraphPackage.XY_LAYOUT_DATA: return createXYLayoutData();
case GMFGraphPackage.STACK_LAYOUT: return createStackLayout();
+ case GMFGraphPackage.SVG_FIGURE: return createSVGFigure();
+ case GMFGraphPackage.SVG_PROPERTY: return createSVGProperty();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -133,6 +135,8 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory
return createLineKindFromString(eDataType, initialValue);
case GMFGraphPackage.ALIGNMENT:
return createAlignmentFromString(eDataType, initialValue);
+ case GMFGraphPackage.SVG_PROPERTY_TYPE:
+ return createSVGPropertyTypeFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -156,6 +160,8 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory
return convertLineKindToString(eDataType, instanceValue);
case GMFGraphPackage.ALIGNMENT:
return convertAlignmentToString(eDataType, instanceValue);
+ case GMFGraphPackage.SVG_PROPERTY_TYPE:
+ return convertSVGPropertyTypeToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -686,6 +692,26 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory
* <!-- end-user-doc -->
* @generated
*/
+ public SVGFigure createSVGFigure() {
+ SVGFigureImpl svgFigure = new SVGFigureImpl();
+ return svgFigure;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SVGProperty createSVGProperty() {
+ SVGPropertyImpl svgProperty = new SVGPropertyImpl();
+ return svgProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public ColorConstants createColorConstantsFromString(EDataType eDataType, String initialValue) {
ColorConstants result = ColorConstants.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
@@ -786,6 +812,26 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory
* <!-- end-user-doc -->
* @generated
*/
+ public SVGPropertyType createSVGPropertyTypeFromString(EDataType eDataType, String initialValue) {
+ SVGPropertyType result = SVGPropertyType.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertSVGPropertyTypeToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public GMFGraphPackage getGMFGraphPackage() {
return (GMFGraphPackage)getEPackage();
}
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java
index d24bc85b1..aad545e05 100644
--- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java
@@ -12,6 +12,85 @@ import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.gmf.gmfgraph.AbstractFigure;
+import org.eclipse.gmf.gmfgraph.AbstractNode;
+import org.eclipse.gmf.gmfgraph.Alignment;
+import org.eclipse.gmf.gmfgraph.AlignmentFacet;
+import org.eclipse.gmf.gmfgraph.BasicFont;
+import org.eclipse.gmf.gmfgraph.Border;
+import org.eclipse.gmf.gmfgraph.BorderLayout;
+import org.eclipse.gmf.gmfgraph.BorderLayoutData;
+import org.eclipse.gmf.gmfgraph.BorderRef;
+import org.eclipse.gmf.gmfgraph.Canvas;
+import org.eclipse.gmf.gmfgraph.ChildAccess;
+import org.eclipse.gmf.gmfgraph.Color;
+import org.eclipse.gmf.gmfgraph.ColorConstants;
+import org.eclipse.gmf.gmfgraph.Compartment;
+import org.eclipse.gmf.gmfgraph.CompoundBorder;
+import org.eclipse.gmf.gmfgraph.Connection;
+import org.eclipse.gmf.gmfgraph.ConnectionFigure;
+import org.eclipse.gmf.gmfgraph.ConstantColor;
+import org.eclipse.gmf.gmfgraph.CustomAttribute;
+import org.eclipse.gmf.gmfgraph.CustomBorder;
+import org.eclipse.gmf.gmfgraph.CustomClass;
+import org.eclipse.gmf.gmfgraph.CustomConnection;
+import org.eclipse.gmf.gmfgraph.CustomDecoration;
+import org.eclipse.gmf.gmfgraph.CustomFigure;
+import org.eclipse.gmf.gmfgraph.CustomLayout;
+import org.eclipse.gmf.gmfgraph.CustomLayoutData;
+import org.eclipse.gmf.gmfgraph.DecorationFigure;
+import org.eclipse.gmf.gmfgraph.DefaultSizeFacet;
+import org.eclipse.gmf.gmfgraph.DiagramElement;
+import org.eclipse.gmf.gmfgraph.DiagramLabel;
+import org.eclipse.gmf.gmfgraph.Dimension;
+import org.eclipse.gmf.gmfgraph.Direction;
+import org.eclipse.gmf.gmfgraph.Ellipse;
+import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.gmfgraph.FigureAccessor;
+import org.eclipse.gmf.gmfgraph.FigureDescriptor;
+import org.eclipse.gmf.gmfgraph.FigureGallery;
+import org.eclipse.gmf.gmfgraph.FigureRef;
+import org.eclipse.gmf.gmfgraph.FlowLayout;
+import org.eclipse.gmf.gmfgraph.Font;
+import org.eclipse.gmf.gmfgraph.FontStyle;
+import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.GeneralFacet;
+import org.eclipse.gmf.gmfgraph.GradientFacet;
+import org.eclipse.gmf.gmfgraph.GridLayout;
+import org.eclipse.gmf.gmfgraph.GridLayoutData;
+import org.eclipse.gmf.gmfgraph.Identity;
+import org.eclipse.gmf.gmfgraph.Insets;
+import org.eclipse.gmf.gmfgraph.Label;
+import org.eclipse.gmf.gmfgraph.LabelOffsetFacet;
+import org.eclipse.gmf.gmfgraph.LabeledContainer;
+import org.eclipse.gmf.gmfgraph.Layout;
+import org.eclipse.gmf.gmfgraph.LayoutData;
+import org.eclipse.gmf.gmfgraph.LayoutRef;
+import org.eclipse.gmf.gmfgraph.Layoutable;
+import org.eclipse.gmf.gmfgraph.LineBorder;
+import org.eclipse.gmf.gmfgraph.LineKind;
+import org.eclipse.gmf.gmfgraph.MarginBorder;
+import org.eclipse.gmf.gmfgraph.Node;
+import org.eclipse.gmf.gmfgraph.Point;
+import org.eclipse.gmf.gmfgraph.Polygon;
+import org.eclipse.gmf.gmfgraph.PolygonDecoration;
+import org.eclipse.gmf.gmfgraph.Polyline;
+import org.eclipse.gmf.gmfgraph.PolylineConnection;
+import org.eclipse.gmf.gmfgraph.PolylineDecoration;
+import org.eclipse.gmf.gmfgraph.RGBColor;
+import org.eclipse.gmf.gmfgraph.RealFigure;
+import org.eclipse.gmf.gmfgraph.Rectangle;
+import org.eclipse.gmf.gmfgraph.RoundedRectangle;
+import org.eclipse.gmf.gmfgraph.SVGFigure;
+import org.eclipse.gmf.gmfgraph.SVGProperty;
+import org.eclipse.gmf.gmfgraph.SVGPropertyType;
+import org.eclipse.gmf.gmfgraph.ScalablePolygon;
+import org.eclipse.gmf.gmfgraph.Shape;
+import org.eclipse.gmf.gmfgraph.StackLayout;
+import org.eclipse.gmf.gmfgraph.VisualFacet;
+import org.eclipse.gmf.gmfgraph.XYLayout;
+import org.eclipse.gmf.gmfgraph.XYLayoutData;
import org.eclipse.gmf.gmfgraph.*;
/**
@@ -509,6 +588,20 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
* <!-- end-user-doc -->
* @generated
*/
+ private EClass svgFigureEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass svgPropertyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EEnum colorConstantsEEnum = null;
/**
@@ -540,6 +633,13 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
private EEnum alignmentEEnum = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum svgPropertyTypeEEnum = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -2322,6 +2422,96 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getSVGFigure() {
+ return svgFigureEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGFigure_DocumentURI() {
+ return (EAttribute)svgFigureEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSVGFigure_Properties() {
+ return (EReference)svgFigureEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSVGProperty() {
+ return svgPropertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGProperty_Query() {
+ return (EAttribute)svgPropertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGProperty_Attribute() {
+ return (EAttribute)svgPropertyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGProperty_Type() {
+ return (EAttribute)svgPropertyEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGProperty_Getter() {
+ return (EAttribute)svgPropertyEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGProperty_Setter() {
+ return (EAttribute)svgPropertyEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSVGProperty_CallSuper() {
+ return (EAttribute)svgPropertyEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EEnum getColorConstants() {
return colorConstantsEEnum;
}
@@ -2358,6 +2548,15 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
* <!-- end-user-doc -->
* @generated
*/
+ public EEnum getSVGPropertyType() {
+ return svgPropertyTypeEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public GMFGraphFactory getGMFGraphFactory() {
return (GMFGraphFactory)getEFactoryInstance();
}
@@ -2639,12 +2838,25 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
stackLayoutEClass = createEClass(STACK_LAYOUT);
+ svgFigureEClass = createEClass(SVG_FIGURE);
+ createEAttribute(svgFigureEClass, SVG_FIGURE__DOCUMENT_URI);
+ createEReference(svgFigureEClass, SVG_FIGURE__PROPERTIES);
+
+ svgPropertyEClass = createEClass(SVG_PROPERTY);
+ createEAttribute(svgPropertyEClass, SVG_PROPERTY__QUERY);
+ createEAttribute(svgPropertyEClass, SVG_PROPERTY__ATTRIBUTE);
+ createEAttribute(svgPropertyEClass, SVG_PROPERTY__TYPE);
+ createEAttribute(svgPropertyEClass, SVG_PROPERTY__GETTER);
+ createEAttribute(svgPropertyEClass, SVG_PROPERTY__SETTER);
+ createEAttribute(svgPropertyEClass, SVG_PROPERTY__CALL_SUPER);
+
// Create enums
colorConstantsEEnum = createEEnum(COLOR_CONSTANTS);
fontStyleEEnum = createEEnum(FONT_STYLE);
directionEEnum = createEEnum(DIRECTION);
lineKindEEnum = createEEnum(LINE_KIND);
alignmentEEnum = createEEnum(ALIGNMENT);
+ svgPropertyTypeEEnum = createEEnum(SVG_PROPERTY_TYPE);
}
/**
@@ -2738,6 +2950,7 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
xyLayoutEClass.getESuperTypes().add(this.getLayout());
xyLayoutDataEClass.getESuperTypes().add(this.getLayoutData());
stackLayoutEClass.getESuperTypes().add(this.getLayout());
+ svgFigureEClass.getESuperTypes().add(this.getRealFigure());
// Initialize classes and features; add operations and parameters
initEClass(canvasEClass, Canvas.class, "Canvas", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -2998,6 +3211,18 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
initEClass(stackLayoutEClass, StackLayout.class, "StackLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(svgFigureEClass, SVGFigure.class, "SVGFigure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSVGFigure_DocumentURI(), ecorePackage.getEString(), "documentURI", null, 0, 1, SVGFigure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSVGFigure_Properties(), this.getSVGProperty(), null, "properties", null, 0, -1, SVGFigure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(svgPropertyEClass, SVGProperty.class, "SVGProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSVGProperty_Query(), ecorePackage.getEString(), "query", null, 0, 1, SVGProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSVGProperty_Attribute(), ecorePackage.getEString(), "attribute", null, 0, 1, SVGProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSVGProperty_Type(), this.getSVGPropertyType(), "type", null, 0, 1, SVGProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSVGProperty_Getter(), ecorePackage.getEString(), "getter", null, 0, 1, SVGProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSVGProperty_Setter(), ecorePackage.getEString(), "setter", null, 0, 1, SVGProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSVGProperty_CallSuper(), ecorePackage.getEBoolean(), "callSuper", null, 0, 1, SVGProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Initialize enums and add enum literals
initEEnum(colorConstantsEEnum, ColorConstants.class, "ColorConstants");
addEEnumLiteral(colorConstantsEEnum, ColorConstants.WHITE_LITERAL);
@@ -3049,6 +3274,10 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
addEEnumLiteral(alignmentEEnum, Alignment.END_LITERAL);
addEEnumLiteral(alignmentEEnum, Alignment.FILL_LITERAL);
+ initEEnum(svgPropertyTypeEEnum, SVGPropertyType.class, "SVGPropertyType");
+ addEEnumLiteral(svgPropertyTypeEEnum, SVGPropertyType.STRING);
+ addEEnumLiteral(svgPropertyTypeEEnum, SVGPropertyType.COLOR);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGFigureImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGFigureImpl.java
new file mode 100644
index 000000000..51a318aeb
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGFigureImpl.java
@@ -0,0 +1,225 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SVGFigureImpl.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ */
+package org.eclipse.gmf.gmfgraph.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.SVGFigure;
+import org.eclipse.gmf.gmfgraph.SVGProperty;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>SVG Figure</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGFigureImpl#getDocumentURI <em>Document URI</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGFigureImpl#getProperties <em>Properties</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
+ /**
+ * The default value of the '{@link #getDocumentURI() <em>Document URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDocumentURI()
+ * @generated
+ * @ordered
+ */
+ protected static final String DOCUMENT_URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDocumentURI() <em>Document URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDocumentURI()
+ * @generated
+ * @ordered
+ */
+ protected String documentURI = DOCUMENT_URI_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProperties()
+ * @generated
+ * @ordered
+ */
+ protected EList<SVGProperty> properties;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SVGFigureImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GMFGraphPackage.eINSTANCE.getSVGFigure();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDocumentURI() {
+ return documentURI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDocumentURI(String newDocumentURI) {
+ String oldDocumentURI = documentURI;
+ documentURI = newDocumentURI;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_FIGURE__DOCUMENT_URI, oldDocumentURI, documentURI));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<SVGProperty> getProperties() {
+ if (properties == null) {
+ properties = new EObjectContainmentEList<SVGProperty>(SVGProperty.class, this, GMFGraphPackage.SVG_FIGURE__PROPERTIES);
+ }
+ return properties;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
+ return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_FIGURE__DOCUMENT_URI:
+ return getDocumentURI();
+ case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
+ return getProperties();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_FIGURE__DOCUMENT_URI:
+ setDocumentURI((String)newValue);
+ return;
+ case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
+ getProperties().clear();
+ getProperties().addAll((Collection<? extends SVGProperty>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_FIGURE__DOCUMENT_URI:
+ setDocumentURI(DOCUMENT_URI_EDEFAULT);
+ return;
+ case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
+ getProperties().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_FIGURE__DOCUMENT_URI:
+ return DOCUMENT_URI_EDEFAULT == null ? documentURI != null : !DOCUMENT_URI_EDEFAULT.equals(documentURI);
+ case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
+ return properties != null && !properties.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (documentURI: ");
+ result.append(documentURI);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SVGFigureImpl
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGPropertyImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGPropertyImpl.java
new file mode 100644
index 000000000..a5a7fe37a
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGPropertyImpl.java
@@ -0,0 +1,438 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SVGPropertyImpl.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ */
+package org.eclipse.gmf.gmfgraph.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.SVGProperty;
+import org.eclipse.gmf.gmfgraph.SVGPropertyType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>SVG Property</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl#getQuery <em>Query</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl#getGetter <em>Getter</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl#getSetter <em>Setter</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl#isCallSuper <em>Call Super</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SVGPropertyImpl extends EObjectImpl implements SVGProperty {
+ /**
+ * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQuery()
+ * @generated
+ * @ordered
+ */
+ protected static final String QUERY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQuery()
+ * @generated
+ * @ordered
+ */
+ protected String query = QUERY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getAttribute() <em>Attribute</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected static final String ATTRIBUTE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected String attribute = ATTRIBUTE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final SVGPropertyType TYPE_EDEFAULT = SVGPropertyType.STRING;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected SVGPropertyType type = TYPE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getGetter() <em>Getter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGetter()
+ * @generated
+ * @ordered
+ */
+ protected static final String GETTER_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getGetter() <em>Getter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGetter()
+ * @generated
+ * @ordered
+ */
+ protected String getter = GETTER_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSetter() <em>Setter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSetter()
+ * @generated
+ * @ordered
+ */
+ protected static final String SETTER_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSetter() <em>Setter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSetter()
+ * @generated
+ * @ordered
+ */
+ protected String setter = SETTER_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isCallSuper() <em>Call Super</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isCallSuper()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean CALL_SUPER_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isCallSuper() <em>Call Super</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isCallSuper()
+ * @generated
+ * @ordered
+ */
+ protected boolean callSuper = CALL_SUPER_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SVGPropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GMFGraphPackage.eINSTANCE.getSVGProperty();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getQuery() {
+ return query;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setQuery(String newQuery) {
+ String oldQuery = query;
+ query = newQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_PROPERTY__QUERY, oldQuery, query));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(String newAttribute) {
+ String oldAttribute = attribute;
+ attribute = newAttribute;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_PROPERTY__ATTRIBUTE, oldAttribute, attribute));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SVGPropertyType getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(SVGPropertyType newType) {
+ SVGPropertyType oldType = type;
+ type = newType == null ? TYPE_EDEFAULT : newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_PROPERTY__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getGetter() {
+ return getter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGetter(String newGetter) {
+ String oldGetter = getter;
+ getter = newGetter;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_PROPERTY__GETTER, oldGetter, getter));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSetter() {
+ return setter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSetter(String newSetter) {
+ String oldSetter = setter;
+ setter = newSetter;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_PROPERTY__SETTER, oldSetter, setter));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isCallSuper() {
+ return callSuper;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCallSuper(boolean newCallSuper) {
+ boolean oldCallSuper = callSuper;
+ callSuper = newCallSuper;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_PROPERTY__CALL_SUPER, oldCallSuper, callSuper));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_PROPERTY__QUERY:
+ return getQuery();
+ case GMFGraphPackage.SVG_PROPERTY__ATTRIBUTE:
+ return getAttribute();
+ case GMFGraphPackage.SVG_PROPERTY__TYPE:
+ return getType();
+ case GMFGraphPackage.SVG_PROPERTY__GETTER:
+ return getGetter();
+ case GMFGraphPackage.SVG_PROPERTY__SETTER:
+ return getSetter();
+ case GMFGraphPackage.SVG_PROPERTY__CALL_SUPER:
+ return isCallSuper() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_PROPERTY__QUERY:
+ setQuery((String)newValue);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__ATTRIBUTE:
+ setAttribute((String)newValue);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__TYPE:
+ setType((SVGPropertyType)newValue);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__GETTER:
+ setGetter((String)newValue);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__SETTER:
+ setSetter((String)newValue);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__CALL_SUPER:
+ setCallSuper(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_PROPERTY__QUERY:
+ setQuery(QUERY_EDEFAULT);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__ATTRIBUTE:
+ setAttribute(ATTRIBUTE_EDEFAULT);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__GETTER:
+ setGetter(GETTER_EDEFAULT);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__SETTER:
+ setSetter(SETTER_EDEFAULT);
+ return;
+ case GMFGraphPackage.SVG_PROPERTY__CALL_SUPER:
+ setCallSuper(CALL_SUPER_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.SVG_PROPERTY__QUERY:
+ return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
+ case GMFGraphPackage.SVG_PROPERTY__ATTRIBUTE:
+ return ATTRIBUTE_EDEFAULT == null ? attribute != null : !ATTRIBUTE_EDEFAULT.equals(attribute);
+ case GMFGraphPackage.SVG_PROPERTY__TYPE:
+ return type != TYPE_EDEFAULT;
+ case GMFGraphPackage.SVG_PROPERTY__GETTER:
+ return GETTER_EDEFAULT == null ? getter != null : !GETTER_EDEFAULT.equals(getter);
+ case GMFGraphPackage.SVG_PROPERTY__SETTER:
+ return SETTER_EDEFAULT == null ? setter != null : !SETTER_EDEFAULT.equals(setter);
+ case GMFGraphPackage.SVG_PROPERTY__CALL_SUPER:
+ return callSuper != CALL_SUPER_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (query: ");
+ result.append(query);
+ result.append(", attribute: ");
+ result.append(attribute);
+ result.append(", type: ");
+ result.append(type);
+ result.append(", getter: ");
+ result.append(getter);
+ result.append(", setter: ");
+ result.append(setter);
+ result.append(", callSuper: ");
+ result.append(callSuper);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SVGPropertyImpl
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java
index 846025f8c..dea22155e 100644
--- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java
@@ -345,6 +345,14 @@ public class GMFGraphAdapterFactory extends AdapterFactoryImpl {
return createStackLayoutAdapter();
}
@Override
+ public Adapter caseSVGFigure(SVGFigure object) {
+ return createSVGFigureAdapter();
+ }
+ @Override
+ public Adapter caseSVGProperty(SVGProperty object) {
+ return createSVGPropertyAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -1331,6 +1339,34 @@ public class GMFGraphAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.SVGFigure <em>SVG Figure</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.gmfgraph.SVGFigure
+ * @generated
+ */
+ public Adapter createSVGFigureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.SVGProperty <em>SVG Property</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.gmfgraph.SVGProperty
+ * @generated
+ */
+ public Adapter createSVGPropertyAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java
index aeda8def4..86aa75bcb 100644
--- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java
+++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java
@@ -647,6 +647,22 @@ public class GMFGraphSwitch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case GMFGraphPackage.SVG_FIGURE: {
+ SVGFigure svgFigure = (SVGFigure)theEObject;
+ T result = caseSVGFigure(svgFigure);
+ if (result == null) result = caseRealFigure(svgFigure);
+ if (result == null) result = caseAbstractFigure(svgFigure);
+ if (result == null) result = caseFigure(svgFigure);
+ if (result == null) result = caseLayoutable(svgFigure);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GMFGraphPackage.SVG_PROPERTY: {
+ SVGProperty svgProperty = (SVGProperty)theEObject;
+ T result = caseSVGProperty(svgProperty);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -1687,6 +1703,36 @@ public class GMFGraphSwitch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>SVG Figure</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>SVG Figure</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSVGFigure(SVGFigure object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>SVG Property</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>SVG Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSVGProperty(SVGProperty object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;

Back to the top