summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlex Ruiz2012-04-18 07:47:33 (EDT)
committer Paul Webster2012-04-18 07:52:45 (EDT)
commit710c69ea8106b835934c497253d6bb751a00c7c1 (patch)
tree42848c033ecbe1d2749f794c81a6bf34e7351cff
parentb60e4e2b3609bdeb94857a0cd9e4a63fb1f0325a (diff)
downloadeclipse.platform.ui-710c69ea8106b835934c497253d6bb751a00c7c1.zip
eclipse.platform.ui-710c69ea8106b835934c497253d6bb751a00c7c1.tar.gz
eclipse.platform.ui-710c69ea8106b835934c497253d6bb751a00c7c1.tar.bz2
Bug 376269 - Editor Mapping Lookup in EditorRegistry assume filev20120418-1152
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);
}