Community
Participate
Working Groups
To allow that new views are contributed by fragments and processors we should rewrite the ShowViewDialog and its related classes to work on the application model.
https://git.eclipse.org/r/23785
Created attachment 241165 [details] Example project To test the change, add the following plugin with a PartDescriptor to your Eclipse runtime configuration.
(In reply to Lars Vogel from comment #0) > To allow that new views are contributed by fragments and processors we > should rewrite the ShowViewDialog and its related classes to work on the > application model. New views in the workbench are still contributed via the extension points. PW
(In reply to Paul Webster from comment #3) > (In reply to Lars Vogel from comment #0) > > To allow that new views are contributed by fragments and processors we > > should rewrite the ShowViewDialog and its related classes to work on the > > application model. > > New views in the workbench are still contributed via the extension points. > > PW This still works, as the extension points are converted to model elements at start time.
Plus one. We already developed new views for RCP application using fragments, and it is a challenge to reconvert them into extension points for our IDE users.
*** Bug 430602 has been marked as a duplicate of this bug. ***
The suggested change is ready, please note that if we start using the application model in the IDE, errors in it will surface. See for example Bug 445663. But IMHO these errors must be resolved in any case. https://git.eclipse.org/r/#/c/23785/
I plan to do this merge this early M4.
To test this with a new part descriptor contributed via a model fragment, you need to add the "View" tag to the part descriptor. The category finding logic is at the moment a bit weird, see Bug 446093, but it works correctly IMHO based on the current data in the model. To define a category for your part descriptor use a tag similar to "categoryTag:YourCategory".
For some reason I was unable to update the existing Gerrit review were the review took place. For reference: https://git.eclipse.org/r/#/c/23785/ New Gerrit review: https://git.eclipse.org/r/#/c/36079/
This bug is fixed with: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b6821b521eefca7bf19e476741823e2a7c41f737 This fix allows the customer to contribute part descriptors to the Eclipse IDE which are also available in the Show View menu. Quick access to open parts contributed as part descriptors also work. If Bug 446093 get applied, the category determination can be simplified. Currently it uses the tag but with the "categoryTag:[yourcategory]" prefix but Bug 446093 plans to use the category field for this.
(In reply to Lars Vogel from comment #11) > This bug is fixed with: > > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=b6821b521eefca7bf19e476741823e2a7c41f737 This commit introduced issues described in bug 454143.
Issues introduced by this bug have been fixed. Verified in 4.5.0.I20150129-1830
Hi Lars. We have a view category named "&C/C++". Before this commit, the & was getting erased when shown in the Show View dialog but after the commit it is shown. I'm not sure why we had the & in the first place (I don't see any possible way to use an accelerator for a category name) but I thought you might like to know in case you want to keep the behavior the same. We can fix it in CDT too, that's not a problem.
(In reply to Marc-Andre Laperle from comment #14) > Hi Lars. We have a view category named "&C/C++". Before this commit, the & > was getting erased when shown in the Show View dialog but after the commit > it is shown. I'm not sure why we had the & in the first place (I don't see > any possible way to use an accelerator for a category name) but I thought > you might like to know in case you want to keep the behavior the same. We > can fix it in CDT too, that's not a problem. I think the right place to fix this is CDT, I'm also not aware of a way to use an accelerator for view categories. Please link your bug to this one.
(In reply to Lars Vogel from comment #15) > I think the right place to fix this is CDT, I'm also not aware of a way to > use an accelerator for view categories. Please link your bug to this one. Thanks Lars! There is no bug, only a Gerrit change. I added it to the See Also.
(In reply to Lars Vogel from comment #2) > Created attachment 241165 [details] > Example project > > To test the change, add the following plugin with a PartDescriptor to your > Eclipse runtime configuration. Lars, the attached project contains neither source code nor the e4xmi file. Do you have a *working* example of the fragment contributing a view which is supposed to work after fixing this bug? I'm trying to create one from scratch but either it still doesn't work or I'm doing something wrong.
(In reply to Andrey Loskutov from comment #17) > Lars, > the attached project contains neither source code nor the e4xmi file. Do you > have a *working* example of the fragment contributing a view which is > supposed to work after fixing this bug? I'm trying to create one from > scratch but either it still doesn't work or I'm doing something wrong. Latest I-Build has a PDE template with an e4 view for the IDE. I'm currently of my computer, if you do not find it I can give more details or upload an example on Monday.
(In reply to Lars Vogel from comment #18) > Latest I-Build has a PDE template with an e4 view for the IDE. Lars, where I have to start to see this template? New -> PDE -> New Plugin? The view template there is still the 3.x one, at least with the build from http://download.eclipse.org/eclipse/updates/4.6-I-builds/I20151103-0800.