FormEditor [message #164941] |
Sun, 26 March 2006 21:11  |
Eclipse User |
|
|
|
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 00:02   |
Eclipse User |
|
|
|
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 #165118 is a reply to message #164953] |
Mon, 27 March 2006 17:21  |
Eclipse User |
|
|
|
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.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05481 seconds