From: Hannu Niemistö Date: Mon, 25 Sep 2017 13:34:25 +0000 (+0300) Subject: Allow creation of SCL modules to folders that are also module names X-Git-Tag: v1.31.0~168^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F1030%2F1;p=simantics%2Fplatform.git Allow creation of SCL modules to folders that are also module names refs #7507 Change-Id: I5c1cc4686aad8b125a5d9debc70eb6376805f3a4 --- diff --git a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/SCLModuleBrowser.java b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/SCLModuleBrowser.java index b175a3e60..97bfc9fb8 100644 --- a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/SCLModuleBrowser.java +++ b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/SCLModuleBrowser.java @@ -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());