Allow creation of SCL modules to folders that are also module names 30/1030/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Mon, 25 Sep 2017 13:34:25 +0000 (16:34 +0300)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Mon, 25 Sep 2017 13:34:25 +0000 (16:34 +0300)
refs #7507

Change-Id: I5c1cc4686aad8b125a5d9debc70eb6376805f3a4

bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/SCLModuleBrowser.java

index b175a3e600c14cc69db9c7e1a8e6ea23de1b6048..97bfc9fb8ed3de929960a15558023c9f63115570 100644 (file)
@@ -55,15 +55,14 @@ public class SCLModuleBrowser extends ViewPart {
         menuMgr.addMenuListener(new IMenuListener() {
             public void menuAboutToShow(IMenuManager manager) {
                 ModuleNameTreeEntry entry = (ModuleNameTreeEntry)content.getStructuredSelection().getFirstElement();
-                if(!entry.isModule)
-                    manager.add(new Action("New Module...") {
-                        @Override
-                        public void run() {
-                            CreateModuleDialog dialog = new CreateModuleDialog(content.getControl().getShell(), SCLModuleBrowser.this);
-                            dialog.setPackage(entry.fullName);
-                            dialog.open();
-                        }
-                    });
+                manager.add(new Action("New Module...") {
+                    @Override
+                    public void run() {
+                        CreateModuleDialog dialog = new CreateModuleDialog(content.getControl().getShell(), SCLModuleBrowser.this);
+                        dialog.setPackage(entry.fullName);
+                        dialog.open();
+                    }
+                });
             }
         });
         Menu menu = menuMgr.createContextMenu(content.getControl());