diff options
author | cletavernie | 2012-07-02 11:43:34 +0000 |
---|---|---|
committer | cletavernie | 2012-07-02 11:43:34 +0000 |
commit | e4b252101fdc0e85b239713b8bfbddf51855cacc (patch) | |
tree | bb8fe903fe238654b2509812d78f2787352ed2fc /plugins | |
parent | ac7506ca3e2efb4c854c5b99bed11a3f7413686e (diff) | |
download | org.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')
2 files changed, 8 insertions, 2 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) {
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui/plugin.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui/plugin.xml index 3e5ebc0c6ca..7af6bd21c08 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui/plugin.xml +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui/plugin.xml @@ -8,7 +8,8 @@ <editor class="org.eclipse.papyrus.infra.gmfdiag.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" - default="true" + default="false" + extensions="css" icon="icons/sourceEditor.gif" id="org.eclipse.papyrus.infra.gmfdiag.CSS" name="Papyrus CSS Editor"> |