[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [pde-dev] Generic Editor and form tabs
|
Thank you for the hints.
I ran into a roadblock in trying to create an instance of IEditorPart from an editor id, which is ultimately the only thing I have to start with. This IEditorPart instance is what I need to then use the addPage(IEditorPart,IEditorInput), which would allow me to reuse the editor that is already there rather than re-implementing a separate page.
If I turn a bad boy and use internals (cast IEditorDescriptor into EditorDescriptor and then use the createEditor method) I see the editor as in this screenshot: https://imgur.com/a/wFG53 (note the extra editor tab). So ultimately this takes me to bug 99568 . As of now I haven't found a non-internal way of going from an editor id to an instance of IEditorPart.
Sopot
----- Oorspronkelijk bericht -----
> Van: "Curtis Windatt" <Curtis_Windatt@xxxxxxxxxx>
> Aan: "Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>
> Verzonden: Dinsdag 7 maart 2017 15:36:24
> Onderwerp: Re: [pde-dev] Generic Editor and form tabs
>
> Jonah has given some excellent suggestions on potential problem areas. Most
> of the editors in PDE already have text editors in a tab and you should aim
> for similar look and feel. We did not create a text editor at the time
> because there was no formal specification for a target definition's
> contents. Its shape was therefore not API and we continued to make edits to
> it. However, there have not been any changes to the file contents in quite
> some time and I expect it to remain stable going forward. I look forward to
> seeing this contribution added to PDE.
>
> Curtis Windatt
>
>
>
> From: Sopot Cela <scela@xxxxxxxxxx>
> To: pde-dev@xxxxxxxxxxx
> Date: 03/06/2017 04:13 AM
> Subject: [pde-dev] Generic Editor and form tabs
> Sent by: pde-dev-bounces@xxxxxxxxxxx
>
>
>
>
> Hello,
>
> The Target Definition file generic editor is an example of many cases for
> which I plan to provide a textual editor with syntax highlighting and
> autocomplete. The .target generic editor is already available and provides
> the two above mentioned features. To open it, now you have to 'Open with...'
> -> Generic Editor. So it's basically an editor in its own right.
>
> I would like to add this alternative editor as a form tab to the main target
> definition editor (the UI one). So basically the TP editor would have 4
> tabs: 'Definition', 'Content', 'Environment' and a new, say, 'Text editor'
> which would basically be equivalent to opening this file with the generic
> editor mentioned above. Just that this would be in the form tab rather than
> opening it as a separate editor.
>
> Is there any (recommended) way to make this transition from a separate editor
> to a tab in a form editor? My initial investigation shows this would have to
> be added as a separate FormPage through the FormEditor#addPage but I'd like
> to check here first if there is a recommended way when you already have a
> working separate editor in place.
>
> Thanks for the time,
> Sopot
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/pde-dev
>
>
>
>
>
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/pde-dev