| Summary: | [View Mgmt] views with undeclared category attribute are tossed (1GD41DV) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jim des Rivieres <jeem> | ||||
| Component: | UI | Assignee: | Debbie Wilson <debbie_wilson> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | n.a.edgar | ||||
| Version: | 2.0 | Keywords: | investigate | ||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
PRODUCT VERSION: build 102 Doc could be improved to make the API contract more clear. There are no plans to change the current behavior for 2.0. Reopened for investigation Doc could be improved to make the API contract more clear. There are no plans to change the current behavior for 2.0. Created attachment 5230 [details]
Patch for org.eclipse.ui.workbench
Patch to output an error message if an unknown category is specified for a
view. Doc changes not included in this patch.
The attached patch file has two copies of the diffs. How was this generated? This may indicate a bug in Compare. In Package Explorer view - select the project (e.g. org.eclipse.ui.workbench) - right click on the project (for context menu) - Team->Create Patch... - select 'Save in File System' - enter a path for the patch Not sure which version of Eclipse I was using to generate the patch but likely a 3.0 Integration build shortly before the patch was generated. Deb is filing a separate PR against Platform Compare for the patch file problem. Patch released with a couple of changes: - do not externalize log error string - use Category.getName() instead of ICategory.MISC_NAME This PR was fixed some time ago but never marked verified. Verified in I20040210800 (candidate for M7). |
Nothing happens if the "category" attribute mentions an undeclared category in the <view> contributed to the org.eclipse.ui.views extension point. Steps to reproduce: 0. Create a plug-in that contributes a view to the org.eclipse.ui.views extension point and mentions the name of an undeclared category in the category attribute on the <view> element. (See attached plugin.xml and .java source file.) 1. Start eclipse 2. Perspective -> Show View -> Other 3. Expand the all of the categories. Observe: The new view does not show up any where. Expectation: If the category is undeclared, I would expect (a) the view to show up in the place it would had I omitted the "category" attribute entirely, and perhaps (b) a helpful entry written to the platform log. 4. Exit the workbench Observe: No log entry. Expectation: =contents of plugin.xml========================= <plugin name="Hello World View" id="com.example.jeem.hello" version="1.0" provider-name="Jeem"> <requires> <import plugin="org.eclipse.ui"/> </requires> <runtime> <library name="hello.zip"/> </runtime> <extension point="org.eclipse.ui.views"> <view id="com.example.jeem.hwViewId" category="com.example.jeem.hwViewCat" name="Hello World View" class="com.example.jeem.HelloWorld"> </view> </extension> </plugin> =contents of /com/example/jeem/HelloWorld.java========================= package com.example.jeem; import org.eclipse.ui.part.ViewPart; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.*; public class HelloWorld extends ViewPart{ Label fLabel; public void createPartControl(Composite parent) { fLabel = new Label(parent, SWT.NONE); fLabel.setText("Hello world"); } public void setFocus() { fLabel.setFocus(); } } =.log excerpt========================================== Log: Wed May 02 13:53:44 EDT 2001 2 org.eclipse.core.runtime 1 Problems encountered loading the plug-in registry. 1=============<children>============= 2 org.eclipse.core.runtime 1 No plugin found for: file:/D:/eclipse102-jdk/eclipse/plugins/org.eclipse.core.boot/plugin.xml 2 org.eclipse.core.runtime 1 No plugin found for: file:/D:/eclipse102-jdk/eclipse/plugins/org.eclipse.jface.examples/plugin.xml 2 org.eclipse.core.runtime 1 No plugin found for: file:/D:/eclipse102-jdk/eclipse/plugins/org.eclipse.scripting.examples/plugin.xml 2 org.eclipse.core.runtime 1 No plugin found for: file:/D:/eclipse102-jdk/eclipse/plugins/org.eclipse.scripting.examples.adapter.development/plugin.xml 2 org.eclipse.core.runtime 1 No plugin found for: file:/D:/eclipse102-jdk/eclipse/plugins/org.eclipse.swt.examples/plugin.xml 2 org.eclipse.core.runtime 1 No plugin found for: file:/D:/eclipse102-jdk/eclipse/plugins/org.eclipse.vcm.core.webdav/plugin.xml 2 org.eclipse.core.runtime 1 Unknown extension point org.eclipse.ui.editorsActions specified in plug-in org.eclipse.ui.examples.readmetool. 2 org.eclipse.core.runtime 1 Unknown extension point com.ibm.eclipse.core.help.contribution specified in plug-in org.eclipse.ui.examples.readmetool. 2 org.eclipse.core.runtime 1 Unknown extension point org.eclipse.ui.makerImageProvider specified in plug-in org.eclipse.debug.ui. 1=============</children>============= NOTES: