diff --git a/chemclipse/plugins/org.eclipse.chemclipse.ux.extension.ui/src/org/eclipse/chemclipse/ux/extension/ui/swt/MultiDataExplorerTreeUI.java b/chemclipse/plugins/org.eclipse.chemclipse.ux.extension.ui/src/org/eclipse/chemclipse/ux/extension/ui/swt/MultiDataExplorerTreeUI.java index 87dc3903a6..dfb5b82d37 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.ux.extension.ui/src/org/eclipse/chemclipse/ux/extension/ui/swt/MultiDataExplorerTreeUI.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.ux.extension.ui/src/org/eclipse/chemclipse/ux/extension/ui/swt/MultiDataExplorerTreeUI.java @@ -16,7 +16,6 @@ import java.io.IOException; import java.util.Collection; import java.util.Comparator; -import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; @@ -282,7 +281,6 @@ private void createContextMenu(DataExplorerTreeUI treeUI) { public void menuAboutToShow(IMenuManager mgr) { Object[] selection = treeViewer.getStructuredSelection().toArray(); - Map>> converterSupplier = new HashMap<>(); Set supplierSet = new TreeSet<>(new Comparator() { @Override @@ -325,20 +323,15 @@ public void run() { @Override public void run() { - outer: for(Object object : selection) { if(object instanceof File file) { - Map> map = converterSupplier.get(file); - if(map == null) { - continue; - } - for(Entry> entry : map.entrySet()) { + Map> identifiers = getIdentifierSupplier().apply(file); + for(Entry> entry : identifiers.entrySet()) { ISupplierFileIdentifier identifier = entry.getKey(); if(identifier instanceof ISupplierFileEditorSupport supplierFileEditorSupport) { for(ISupplier supplier : entry.getValue()) { if(activeFileSupplier.getId().equals(supplier.getId())) { openEditorWithSupplier(file, supplierFileEditorSupport, supplier); - continue outer; } } }