Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2008-08-04 12:45:55 +0000
committerdstadnik2008-08-04 12:45:55 +0000
commitb25b3f90b67752d64c8763db76263c0741c21e89 (patch)
treed057754944945cd0613e1220db65e9736c7fec05 /plugins
parentb5da282e5f64bdcdf5dce192ca16ecef49cfb7cc (diff)
downloadorg.eclipse.gmf-tooling-b25b3f90b67752d64c8763db76263c0741c21e89.tar.gz
org.eclipse.gmf-tooling-b25b3f90b67752d64c8763db76263c0741c21e89.tar.xz
org.eclipse.gmf-tooling-b25b3f90b67752d64c8763db76263c0741c21e89.zip
[243052] add prop to force safe rendering
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore1
-rw-r--r--plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel1
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java22
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/SVGFigure.java29
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java11
-rw-r--r--plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/SVGFigureImpl.java56
6 files changed, 117 insertions, 3 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore
index 328b48a8f..92db0fc8d 100644
--- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore
+++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore
@@ -514,6 +514,7 @@
<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"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="safeRendering" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</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"/>
diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel
index 691b88a1b..1d44de498 100644
--- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel
+++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel
@@ -299,6 +299,7 @@
<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"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGFigure/safeRendering"/>
</genClasses>
<genClasses ecoreClass="gmfgraph.ecore#//SVGProperty">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//SVGProperty/query"/>
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 2462669b7..cbb755dda 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
@@ -6261,13 +6261,22 @@ public interface GMFGraphPackage extends EPackage {
int SVG_FIGURE__PROPERTIES = REAL_FIGURE_FEATURE_COUNT + 1;
/**
+ * The feature id for the '<em><b>Safe Rendering</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SVG_FIGURE__SAFE_RENDERING = REAL_FIGURE_FEATURE_COUNT + 2;
+
+ /**
* 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;
+ int SVG_FIGURE_FEATURE_COUNT = REAL_FIGURE_FEATURE_COUNT + 3;
/**
* The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.SVGPropertyImpl <em>SVG Property</em>}' class.
@@ -8448,6 +8457,17 @@ public interface GMFGraphPackage extends EPackage {
EReference getSVGFigure_Properties();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.SVGFigure#isSafeRendering <em>Safe Rendering</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Safe Rendering</em>'.
+ * @see org.eclipse.gmf.gmfgraph.SVGFigure#isSafeRendering()
+ * @see #getSVGFigure()
+ * @generated
+ */
+ EAttribute getSVGFigure_SafeRendering();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.SVGProperty <em>SVG Property</em>}'.
* <!-- 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
index 87e03f291..4e3714702 100644
--- 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
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: SVGFigure.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ * $Id: SVGFigure.java,v 1.2 2008/08/04 12:45:55 dstadnik Exp $
*/
package org.eclipse.gmf.gmfgraph;
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.EList;
* <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>
+ * <li>{@link org.eclipse.gmf.gmfgraph.SVGFigure#isSafeRendering <em>Safe Rendering</em>}</li>
* </ul>
* </p>
*
@@ -68,4 +69,30 @@ public interface SVGFigure extends RealFigure {
*/
EList<SVGProperty> getProperties();
+ /**
+ * Returns the value of the '<em><b>Safe Rendering</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Safe Rendering</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Safe Rendering</em>' attribute.
+ * @see #setSafeRendering(boolean)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getSVGFigure_SafeRendering()
+ * @model
+ * @generated
+ */
+ boolean isSafeRendering();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.SVGFigure#isSafeRendering <em>Safe Rendering</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Safe Rendering</em>' attribute.
+ * @see #isSafeRendering()
+ * @generated
+ */
+ void setSafeRendering(boolean value);
+
} // SVGFigure
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 aad545e05..5ef003a41 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
@@ -2449,6 +2449,15 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getSVGFigure_SafeRendering() {
+ return (EAttribute)svgFigureEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getSVGProperty() {
return svgPropertyEClass;
}
@@ -2841,6 +2850,7 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
svgFigureEClass = createEClass(SVG_FIGURE);
createEAttribute(svgFigureEClass, SVG_FIGURE__DOCUMENT_URI);
createEReference(svgFigureEClass, SVG_FIGURE__PROPERTIES);
+ createEAttribute(svgFigureEClass, SVG_FIGURE__SAFE_RENDERING);
svgPropertyEClass = createEClass(SVG_PROPERTY);
createEAttribute(svgPropertyEClass, SVG_PROPERTY__QUERY);
@@ -3214,6 +3224,7 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage
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);
+ initEAttribute(getSVGFigure_SafeRendering(), ecorePackage.getEBoolean(), "safeRendering", null, 0, 1, SVGFigure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, 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);
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
index 51a318aeb..507d2f0e0 100644
--- 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
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: SVGFigureImpl.java,v 1.1 2008/07/31 12:17:13 dstadnik Exp $
+ * $Id: SVGFigureImpl.java,v 1.2 2008/08/04 12:45:55 dstadnik Exp $
*/
package org.eclipse.gmf.gmfgraph.impl;
@@ -34,6 +34,7 @@ import org.eclipse.gmf.gmfgraph.SVGProperty;
* <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>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.SVGFigureImpl#isSafeRendering <em>Safe Rendering</em>}</li>
* </ul>
* </p>
*
@@ -71,6 +72,26 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
protected EList<SVGProperty> properties;
/**
+ * The default value of the '{@link #isSafeRendering() <em>Safe Rendering</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSafeRendering()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean SAFE_RENDERING_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isSafeRendering() <em>Safe Rendering</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSafeRendering()
+ * @generated
+ * @ordered
+ */
+ protected boolean safeRendering = SAFE_RENDERING_EDEFAULT;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -127,6 +148,27 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
* <!-- end-user-doc -->
* @generated
*/
+ public boolean isSafeRendering() {
+ return safeRendering;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSafeRendering(boolean newSafeRendering) {
+ boolean oldSafeRendering = safeRendering;
+ safeRendering = newSafeRendering;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SVG_FIGURE__SAFE_RENDERING, oldSafeRendering, safeRendering));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -148,6 +190,8 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
return getDocumentURI();
case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
return getProperties();
+ case GMFGraphPackage.SVG_FIGURE__SAFE_RENDERING:
+ return isSafeRendering() ? Boolean.TRUE : Boolean.FALSE;
}
return super.eGet(featureID, resolve, coreType);
}
@@ -168,6 +212,9 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
getProperties().clear();
getProperties().addAll((Collection<? extends SVGProperty>)newValue);
return;
+ case GMFGraphPackage.SVG_FIGURE__SAFE_RENDERING:
+ setSafeRendering(((Boolean)newValue).booleanValue());
+ return;
}
super.eSet(featureID, newValue);
}
@@ -186,6 +233,9 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
getProperties().clear();
return;
+ case GMFGraphPackage.SVG_FIGURE__SAFE_RENDERING:
+ setSafeRendering(SAFE_RENDERING_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -202,6 +252,8 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
return DOCUMENT_URI_EDEFAULT == null ? documentURI != null : !DOCUMENT_URI_EDEFAULT.equals(documentURI);
case GMFGraphPackage.SVG_FIGURE__PROPERTIES:
return properties != null && !properties.isEmpty();
+ case GMFGraphPackage.SVG_FIGURE__SAFE_RENDERING:
+ return safeRendering != SAFE_RENDERING_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -218,6 +270,8 @@ public class SVGFigureImpl extends RealFigureImpl implements SVGFigure {
StringBuffer result = new StringBuffer(super.toString());
result.append(" (documentURI: ");
result.append(documentURI);
+ result.append(", safeRendering: ");
+ result.append(safeRendering);
result.append(')');
return result.toString();
}

Back to the top