Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2012-09-25 19:49:56 +0000
committerBrian de Alwis2012-09-25 19:49:56 +0000
commit78c099995ee3e0a25e88fb4e7c963fbeb4bcbf70 (patch)
treecf414de1964dcd15e3619ede6c89700b1f923e5f
parent750f10c8c1aa756ce2f6ef39c87dad5ad42d97cc (diff)
downloadeclipse.platform.ui-78c099995ee3e0a25e88fb4e7c963fbeb4bcbf70.tar.gz
eclipse.platform.ui-78c099995ee3e0a25e88fb4e7c963fbeb4bcbf70.tar.xz
eclipse.platform.ui-78c099995ee3e0a25e88fb4e7c963fbeb4bcbf70.zip
[Regression] 'Show View' dialog: views without category missing since 'Other' node is missing
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
index ac7a9f164bd..021b783da15 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
@@ -30,7 +30,6 @@ import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.e4.compatibility.CompatibilityPart;
import org.eclipse.ui.internal.menus.MenuHelper;
@@ -56,6 +55,8 @@ public class ViewRegistry implements IViewRegistry {
private HashMap<String, ViewCategory> categories = new HashMap<String, ViewCategory>();
+ private Category miscCategory = new Category();
+
@PostConstruct
void postConstruct() {
IExtensionPoint point = extensionRegistry.getExtensionPoint("org.eclipse.ui.views"); //$NON-NLS-1$
@@ -78,6 +79,10 @@ public class ViewRegistry implements IViewRegistry {
}
}
}
+ if (!categories.containsKey(miscCategory.getId())) {
+ categories.put(miscCategory.getId(), new ViewCategory(miscCategory.getId(),
+ miscCategory.getLabel()));
+ }
for (IExtension extension : point.getExtensions()) {
for (IConfigurationElement element : extension.getConfigurationElements()) {
@@ -138,11 +143,7 @@ public class ViewRegistry implements IViewRegistry {
String categoryId = element
.getAttribute(IWorkbenchRegistryConstants.ATT_CATEGORY);
ViewCategory category = findCategory(categoryId);
- if (category == null) {
- tags.add("categoryTag:" + WorkbenchMessages.ICategory_other); //$NON-NLS-1$
- } else {
- tags.add("categoryTag:" + category.getLabel()); //$NON-NLS-1$
- }
+ tags.add("categoryTag:" + category.getLabel()); //$NON-NLS-1$
// ==> End of update descriptor
ViewDescriptor viewDescriptor = new ViewDescriptor(application, descriptor,
@@ -212,14 +213,13 @@ public class ViewRegistry implements IViewRegistry {
*/
public ViewCategory findCategory(String id) {
if (id == null) {
- return null;
+ return categories.get(miscCategory.getId());
}
return categories.get(id);
}
public Category getMiscCategory() {
- // TODO Auto-generated method stub
- return null;
+ return miscCategory;
}
}

Back to the top