Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Advanced Scripting Environment (EASE) » Problems with EASE's SelectionModule & missing extensions
Problems with EASE's SelectionModule & missing extensions [message #1520283] Sun, 21 December 2014 04:51 Go to next message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
I noticed a mismatch between the registration of the modeling selector extensions and the code in the selector service that looks up these extensions.

There are 2 selection extensions in org.eclipse.ease.modules.modeling:

   <extension
         point="org.eclipse.ease.modules.modeling.selector">
      <selector
            id="GMFSemanticSeletor"
            impl="org.eclipse.ease.modules.modeling.selector.GMFSemanticSeletor"
            priority="50">
      </selector>
      <selector
            id="GMFNotationSelector"
            impl="org.eclipse.ease.modules.modeling.selector.GMFNotationSelector"
            priority="45">
      </selector>
   </extension>


The SelectorService is looking up the extension with the wrong ID and wrong name.

I also noticed that there are several EASE modules that are not included in the plugin.xml extensions.

I propose the following fixes:

diff --git a/plugins/org.eclipse.ease.modules.modeling/plugin.xml b/plugins/org.eclipse.ease.modules.modeling/plugin.xml
index 0b24c38..7dcc79c 100644
--- a/plugins/org.eclipse.ease.modules.modeling/plugin.xml
+++ b/plugins/org.eclipse.ease.modules.modeling/plugin.xml
@@ -23,6 +23,36 @@
       </category>
       <module
             category="org.eclipse.ease.modules.category.modeling"
+            class="org.eclipse.ease.modules.modeling.DialogModule"
+            id="org.eclipse.ease.modules.modeling.ecore"
+            name="DialogModule"
+            visible="true">
+         <dependency
+               module="org.eclipse.ease.module.platform.ui">
+         </dependency>
+      </module>
+      <module
+            category="org.eclipse.ease.modules.category.modeling"
+            class="org.eclipse.ease.modules.modeling.SelectionModule"
+            id="org.eclipse.ease.modules.modeling.ecore"
+            name="SelectionModule"
+            visible="true">
+         <dependency
+               module="org.eclipse.ease.module.platform.ui">
+         </dependency>
+      </module>
+      <module
+            category="org.eclipse.ease.modules.category.modeling"
+            class="org.eclipse.ease.modules.modeling.WorkbenchModule"
+            id="org.eclipse.ease.modules.modeling.ecore"
+            name="WorkbenchModule"
+            visible="true">
+         <dependency
+               module="org.eclipse.ease.module.platform.ui">
+         </dependency>
+      </module>
+      <module
+            category="org.eclipse.ease.modules.category.modeling"
             class="org.eclipse.ease.modules.modeling.EcoreModule"
             id="org.eclipse.ease.modules.modeling.ecore"
             name="ECore"
diff --git a/plugins/org.eclipse.ease.modules.modeling/src/org/eclipse/ease/modules/modeling/SelectorService.java b/plugins/org.eclipse.ease.modules.modeling/src/org/eclipse/ease/modules/modeling/SelectorService.java
index 2ff2ce0..b4e6206 100644
--- a/plugins/org.eclipse.ease.modules.modeling/src/org/eclipse/ease/modules/modeling/SelectorService.java
+++ b/plugins/org.eclipse.ease.modules.modeling/src/org/eclipse/ease/modules/modeling/SelectorService.java
@@ -37,7 +37,7 @@ import com.google.common.collect.TreeMultimap;
  */
 public class SelectorService {
 
-	private static final String SELECTOR_EXT_POINT_ID = "org.eclipse.ease.module.platform.Selector";
+	private static final String SELECTOR_EXT_POINT_ID = "org.eclipse.ease.modules.modeling.selector";
 
 	private static class SingletonHolder {
 
@@ -143,7 +143,7 @@ public class SelectorService {
 			final IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(SELECTOR_EXT_POINT_ID);
 
 			for (final IConfigurationElement e : config) {
-				if ("Selector".equals(e.getName())) {
+				if ("selector".equals(e.getName())) {
 					String id = e.getAttribute("id");
 					try {
 						ISelector newSelector = (ISelector) e.createExecutableExtension("impl");


- Nicolas.
Re: Problems with EASE's SelectionModule & missing extensions [message #1521429 is a reply to message #1520283] Sun, 21 December 2014 20:27 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 189
Registered: July 2009
Location: Graz, Austria
Senior Member
I have to admit I never looked at the modeling modules much. Fixes are much appreciated, but you would have to provide them as gerrit patches. Please see the contributor guide, which I just updated recently.

For some of the additional modules I question their usefulness. For example DialogModule and WorkbenchModule both share a getActiveShell() method. selectFormList() might be better moved to the UI module and be refactored to something like showSelectionDialog(...).
I also am not sure about all the functions in the WorkbenchModule(). Does it make sense for a script to call getActivePage()/getActiveWindow() ? Might be a use case, but what to do in a script with such objects? Nevertheless, questioning the use case is a differnt story, so please add it to a gerrit commit.
Re: Problems with EASE's SelectionModule & missing extensions [message #1523061 is a reply to message #1521429] Mon, 22 December 2014 18:05 Go to previous message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 40
Registered: December 2014
Member
Pushed a fix on gerrit for bug 455979
Next Topic:Problems with the new EASE script metadata
Goto Forum:
  


Current Time: Mon Feb 19 06:37:36 GMT 2018

Powered by FUDForum. Page generated in 0.02783 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software