Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Implement FormEditor for own XML format / Java model
Implement FormEditor for own XML format / Java model [message #1002770] Sat, 19 January 2013 11:08 Go to next message
Johan Kumps is currently offline Johan KumpsFriend
Messages: 1
Registered: January 2013
Junior Member
Hi,

I'm looking for a complete example about how to implement a Form based editor for my own XML format and corresponding Java model within an Eclipse plugin.

Following some examples on the net I keep getting an empty page.

I would like to end up with a multitabbed editor (like plugin.xml editor) containing at least on GUI page and a textual representation of the XML file I opened. Could you point me to a complete example.

I'm using the Juno release to build my plugin.

Thank you in advance,
Johan
Re: Implement FormEditor for own XML format / Java model [message #1003638 is a reply to message #1002770] Mon, 21 January 2013 17:06 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
There are articles and examples found online. I couldn't tell you why you end up getting an empty page.

The PDE code is all open source so you can examine how we implement the forms API. Most of the PDE editors have extra framework code that you wouldn't need, but it does give you a working example. Note that PDE has a lot of form editors, Plug-in, Schema, Product, Target, Context Help, Table of Contents, Category, Update Site, Feature, etc.
Re: Implement FormEditor for own XML format / Java model [message #1003645 is a reply to message #1002770] Mon, 21 January 2013 17:13 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
.... and why not using http://www.eclipse.org/sapphire/?

Tom

Am 21.01.13 14:23, schrieb Johan Kumps:
> Hi,
>
> I'm looking for a complete example about how to implement a Form based
> editor for my own XML format and corresponding Java model within an
> Eclipse plugin.
>
> Following some examples on the net I keep getting an empty page.
> I would like to end up with a multitabbed editor (like plugin.xml
> editor) containing at least on GUI page and a textual representation of
> the XML file I opened. Could you point me to a complete example.
>
> I'm using the Juno release to build my plugin.
>
> Thank you in advance,
> Johan
Re: Implement FormEditor for own XML format / Java model [message #1053643 is a reply to message #1003645] Tue, 07 May 2013 06:18 Go to previous message
akhil gupta is currently offline akhil guptaFriend
Messages: 13
Registered: November 2012
Junior Member
Hi Johan,
if you are looking to implement form based editor in eclipse then you will have to extend your editor class to FormEditor and for the tab like plugin.xml, you will have to create separate classes for each and each one should extend the FormPage.

In your editor class, override the addPage() just like:
@Override
protected void addPages() {
firstPage();
secondPage();
.....
.....
}

and above each page should have definition like:

private void firstPage() {
//add 'first' page
firstFormObj = new FirstPage(this, "FirstPage","FirstTab");
try {
addPage(firstFormObj);
} catch (PartInitException e) {
e.printStackTrace();
}
}

In above code, FirstPage is class related to First tab,
now, In class FirstPage, extend it from FormPage class and override the "createFormContent(IManagedForm managedForm)" method. Within this method you can define UI of your first tab.
This is too late for you.. but hope this will help to others.

Regards,
Akhil
Previous Topic:Plugin not executable anymore after svn "checkout"
Next Topic:Genereate Constructor Using Fields with Jackson Annotations
Goto Forum:
  


Current Time: Fri Apr 19 16:24:29 GMT 2024

Powered by FUDForum. Page generated in 0.02406 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top