Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra')
-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
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui/plugin.xml3
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">

Back to the top