Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » FormEditor
FormEditor [message #164941] Mon, 27 March 2006 02:11 Go to next message
Marc Adams is currently offline Marc AdamsFriend
Messages: 15
Registered: July 2009
Junior Member
What would be the best method for adding a FormEditor page to the
existing XML Editor?

I know that it isn't recommended to subclass the XMLMultiPageEditorPart,
and I don't believe an editor configuration will achieve this either.

If I did extend the XMLMultiPageEditorPart, how would I add a page that
is part of a FormEditor? Essentially the FormEditor extends
MultiPageEditor like the XMLMultiPageEditorPart....it sounds messy, but
I'd like to leverage the current editor and add this desired functionality.

Thanks for your input
Re: FormEditor [message #164953 is a reply to message #164941] Mon, 27 March 2006 05:02 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Sun, 26 Mar 2006 21:11:28 -0500, Marc Adams <marc.adams@apc.com> wrote:

> What would be the best method for adding a FormEditor page to the
> existing XML Editor?
>
> I know that it isn't recommended to subclass the XMLMultiPageEditorPart,
> and I don't believe an editor configuration will achieve this either.
>
> If I did extend the XMLMultiPageEditorPart, how would I add a page that
> is part of a FormEditor? Essentially the FormEditor extends
> MultiPageEditor like the XMLMultiPageEditorPart....it sounds messy, but
> I'd like to leverage the current editor and add this desired functionality.
>
> Thanks for your input
>

Our main recomendation here is for you to make your own multipage editor.
You could even use a copy of the XML Editor as a start, and then remove the tabel-tree
view page, and instead put in your form pages there.

But, I'll admit, I'm not that familar with FormEditor, so, might be easier for you to start with
that.

What exactly is your end-result to be? I'm asking since I'd really discourage people from using the
table-tree-grid page (that's likely to change a lot in future) the we do intend adopters to be able
to use the source page in multipage editors.
Re: FormEditor [message #165020 is a reply to message #164953] Mon, 27 March 2006 13:49 Go to previous messageGo to next message
Marc Adams is currently offline Marc AdamsFriend
Messages: 15
Registered: July 2009
Junior Member
David,

Thanks for the reply. To answer your question: The end goal is to have an
editor to add/edit XML nodes without having to see XML. It sounds lame,
but a lot of the people who will be using the editor don't
need/want/desire to see the XML source and the tree view isn't what they
want to see either. So I wanted to add a page using the FormEditor to have
a master/details block that the user can use to edit and add elements.

As for the rest of us who love the tree view and source view, we'd prefer
not to lose it. I personally think the editor is parfait as it is.

Seeing as I do value my job though, I'll take your advice and start with a
new MPE. I'll make the form editor first, but stick to the DOM model so
that if I can integrate the tree view later, the model will plug right in.

I'm pretty sure I can add the XML SSE as a page in the editor pretty much
drop in. Using the common SSE and an XML configuration right?

I appreciate your guidance

Marc
Re: FormEditor [message #165104 is a reply to message #165020] Mon, 27 March 2006 21:21 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4501
Registered: July 2009
Senior Member

Marc Adams wrote:
> David,
> Thanks for the reply. To answer your question: The end goal is to have
> an editor to add/edit XML nodes without having to see XML. It sounds
> lame, but a lot of the people who will be using the editor don't
> need/want/desire to see the XML source and the tree view isn't what they
> want to see either. So I wanted to add a page using the FormEditor to
> have a master/details block that the user can use to edit and add elements.
> As for the rest of us who love the tree view and source view, we'd
> prefer not to lose it. I personally think the editor is parfait as it is.
>
> Seeing as I do value my job though, I'll take your advice and start with
> a new MPE. I'll make the form editor first, but stick to the DOM model
> so that if I can integrate the tree view later, the model will plug
> right in.
> I'm pretty sure I can add the XML SSE as a page in the editor pretty
> much drop in. Using the common SSE and an XML configuration right?
>
> I appreciate your guidance

Yes, that would be the correct way to do it. The configuration
design document at
http://www.eclipse.org/webtools/wst/components/sse/designs/E ditorConfiguration.html
is a good reference, as is the XMLMultiPageEditorPart's creation and
handling of the source page.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: FormEditor [message #165118 is a reply to message #164953] Mon, 27 March 2006 22:21 Go to previous message
Steve Blass is currently offline Steve BlassFriend
Messages: 276
Registered: July 2009
Senior Member
If you use FormEditor you get a multi-page form editor. You can change
the MultiPageEditor in the stock editor declaration to FormEditor pretty
quick and go from there OR you can add a FormPage to the stock
MultiPageEditor like so
// this is where we actually set up the form page
+ ManagedForm managedForm = new ManagedForm(getContainer());
+ managedForm.getForm().setText("Master/Details Form");
+ TreeViewer ourViewer = null;
+ MasterDetailsFormPage mdfp = new MasterDetailsFormPage(ourViewer);
+ mdfp.createContent(managedForm);
+
+ // and here we finally add it to the multi-page editor
+ int pageIndex = addPage(managedForm.getForm());
+ setPageText(pageIndex, getString( "_UI_FormPage_label" ) );

You'll need to replace the MasterDetailsFormPage above with your own
form page but the mechanics of putting a form page in any old composite
are essentially the same.

-
Steve



David Williams wrote:
> On Sun, 26 Mar 2006 21:11:28 -0500, Marc Adams <marc.adams@apc.com> wrote:
>
>> What would be the best method for adding a FormEditor page to the
>> existing XML Editor?
>>
>> I know that it isn't recommended to subclass the XMLMultiPageEditorPart,
>> and I don't believe an editor configuration will achieve this either.
>>
>> If I did extend the XMLMultiPageEditorPart, how would I add a page that
>> is part of a FormEditor? Essentially the FormEditor extends
>> MultiPageEditor like the XMLMultiPageEditorPart....it sounds messy, but
>> I'd like to leverage the current editor and add this desired
>> functionality.
>>
>> Thanks for your input
>>
>
> Our main recomendation here is for you to make your own multipage editor.
> You could even use a copy of the XML Editor as a start, and then remove
> the tabel-tree
> view page, and instead put in your form pages there.
>
> But, I'll admit, I'm not that familar with FormEditor, so, might be
> easier for you to start with
> that.
>
> What exactly is your end-result to be? I'm asking since I'd really
> discourage people from using the
> table-tree-grid page (that's likely to change a lot in future) the we do
> intend adopters to be able
> to use the source page in multipage editors.
>
>
>
Previous Topic:WTP 1.0.1, built in jboss server definition file, & jboss 4.0.2
Next Topic:some basic question abut Eclipse web tools platform,
Goto Forum:
  


Current Time: Sat Nov 09 01:35:51 GMT 2024

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

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

Back to the top