Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-02-11 02:48:20 +0000
committerGerrit Code Review @ Eclipse.org2016-02-12 15:31:41 +0000
commitecd4928b327f5561364c5068c9ff5f1668e92d13 (patch)
tree7c34f46cf82a1d65ac753fa92c2a5d55371b8dba /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui
parent751a204d74e15eb2db6b41c937691fc56dcc1252 (diff)
downloadorg.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.gz
org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.xz
org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.zip
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220 Factor UI dependencies out of the UML Element Types bundle. This includes moving some advices that interact with the user into a new org.eclipse.papyrus.uml.service.types.ui bundle. Pull up the PasteCommandService and IPasteCommandProvider API into the Infra Diagram layer where the extension point is defined. Deprecate the old API in the UML layer. Introduce a service for participation of languages in CSS styling: * styling reset actions in the Reset Style command * access to semantic model classes and properties to make available to CSS Factor PapyrusObservableValue and cohorts out of the UML Tools bundle into the Infra Layer for more general reuse and to relieve the Diagram Infrastructure layer of UML dependencies. The old API remains as deprecated. Remove the Infra Diagram Layer dependency on UML Layer for property testers governing deletion in the diagram. Includes introduction of a new IGraphicalDeletionHelper OSGi service for delegation of the determination of whether an element can be deleted from the diagram and replacement of the XML expression properties * org.eclipse.papyrus.uml.diagram.common.isSemanticDeletion * org.eclipse.papyrus.uml.diagram.common.isReadOnly by * org.eclipse.papyrus.infra.gmfdiag.common.isSemanticDeletion * org.eclipse.papyrus.infra.gmfdiag.common.canDelete (where the latter is the negation of the property that it supersedes) Extract UML dependencies from the Diagram Outline and CSS Editor bundles. Remove unused MDTUtil APIs that referenced a UML-specific annotation. Move the Diagram Infrastructure CSS Palette bundle into the UML layer because it serves to provide extensions on the Palette Service, which is an overtly UML-specific capability. All client APIs for the Properties View are moved from org.eclipse.papyrus.views.properties bundle to a new org.eclipse.papyrus.infra.properties.ui bundle. This includes renaming of: * extension points * label-provider contexts * XWT namespaces Add an "all UI tests" suite. Define a componentized hierarchical build layout of the main plug-ins Change-Id: I43f8f3644857a18b69715f5a2f1da9b1cf286d67
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF56
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml852
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java59
6 files changed, 486 insertions, 501 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath
index d1b97f72bd5..bc001b4a78c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.classpath
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs
index f08be2b06c4..b3aa6d60f94 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF
index 5708934a9af..d105d17b046 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF
@@ -1,28 +1,28 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.xtext.ui,
- org.eclipse.ui.editors;bundle-version="3.5.0",
- org.eclipse.ui.ide;bundle-version="3.5.0",
- org.eclipse.xtext.ui.shared,
- org.eclipse.ui,
- org.eclipse.xtext.builder,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.xtext.common.types.ui,
- org.eclipse.xtext.ui.codetemplates.ui,
- org.eclipse.compare,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css3.ui.quickfix,
- org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist,
- org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal,
- org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist.antlr
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: CSS3 Xtext Editor (UI)
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal.CSSActivator
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui; singleton:=true
-Import-Package: org.apache.log4j
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.xtext.ui,
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.xtext.ui.shared,
+ org.eclipse.ui,
+ org.eclipse.xtext.builder,
+ org.eclipse.xtext.xbase.lib,
+ org.eclipse.xtext.common.types.ui,
+ org.eclipse.xtext.ui.codetemplates.ui,
+ org.eclipse.compare,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css3.ui.quickfix,
+ org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist,
+ org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal,
+ org.eclipse.papyrus.infra.gmfdiag.css3.ui.contentassist.antlr
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: CSS3 Xtext Editor (UI)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal.CSSActivator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui; singleton:=true
+Import-Package: org.apache.log4j
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml
index d7716fb075a..49b159d1cae 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/plugin.xml
@@ -1,426 +1,426 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
- contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
- default="true"
- extensions="css"
- icon="icons/sourceEditor.gif"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- name="Papyrus CSS Editor">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
- commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
- commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- <!-- copy qualified name -->
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
- commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
- <activeWhen>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
- commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
- <activeWhen>
- <and>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
- <iterate>
- <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
- </iterate>
- </and>
- </activeWhen>
- </handler>
- </extension>
- <extension point="org.eclipse.core.expressions.definitions">
- <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- <and>
- <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
- <with variable="activeEditor">
- <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
- value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- forcePluginActivation="true"/>
- </with>
- </and>
- </definition>
- <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened">
- <and>
- <reference definitionId="isXtextEditorActive"/>
- <with variable="activeEditor">
- <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
- value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- forcePluginActivation="true"/>
- </with>
- </and>
- </definition>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- name="CSS">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.coloring"
- name="Syntax Coloring">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.templates"
- name="Templates">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- name="CSS">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject"/>
- </enabledWhen>
- <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"
- label="CSS"/>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Trigger expensive validation"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
- name="Validate">
- </command>
- <!-- copy qualified name -->
- <command
- id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
- categoryId="org.eclipse.ui.category.edit"
- description="Copy the qualified name for the selected element"
- name="Copy Qualified Name">
- </command>
- <command
- id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
- categoryId="org.eclipse.ui.category.edit"
- description="Copy the qualified name for the selected element"
- name="Copy Qualified Name">
- </command>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.edit">
- <command
- commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
- style="push"
- tooltip="Trigger expensive validation">
- <visibleWhen checkEnabled="false">
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- <!-- copy qualified name -->
- <menuContribution locationURI="popup:#TextEditorContext?after=copy">
- <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
- style="push" tooltip="Copy Qualified Name">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="menu:edit?after=copy">
- <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
- style="push" tooltip="Copy Qualified Name">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
- <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
- style="push" tooltip="Copy Qualified Name">
- <visibleWhen checkEnabled="false">
- <and>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
- <iterate>
- <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
- </iterate>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
- <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
- commandId="org.eclipse.xtext.ui.editor.FindReferences">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
-
-<!-- adding resource factories -->
-
- <extension
- point="org.eclipse.emf.ecore.extension_parser">
- <parser
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
- type="css">
- </parser>
- </extension>
- <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
- <resourceServiceProvider
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
- uriExtension="css">
- </resourceServiceProvider>
- </extension>
-
-
- <!-- marker definitions for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
- <extension
- id="css.check.fast"
- name="CSS Problem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.xtext.ui.check.fast"/>
- <persistent value="true"/>
- </extension>
- <extension
- id="css.check.normal"
- name="CSS Problem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.xtext.ui.check.normal"/>
- <persistent value="true"/>
- </extension>
- <extension
- id="css.check.expensive"
- name="CSS Problem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.xtext.ui.check.expensive"/>
- <persistent value="true"/>
- </extension>
-
- <extension
- point="org.eclipse.xtext.builder.participant">
- <participant
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
- fileExtensions="css"
- >
- </participant>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.preferencePage"
- name="Compiler">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.propertyPage"
- name="Compiler">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject"/>
- </enabledWhen>
- <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
- </page>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
- <command
- commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.OpenGeneratedCode"
- style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
- commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
- <activeWhen>
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
- </activeWhen>
- </handler>
- </extension>
-
- <!-- Quick Outline -->
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
- commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Open the quick outline."
- id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
- name="Quick Outline">
- </command>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.open">
- <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
- style="push"
- tooltip="Open Quick Outline">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened"/>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <!-- quickfix marker resolution generator for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
- <extension
- point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
- markerType="org.eclipse.papyrus.infra.gmfdiag.css3.ui.css.check.fast">
- <attribute
- name="FIXABLE_KEY"
- value="true">
- </attribute>
- </markerResolutionGenerator>
- <markerResolutionGenerator
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
- markerType="org.eclipse.papyrus.infra.gmfdiag.css3.ui.css.check.normal">
- <attribute
- name="FIXABLE_KEY"
- value="true">
- </attribute>
- </markerResolutionGenerator>
- <markerResolutionGenerator
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
- markerType="org.eclipse.papyrus.infra.gmfdiag.css3.ui.css.check.expensive">
- <attribute
- name="FIXABLE_KEY"
- value="true">
- </attribute>
- </markerResolutionGenerator>
- </extension>
- <!-- Rename Refactoring -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
- commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
- <activeWhen>
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.edit">
- <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
- style="push">
- <visibleWhen checkEnabled="false">
- <reference
- definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.refactoring"
- name="Refactoring">
- <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
- </page>
- </extension>
-
- <extension point="org.eclipse.compare.contentViewers">
- <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentViewers"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
- extensions="css">
- </viewer>
- </extension>
- <extension point="org.eclipse.compare.contentMergeViewers">
- <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentMergeViewers"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
- extensions="css" label="CSS Compare">
- </viewer>
- </extension>
- <extension point="org.eclipse.ui.editors.documentProviders">
- <provider id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.editors.documentProviders"
- class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
- extensions="css">
- </provider>
- </extension>
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- extension="css"
- type="text">
- </fileTypes>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="css"
+ icon="icons/sourceEditor.gif"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ name="Papyrus CSS Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <!-- copy qualified name -->
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
+ <activeWhen>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
+ <activeWhen>
+ <and>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ <definition id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened">
+ <and>
+ <reference definitionId="isXtextEditorActive"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ name="CSS">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ name="CSS">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"
+ label="CSS"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
+ name="Validate">
+ </command>
+ <!-- copy qualified name -->
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <!-- copy qualified name -->
+ <menuContribution locationURI="popup:#TextEditorContext?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="menu:edit?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="css">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="css">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
+ <extension
+ id="css.check.fast"
+ name="CSS Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="css.check.normal"
+ name="CSS Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="css.check.expensive"
+ name="CSS Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
+ fileExtensions="css"
+ >
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
+ <command
+ commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.OpenGeneratedCode"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
+ commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
+ <activeWhen>
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened" />
+ </activeWhen>
+ </handler>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.papyrus.infra.gmfdiag.css3.CSS -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui.css.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui.css.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui.css.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <!-- Rename Refactoring -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
+ commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.gmfdiag.css3.CSS"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+ id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.refactoring"
+ name="Refactoring">
+ <keywordReference id="org.eclipse.papyrus.infra.gmfdiag.css3.ui.keyword_CSS"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.compare.contentViewers">
+ <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentViewers"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="css">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.compare.contentMergeViewers"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="css" label="CSS Compare">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider id="org.eclipse.papyrus.infra.gmfdiag.css3.CSS.editors.documentProviders"
+ class="org.eclipse.papyrus.infra.gmfdiag.css3.ui.CSSExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+ extensions="css">
+ </provider>
+ </extension>
+ <extension point="org.eclipse.team.core.fileTypes">
+ <fileTypes
+ extension="css"
+ type="text">
+ </fileTypes>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml
index 5d5d6b9a034..debd4cd3c07 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
@@ -51,4 +49,4 @@
</plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java
index 65c1e2280d3..4c6d6a484b8 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/src/org/eclipse/papyrus/infra/gmfdiag/css3/ui/contentassist/CustomCSSProposalProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
+ * Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
@@ -19,21 +20,21 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
-import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.jface.text.contentassist.CompletionProposal;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.NamedStyleProperties;
+import org.eclipse.papyrus.infra.gmfdiag.css.service.StylingService;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.AttributeSelector;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.IdentifierTok;
import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.css_declaration;
-import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
@@ -49,8 +50,8 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
/** The Constant colorNames. */
static final Set<String> colorNames = new LinkedHashSet<String>();
- /** The Constant umlProperties. */
- static final Set<String> umlProperties = new LinkedHashSet<String>();
+ /** The CSS properties of supported semantic classes. */
+ static final Set<String> semanticProperties;
static {
colorNames.add("aliceblue");//$NON-NLS-1$
@@ -202,26 +203,16 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
}
static {
- for (EClassifier umlMetaclass : UMLPackage.eINSTANCE.getEClassifiers()) {
- if (umlMetaclass instanceof EClass) {
- EClass umlClass = (EClass) umlMetaclass;
- for (EAttribute attribute : umlClass.getEAllAttributes()) {
- umlProperties.add(attribute.getName());
- }
-
- for (EReference reference : umlClass.getEAllReferences()) {
- EClassifier type = reference.getEType();
- if (type instanceof EClass) {
- EClass eType = (EClass) type;
- if (EMFHelper.isSubclass(eType, UMLPackage.eINSTANCE.getNamedElement())) {
- umlProperties.add(reference.getName());
- }
- }
- }
- }
- }
+ semanticProperties = supportedSemanticCSSClasses()
+ .flatMap(cssClass -> cssClass.getEAllStructuralFeatures().stream())
+ .filter(StylingService.getInstance().getSemanticPropertySupportedPredicate())
+ .map(EStructuralFeature::getName)
+ .collect(Collectors.toCollection(LinkedHashSet::new));
}
+ private static Stream<EClass> supportedSemanticCSSClasses() {
+ return StreamSupport.stream(StylingService.getInstance().getSupportedSemanticClasses().spliterator(), false);
+ }
/**
* Gets the custom properties.
@@ -486,14 +477,10 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
@Override
public void complete_selector(final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
super.complete_selector(model, ruleCall, context, acceptor);
- for (EClassifier umlMetaclass : UMLPackage.eINSTANCE.getEClassifiers()) {
- if (umlMetaclass instanceof EClass) {
- EClass umlClass = (EClass) umlMetaclass;
- if (umlClass.getName().contains(context.getPrefix())) {
- acceptor.accept(buildProposal(umlClass.getName(), context));
- }
- }
- }
+
+ supportedSemanticCSSClasses()
+ .filter(cssClass -> cssClass.getName().contains(context.getPrefix()))
+ .forEach(cssClass -> acceptor.accept(buildProposal(cssClass.getName(), context)));
String[] otherSemanticElements = new String[] {
"Compartment", //$NON-NLS-1$
@@ -529,9 +516,9 @@ public class CustomCSSProposalProvider extends AbstractCSSProposalProvider {
prefix = prefix.substring(1);
}
- for (String umlProperty : umlProperties) {
- if (umlProperty.contains(prefix)) {
- acceptor.accept(buildProposal(umlProperty, context));
+ for (String semanticProperty : semanticProperties) {
+ if (semanticProperty.contains(prefix)) {
+ acceptor.accept(buildProposal(semanticProperty, context));
}
}
} else {

Back to the top