Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java
index 37fe06312dd..7e6d0ba86d1 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/provider/CSSThemeInitializer.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2012, 2013 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
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - support adapter instead of custom resource impl for CSS (CDO)
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.provider;
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
/**
* A class to skip the PreferenceInitializer when the CSS support is enabled.
- *
+ *
* @author Camille Letavernier
*/
public class CSSThemeInitializer implements IThemeInitializer {
@@ -29,11 +29,12 @@ public class CSSThemeInitializer implements IThemeInitializer {
/**
* Return false when the CSS support is enabled
*/
+ @Override
public boolean usePreferenceInitializer(View view) {
- //Sometimes, the view is created before its diagram is attached to its resource
- //This happens in diagrams which are initialized with a root element (Activity, Sequence, StateMachine, IBD, ...)
- //In this case, it is better to test the CSSDiagram than the resource (As there is no resource yet)
- if(view.getDiagram() != null) {
+ // Sometimes, the view is created before its diagram is attached to its resource
+ // This happens in diagrams which are initialized with a root element (Activity, Sequence, StateMachine, IBD, ...)
+ // In this case, it is better to test the CSSDiagram than the resource (As there is no resource yet)
+ if (view.getDiagram() != null) {
return !(view.getDiagram() instanceof CSSDiagram);
}

Back to the top