Hi,

Many thank's to have taking time to answer me.

I must play with E4 editor development. Doc is important but I think
tooling is important too. It should be cool if we can have PDE templates
like :

* Plug-in with an E4 editor.
* Plug-in with an E4 view.
...

In my case I have learnt Eclipse Editor and View by using PDE templates.

I tell me if JDT, WTP etc have the intention to migrate to pure E4 API?

With 3.x, we have base class EditorPart and IDE provides TextEditor which
extends EditorPart. After that a lot of Plug'In can extends TextEditor like
JDT with JavaEditor, WTP with StructuredTextEditor, etc..
With 4.x, if I understand, the idea is to use annotation and not base
class. If we have not base class, it means that each Plug-in will implement
TextEditor-like? Or perhaps the idea is just to provide a TextEditor (a
simple Pojo)?

Regards Angelo


2013/9/6 Eric Moffatt <[email protected]>

> Angelo, Surely these concepts are not so daunting as to require a base
> class to wrap them. If you forget that you need @Inject then you haven't
> yet 'adopted' Dependency Injection into your natural work flow. I'm pretty
> sure that once you've used it a bit you'll find it *more* natural than the
> old style API.
>
> We do have a lack of specific docs for this and hopefully we'll spend some
> of the Luna end-game updating them (as part of documenting the new 'e4'
> extension point fixes).
>
> IMO enforcing *any* inheritance architecture is in direct conflict with
> DI. Allowing clients to construct their own hierarchies is fine (I'm +1 for
> making sure this works) but we must not *require* that someone else use
> anything but a POJO or we end up back where we started.
>
> Eric
>
> [image: Inactive hide details for Angelo zerr ---09/06/2013 10:39:33
> AM---Hi Lars, Eric, Wim, Many thank's for your answer!]Angelo zerr
> ---09/06/2013 10:39:33 AM---Hi Lars, Eric, Wim, Many thank's for your
> answer!
>
>
>
>    From:
>
>
> Angelo zerr <[email protected]>
>
>    To:
>
>
> E4 Project developer mailing list <[email protected]>,
>
>    Date:
>
>
> 09/06/2013 10:39 AM
>
>    Subject:
>
>
> Re: [e4-dev] What about E4 Editor?
>
>
>    Sent by:
>
>
> [email protected]
> ------------------------------
>
>
>
> Hi Lars, Eric, Wim,
>
> Many thank's for your answer!
>
> > I think Angelo wants some base class which already implements dirty,
> focus, memento, save as, issaveasallowed, editor input, etcetera. An editor
> that is uniform to workbench requirements and that plays along well with
> the 3.x editor lifecycle.
> Exactly!
>
> >I'm not sure why you think it's necessary to have a base class though; we
> already handle focus and dirty etc through the model.
> When you are newbie to develop some editor with E4 (as me), it's difficult
> to know how to start (except if you read tutorial of Lars:)). I think if E4
> provides some framework by providing some base class, it should be easier.
>
> Takes a basic sample of Lars tutorial :
>
> ------------------------------------------------------------------
> public class MySavePart {
>
>   @Inject
>   MDirtyable dirty;
>
>   @PostConstruct
>   public void createControls(Composite parent) {
>     Button button = new Button(parent, SWT.PUSH);
>     button.addSelectionListener(new SelectionAdapter() {
>       @Override
>       public void widgetSelected(SelectionEvent e) {
>         dirty.setDirty(true);
>       }
>     });
>   }
>
> }
> ------------------------------------------------------------------
>
> In this sample you need to declare MDirtyable with @Inject and
> createControls with @PostConstruct. If you are newbie, you can forget to
> set the well annotation. If E4 provides a base class like this :
>
> ------------------------------------------------------------------
> public abstract class BasePart {
>
>   @Inject
>   protected MDirtyable dirty;
>
>   @PostConstruct
>   public abstract void createControls(Composite parent);
>
> }
> ------------------------------------------------------------------
>
> After you could implement like this :
>
> ------------------------------------------------------------------
> public class MySavePart extends BasePart {
>
>   public void createControls(Composite parent) {
>     Button button = new Button(parent, SWT.PUSH);
>     button.addSelectionListener(new SelectionAdapter() {
>       @Override
>       public void widgetSelected(SelectionEvent e) {
>         dirty.setDirty(true);
>       }
>     });
>   }
>
> }
> ------------------------------------------------------------------
>
> It's a basic example, but if E4 doesn't provide this BasePart class, I
> think each people will create that to avoid duplicate the code. But perhaps
> I'm wrong.
>
> @Lars : it should be fantastic if you can send me the part about the
> editor of your chapter. I will follow you to buy it as soon as it will
> available (I have already the first edition).
>
> Regards Angelo
>
>
>
> 2013/9/6 Wim Jongman <*[email protected]* <[email protected]>>
>
>    I think Angelo wants some base class which already implements dirty,
>    focus, memento, save as, issaveasallowed, editor input, etcetera. An editor
>    that is uniform to workbench requirements and that plays along well with
>    the 3.x editor lifecycle.
>
>    Cheers,
>
>    Wim
>
>
>    On Fri, Sep 6, 2013 at 4:07 PM, Lars Vogel 
> <*[email protected]*<[email protected]>>
>    wrote:
>       Hi Angelo,
>
>       I'm not sure if I understand your question correctly. Dirty and
>       focus is handled via the application model.
>
>       Best regards, Lars
>
>
>       2013/9/6 Angelo zerr <*[email protected]*<[email protected]>
>       >
>          Hi E4 Team,
>
>          I know this topic comes from every time, but I would like to
>          know what is the sate of E4 Editor.
>          My project 
> *CodeMirror-Eclipse*<https://github.com/angelozerr/CodeMirror-Eclipse> 
> provides
>          Eclipse 3.x EditorPart, but I would like to provide too Eclipse 4.x 
> Editor.
>
>          I would like to avoid developping my own Pojo class like
>          ModelEditor. E4 provides the capability to manage your editor with 
> Pojo,
>          it's a great feature, but IMHO I think E4 should provide an abstract 
> class
>          for editor like EditorPart which manages dirty, focus, after that E4 
> could
>          provide TextEditor class and a lot of project (JDT Java editor, WTP 
> XML
>          editor, etc) could migrate to a pure E4 code (but I don't know if 
> it's the
>          goal of E4 to remove 3.x EditorPart, View in the future?).
>
>          Many thank's for your help.
>
>          Regards Angelo
>
>
>
>          _______________________________________________
>          e4-dev mailing list*
>          **[email protected]* <[email protected]>*
>          
> **https://dev.eclipse.org/mailman/listinfo/e4-dev*<https://dev.eclipse.org/mailman/listinfo/e4-dev>
>
>
>       _______________________________________________
>       e4-dev mailing list*
>       **[email protected]* <[email protected]>*
>       
> **https://dev.eclipse.org/mailman/listinfo/e4-dev*<https://dev.eclipse.org/mailman/listinfo/e4-dev>
>
>
>    _______________________________________________
>    e4-dev mailing list*
>    **[email protected]* <[email protected]>*
>    
> **https://dev.eclipse.org/mailman/listinfo/e4-dev*<https://dev.eclipse.org/mailman/listinfo/e4-dev>
>
> _______________________________________________
> e4-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/e4-dev
>
>
>
> _______________________________________________
> e4-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/e4-dev
>
>

<<ecblank.gif>>

<<graycol.gif>>

_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to