Bug 496833 - [Tools] Application model editor doesn’t allow to create a ToolBar for a CompositePart
Summary: [Tools] Application model editor doesn’t allow to create a ToolBar for a Comp...
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Benedikt Kuntz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 08:55 EDT by Christoph Keimel CLA
Modified: 2019-11-03 02:00 EST (History)
6 users (show)

See Also:


Attachments
CompositePart Toolbar Demo Project (19.44 KB, application/x-zip-compressed)
2016-06-29 08:18 EDT, Christoph Keimel CLA
no flags Details
Screenshot of the application (25.48 KB, image/png)
2016-06-29 08:20 EDT, Christoph Keimel CLA
no flags Details
CompositePart Toolbar (7.74 KB, image/png)
2019-11-01 12:26 EDT, Benedikt Kuntz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Keimel CLA 2016-06-27 08:55:32 EDT
Since MCompositePart inherits from MPart you can add a ToolBar to it. Using the efxclipse renderes the ToolBar is rendered correctly, if the ToolBar is manualy added to the e4xmi. 

The e4 model editor tooling should allow this feature in the same way it can be done for parts.
Comment 1 Patrik Suzzi CLA 2016-06-28 07:57:59 EDT
Thanks for reporting!

Did you check if also the E4 renderer is able to render it correctly ?
Comment 2 Christoph Keimel CLA 2016-06-28 10:14:26 EDT
I can verify that the efxclipse javafx renderer does it correctly. I don't know about the swt renderer.
Comment 3 Thomas Schindl CLA 2016-06-29 05:58:15 EDT
Just to mention - just because the SWT-Renderer can't do something does not mean it should not be added.
Comment 4 Dirk Fauth CLA 2016-06-29 07:23:51 EDT
And supposed the SWT renderer doesn't support it, we should consider adding that support to make the model rendering capabilities even between SWT and JavaFX. 

@christoph
Do you have a simple efxclipse example that shows this? I could try to migrate it to SWT then.
Comment 5 Christoph Keimel CLA 2016-06-29 08:18:53 EDT
Created attachment 262779 [details]
CompositePart Toolbar Demo Project

I have attached a project with a Toolbar in a CompositePart that rendes with the efxclipse renderers.
Comment 6 Christoph Keimel CLA 2016-06-29 08:20:29 EDT
Created attachment 262780 [details]
Screenshot of the application

And here is a screen shot, so you can see what it should look like.
Comment 7 Christoph Laeubrich CLA 2019-10-03 12:33:42 EDT
Any progress on this?
Comment 8 Karsten Thoms CLA 2019-10-04 14:08:44 EDT
Christoph L., maybe something for you to solve?
Comment 9 Eclipse Genie CLA 2019-10-29 08:58:33 EDT
New Gerrit change created: https://git.eclipse.org/r/151748
Comment 11 Karsten Thoms CLA 2019-10-31 05:23:30 EDT
Thanks Benedikt for the patch, and Christoph for the review!
Comment 12 Christoph Laeubrich CLA 2019-10-31 06:14:22 EDT
Thanks for fixing this, can anyone tell when those changes are release officially? If they are merged to master will they appear in the next Eclipse release?
Comment 13 Karsten Thoms CLA 2019-10-31 11:56:15 EDT
This will be part of 4.14 in december. It will be part of the next integration build, available tomorrow. Would be great if you could download one and confirm that your issue is solved.

https://download.eclipse.org/eclipse/downloads/
Comment 14 Christoph Laeubrich CLA 2019-11-01 10:50:58 EDT
(In reply to Karsten Thoms from comment #13)
> Would be great if you could download
> one and confirm that your issue is solved.

I'm not very familiar with the integration build stuff, so maybe you can give me a hint, I tried the following:

1) go to https://download.eclipse.org/eclipse/downloads/ and choose the latest integration build
2) downloaded Eclipse-SDK for my platform, Eclipse starts fine
3) because no RCP Tooling is available, with Windows>Install New Software I only get offered RCPTT
4) next I downloaded the "RCP Runtime Binary" Updatesite, extracted it and add it, but it say "all items installed" ....

now I'm a bit stuck :-)
Comment 15 Christoph Laeubrich CLA 2019-11-01 11:05:13 EDT
Okay everything is there I was just confused because it seems you cant anymore add a CompositePart to the snippets or controls section, is this intentional?
Beside that the Toolbar can now be enabled for a composite Part but it is not rendered by SWT.
Comment 16 Benedikt Kuntz CLA 2019-11-01 12:26:25 EDT
Created attachment 280487 [details]
CompositePart Toolbar

The elements that can be added to the snippets are defined in VSnippetsEditor, there was no change to that class here. If it is intended, one could add it.
Same goes for a CompositePart below another CompositePart. This was not possible prior to the commit here, but I am not sure if it should be...

I got a toolbar rendered in the PartStack in which the CompositePart resides with SWT, but I had to define a contributing Class for the CompositePart and to make sure that there is a toolbar item defined in the toolbar (see screenshot).
Comment 17 Christoph Laeubrich CLA 2019-11-02 02:27:26 EDT
(In reply to Benedikt Kuntz from comment #16)
> Created attachment 280487 [details]
> CompositePart Toolbar
> 

Thanks it seems thats what need to be done, I noticed that I already opened a request for the Snippets in Bug 551749 so from my point of view this could be closed.


(In reply to Benedikt Kuntz from comment #16)
> The elements that can be added to the snippets are defined in
> VSnippetsEditor, there was no change to that class here. If it is intended,
> one could add it.

Would be good IMO, do you think you can also create a gerrit for the other bug? What I'm wondering about these "missing elements" is, can't the editor derive the information what are valid element from the EMF Model somewhat, so one won't need to code that manually or is this not possible?
Comment 18 Benedikt Kuntz CLA 2019-11-02 11:54:25 EDT
Added a patch set for Bug 551749.

From what I've seen so far, there is a lot of redundancy in all those model editor classes, especially when it comes to the handling of adding child elements.
I think it would be possible to derive the information from the EMF model, but this would definitely mean a major rework of the whole editor.
Comment 19 Christoph Laeubrich CLA 2019-11-03 02:00:10 EST
(In reply to Benedikt Kuntz from comment #18)
> Added a patch set for Bug 551749.

Thanks for that I have already reviewed it, but a commiter needs to approve.

> I think it would be possible to derive the information from the EMF model,
> but this would definitely mean a major rework of the whole editor.

I have opened Bug 552639 maybe you can share your investigations there?