diff options
author | cletavernie | 2012-01-23 13:44:15 +0000 |
---|---|---|
committer | cletavernie | 2012-01-23 13:44:15 +0000 |
commit | 0fff36636af97489c1228cf00e39923c915c4296 (patch) | |
tree | 653993be61e56a77407a9f010ff7749fafa7a635 | |
parent | 4419c6a7b502912ce78e6022eb1c57f6e07b67df (diff) | |
download | org.eclipse.papyrus-0fff36636af97489c1228cf00e39923c915c4296.tar.gz org.eclipse.papyrus-0fff36636af97489c1228cf00e39923c915c4296.tar.xz org.eclipse.papyrus-0fff36636af97489c1228cf00e39923c915c4296.zip |
Sandbox commit
77 files changed, 7077 insertions, 318 deletions
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/META-INF/MANIFEST.MF index b1fa2581fb0..fd887894a34 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/META-INF/MANIFEST.MF +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/META-INF/MANIFEST.MF @@ -15,7 +15,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.services.resourceloading;bundle-version="0.9.0", org.eclipse.emf;bundle-version="2.6.0", org.eclipse.emf.ecore.xmi;bundle-version="2.8.0", - org.w3c.css.sac;bundle-version="1.3.1", - org.eclipse.e4.ui.css.swt;bundle-version="0.10.0" + org.w3c.css.sac;bundle-version="1.3.1" Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter, + org.eclipse.papyrus.prototype.infra.gmfdiag.css.custom diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/resources/papyrus.css b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/resources/papyrus.css index 7076f651dfa..77b43693554 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/resources/papyrus.css +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/resources/papyrus.css @@ -14,11 +14,27 @@ lineColor:#272727;
fontColor:black;
fontHeight:9;
- elementIcon:true; /* Unsupported yet */
+ elementIcon:true;
+
+ /* Detailed gradient */
+ /* gradientColor:white; */
+ /* gradientStyle:vertical; */
+
+ /* Global gradient (Equivalent to the latter) */
+ gradient:white vertical;
+
+ /* Global gradient (2) */
+ /* gradient:white blue vertical Unsupported by diagrams (Color2 is unused) */
}
-
-Class, Interface {
+
+Class {
fillColor:#C3D1D5;
+ lineColor:black;
+}
+
+Port {
+ fillColor:#C8D9F5;
+ lineColor:black;
}
Comment {
@@ -30,6 +46,5 @@ Constraint { }
Package {
- fillColor:#FFFFFF
-}
-
+ fillColor:white;
+}
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSArrowStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSArrowStyle.java index 50745991eee..91f68639dda 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSArrowStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSArrowStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSArrowStyle extends ArrowStyleImpl implements CSSStylableEleme this.arrowStyle = new CSSArrowStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSArrowStyle extends ArrowStyleImpl implements CSSStylableEleme } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicCompartment.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicCompartment.java index 56ca3b3075a..ed6e9c94e05 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicCompartment.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicCompartment.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSBasicCompartment extends BasicCompartmentImpl implements CSSS this.drawerStyle = new CSSDrawerStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSBasicCompartment extends BasicCompartmentImpl implements CSSS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicDecorationNode.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicDecorationNode.java new file mode 100644 index 00000000000..90d19b20916 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicDecorationNode.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.BasicDecorationNodeImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSBasicDecorationNode extends BasicDecorationNodeImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSBasicDecorationNode(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicSemanticCompartment.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicSemanticCompartment.java index 0b1ae3c80e2..cb332f4c531 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicSemanticCompartment.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBasicSemanticCompartment.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSBasicSemanticCompartment extends BasicSemanticCompartmentImpl this.drawerStyle = new CSSDrawerStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSBasicSemanticCompartment extends BasicSemanticCompartmentImpl } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanListValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanListValueStyle.java index e29e0631385..a7731e37f1c 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanListValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanListValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSBooleanListValueStyle extends BooleanListValueStyleImpl imple this.booleanListValueStyle = new CSSBooleanListValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSBooleanListValueStyle extends BooleanListValueStyleImpl imple } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanValueStyle.java index 39ed9841234..694d2efc352 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBooleanValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSBooleanValueStyle extends BooleanValueStyleImpl implements CS this.booleanValueStyle = new CSSBooleanValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSBooleanValueStyle extends BooleanValueStyleImpl implements CS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBounds.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBounds.java new file mode 100644 index 00000000000..93d86c7d06c --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSBounds.java @@ -0,0 +1,330 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.gmf.runtime.notation.impl.BoundsImpl; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; + +@SuppressWarnings("restriction") +public class GMFCSSBounds extends BoundsImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSBounds(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSByteArrayValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSByteArrayValueStyle.java index 2920361f1c2..e11077f829f 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSByteArrayValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSByteArrayValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSByteArrayValueStyle extends ByteArrayValueStyleImpl implement this.byteArrayValueStyle = new CSSByteArrayValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSByteArrayValueStyle extends ByteArrayValueStyleImpl implement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCanonicalStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCanonicalStyle.java index 742d6398f8e..64ae2e602e5 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCanonicalStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCanonicalStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSCanonicalStyle extends CanonicalStyleImpl implements CSSStyla this.canonicalStyle = new CSSCanonicalStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSCanonicalStyle extends CanonicalStyleImpl implements CSSStyla } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCompartment.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCompartment.java index 680d00f2ecb..c2fdc367ae1 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCompartment.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSCompartment.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSCompartment extends CompartmentImpl implements CSSStylableEle this.drawerStyle = new CSSDrawerStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSCompartment extends CompartmentImpl implements CSSStylableEle } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnector.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnector.java index a5c89221b19..2961bb0ef5b 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnector.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnector.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSConnector extends ConnectorImpl implements CSSStylableElement this.connectorStyle = new CSSConnectorStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -187,6 +199,7 @@ public class GMFCSSConnector extends ConnectorImpl implements CSSStylableElement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnectorStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnectorStyle.java index 9a3f80ad720..5a0ba1605e6 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnectorStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSConnectorStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSConnectorStyle extends ConnectorStyleImpl implements CSSStyla this.connectorStyle = new CSSConnectorStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -187,6 +199,7 @@ public class GMFCSSConnectorStyle extends ConnectorStyleImpl implements CSSStyla } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDataTypeStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDataTypeStyle.java index 8bdffd76208..b3109239d67 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDataTypeStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDataTypeStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDataTypeStyle extends DataTypeStyleImpl implements CSSStylabl this.dataTypeStyle = new CSSDataTypeStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSDataTypeStyle extends DataTypeStyleImpl implements CSSStylabl } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDecorationNode.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDecorationNode.java new file mode 100644 index 00000000000..6026e399d5e --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDecorationNode.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.DecorationNodeImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSDecorationNode extends DecorationNodeImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSDecorationNode(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDescriptionStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDescriptionStyle.java index 81e8e799528..e642d064e49 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDescriptionStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDescriptionStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDescriptionStyle extends DescriptionStyleImpl implements CSSS this.descriptionStyle = new CSSDescriptionStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSDescriptionStyle extends DescriptionStyleImpl implements CSSS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagram.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagram.java new file mode 100644 index 00000000000..9c4295c0a84 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagram.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.DiagramImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSDiagram extends DiagramImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSDiagram(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramLinkStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramLinkStyle.java index 37047d8dfac..4c2709eda85 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramLinkStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramLinkStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDiagramLinkStyle extends DiagramLinkStyleImpl implements CSSS this.diagramLinkStyle = new CSSDiagramLinkStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -49,6 +61,7 @@ public class GMFCSSDiagramLinkStyle extends DiagramLinkStyleImpl implements CSSS + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramStyle.java index 799918a74b5..5335d3b3eef 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDiagramStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDiagramStyle extends DiagramStyleImpl implements CSSStylableE this.diagramStyle = new CSSDiagramStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -117,6 +129,7 @@ public class GMFCSSDiagramStyle extends DiagramStyleImpl implements CSSStylableE } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleListValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleListValueStyle.java index 6616655d549..0b95edf4194 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleListValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleListValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDoubleListValueStyle extends DoubleListValueStyleImpl impleme this.doubleListValueStyle = new CSSDoubleListValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSDoubleListValueStyle extends DoubleListValueStyleImpl impleme } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleValueStyle.java index 976e8af3dcd..8a309619eb6 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDoubleValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDoubleValueStyle extends DoubleValueStyleImpl implements CSSS this.doubleValueStyle = new CSSDoubleValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSDoubleValueStyle extends DoubleValueStyleImpl implements CSSS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDrawerStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDrawerStyle.java index 11a3dcd5bd4..a90b3c6cc8b 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDrawerStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSDrawerStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSDrawerStyle extends DrawerStyleImpl implements CSSStylableEle this.drawerStyle = new CSSDrawerStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSDrawerStyle extends DrawerStyleImpl implements CSSStylableEle } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectListValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectListValueStyle.java index 56931b1849e..b2710190f89 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectListValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectListValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSEObjectListValueStyle extends EObjectListValueStyleImpl imple this.eObjectListValueStyle = new CSSEObjectListValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSEObjectListValueStyle extends EObjectListValueStyleImpl imple } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectValueStyle.java index d1de2c06288..00592c09bbc 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEObjectValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSEObjectValueStyle extends EObjectValueStyleImpl implements CS this.eObjectValueStyle = new CSSEObjectValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSEObjectValueStyle extends EObjectValueStyleImpl implements CS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEdge.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEdge.java new file mode 100644 index 00000000000..8c3f66d1b58 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSEdge.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.EdgeImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSEdge extends EdgeImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSEdge(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFillStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFillStyle.java index 2edfa14d2f2..03a0acb1cfb 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFillStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFillStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSFillStyle extends FillStyleImpl implements CSSStylableElement this.fillStyle = new CSSFillStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -89,6 +101,7 @@ public class GMFCSSFillStyle extends FillStyleImpl implements CSSStylableElement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFilteringStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFilteringStyle.java index 8d2e71baeb8..9a430ea2db3 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFilteringStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFilteringStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSFilteringStyle extends FilteringStyleImpl implements CSSStyla this.filteringStyle = new CSSFilteringStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSFilteringStyle extends FilteringStyleImpl implements CSSStyla } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFontStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFontStyle.java index 5765e849237..dd0aff5594c 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFontStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSFontStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSFontStyle extends FontStyleImpl implements CSSStylableElement this.fontStyle = new CSSFontStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -145,6 +157,7 @@ public class GMFCSSFontStyle extends FontStyleImpl implements CSSStylableElement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuide.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuide.java new file mode 100644 index 00000000000..da3019706ac --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuide.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.GuideImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSGuide extends GuideImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSGuide(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuideStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuideStyle.java index 82497ffdc01..844c2da3206 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuideStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSGuideStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSGuideStyle extends GuideStyleImpl implements CSSStylableEleme this.guideStyle = new CSSGuideStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -49,6 +61,7 @@ public class GMFCSSGuideStyle extends GuideStyleImpl implements CSSStylableEleme + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSHintedDiagramLinkStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSHintedDiagramLinkStyle.java index 9e7d5cd672f..7fff875f8b2 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSHintedDiagramLinkStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSHintedDiagramLinkStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSHintedDiagramLinkStyle extends HintedDiagramLinkStyleImpl imp this.hintedDiagramLinkStyle = new CSSHintedDiagramLinkStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSHintedDiagramLinkStyle extends HintedDiagramLinkStyleImpl imp } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIdentityAnchor.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIdentityAnchor.java new file mode 100644 index 00000000000..1e89e867fb3 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIdentityAnchor.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.IdentityAnchorImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSIdentityAnchor extends IdentityAnchorImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSIdentityAnchor(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImage.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImage.java new file mode 100644 index 00000000000..21c5a410a7d --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImage.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.ImageImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSImage extends ImageImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSImage(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageBufferStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageBufferStyle.java index 111d1513341..14911fa253a 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageBufferStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageBufferStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSImageBufferStyle extends ImageBufferStyleImpl implements CSSS this.imageBufferStyle = new CSSImageBufferStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSImageBufferStyle extends ImageBufferStyleImpl implements CSSS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageStyle.java index 72ef155a393..f038a022394 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSImageStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSImageStyle extends ImageStyleImpl implements CSSStylableEleme this.imageStyle = new CSSImageStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSImageStyle extends ImageStyleImpl implements CSSStylableEleme } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntListValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntListValueStyle.java index d44d7462346..2125dd88771 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntListValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntListValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSIntListValueStyle extends IntListValueStyleImpl implements CS this.intListValueStyle = new CSSIntListValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSIntListValueStyle extends IntListValueStyleImpl implements CS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntValueStyle.java index 175458ca2a4..ab0f657ea9d 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSIntValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSIntValueStyle extends IntValueStyleImpl implements CSSStylabl this.intValueStyle = new CSSIntValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSIntValueStyle extends IntValueStyleImpl implements CSSStylabl } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineStyle.java index de468452257..eb6cbdfba41 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSLineStyle extends LineStyleImpl implements CSSStylableElement this.lineStyle = new CSSLineStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSLineStyle extends LineStyleImpl implements CSSStylableElement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineTypeStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineTypeStyle.java index 9da12729835..33ffcd8ac07 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineTypeStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLineTypeStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSLineTypeStyle extends LineTypeStyleImpl implements CSSStylabl this.lineTypeStyle = new CSSLineTypeStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSLineTypeStyle extends LineTypeStyleImpl implements CSSStylabl } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListCompartment.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListCompartment.java index 1e387a84d61..d40d24593bf 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListCompartment.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListCompartment.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSListCompartment extends ListCompartmentImpl implements CSSSty this.drawerStyle = new CSSDrawerStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSListCompartment extends ListCompartmentImpl implements CSSSty } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListValueStyle.java index 12e373f6d0a..88beffa76d6 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSListValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSListValueStyle extends ListValueStyleImpl implements CSSStyla this.listValueStyle = new CSSListValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSListValueStyle extends ListValueStyleImpl implements CSSStyla } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLocation.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLocation.java new file mode 100644 index 00000000000..687f8546164 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSLocation.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.LocationImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSLocation extends LocationImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSLocation(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSMultiDiagramLinkStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSMultiDiagramLinkStyle.java index dc74d9e5e62..ec49d36f177 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSMultiDiagramLinkStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSMultiDiagramLinkStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSMultiDiagramLinkStyle extends MultiDiagramLinkStyleImpl imple this.multiDiagramLinkStyle = new CSSMultiDiagramLinkStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -49,6 +61,7 @@ public class GMFCSSMultiDiagramLinkStyle extends MultiDiagramLinkStyleImpl imple + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNamedStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNamedStyle.java index 19e6589fc79..7266d3c5795 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNamedStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNamedStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSNamedStyle extends NamedStyleImpl implements CSSStylableEleme this.namedStyle = new CSSNamedStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSNamedStyle extends NamedStyleImpl implements CSSStylableEleme } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNode.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNode.java new file mode 100644 index 00000000000..41a6dca3dba --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNode.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.NodeImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSNode extends NodeImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSNode(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNodeEntry.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNodeEntry.java new file mode 100644 index 00000000000..5e49d772bad --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSNodeEntry.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.NodeEntryImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSNodeEntry extends NodeEntryImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSNodeEntry(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPageStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPageStyle.java index a0f2f46765b..657651bc59f 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPageStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPageStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSPageStyle extends PageStyleImpl implements CSSStylableElement this.pageStyle = new CSSPageStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -103,6 +115,7 @@ public class GMFCSSPageStyle extends PageStyleImpl implements CSSStylableElement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertiesSetStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertiesSetStyle.java index ed61fd51ee7..21dacbdda1f 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertiesSetStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertiesSetStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSPropertiesSetStyle extends PropertiesSetStyleImpl implements this.propertiesSetStyle = new CSSPropertiesSetStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSPropertiesSetStyle extends PropertiesSetStyleImpl implements } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertyValue.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertyValue.java new file mode 100644 index 00000000000..6e875f11354 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSPropertyValue.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.PropertyValueImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSPropertyValue extends PropertyValueImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSPropertyValue(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRatio.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRatio.java new file mode 100644 index 00000000000..85949bef43a --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRatio.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.RatioImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSRatio extends RatioImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSRatio(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRelativeBendpoints.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRelativeBendpoints.java new file mode 100644 index 00000000000..6d98fc0ef7c --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRelativeBendpoints.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.RelativeBendpointsImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSRelativeBendpoints extends RelativeBendpointsImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSRelativeBendpoints(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoundedCornersStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoundedCornersStyle.java index e2defe0e292..3819d2b1215 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoundedCornersStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoundedCornersStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSRoundedCornersStyle extends RoundedCornersStyleImpl implement this.roundedCornersStyle = new CSSRoundedCornersStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSRoundedCornersStyle extends RoundedCornersStyleImpl implement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoutingStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoutingStyle.java index 7cfc17420b0..f03a46d6035 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoutingStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSRoutingStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSRoutingStyle extends RoutingStyleImpl implements CSSStylableE this.routingStyle = new CSSRoutingStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -159,6 +171,7 @@ public class GMFCSSRoutingStyle extends RoutingStyleImpl implements CSSStylableE } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSemanticListCompartment.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSemanticListCompartment.java index d84939b017d..d921a4befd3 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSemanticListCompartment.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSemanticListCompartment.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSSemanticListCompartment extends SemanticListCompartmentImpl i this.drawerStyle = new CSSDrawerStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSSemanticListCompartment extends SemanticListCompartmentImpl i } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShape.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShape.java index 5cf7f77edfc..9bbaf425db7 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShape.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShape.java @@ -1,30 +1,33 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.util.EList; import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; import org.eclipse.e4.ui.css.core.engine.CSSEngine; -import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; -import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.impl.ShapeImpl; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; import org.eclipse.papyrus.prototype.infra.gmfdiag.css.style.CSSShapeStyle; import org.eclipse.papyrus.prototype.infra.gmfdiag.css.style.impl.CSSShapeStyleImpl; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Document; -import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.TypeInfo; import org.w3c.dom.UserDataHandler; import org.w3c.dom.css.CSSStyleDeclaration; -import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; @SuppressWarnings("restriction") public class GMFCSSShape extends ShapeImpl implements CSSStylableElement, CSSShapeStyle { @@ -34,123 +37,124 @@ public class GMFCSSShape extends ShapeImpl implements CSSStylableElement, CSSSha private CSSStylableElement cssAdapter; private CSSShapeStyle shapeStyle; - + public GMFCSSShape(CSSEngine engine) { this.engine = engine; this.cssAdapter = new GMFCSSAdapter(this, engine); this.shapeStyle = new CSSShapeStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// - public int getCSSFontColor(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontColor())){ + public int getCSSFontColor() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontColor())) { return super.getFontColor(); } else { return shapeStyle.getCSSFontColor(); } } - public java.lang.String getCSSFontName(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontName())){ + public java.lang.String getCSSFontName() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontName())) { return super.getFontName(); } else { return shapeStyle.getCSSFontName(); } } - public int getCSSFontHeight(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontHeight())){ + public int getCSSFontHeight() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontHeight())) { return super.getFontHeight(); } else { return shapeStyle.getCSSFontHeight(); } } - public boolean isCSSBold(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_Bold())){ + public boolean isCSSBold() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_Bold())) { return super.isBold(); } else { return shapeStyle.isCSSBold(); } } - public boolean isCSSItalic(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_Italic())){ + public boolean isCSSItalic() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_Italic())) { return super.isItalic(); } else { return shapeStyle.isCSSItalic(); } } - public boolean isCSSUnderline(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_Underline())){ + public boolean isCSSUnderline() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_Underline())) { return super.isUnderline(); } else { return shapeStyle.isCSSUnderline(); } } - public boolean isCSSStrikeThrough(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough())){ + public boolean isCSSStrikeThrough() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough())) { return super.isStrikeThrough(); } else { return shapeStyle.isCSSStrikeThrough(); } } - public java.lang.String getCSSDescription(){ - if (eIsSet(NotationPackage.eINSTANCE.getDescriptionStyle_Description())){ + public java.lang.String getCSSDescription() { + if(eIsSet(NotationPackage.eINSTANCE.getDescriptionStyle_Description())) { return super.getDescription(); } else { return shapeStyle.getCSSDescription(); } } - public int getCSSFillColor(){ - if (eIsSet(NotationPackage.eINSTANCE.getFillStyle_FillColor())){ + public int getCSSFillColor() { + if(eIsSet(NotationPackage.eINSTANCE.getFillStyle_FillColor())) { return super.getFillColor(); } else { return shapeStyle.getCSSFillColor(); } } - public int getCSSTransparency(){ - if (eIsSet(NotationPackage.eINSTANCE.getFillStyle_Transparency())){ + public int getCSSTransparency() { + if(eIsSet(NotationPackage.eINSTANCE.getFillStyle_Transparency())) { return super.getTransparency(); } else { return shapeStyle.getCSSTransparency(); } } - public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient(){ - if (eIsSet(NotationPackage.eINSTANCE.getFillStyle_Gradient())){ + public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient() { + if(eIsSet(NotationPackage.eINSTANCE.getFillStyle_Gradient())) { return super.getGradient(); } else { return shapeStyle.getCSSGradient(); } } - public int getCSSLineColor(){ - if (eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineColor())){ + public int getCSSLineColor() { + if(eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineColor())) { return super.getLineColor(); } else { return shapeStyle.getCSSLineColor(); } } - public int getCSSLineWidth(){ - if (eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineWidth())){ + public int getCSSLineWidth() { + if(eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineWidth())) { return super.getLineWidth(); } else { return shapeStyle.getCSSLineWidth(); } } - public int getCSSRoundedBendpointsRadius(){ - if (eIsSet(NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius())){ + public int getCSSRoundedBendpointsRadius() { + if(eIsSet(NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius())) { return super.getRoundedBendpointsRadius(); } else { return shapeStyle.getCSSRoundedBendpointsRadius(); @@ -159,89 +163,106 @@ public class GMFCSSShape extends ShapeImpl implements CSSStylableElement, CSSSha @Override - public int getFontColor(){ + public int getFontColor() { //return super.getFontColor(); return getCSSFontColor(); } @Override - public java.lang.String getFontName(){ + public java.lang.String getFontName() { //return super.getFontName(); return getCSSFontName(); } @Override - public int getFontHeight(){ + public int getFontHeight() { //return super.getFontHeight(); return getCSSFontHeight(); } @Override - public boolean isBold(){ + public boolean isBold() { //return super.isBold(); return isCSSBold(); } @Override - public boolean isItalic(){ + public boolean isItalic() { //return super.isItalic(); return isCSSItalic(); } @Override - public boolean isUnderline(){ + public boolean isUnderline() { //return super.isUnderline(); return isCSSUnderline(); } @Override - public boolean isStrikeThrough(){ + public boolean isStrikeThrough() { //return super.isStrikeThrough(); return isCSSStrikeThrough(); } @Override - public java.lang.String getDescription(){ + public java.lang.String getDescription() { //return super.getDescription(); return getCSSDescription(); } @Override - public int getFillColor(){ + public int getFillColor() { //return super.getFillColor(); return getCSSFillColor(); } @Override - public int getTransparency(){ + public int getTransparency() { //return super.getTransparency(); return getCSSTransparency(); } @Override - public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient(){ + public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient() { //return super.getGradient(); return getCSSGradient(); } @Override - public int getLineColor(){ + public int getLineColor() { //return super.getLineColor(); return getCSSLineColor(); } @Override - public int getLineWidth(){ + public int getLineWidth() { //return super.getLineWidth(); return getCSSLineWidth(); } @Override - public int getRoundedBendpointsRadius(){ + public int getRoundedBendpointsRadius() { //return super.getRoundedBendpointsRadius(); return getCSSRoundedBendpointsRadius(); } + public boolean getCSSElementIcon() { + return shapeStyle.getCSSElementIcon(); + } + + public boolean getStereotypeDisplay() { + return shapeStyle.getStereotypeDisplay(); + } + + public boolean getShadow() { + return shapeStyle.getShadow(); + } + + public int getQualifiedNameDepth() { + return shapeStyle.getQualifiedNameDepth(); + } + + ////////////////////////////////////////// // Forwards all calls to cssAdapter // @@ -250,283 +271,283 @@ public class GMFCSSShape extends ShapeImpl implements CSSStylableElement, CSSSha public String getTagName() { return cssAdapter.getTagName(); } - + public String getAttribute(String name) { return cssAdapter.getAttribute(name); } - + public void setAttribute(String name, String value) throws DOMException { setAttribute(name, value); } - + public void removeAttribute(String name) throws DOMException { removeAttribute(name); } - + public Attr getAttributeNode(String name) { return cssAdapter.getAttributeNode(name); } - + public Attr setAttributeNode(Attr newAttr) throws DOMException { return cssAdapter.setAttributeNode(newAttr); } - + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { return cssAdapter.removeAttributeNode(oldAttr); } - + public NodeList getElementsByTagName(String name) { return cssAdapter.getElementsByTagName(name); } - + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.getAttributeNS(namespaceURI, localName); } - + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { setAttributeNS(namespaceURI, qualifiedName, value); } - + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { removeAttributeNS(namespaceURI, localName); } - + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.getAttributeNodeNS(namespaceURI, localName); } - + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { return cssAdapter.setAttributeNodeNS(newAttr); } - + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); } - + public boolean hasAttribute(String name) { return cssAdapter.hasAttribute(name); } - + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.hasAttributeNS(namespaceURI, localName); } - + public TypeInfo getSchemaTypeInfo() { return cssAdapter.getSchemaTypeInfo(); } - + public void setIdAttribute(String name, boolean isId) throws DOMException { setIdAttribute(name, isId); } - + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { setIdAttributeNS(namespaceURI, localName, isId); } - + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { setIdAttributeNode(idAttr, isId); } - + public String getNodeName() { return cssAdapter.getNodeName(); } - + public String getNodeValue() throws DOMException { return cssAdapter.getNodeValue(); } - + public void setNodeValue(String nodeValue) throws DOMException { setNodeValue(nodeValue); } - + public short getNodeType() { return cssAdapter.getNodeType(); } - + public Node getParentNode() { return cssAdapter.getParentNode(); } - + public NodeList getChildNodes() { return cssAdapter.getChildNodes(); } - + public Node getFirstChild() { return cssAdapter.getFirstChild(); } - + public Node getLastChild() { return cssAdapter.getLastChild(); } - + public Node getPreviousSibling() { return cssAdapter.getPreviousSibling(); } - + public Node getNextSibling() { return cssAdapter.getNextSibling(); } - + public NamedNodeMap getAttributes() { return cssAdapter.getAttributes(); } - + public Document getOwnerDocument() { return cssAdapter.getOwnerDocument(); } - + public Node insertBefore(Node newChild, Node refChild) throws DOMException { return cssAdapter.insertBefore(newChild, refChild); } - + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { return cssAdapter.replaceChild(newChild, oldChild); } - + public Node removeChild(Node oldChild) throws DOMException { return cssAdapter.removeChild(oldChild); } - + public Node appendChild(Node newChild) throws DOMException { return cssAdapter.appendChild(newChild); } - + public boolean hasChildNodes() { return cssAdapter.hasChildNodes(); } - + public Node cloneNode(boolean deep) { return cssAdapter.cloneNode(deep); } - + public void normalize() { normalize(); } - + public boolean isSupported(String feature, String version) { return cssAdapter.isSupported(feature, version); } - + public String getNamespaceURI() { return cssAdapter.getNamespaceURI(); } - + public String getPrefix() { return cssAdapter.getPrefix(); } - + public void setPrefix(String prefix) throws DOMException { setPrefix(prefix); } - + public String getLocalName() { return cssAdapter.getLocalName(); } - + public boolean hasAttributes() { return cssAdapter.hasAttributes(); } - + public String getBaseURI() { return cssAdapter.getBaseURI(); } - + public short compareDocumentPosition(Node other) throws DOMException { return cssAdapter.compareDocumentPosition(other); } - + public String getTextContent() throws DOMException { return cssAdapter.getTextContent(); } - + public void setTextContent(String textContent) throws DOMException { setTextContent(textContent); } - + public boolean isSameNode(Node other) { return cssAdapter.isSameNode(other); } - + public String lookupPrefix(String namespaceURI) { return cssAdapter.lookupPrefix(namespaceURI); } - + public boolean isDefaultNamespace(String namespaceURI) { return cssAdapter.isDefaultNamespace(namespaceURI); } - + public String lookupNamespaceURI(String prefix) { return cssAdapter.lookupNamespaceURI(prefix); } - + public boolean isEqualNode(Node arg) { return cssAdapter.isEqualNode(arg); } - + public Object getFeature(String feature, String version) { return cssAdapter.getFeature(feature, version); } - + public Object setUserData(String key, Object data, UserDataHandler handler) { return cssAdapter.setUserData(key, data, handler); } - + public Object getUserData(String key) { return cssAdapter.getUserData(key); } - + public Object getNativeWidget() { return cssAdapter.getNativeWidget(); } - + public String getCSSId() { return cssAdapter.getCSSId(); } - + public String getCSSClass() { return cssAdapter.getCSSClass(); } - + public String getCSSStyle() { return cssAdapter.getCSSStyle(); } - + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { return cssAdapter.getDefaultStyleDeclaration(pseudoE); } - + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { copyDefaultStyleDeclarations(stylableElement); } - + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); } - + public boolean isPseudoInstanceOf(String s) { return cssAdapter.isPseudoInstanceOf(s); } - + public String[] getStaticPseudoInstances() { return cssAdapter.getStaticPseudoInstances(); } - + public boolean isStaticPseudoInstance(String s) { return cssAdapter.isStaticPseudoInstance(s); } - + public void onStylesApplied(NodeList nodes) { onStylesApplied(nodes); } - + public CSSExtendedProperties getStyle() { return cssAdapter.getStyle(); } - + public void initialize() { initialize(); } - + public void dispose() { dispose(); } diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShapeStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShapeStyle.java index bf8c701cb9e..a2cfab51f4c 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShapeStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSShapeStyle.java @@ -1,30 +1,33 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.util.EList; import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; import org.eclipse.e4.ui.css.core.engine.CSSEngine; -import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; -import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.impl.ShapeStyleImpl; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; import org.eclipse.papyrus.prototype.infra.gmfdiag.css.style.CSSShapeStyle; import org.eclipse.papyrus.prototype.infra.gmfdiag.css.style.impl.CSSShapeStyleImpl; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Document; -import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.TypeInfo; import org.w3c.dom.UserDataHandler; import org.w3c.dom.css.CSSStyleDeclaration; -import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; @SuppressWarnings("restriction") public class GMFCSSShapeStyle extends ShapeStyleImpl implements CSSStylableElement, CSSShapeStyle { @@ -34,215 +37,233 @@ public class GMFCSSShapeStyle extends ShapeStyleImpl implements CSSStylableEleme private CSSStylableElement cssAdapter; private CSSShapeStyle shapeStyle; - + public GMFCSSShapeStyle(CSSEngine engine) { this.engine = engine; this.cssAdapter = new GMFCSSAdapter(this, engine); this.shapeStyle = new CSSShapeStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// - public int getCSSFontColor(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontColor())){ + public int getCSSFontColor() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontColor())) { return super.getFontColor(); } else { return shapeStyle.getCSSFontColor(); } } - public java.lang.String getCSSFontName(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontName())){ + public java.lang.String getCSSFontName() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontName())) { return super.getFontName(); } else { return shapeStyle.getCSSFontName(); } } - public int getCSSFontHeight(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontHeight())){ + public int getCSSFontHeight() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_FontHeight())) { return super.getFontHeight(); } else { return shapeStyle.getCSSFontHeight(); } } - public boolean isCSSBold(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_Bold())){ + public boolean isCSSBold() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_Bold())) { return super.isBold(); } else { return shapeStyle.isCSSBold(); } } - public boolean isCSSItalic(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_Italic())){ + public boolean isCSSItalic() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_Italic())) { return super.isItalic(); } else { return shapeStyle.isCSSItalic(); } } - public boolean isCSSUnderline(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_Underline())){ + public boolean isCSSUnderline() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_Underline())) { return super.isUnderline(); } else { return shapeStyle.isCSSUnderline(); } } - public boolean isCSSStrikeThrough(){ - if (eIsSet(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough())){ + public boolean isCSSStrikeThrough() { + if(eIsSet(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough())) { return super.isStrikeThrough(); } else { return shapeStyle.isCSSStrikeThrough(); } } - public java.lang.String getCSSDescription(){ - if (eIsSet(NotationPackage.eINSTANCE.getDescriptionStyle_Description())){ + public java.lang.String getCSSDescription() { + if(eIsSet(NotationPackage.eINSTANCE.getDescriptionStyle_Description())) { return super.getDescription(); } else { return shapeStyle.getCSSDescription(); } } - public int getCSSFillColor(){ - if (eIsSet(NotationPackage.eINSTANCE.getFillStyle_FillColor())){ + public int getCSSFillColor() { + if(eIsSet(NotationPackage.eINSTANCE.getFillStyle_FillColor())) { return super.getFillColor(); } else { return shapeStyle.getCSSFillColor(); } } - public int getCSSTransparency(){ - if (eIsSet(NotationPackage.eINSTANCE.getFillStyle_Transparency())){ + public int getCSSTransparency() { + if(eIsSet(NotationPackage.eINSTANCE.getFillStyle_Transparency())) { return super.getTransparency(); } else { return shapeStyle.getCSSTransparency(); } } - public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient(){ - if (eIsSet(NotationPackage.eINSTANCE.getFillStyle_Gradient())){ + public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient() { + if(eIsSet(NotationPackage.eINSTANCE.getFillStyle_Gradient())) { return super.getGradient(); } else { return shapeStyle.getCSSGradient(); } } - public int getCSSLineColor(){ - if (eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineColor())){ + public int getCSSLineColor() { + if(eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineColor())) { return super.getLineColor(); } else { return shapeStyle.getCSSLineColor(); } } - public int getCSSLineWidth(){ - if (eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineWidth())){ + public int getCSSLineWidth() { + if(eIsSet(NotationPackage.eINSTANCE.getLineStyle_LineWidth())) { return super.getLineWidth(); } else { return shapeStyle.getCSSLineWidth(); } } - public int getCSSRoundedBendpointsRadius(){ - if (eIsSet(NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius())){ + public int getCSSRoundedBendpointsRadius() { + if(eIsSet(NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius())) { return super.getRoundedBendpointsRadius(); } else { return shapeStyle.getCSSRoundedBendpointsRadius(); } } + public boolean getCSSElementIcon() { + return shapeStyle.getCSSElementIcon(); + } + + public boolean getStereotypeDisplay() { + return shapeStyle.getStereotypeDisplay(); + } + + public boolean getShadow() { + return shapeStyle.getShadow(); + } + + public int getQualifiedNameDepth() { + return shapeStyle.getQualifiedNameDepth(); + } + @Override - public int getFontColor(){ + public int getFontColor() { //return super.getFontColor(); return getCSSFontColor(); } @Override - public java.lang.String getFontName(){ + public java.lang.String getFontName() { //return super.getFontName(); return getCSSFontName(); } @Override - public int getFontHeight(){ + public int getFontHeight() { //return super.getFontHeight(); return getCSSFontHeight(); } @Override - public boolean isBold(){ + public boolean isBold() { //return super.isBold(); return isCSSBold(); } @Override - public boolean isItalic(){ + public boolean isItalic() { //return super.isItalic(); return isCSSItalic(); } @Override - public boolean isUnderline(){ + public boolean isUnderline() { //return super.isUnderline(); return isCSSUnderline(); } @Override - public boolean isStrikeThrough(){ + public boolean isStrikeThrough() { //return super.isStrikeThrough(); return isCSSStrikeThrough(); } @Override - public java.lang.String getDescription(){ + public java.lang.String getDescription() { //return super.getDescription(); return getCSSDescription(); } @Override - public int getFillColor(){ + public int getFillColor() { //return super.getFillColor(); return getCSSFillColor(); } @Override - public int getTransparency(){ + public int getTransparency() { //return super.getTransparency(); return getCSSTransparency(); } @Override - public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient(){ + public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient() { //return super.getGradient(); return getCSSGradient(); } @Override - public int getLineColor(){ + public int getLineColor() { //return super.getLineColor(); return getCSSLineColor(); } @Override - public int getLineWidth(){ + public int getLineWidth() { //return super.getLineWidth(); return getCSSLineWidth(); } @Override - public int getRoundedBendpointsRadius(){ + public int getRoundedBendpointsRadius() { //return super.getRoundedBendpointsRadius(); return getCSSRoundedBendpointsRadius(); } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// @@ -250,283 +271,283 @@ public class GMFCSSShapeStyle extends ShapeStyleImpl implements CSSStylableEleme public String getTagName() { return cssAdapter.getTagName(); } - + public String getAttribute(String name) { return cssAdapter.getAttribute(name); } - + public void setAttribute(String name, String value) throws DOMException { setAttribute(name, value); } - + public void removeAttribute(String name) throws DOMException { removeAttribute(name); } - + public Attr getAttributeNode(String name) { return cssAdapter.getAttributeNode(name); } - + public Attr setAttributeNode(Attr newAttr) throws DOMException { return cssAdapter.setAttributeNode(newAttr); } - + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { return cssAdapter.removeAttributeNode(oldAttr); } - + public NodeList getElementsByTagName(String name) { return cssAdapter.getElementsByTagName(name); } - + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.getAttributeNS(namespaceURI, localName); } - + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { setAttributeNS(namespaceURI, qualifiedName, value); } - + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { removeAttributeNS(namespaceURI, localName); } - + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.getAttributeNodeNS(namespaceURI, localName); } - + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { return cssAdapter.setAttributeNodeNS(newAttr); } - + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); } - + public boolean hasAttribute(String name) { return cssAdapter.hasAttribute(name); } - + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { return cssAdapter.hasAttributeNS(namespaceURI, localName); } - + public TypeInfo getSchemaTypeInfo() { return cssAdapter.getSchemaTypeInfo(); } - + public void setIdAttribute(String name, boolean isId) throws DOMException { setIdAttribute(name, isId); } - + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { setIdAttributeNS(namespaceURI, localName, isId); } - + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { setIdAttributeNode(idAttr, isId); } - + public String getNodeName() { return cssAdapter.getNodeName(); } - + public String getNodeValue() throws DOMException { return cssAdapter.getNodeValue(); } - + public void setNodeValue(String nodeValue) throws DOMException { setNodeValue(nodeValue); } - + public short getNodeType() { return cssAdapter.getNodeType(); } - + public Node getParentNode() { return cssAdapter.getParentNode(); } - + public NodeList getChildNodes() { return cssAdapter.getChildNodes(); } - + public Node getFirstChild() { return cssAdapter.getFirstChild(); } - + public Node getLastChild() { return cssAdapter.getLastChild(); } - + public Node getPreviousSibling() { return cssAdapter.getPreviousSibling(); } - + public Node getNextSibling() { return cssAdapter.getNextSibling(); } - + public NamedNodeMap getAttributes() { return cssAdapter.getAttributes(); } - + public Document getOwnerDocument() { return cssAdapter.getOwnerDocument(); } - + public Node insertBefore(Node newChild, Node refChild) throws DOMException { return cssAdapter.insertBefore(newChild, refChild); } - + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { return cssAdapter.replaceChild(newChild, oldChild); } - + public Node removeChild(Node oldChild) throws DOMException { return cssAdapter.removeChild(oldChild); } - + public Node appendChild(Node newChild) throws DOMException { return cssAdapter.appendChild(newChild); } - + public boolean hasChildNodes() { return cssAdapter.hasChildNodes(); } - + public Node cloneNode(boolean deep) { return cssAdapter.cloneNode(deep); } - + public void normalize() { normalize(); } - + public boolean isSupported(String feature, String version) { return cssAdapter.isSupported(feature, version); } - + public String getNamespaceURI() { return cssAdapter.getNamespaceURI(); } - + public String getPrefix() { return cssAdapter.getPrefix(); } - + public void setPrefix(String prefix) throws DOMException { setPrefix(prefix); } - + public String getLocalName() { return cssAdapter.getLocalName(); } - + public boolean hasAttributes() { return cssAdapter.hasAttributes(); } - + public String getBaseURI() { return cssAdapter.getBaseURI(); } - + public short compareDocumentPosition(Node other) throws DOMException { return cssAdapter.compareDocumentPosition(other); } - + public String getTextContent() throws DOMException { return cssAdapter.getTextContent(); } - + public void setTextContent(String textContent) throws DOMException { setTextContent(textContent); } - + public boolean isSameNode(Node other) { return cssAdapter.isSameNode(other); } - + public String lookupPrefix(String namespaceURI) { return cssAdapter.lookupPrefix(namespaceURI); } - + public boolean isDefaultNamespace(String namespaceURI) { return cssAdapter.isDefaultNamespace(namespaceURI); } - + public String lookupNamespaceURI(String prefix) { return cssAdapter.lookupNamespaceURI(prefix); } - + public boolean isEqualNode(Node arg) { return cssAdapter.isEqualNode(arg); } - + public Object getFeature(String feature, String version) { return cssAdapter.getFeature(feature, version); } - + public Object setUserData(String key, Object data, UserDataHandler handler) { return cssAdapter.setUserData(key, data, handler); } - + public Object getUserData(String key) { return cssAdapter.getUserData(key); } - + public Object getNativeWidget() { return cssAdapter.getNativeWidget(); } - + public String getCSSId() { return cssAdapter.getCSSId(); } - + public String getCSSClass() { return cssAdapter.getCSSClass(); } - + public String getCSSStyle() { return cssAdapter.getCSSStyle(); } - + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { return cssAdapter.getDefaultStyleDeclaration(pseudoE); } - + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { copyDefaultStyleDeclarations(stylableElement); } - + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); } - + public boolean isPseudoInstanceOf(String s) { return cssAdapter.isPseudoInstanceOf(s); } - + public String[] getStaticPseudoInstances() { return cssAdapter.getStaticPseudoInstances(); } - + public boolean isStaticPseudoInstance(String s) { return cssAdapter.isStaticPseudoInstance(s); } - + public void onStylesApplied(NodeList nodes) { onStylesApplied(nodes); } - + public CSSExtendedProperties getStyle() { return cssAdapter.getStyle(); } - + public void initialize() { initialize(); } - + public void dispose() { dispose(); } diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSingleValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSingleValueStyle.java index 5fc8f658669..b082c1fe32a 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSingleValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSingleValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSSingleValueStyle extends SingleValueStyleImpl implements CSSS this.singleValueStyle = new CSSSingleValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSSingleValueStyle extends SingleValueStyleImpl implements CSSS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSize.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSize.java new file mode 100644 index 00000000000..66e55ebd2b6 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSize.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.SizeImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSSize extends SizeImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSSize(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSortingStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSortingStyle.java index 06e044e8221..f667a8a47fb 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSortingStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSSortingStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSSortingStyle extends SortingStyleImpl implements CSSStylableE this.sortingStyle = new CSSSortingStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSSortingStyle extends SortingStyleImpl implements CSSStylableE } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStandardDiagram.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStandardDiagram.java index 6812383e96b..60bb0fa5cc2 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStandardDiagram.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStandardDiagram.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSStandardDiagram extends StandardDiagramImpl implements CSSSty this.diagramStyle = new CSSDiagramStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -117,6 +129,7 @@ public class GMFCSSStandardDiagram extends StandardDiagramImpl implements CSSSty } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringListValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringListValueStyle.java index d03fbb4a986..5db668b84fe 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringListValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringListValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSStringListValueStyle extends StringListValueStyleImpl impleme this.stringListValueStyle = new CSSStringListValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSStringListValueStyle extends StringListValueStyleImpl impleme } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringToPropertyValueMapEntry.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringToPropertyValueMapEntry.java new file mode 100644 index 00000000000..78f972235b7 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringToPropertyValueMapEntry.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.StringToPropertyValueMapEntryImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSStringToPropertyValueMapEntry extends StringToPropertyValueMapEntryImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSStringToPropertyValueMapEntry(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringValueStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringValueStyle.java index b50a3806b1f..92581caea77 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringValueStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSStringValueStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSStringValueStyle extends StringValueStyleImpl implements CSSS this.stringValueStyle = new CSSStringValueStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -75,6 +87,7 @@ public class GMFCSSStringValueStyle extends StringValueStyleImpl implements CSSS } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTextStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTextStyle.java index 8ae86f42cbf..83afed17400 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTextStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTextStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSTextStyle extends TextStyleImpl implements CSSStylableElement this.textStyle = new CSSTextStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSTextStyle extends TextStyleImpl implements CSSStylableElement } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTitleStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTitleStyle.java index 6c4fa501a53..2dd7668ab02 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTitleStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSTitleStyle.java @@ -1,3 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ package org.eclipse.papyrus.prototype.infra.gmfdiag.css; import java.util.ArrayList; @@ -41,6 +52,7 @@ public class GMFCSSTitleStyle extends TitleStyleImpl implements CSSStylableEleme this.titleStyle = new CSSTitleStyleImpl(this, this, engine); } + ////////////////////////////////////////// // Forwards accesses to CSS properties // ////////////////////////////////////////// @@ -61,6 +73,7 @@ public class GMFCSSTitleStyle extends TitleStyleImpl implements CSSStylableEleme } + ////////////////////////////////////////// // Forwards all calls to cssAdapter // ////////////////////////////////////////// diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSView.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSView.java new file mode 100644 index 00000000000..536cfa71034 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/GMFCSSView.java @@ -0,0 +1,339 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.prototype.infra.gmfdiag.css; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties; +import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; +import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl; +import org.eclipse.gmf.runtime.notation.*; +import org.eclipse.gmf.runtime.notation.impl.ViewImpl; +import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; +import org.w3c.dom.css.CSSStyleDeclaration; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter.GMFCSSAdapter; + +@SuppressWarnings("restriction") +public class GMFCSSView extends ViewImpl implements CSSStylableElement { + + protected CSSEngine engine; + + private CSSStylableElement cssAdapter; + + + public GMFCSSView(CSSEngine engine) { + this.engine = engine; + this.cssAdapter = new GMFCSSAdapter(this, engine); + } + + + ////////////////////////////////////////// + // Forwards all calls to cssAdapter // + ////////////////////////////////////////// + + public String getTagName() { + return cssAdapter.getTagName(); + } + + public String getAttribute(String name) { + return cssAdapter.getAttribute(name); + } + + public void setAttribute(String name, String value) throws DOMException { + setAttribute(name, value); + } + + public void removeAttribute(String name) throws DOMException { + removeAttribute(name); + } + + public Attr getAttributeNode(String name) { + return cssAdapter.getAttributeNode(name); + } + + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNode(newAttr); + } + + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return cssAdapter.removeAttributeNode(oldAttr); + } + + public NodeList getElementsByTagName(String name) { + return cssAdapter.getElementsByTagName(name); + } + + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNS(namespaceURI, localName); + } + + public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { + setAttributeNS(namespaceURI, qualifiedName, value); + } + + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + removeAttributeNS(namespaceURI, localName); + } + + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getAttributeNodeNS(namespaceURI, localName); + } + + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return cssAdapter.setAttributeNodeNS(newAttr); + } + + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.getElementsByTagNameNS(namespaceURI, localName); + } + + public boolean hasAttribute(String name) { + return cssAdapter.hasAttribute(name); + } + + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return cssAdapter.hasAttributeNS(namespaceURI, localName); + } + + public TypeInfo getSchemaTypeInfo() { + return cssAdapter.getSchemaTypeInfo(); + } + + public void setIdAttribute(String name, boolean isId) throws DOMException { + setIdAttribute(name, isId); + } + + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + setIdAttributeNS(namespaceURI, localName, isId); + } + + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + setIdAttributeNode(idAttr, isId); + } + + public String getNodeName() { + return cssAdapter.getNodeName(); + } + + public String getNodeValue() throws DOMException { + return cssAdapter.getNodeValue(); + } + + public void setNodeValue(String nodeValue) throws DOMException { + setNodeValue(nodeValue); + } + + public short getNodeType() { + return cssAdapter.getNodeType(); + } + + public Node getParentNode() { + return cssAdapter.getParentNode(); + } + + public NodeList getChildNodes() { + return cssAdapter.getChildNodes(); + } + + public Node getFirstChild() { + return cssAdapter.getFirstChild(); + } + + public Node getLastChild() { + return cssAdapter.getLastChild(); + } + + public Node getPreviousSibling() { + return cssAdapter.getPreviousSibling(); + } + + public Node getNextSibling() { + return cssAdapter.getNextSibling(); + } + + public NamedNodeMap getAttributes() { + return cssAdapter.getAttributes(); + } + + public Document getOwnerDocument() { + return cssAdapter.getOwnerDocument(); + } + + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return cssAdapter.insertBefore(newChild, refChild); + } + + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return cssAdapter.replaceChild(newChild, oldChild); + } + + public Node removeChild(Node oldChild) throws DOMException { + return cssAdapter.removeChild(oldChild); + } + + public Node appendChild(Node newChild) throws DOMException { + return cssAdapter.appendChild(newChild); + } + + public boolean hasChildNodes() { + return cssAdapter.hasChildNodes(); + } + + public Node cloneNode(boolean deep) { + return cssAdapter.cloneNode(deep); + } + + public void normalize() { + normalize(); + } + + public boolean isSupported(String feature, String version) { + return cssAdapter.isSupported(feature, version); + } + + public String getNamespaceURI() { + return cssAdapter.getNamespaceURI(); + } + + public String getPrefix() { + return cssAdapter.getPrefix(); + } + + public void setPrefix(String prefix) throws DOMException { + setPrefix(prefix); + } + + public String getLocalName() { + return cssAdapter.getLocalName(); + } + + public boolean hasAttributes() { + return cssAdapter.hasAttributes(); + } + + public String getBaseURI() { + return cssAdapter.getBaseURI(); + } + + public short compareDocumentPosition(Node other) throws DOMException { + return cssAdapter.compareDocumentPosition(other); + } + + public String getTextContent() throws DOMException { + return cssAdapter.getTextContent(); + } + + public void setTextContent(String textContent) throws DOMException { + setTextContent(textContent); + } + + public boolean isSameNode(Node other) { + return cssAdapter.isSameNode(other); + } + + public String lookupPrefix(String namespaceURI) { + return cssAdapter.lookupPrefix(namespaceURI); + } + + public boolean isDefaultNamespace(String namespaceURI) { + return cssAdapter.isDefaultNamespace(namespaceURI); + } + + public String lookupNamespaceURI(String prefix) { + return cssAdapter.lookupNamespaceURI(prefix); + } + + public boolean isEqualNode(Node arg) { + return cssAdapter.isEqualNode(arg); + } + + public Object getFeature(String feature, String version) { + return cssAdapter.getFeature(feature, version); + } + + public Object setUserData(String key, Object data, UserDataHandler handler) { + return cssAdapter.setUserData(key, data, handler); + } + + public Object getUserData(String key) { + return cssAdapter.getUserData(key); + } + + public Object getNativeWidget() { + return cssAdapter.getNativeWidget(); + } + + public String getCSSId() { + return cssAdapter.getCSSId(); + } + + public String getCSSClass() { + return cssAdapter.getCSSClass(); + } + + public String getCSSStyle() { + return cssAdapter.getCSSStyle(); + } + + public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE) { + return cssAdapter.getDefaultStyleDeclaration(pseudoE); + } + + public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement) { + copyDefaultStyleDeclarations(stylableElement); + } + + public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) { + setDefaultStyleDeclaration(pseudoE, defaultStyleDeclaration); + } + + public boolean isPseudoInstanceOf(String s) { + return cssAdapter.isPseudoInstanceOf(s); + } + + public String[] getStaticPseudoInstances() { + return cssAdapter.getStaticPseudoInstances(); + } + + public boolean isStaticPseudoInstance(String s) { + return cssAdapter.isStaticPseudoInstance(s); + } + + public void onStylesApplied(NodeList nodes) { + onStylesApplied(nodes); + } + + public CSSExtendedProperties getStyle() { + return cssAdapter.getStyle(); + } + + public void initialize() { + initialize(); + } + + public void dispose() { + dispose(); + } +} diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/factory/GMFCSSFactory.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/factory/GMFCSSFactory.java index 9cb35273a4d..366b91de633 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/factory/GMFCSSFactory.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/factory/GMFCSSFactory.java @@ -10,6 +10,20 @@ public class GMFCSSFactory extends NotationFactoryImpl { @Override + public Edge createEdge() { + Edge edge = new GMFCSSEdge(getCSSEngine()); + return edge; + } + + + @Override + public Node createNode() { + Node node = new GMFCSSNode(getCSSEngine()); + return node; + } + + + @Override public FillStyle createFillStyle() { FillStyle fillStyle = new GMFCSSFillStyle(getCSSEngine()); return fillStyle; @@ -52,6 +66,41 @@ public class GMFCSSFactory extends NotationFactoryImpl { @Override + public Size createSize() { + Size size = new GMFCSSSize(getCSSEngine()); + return size; + } + + + @Override + public Location createLocation() { + Location location = new GMFCSSLocation(getCSSEngine()); + return location; + } + + + @Override + public Bounds createBounds() { + Bounds bounds = new GMFCSSBounds(getCSSEngine()); + return bounds; + } + + + @Override + public Ratio createRatio() { + Ratio ratio = new GMFCSSRatio(getCSSEngine()); + return ratio; + } + + + @Override + public IdentityAnchor createIdentityAnchor() { + IdentityAnchor identityAnchor = new GMFCSSIdentityAnchor(getCSSEngine()); + return identityAnchor; + } + + + @Override public RoutingStyle createRoutingStyle() { RoutingStyle routingStyle = new GMFCSSRoutingStyle(getCSSEngine()); return routingStyle; @@ -59,6 +108,27 @@ public class GMFCSSFactory extends NotationFactoryImpl { @Override + public RelativeBendpoints createRelativeBendpoints() { + RelativeBendpoints relativeBendpoints = new GMFCSSRelativeBendpoints(getCSSEngine()); + return relativeBendpoints; + } + + + @Override + public Diagram createDiagram() { + Diagram diagram = new GMFCSSDiagram(getCSSEngine()); + return diagram; + } + + + @Override + public Image createImage() { + Image image = new GMFCSSImage(getCSSEngine()); + return image; + } + + + @Override public CanonicalStyle createCanonicalStyle() { CanonicalStyle canonicalStyle = new GMFCSSCanonicalStyle(getCSSEngine()); return canonicalStyle; @@ -101,6 +171,20 @@ public class GMFCSSFactory extends NotationFactoryImpl { @Override + public Guide createGuide() { + Guide guide = new GMFCSSGuide(getCSSEngine()); + return guide; + } + + + @Override + public java.util.Map.Entry createNodeEntry() { + java.util.Map.Entry nodeEntry = new GMFCSSNodeEntry(getCSSEngine()); + return nodeEntry; + } + + + @Override public FilteringStyle createFilteringStyle() { FilteringStyle filteringStyle = new GMFCSSFilteringStyle(getCSSEngine()); return filteringStyle; @@ -136,6 +220,20 @@ public class GMFCSSFactory extends NotationFactoryImpl { @Override + public java.util.Map.Entry createStringToPropertyValueMapEntry() { + java.util.Map.Entry stringToPropertyValueMapEntry = new GMFCSSStringToPropertyValueMapEntry(getCSSEngine()); + return stringToPropertyValueMapEntry; + } + + + @Override + public PropertyValue createPropertyValue() { + PropertyValue propertyValue = new GMFCSSPropertyValue(getCSSEngine()); + return propertyValue; + } + + + @Override public SingleValueStyle createSingleValueStyle() { SingleValueStyle singleValueStyle = new GMFCSSSingleValueStyle(getCSSEngine()); return singleValueStyle; @@ -318,6 +416,20 @@ public class GMFCSSFactory extends NotationFactoryImpl { @Override + public DecorationNode createDecorationNode() { + DecorationNode decorationNode = new GMFCSSDecorationNode(getCSSEngine()); + return decorationNode; + } + + + @Override + public BasicDecorationNode createBasicDecorationNode() { + BasicDecorationNode basicDecorationNode = new GMFCSSBasicDecorationNode(getCSSEngine()); + return basicDecorationNode; + } + + + @Override public BasicCompartment createBasicCompartment() { BasicCompartment basicCompartment = new GMFCSSBasicCompartment(getCSSEngine()); return basicCompartment; diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSFillStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSFillStyle.java index b47ae1dc0e6..895d5b9fb88 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSFillStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSFillStyle.java @@ -1,10 +1,13 @@ package org.eclipse.papyrus.prototype.infra.gmfdiag.css.style; -import org.eclipse.gmf.runtime.notation.*; -import org.eclipse.emf.common.util.EList; public interface CSSFillStyle { - + + public String GRADIENT_VERTICAL = "vertical"; + + public String GRADIENT_HORIZONTAL = "horizontal"; + + public int getCSSFillColor(); diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSShapeStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSShapeStyle.java index a468fd44975..02cdea741f4 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSShapeStyle.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/CSSShapeStyle.java @@ -1,9 +1,8 @@ package org.eclipse.papyrus.prototype.infra.gmfdiag.css.style; -import org.eclipse.gmf.runtime.notation.*; -import org.eclipse.emf.common.util.EList; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.custom.UMLCustomStyle; + +public interface CSSShapeStyle extends CSSFontStyle, CSSDescriptionStyle, CSSFillStyle, CSSLineStyle, CSSRoundedCornersStyle, UMLCustomStyle { -public interface CSSShapeStyle extends CSSFontStyle, CSSDescriptionStyle, CSSFillStyle, CSSLineStyle, CSSRoundedCornersStyle{ - } diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/impl/CSSShapeStyleImpl.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/impl/CSSShapeStyleImpl.java index ef9d0feacbb..77b003aea98 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/impl/CSSShapeStyleImpl.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/prototype/infra/gmfdiag/css/style/impl/CSSShapeStyleImpl.java @@ -5,10 +5,13 @@ import java.io.IOException; import org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper; import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; import org.eclipse.e4.ui.css.core.engine.CSSEngine; +import org.eclipse.gmf.runtime.notation.GradientStyle; import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.ShapeStyle; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; import org.eclipse.papyrus.infra.emf.Activator; import org.eclipse.papyrus.prototype.infra.gmfdiag.css.helper.ConversionHelper; +import org.eclipse.papyrus.prototype.infra.gmfdiag.css.helper.ParserHelper; import org.eclipse.papyrus.prototype.infra.gmfdiag.css.style.CSSShapeStyle; import org.w3c.dom.css.CSSValue; import org.w3c.dom.css.RGBColor; @@ -122,26 +125,16 @@ public class CSSShapeStyleImpl implements CSSShapeStyle { public int getCSSFillColor() { String cssValue = engine.retrieveCSSProperty(element, "fillColor", ""); - if(cssValue == null) { - Object defaultValue = NotationPackage.eINSTANCE.getFillStyle_FillColor().getDefaultValue(); - return (Integer)defaultValue; - } else { + if(cssValue != null) { try { CSSValue value = engine.parsePropertyValue(cssValue); - RGBColor color; - if(value instanceof RGBColor) { - color = (RGBColor)value; - } else { - color = CSS2ColorHelper.getRGBColor(cssValue); - } - - return ConversionHelper.getIntColor(color); + return ConversionHelper.getIntColor(cssValue, value); } catch (IOException ex) { Activator.log.error(ex); } } - return Integer.parseInt(cssValue); + return (Integer)NotationPackage.eINSTANCE.getFillStyle_FillColor().getDefaultValue(); } public int getCSSTransparency() { @@ -153,13 +146,115 @@ public class CSSShapeStyleImpl implements CSSShapeStyle { return Integer.parseInt(cssValue); } + //Type 1 : + //gradientColor:#ABCDEF; + //gradientStyle:vertical; + + //Type 2 : + //(gradient:#FEDCBA #ABCDEF horizontal;) //Currently not supported, as diagrams usually seek for #fillColor() + //gradient:#ABCDEF horizontal; + //gradient:#ABCDEF + //gradient:horizontal public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient() { - String cssValue = engine.retrieveCSSProperty(element, "gradient", ""); - if(cssValue == null) { - Object defaultValue = NotationPackage.eINSTANCE.getFillStyle_Gradient().getDefaultValue(); - return (org.eclipse.gmf.runtime.notation.datatype.GradientData)defaultValue; + //Type 1 + String gradientColor = engine.retrieveCSSProperty(element, "gradientColor", ""); + String gradientStyle = engine.retrieveCSSProperty(element, "gradientStyle", ""); + + if(gradientColor != null || gradientStyle != null) { + int color1 = getGradientColor(gradientColor); + int color2 = 0; //Unused by Papyrus diagrams + int style = getGradientStyle(gradientStyle); + GradientData data = new GradientData(color1, color2, style); + return data; + } + + //Type 2 + String gradient = engine.retrieveCSSProperty(element, "gradient", ""); + + if(gradient != null) { + int[] gradientValues = parseGradient(gradient); + return new GradientData(gradientValues[0], gradientValues[1], gradientValues[2]); } - return null; + + //Default + return getDefaultGradient(); + } + + /** [color1, color2, style] */ + private int[] parseGradient(String gradient) { + String color1, color2, style; + color1 = color2 = style = null; + + String[] values = ParserHelper.parseValues(engine, gradient); + + if(values.length == 3) { + color1 = values[0]; + color2 = values[1]; + style = values[2]; + } else if(values.length == 2) { + color1 = values[0]; + String value = values[1]; + if(isGradientStyle(value)) { + style = value; + } else { + color2 = value; + } + } else if(values.length == 1) { + String value = values[0]; + if(isGradientStyle(value)) { + style = value; + } else { + color1 = value; + } + } + + return parseGradient(color1, color2, style); + } + + private int[] parseGradient(String sColor1, String sColor2, String sStyle) { + int color1, color2, style; + color1 = color2 = style = -1; + + color1 = getGradientColor(sColor1); + color2 = 0; //Unused + style = getGradientStyle(sStyle); + + return new int[]{ color1, color2, style }; + } + + private boolean isGradientStyle(String value) { + return GRADIENT_VERTICAL.equals(value) || GRADIENT_HORIZONTAL.equals(value); + } + + private int getGradientColor(String gradientColor) { + if(gradientColor != null) { + CSSValue cssValue; + try { + cssValue = engine.parsePropertyValue(gradientColor); + return ConversionHelper.getIntColor(gradientColor, cssValue); + } catch (IOException ex) { + Activator.log.error(ex); + } + } + + //Default value + return new GradientData().getGradientColor1(); + } + + private int getGradientStyle(String gradientStyle) { + if(GRADIENT_VERTICAL.equals(gradientStyle)) { + return GradientStyle.VERTICAL; + } else if(GRADIENT_HORIZONTAL.equals(gradientStyle)) { + return GradientStyle.HORIZONTAL; + } + + //Default value + return new GradientData().getGradientStyle(); + } + + private GradientData getDefaultGradient() { + Object defaultValue = NotationPackage.eINSTANCE.getFillStyle_Gradient().getDefaultValue(); + return (GradientData)defaultValue; } public int getCSSLineColor() { @@ -203,4 +298,36 @@ public class CSSShapeStyleImpl implements CSSShapeStyle { } return Integer.parseInt(cssValue); } + + public boolean getCSSElementIcon() { + String cssValue = engine.retrieveCSSProperty(element, "elementIcon", ""); + if(cssValue == null) { + return false; + } + return Boolean.parseBoolean(cssValue); + } + + public boolean getStereotypeDisplay() { + String cssValue = engine.retrieveCSSProperty(element, "stereotypeDisplay", ""); + if(cssValue == null) { + return false; + } + return Boolean.parseBoolean(cssValue); + } + + public boolean getShadow() { + String cssValue = engine.retrieveCSSProperty(element, "shadow", ""); + if(cssValue == null) { + return false; + } + return Boolean.parseBoolean(cssValue); + } + + public int getQualifiedNameDepth() { + String cssValue = engine.retrieveCSSProperty(element, "qualifiedNameDepth", ""); + if(cssValue == null) { + return 1000; + } + return Integer.parseInt(cssValue); + } } diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/adapter/GMFCSSAdapter.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/adapter/GMFCSSAdapter.java index 9110e082bde..94f6b6a6059 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/adapter/GMFCSSAdapter.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/adapter/GMFCSSAdapter.java @@ -11,6 +11,9 @@ *****************************************************************************/
package org.eclipse.papyrus.prototype.infra.gmfdiag.css.adapter;
+import java.util.HashMap;
+import java.util.Map;
+
import org.eclipse.e4.ui.css.core.dom.ElementAdapter;
import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.eclipse.emf.ecore.EAnnotation;
@@ -27,6 +30,30 @@ import org.w3c.dom.NodeList; public class GMFCSSAdapter extends ElementAdapter implements NodeList {
+ //TODO : Use an extension point for this map, or find another way to map Diagram ID to CSS Element name
+ public static final Map<String, String> diagramNameMappings = new HashMap<String, String>();
+
+ static {
+ //UML
+ diagramNameMappings.put("CompositeStructure", "CompositeDiagram");
+ diagramNameMappings.put("Package", "PackageDiagram");
+ diagramNameMappings.put("PapyrusUMLActivityDiagram", "ActivityDiagram");
+ diagramNameMappings.put("PapyrusUMLClassDiagram", "ClassDiagram");
+ diagramNameMappings.put("PapyrusUMLCommunicationDiagram", "CommunicationDiagram");
+ diagramNameMappings.put("PapyrusUMLComponentDiagram", "ComponentDiagram");
+ diagramNameMappings.put("PapyrusUMLDeploymentDiagram", "DeploymentDiagram");
+ diagramNameMappings.put("PapyrusUMLProfileDiagram", "ProfileDiagram");
+ diagramNameMappings.put("PapyrusUMLSequenceDiagram", "SequenceDiagram");
+ diagramNameMappings.put("PapyrusUMLStateMachineDiagram", "StateMachineDiagram");
+ diagramNameMappings.put("UseCase", "UseCaseDiagram");
+
+ //SysML
+ diagramNameMappings.put("BlockDefinition", "BlockDiagram");
+ diagramNameMappings.put("InternalBlock", "InternalBlockDiagram");
+ diagramNameMappings.put("PapyrusSysMLRequirement", "RequirementDiagram");
+ diagramNameMappings.put("Parametric", "ParametricDiagram");
+ }
+
/**
* The UML Element associated to the current styled element
* Might also be a GMF Diagram
@@ -166,6 +193,15 @@ public class GMFCSSAdapter extends ElementAdapter implements NodeList { @Override
public String getLocalName() {
+ if(getSemanticElement() instanceof Diagram) {
+ Diagram diagram = (Diagram)getSemanticElement();
+ String type = diagram.getType();
+ if(diagramNameMappings.containsKey(type)) {
+ return diagramNameMappings.get(type);
+ }
+ return type;
+ }
+
return getSemanticElement().eClass().getName();
}
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/custom/UMLCustomStyle.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/custom/UMLCustomStyle.java new file mode 100644 index 00000000000..bfdeac42cc4 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/custom/UMLCustomStyle.java @@ -0,0 +1,24 @@ +/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.prototype.infra.gmfdiag.css.custom;
+
+
+public interface UMLCustomStyle {
+
+ boolean getCSSElementIcon();
+
+ boolean getStereotypeDisplay();
+
+ boolean getShadow();
+
+ int getQualifiedNameDepth();
+}
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandler.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandler.java index 777a6ebd0ad..c8218e39c9d 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandler.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandler.java @@ -17,50 +17,20 @@ import org.w3c.dom.Element; import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSValue;
-
+@SuppressWarnings("restriction")
public class UMLPropertyHandler implements ICSSPropertyHandler {
public boolean applyCSSProperty(Object element, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception {
- return true;
+ return false;
}
public String retrieveCSSProperty(Object element, String property, String pseudo, CSSEngine engine) throws Exception {
- // System.out.println("Break");
CSSStyleDeclaration style = engine.getViewCSS().getComputedStyle((Element)element, pseudo);
CSSValue value = style.getPropertyCSSValue(property);
if(value == null) {
return null;
}
return value.getCssText();
-
- // StyleSheetList styleSheets = engine.getDocumentCSS().getStyleSheets();
- // for(int i = 0; i < styleSheets.getLength(); i++) {
- // StyleSheet styleSheet = styleSheets.item(i);
- // if(!styleSheet.getDisabled()) {
- // if(styleSheet instanceof CSSStyleSheet) {
- // CSSStyleSheet cssSheet = (CSSStyleSheet)styleSheet;
- // CSSRuleList rules = cssSheet.getCssRules();
- // for(int j = 0; j < rules.getLength(); j++) {
- // CSSRule rule = rules.item(j);
- // if (rule instanceof ExtendedCSSRule){
- // ExtendedCSSRule cssRule = (ExtendedCSSRule)rule;
- // SelectorList selectors = cssRule.getSelectorList();
- // for (int k = 0; k < selectors.getLength(); k++){
- // Selector selector = selectors.item(k);
- // if (selector instanceof ExtendedSelector){
- // ExtendedSelector cssSelector = (ExtendedSelector)selector;
- // if (cssSelector.match(e, pseudo)){
- //
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
-
- // return "";
}
}
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandlerProvider.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandlerProvider.java index 1333e031e47..b648fa962c3 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandlerProvider.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/engine/handlers/UMLPropertyHandlerProvider.java @@ -14,21 +14,27 @@ package org.eclipse.papyrus.prototype.infra.gmfdiag.css.engine.handlers; import java.util.Collection;
import java.util.Collections;
-import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandlerProvider;
+import org.eclipse.e4.ui.css.core.dom.CSSStylableElement;
+import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler;
+import org.eclipse.e4.ui.css.core.dom.properties.providers.AbstractCSSPropertyHandlerProvider;
import org.eclipse.e4.ui.css.core.engine.CSSEngine;
-import org.eclipse.e4.ui.css.core.impl.dom.CSSComputedStyleImpl;
import org.w3c.dom.css.CSSStyleDeclaration;
-
@SuppressWarnings("restriction")
-public class UMLPropertyHandlerProvider implements ICSSPropertyHandlerProvider {
+public class UMLPropertyHandlerProvider extends AbstractCSSPropertyHandlerProvider {
- public Collection getCSSPropertyHandlers(String property) throws Exception {
+ public Collection<? extends ICSSPropertyHandler> getCSSPropertyHandlers(String property) throws Exception {
return Collections.singleton(new UMLPropertyHandler());
}
- public CSSStyleDeclaration getDefaultCSSStyleDeclaration(CSSEngine engine, Object element, CSSStyleDeclaration newStyle, String pseudoE) throws Exception {
- return new CSSComputedStyleImpl(Collections.EMPTY_LIST);
+ // @Override
+ // public CSSStyleDeclaration getDefaultCSSStyleDeclaration(CSSEngine engine, Object element, CSSStyleDeclaration newStyle, String pseudoE) throws Exception {
+ // return new CSSComputedStyleImpl(Collections.EMPTY_LIST);
+ // }
+
+ @Override
+ protected CSSStyleDeclaration getDefaultCSSStyleDeclaration(CSSEngine engine, CSSStylableElement stylableElement, CSSStyleDeclaration newStyle, String pseudoE) throws Exception {
+ return null;
}
}
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ConversionHelper.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ConversionHelper.java index a86f2ff00b4..6642ed1552f 100644 --- a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ConversionHelper.java +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ConversionHelper.java @@ -11,6 +11,7 @@ *****************************************************************************/
package org.eclipse.papyrus.prototype.infra.gmfdiag.css.helper;
+import org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper;
import org.eclipse.e4.ui.css.core.impl.dom.Measure;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.CSSValue;
@@ -35,4 +36,25 @@ public class ConversionHelper { return (int)value.getFloatValue(CSSValue.CSS_PRIMITIVE_VALUE);
}
+ public static int getIntColor(String value, CSSValue cssValue) {
+ RGBColor color;
+ if(cssValue instanceof RGBColor) {
+ //color:rgb(125, 255, 0);
+ color = (RGBColor)cssValue;
+ } else {
+ //color:red; || color:#FFFFFF;
+ color = CSS2ColorHelper.getRGBColor(value);
+ }
+
+ if(color == null) {
+ try {
+ return Integer.parseInt(value);
+ } catch (NumberFormatException ex) {
+ return -1;
+ }
+ }
+
+ return getIntColor(color);
+ }
+
}
diff --git a/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ParserHelper.java b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ParserHelper.java new file mode 100644 index 00000000000..04d2aec78e0 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.prototype.infra.gmfdiag.css/src/org/eclipse/papyrus/prototype/infra/gmfdiag/css/helper/ParserHelper.java @@ -0,0 +1,50 @@ +/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.prototype.infra.gmfdiag.css.helper;
+
+import java.io.IOException;
+
+import org.eclipse.e4.ui.css.core.engine.CSSEngine;
+import org.eclipse.papyrus.prototype.infra.gmfdiag.css.Activator;
+import org.w3c.dom.css.CSSValue;
+import org.w3c.dom.css.CSSValueList;
+
+
+public class ParserHelper {
+
+ //TODO : Handle quote-protected values
+ //parseValue("fo o" bar "foobar") = ["fo o","bar","foobar"]
+ public static String[] parseValues(CSSEngine engine, String value) {
+ CSSValue cssValue;
+ try {
+ cssValue = engine.parsePropertyValue(value);
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ return new String[0];
+ }
+
+ if(cssValue instanceof CSSValueList) {
+ CSSValueList list = (CSSValueList)cssValue;
+ return toArray(list);
+ }
+
+ return new String[]{ cssValue.getCssText() };
+ }
+
+ public static String[] toArray(CSSValueList valueList) {
+ String[] result = new String[valueList.getLength()];
+ for(int i = 0; i < result.length; i++) {
+ result[i] = valueList.item(i).getCssText();
+ }
+ return result;
+ }
+}
|