Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-07-02 07:43:34 -0400
committercletavernie2012-07-02 07:43:34 -0400
commite4b252101fdc0e85b239713b8bfbddf51855cacc (patch)
treebb8fe903fe238654b2509812d78f2787352ed2fc /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration
parentac7506ca3e2efb4c854c5b99bed11a3f7413686e (diff)
downloadorg.eclipse.papyrus-e4b252101fdc0e85b239713b8bfbddf51855cacc.tar.gz
org.eclipse.papyrus-e4b252101fdc0e85b239713b8bfbddf51855cacc.tar.xz
org.eclipse.papyrus-e4b252101fdc0e85b239713b8bfbddf51855cacc.zip
370797: [Theme] Papyrus should provide a support for CSS files on its diagrams
https://bugs.eclipse.org/bugs/show_bug.cgi?id=370797
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java
index 291c328a865..a5b76514954 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/providers/ExistingStyleContentProvider.java
@@ -43,7 +43,12 @@ public class ExistingStyleContentProvider implements IHierarchicContentProvider
}
public Object[] getElements(Object inputElement) {
- return getStyleSheets().toArray();
+ Collection<StyleSheet> stylesheets = getStyleSheets();
+ if(stylesheets.isEmpty()) {
+ //Display a message to let the user know why he cannot edit a stylesheet
+ return new Object[]{ "No stylesheet available" };
+ }
+ return stylesheets.toArray();
}
public Object[] getChildren(Object parentElement) {

Back to the top