498553: Editors available on marketplace dialog ignores "do not ask me again"
Re-enable persisting choice for special internal / system editors
This reverts commit 0c9520ab7be3ee2dc2afbc6f591ee7b3bd99641e.
Bug: 498553
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=498553
See also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=502514
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/AskMarketPlaceForFileSupportStrategy.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/AskMarketPlaceForFileSupportStrategy.java
index dc192e4..dc9dd67 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/AskMarketPlaceForFileSupportStrategy.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/AskMarketPlaceForFileSupportStrategy.java
@@ -93,9 +93,7 @@
.getMarketplaceClientService();
IMarketplaceClientConfiguration config = marketplaceClientService.newConfiguration();
marketplaceClientService.open(config, new LinkedHashSet<INode>(nodes));
- } else if (dialog.isAssociateToExtension() &&
- // FIXME bug 498553: workaround for platform bug 502514 - persisting system editor association leads to NPE
- res.isInternal() && !AskMarketPlaceForFileSupportStrategy.isSystem(res.getId())) {
+ } else if (dialog.isAssociateToExtension()) {
List<String> extensions = new ArrayList<String>(1);
extensions.add(fileExtension);
// need internal API:
@@ -114,7 +112,6 @@
newMapping.setDefaultEditor(res);
mappings[mappings.length - 1] = newMapping;
((EditorRegistry) editorRegistry).setFileEditorMappings(mappings);
-
((EditorRegistry) editorRegistry).saveAssociations();
}
return Status.OK_STATUS;
@@ -144,8 +141,4 @@
return res;
}
- private static boolean isSystem(String id) {
- return IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID.equals(id)
- || IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID.equals(id);
- }
}