Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » XML editor Part in CTabItem (Help to novice: implement multipage editor with a xml editor tab in e4)
XML editor Part in CTabItem [message #1091372] Wed, 21 August 2013 08:06 Go to next message
Pim van Nierop is currently offline Pim van Nierop
Messages: 7
Registered: August 2013
Junior Member
Hello everyone,

My question is its shortest for is "How to include the standard eclipse XML editor in a Composite of a part that I created myself?"

Background:
I have started developing Eclipse e4 RCP recently and progression is slow but steady. In many instances I am struggeling with the approach to relatively simple things because I cannot find relevant documentation. Because I could not find any help on the www I would like to as you for advice on these forums for the following problem:

I try to create a Part that acts as a multipage editor. What confuses me first of all is that there are all these predefined Part classes (such as MultiPageEditorPart), but on these forums I have found that is is not needed nor advised to use these classes for extension. Why are these abstact classes defined? In addition, I was not able to use the SWT WindowBuilder when my class extended the MultiPageEditorPart.

My current approach to create a multipage editoris to define a single part in the application model that points to an implementing class that creates a CTabFolder control. Each of the CTabItems contains its own Composite and is ready to contain its own Controls (this works with the SWT WindowBuilder). Next, I would like one of the multipage editor tabs to contain the standard XML editor that comes with eclipse. And I have no idea how to do this.

Any help would be appreciated greatly.

Pim
Re: XML editor Part in CTabItem [message #1092435 is a reply to message #1091372] Thu, 22 August 2013 15:57 Go to previous messageGo to next message
Eric Moffatt is currently offline Eric Moffatt
Messages: 118
Registered: July 2009
Senior Member

We're close to being able to do this. The basic idea is:

Create an MPart identical to the one that is created when you open that editor normally.

Call the EModelService#hostElement and pass in the various parameters...voila !

Unfortunately this works ok for views (where you only have to set the element's ID to the viewId) but is somewhat more complicated with editors.

I'm interested in getting these new features working, send me an email and I'll try
to dig up some time to work with you on it...
Re: XML editor Part in CTabItem [message #1094799 is a reply to message #1092435] Mon, 26 August 2013 03:53 Go to previous messageGo to next message
Pim van Nierop is currently offline Pim van Nierop
Messages: 7
Registered: August 2013
Junior Member
I have created a sample project that we can work on. How can I contact you by email? Private messages or email exchange do not seem to be supported by the eclipse forums.

Bye, Pim

[Updated on: Mon, 26 August 2013 03:57]

Report message to a moderator

Re: XML editor Part in CTabItem [message #1095214 is a reply to message #1094799] Mon, 26 August 2013 15:53 Go to previous message
Eric Moffatt is currently offline Eric Moffatt
Messages: 118
Registered: July 2009
Senior Member
Easy...emoffatt@ca.ibm.com ... I'm the Eclipse 4 Dev lead so I've put this email out in a number of places...one more won't hurt...Wink.
Previous Topic:PropertyDialog for e4 app
Next Topic:Editors not restored on restart, not saved in workbench.xmi (new in 4.3)
Goto Forum:
  


Current Time: Fri Aug 29 01:33:32 EDT 2014

Powered by FUDForum. Page generated in 0.02489 seconds