summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlex Ruiz2012-04-18 07:47:33 (EDT)
committer Paul Webster2012-04-18 07:47:33 (EDT)
commit6a3c2870c4b77571115360602140a34d61cef2bf (patch)
tree791b930a458e932b86a8a0bca1b5c9e8e55f1ddb
parentfdf4db780aacd85623c995e81788979e721fb568 (diff)
downloadeclipse.platform.ui-6a3c2870c4b77571115360602140a34d61cef2bf.zip
eclipse.platform.ui-6a3c2870c4b77571115360602140a34d61cef2bf.tar.gz
eclipse.platform.ui-6a3c2870c4b77571115360602140a34d61cef2bf.tar.bz2
Bug 376269 - Editor Mapping Lookup in EditorRegistry assume file
extension is not empty look for mappings with no extension Bug: 376269
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
index 36720c5..629690e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
@@ -773,7 +773,11 @@ public class EditorRegistry extends EventManager implements IEditorRegistry,
deletedEditorIDs[j] = idMementos[j]
.getString(IWorkbenchConstants.TAG_ID);
}
- FileEditorMapping mapping = getMappingFor(name + "." + extension); //$NON-NLS-1$
+ String key = name;
+ if (extension != null && extension.length() > 0) {
+ key = key + "." + extension; //$NON-NLS-1$
+ }
+ FileEditorMapping mapping = getMappingFor(key);
if (mapping == null) {
mapping = new FileEditorMapping(name, extension);
}