Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauline DEVILLE2019-06-28 09:29:42 -0400
committerPauline DEVILLE2019-06-28 09:30:13 -0400
commit74d8b1eca8309aa395493d7d3bbd3138301c8eef (patch)
treee90400a6c1852e28020b455b01ac6119fa703f8b /plugins/infra/gmfdiag/css
parentac8e4efa3b98394e807812769bcd8fe31a34a41a (diff)
downloadorg.eclipse.papyrus-74d8b1eca8309aa395493d7d3bbd3138301c8eef.tar.gz
org.eclipse.papyrus-74d8b1eca8309aa395493d7d3bbd3138301c8eef.tar.xz
org.eclipse.papyrus-74d8b1eca8309aa395493d7d3bbd3138301c8eef.zip
Bug 548758 - [CSS] The CSSDiagram should provide a createEngine method
to ease override Change-Id: I39358c28a2f71764a674fd08dbe3e2eeddaa3bd8 Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/css')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
index a8eb5228bbc..55a9e96f091 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
@@ -53,11 +53,20 @@ public class CSSDiagramImpl extends DiagramImpl implements CSSDiagram, CSSView.I
if (engine == null) {
ExtendedCSSEngine modelEngine = getModelEngine();
viewpointEngine = new ViewpointCSSEngine(modelEngine, this);
- engine = new DiagramCSSEngine(viewpointEngine, this);
+ engine = createEngine(viewpointEngine);
}
return engine;
}
+ /**
+ * Create the DiagramCSS
+ * @param viewpointCSSEngine
+ * @return
+ */
+ protected ExtendedCSSEngine createEngine(ExtendedCSSEngine viewpointCSSEngine) {
+ return new DiagramCSSEngine(viewpointEngine, this);
+ }
+
@Override
public void resetCSS() {
if (engine != null) {
@@ -97,7 +106,7 @@ public class CSSDiagramImpl extends DiagramImpl implements CSSDiagram, CSSView.I
@Override
public List<StyleSheet> getStyleSheets() {
- List<StyleSheet> result = new LinkedList<StyleSheet>();
+ List<StyleSheet> result = new LinkedList<>();
for (Object styleObject : getStyles()) {
if (styleObject instanceof NamedStyle) {
@@ -122,7 +131,7 @@ public class CSSDiagramImpl extends DiagramImpl implements CSSDiagram, CSSView.I
return result;
}
-
+
protected CSSView getCSSView() {
if (cssView == null) {

Back to the top