From b852116e4040917e4b4a3b72b72f09af17acf72d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Mon, 25 Sep 2017 16:34:25 +0300 Subject: [PATCH] Allow creation of SCL modules to folders that are also module names refs #7507 Change-Id: I5c1cc4686aad8b125a5d9debc70eb6376805f3a4 --- .../scl/ui/modulebrowser/SCLModuleBrowser.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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()); -- 2.47.1