views:

69

answers:

1

In eclipse plugin development,i am trying to combine two different editors (html and Java editors) in a single multipage editor.

Can anyone guide me on this.

Thanks in advance

regards Mathan

+2  A: 

You can check out the Multi-page Editor Example, which adds an editor for files with the .mpe extension. It shows how to create an editor that uses multiple pages by defining both an editor and a page contributor that can add entries to an action bar.

Also Eclipse Wiki: "FAQ How do I make an editor that contains another editor?"

Both are based on Multi-page form editors.


Regarding the issue of "Compilation unit name must end with .java, or one of the registered java-like extensions", may be this SO answer can help (i.e. defining a new <content-type>)

VonC
Thanks Vonc,Yes i am using multipage editor for combining these two editors(html and Java editors).In my application i have mutipage editor file with .mpe extension, which is stored physically in the workspace.And i have java editor file (placed as a child file in mutipageeditor) with .java extension, this is also stored physically in the workspace.My concern is, How to avoid by keeping .java file as a separated physical file.If i remove this java file i am getting a runtime error like "Compilation unit name must end with .java, or one of the registered java-like extensions"