www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - The eclipse editor in work

reply Frank Benoit <keinfarbton googlemail.com> writes:
Currently I am working on porting the component JFace.Text.
This is the editor that eclipse uses internally.

AFAIK the only graphical Editor available for D GUI is Scintilla. This
one is used in DCode/Entice, Poseidon. JFace.Text will bring in a new
Editor component, ported from Java to pure D.
Does someone know if a comparison JFace.Text vs. Scintilla exists?

Key Features of JFace.Text
- Undo/Redo/find/replace
- Linenumbers
- Text templates
- Folding
- Problem+Quickfix markers with automatic update while typing
- Hovers, Links
- Context menu management
- Proposals
- Rules as basis for parsing the text
- Annotation of the text (put problem description or breakpoint location
to the text)
- Syntax highlightning
- Revisions of the text and difference view
- ....

http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
http://www.jdg2e.com/ch26.jface.text/doc/index.html
http://www.realsolve.co.uk/site/tech/jface-text.php

The current state is that 434 of 443 files are compilable.

So the boring stuff is done, now some manual coding is still needed to
implement missing stuff from the java runtime environment
(BufferedReader,StringReader,Pattern,Matchers,...) and some Java
synchronize stuff.

I hope to have waken someones interest... I could use some help ;)
Sep 07 2008
next sibling parent reply BLS <nanali nospam-wanadoo.fr> writes:
Hallo Frank, I've just annotated your text with // xxx

Frank Benoit schrieb:
 Currently I am working on porting the component JFace.Text.
 This is the editor that eclipse uses internally.
 
 AFAIK the only graphical Editor available for D GUI is Scintilla. This
 one is used in DCode/Entice, Poseidon. JFace.Text will bring in a new
 Editor component, ported from Java to pure D.
 Does someone know if a comparison JFace.Text vs. Scintilla exists?
 
 Key Features of JFace.Text
 - Undo/Redo/find/replace  //Yes
 - Linenumbers	//Yes
 - Text templates  // Yes
 - Folding  //Yes
 - Problem+Quickfix markers with automatic update while typing // Doable
 - Hovers, Links // No... 
 - Context menu management  // Yes
 - Proposals // Don't know
 - Rules as basis for parsing the text  // Scintilla Lexer
 - Annotation of the text (put problem description or breakpoint location
 to the text) //Doable
 - Syntax highlightning  // Yes
 - Revisions of the text and difference view // Don't know, but I've never seen
someting similar for Scintilla
 - ....
 
 http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
 http://www.jdg2e.com/ch26.jface.text/doc/index.html
 http://www.realsolve.co.uk/site/tech/jface-text.php
 
 The current state is that 434 of 443 files are compilable.
 
 So the boring stuff is done, now some manual coding is still needed to
 implement missing stuff from the java runtime environment
 (BufferedReader,StringReader,Pattern,Matchers,...) and some Java
 synchronize stuff.

Do you plan to implement Pattern and Matchers around tango's regex, or do you plan to create something new ? bjoern beside, having a look at the DWTxxx repo. from time to time it becomes more and more clear that you will be soon pretty much prepared for Declipse...
Sep 08 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
BLS schrieb:
 Hallo Frank, I've just annotated your text with // xxx
 
 Frank Benoit schrieb:
 Currently I am working on porting the component JFace.Text.
 This is the editor that eclipse uses internally.

 AFAIK the only graphical Editor available for D GUI is Scintilla. This
 one is used in DCode/Entice, Poseidon. JFace.Text will bring in a new
 Editor component, ported from Java to pure D.
 Does someone know if a comparison JFace.Text vs. Scintilla exists?

 Key Features of JFace.Text
 - Undo/Redo/find/replace  //Yes
 - Linenumbers    //Yes
 - Text templates  // Yes
 - Folding  //Yes
 - Problem+Quickfix markers with automatic update while typing // Doable
 - Hovers, Links // No... - Context menu management  // Yes
 - Proposals // Don't know
 - Rules as basis for parsing the text  // Scintilla Lexer
 - Annotation of the text (put problem description or breakpoint location
 to the text) //Doable
 - Syntax highlightning  // Yes
 - Revisions of the text and difference view // Don't know, but I've
 never seen someting similar for Scintilla
 - ....

 http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html

 http://www.jdg2e.com/ch26.jface.text/doc/index.html
 http://www.realsolve.co.uk/site/tech/jface-text.php

 The current state is that 434 of 443 files are compilable.

 So the boring stuff is done, now some manual coding is still needed to
 implement missing stuff from the java runtime environment
 (BufferedReader,StringReader,Pattern,Matchers,...) and some Java
 synchronize stuff.

Do you plan to implement Pattern and Matchers around tango's regex, or do you plan to create something new ? bjoern beside, having a look at the DWTxxx repo. from time to time it becomes more and more clear that you will be soon pretty much prepared for Declipse...

I will not map (alias?), but do wrappers. See dwt.dwthelper or dwtx.dwtxhelper. And those wrappers are around tango, but they could be reimplemented for phobos also *blink*
Sep 10 2008
prev sibling next sibling parent reply davidl <davidl 126.com> writes:
在 Mon, 08 Sep 2008 08:18:13 +0800,Frank Benoit  
<keinfarbton googlemail.com> 写道:

 Currently I am working on porting the component JFace.Text.
 This is the editor that eclipse uses internally.

 AFAIK the only graphical Editor available for D GUI is Scintilla. This
 one is used in DCode/Entice, Poseidon. JFace.Text will bring in a new
 Editor component, ported from Java to pure D.
 Does someone know if a comparison JFace.Text vs. Scintilla exists?

 Key Features of JFace.Text
 - Undo/Redo/find/replace
 - Linenumbers
 - Text templates
 - Folding
 - Problem+Quickfix markers with automatic update while typing
 - Hovers, Links
 - Context menu management
 - Proposals
 - Rules as basis for parsing the text
 - Annotation of the text (put problem description or breakpoint location
 to the text)
 - Syntax highlightning
 - Revisions of the text and difference view
 - ....

 http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
 http://www.jdg2e.com/ch26.jface.text/doc/index.html
 http://www.realsolve.co.uk/site/tech/jface-text.php

 The current state is that 434 of 443 files are compilable.

 So the boring stuff is done, now some manual coding is still needed to
 implement missing stuff from the java runtime environment
 (BufferedReader,StringReader,Pattern,Matchers,...) and some Java
 synchronize stuff.

 I hope to have waken someones interest... I could use some help ;)

It's really awesome!!! It's the most exciting project ever in D I can only say! I can't imagine a whole eclipse in D !!! You really have spent a lot of effort on it!!! From the experience I work with scintilla, it gives less feature compared to the Java Editor component. Also Java Editor is able to do some nice autocomplete(scintilla is buggy Miller said. Also Java Editor gives an overall more professional & more smooth feel. The highlighting feature , codefolding all nicer than scintilla. the ability of code folding in scintilla is a pain in the ass. ) I'm wondering how you deal with plugin code? I've brought up an idea of plugin on process communication. It's a clean and portable solution. Also the process based plugin won't crash the whole application when a plugin crashes. -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
Sep 08 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
davidl schrieb:
 It's really awesome!!!
 It's the most exciting project ever in D I can only say!
 I can't imagine a whole eclipse in D !!! You really have spent a lot of
 effort on it!!!

Thanks. But whole eclipse is really far behind the horizont. My vision is the eclipse rich client platform.
 From the experience I work with scintilla, it gives less feature
 compared to the Java Editor component.
 Also Java Editor is able to do some nice autocomplete(scintilla is buggy
 Miller said. Also Java Editor gives an overall more professional & more
 smooth feel. The highlighting feature , codefolding all nicer than
 scintilla. the ability of code folding in scintilla is a pain in the ass. )

I would like to see a Poseidon, implemented with new DWT and Descent.
 I'm wondering how you deal with plugin code? I've brought up an idea of
 plugin on process communication. It's a clean and portable solution.
 Also the process based plugin won't crash the whole application when a
 plugin crashes.

I also do not know yet how to deal with it. At the moment I just ignore that as far as possible. The plugins in eclipse use the OSGi. I thought this could perhaps be done in D with DDL.
Sep 08 2008
prev sibling next sibling parent Frank Benoit <keinfarbton googlemail.com> writes:
Frank Benoit schrieb:
 Currently I am working on porting the component JFace.Text.
 This is the editor that eclipse uses internally.
 
 AFAIK the only graphical Editor available for D GUI is Scintilla. This
 one is used in DCode/Entice, Poseidon. JFace.Text will bring in a new
 Editor component, ported from Java to pure D.
 Does someone know if a comparison JFace.Text vs. Scintilla exists?
 
 Key Features of JFace.Text
 - Undo/Redo/find/replace
 - Linenumbers
 - Text templates
 - Folding
 - Problem+Quickfix markers with automatic update while typing
 - Hovers, Links
 - Context menu management
 - Proposals
 - Rules as basis for parsing the text
 - Annotation of the text (put problem description or breakpoint location
 to the text)
 - Syntax highlightning
 - Revisions of the text and difference view
 - ....
 
 http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
 http://www.jdg2e.com/ch26.jface.text/doc/index.html
 http://www.realsolve.co.uk/site/tech/jface-text.php
 
 The current state is that 434 of 443 files are compilable.
 
 So the boring stuff is done, now some manual coding is still needed to
 implement missing stuff from the java runtime environment
 (BufferedReader,StringReader,Pattern,Matchers,...) and some Java
 synchronize stuff.
 
 I hope to have waken someones interest... I could use some help ;)
 

First screenshot: http://www.dsource.org/projects/dwt/wiki/JFaceTextExample
Sep 10 2008
prev sibling parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Frank Benoit wrote:
 Currently I am working on porting the component JFace.Text.
 This is the editor that eclipse uses internally.
 
 AFAIK the only graphical Editor available for D GUI is Scintilla. This
 one is used in DCode/Entice, Poseidon. JFace.Text will bring in a new
 Editor component, ported from Java to pure D.
 Does someone know if a comparison JFace.Text vs. Scintilla exists?
 
 Key Features of JFace.Text
 - Undo/Redo/find/replace
 - Linenumbers
 - Text templates
 - Folding
 - Problem+Quickfix markers with automatic update while typing
 - Hovers, Links
 - Context menu management
 - Proposals
 - Rules as basis for parsing the text
 - Annotation of the text (put problem description or breakpoint location
 to the text)
 - Syntax highlightning
 - Revisions of the text and difference view
 - ....
 
 http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
 http://www.jdg2e.com/ch26.jface.text/doc/index.html
 http://www.realsolve.co.uk/site/tech/jface-text.php
 
 The current state is that 434 of 443 files are compilable.
 
 So the boring stuff is done, now some manual coding is still needed to
 implement missing stuff from the java runtime environment
 (BufferedReader,StringReader,Pattern,Matchers,...) and some Java
 synchronize stuff.
 
 I hope to have waken someones interest... I could use some help ;)
 

The JFace Text framework in D? Pretty cool :) The ideia of having Eclipse functionality in D is pretty awesome! If we had the whole Platform available it would be ass-kicking, but it would also be an herculean effort. -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Sep 11 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
Bruno Medeiros Wrote:
 The JFace Text framework in D? Pretty cool :)
 The ideia of having Eclipse functionality in D is pretty awesome! If we 
 had the whole Platform available it would be ass-kicking, but it would 
 also be an herculean effort.

I hope some D IDE devs will pick it up to create a D IDE written in pure D. *blink* What is needed from the Eclipse framework? Probably not all, and perhaps even less to start with?
Sep 11 2008
next sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Frank Benoit a crit :
 Bruno Medeiros Wrote:
 The JFace Text framework in D? Pretty cool :)
 The ideia of having Eclipse functionality in D is pretty awesome! If we 
 had the whole Platform available it would be ass-kicking, but it would 
 also be an herculean effort.

I hope some D IDE devs will pick it up to create a D IDE written in pure D. *blink* What is needed from the Eclipse framework? Probably not all, and perhaps even less to start with?

How can one implement plugins in D?
Sep 12 2008
next sibling parent reply Frank Benoit <keinfarbton googlemail.com> writes:
Ary Borenszweig Wrote:

 How can one implement plugins in D?

In theory this can be made with a DDL like mechanism. IMO in the first run, it can be ignored and you just compile the configuration you want. A dummy OSGi/Equinox API could be used, so the code is still compatible.
Sep 12 2008
parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Frank Benoit wrote:
 Ary Borenszweig Wrote:
 
 How can one implement plugins in D?

In theory this can be made with a DDL like mechanism. IMO in the first run, it can be ignored and you just compile the configuration you want. A dummy OSGi/Equinox API could be used, so the code is still compatible.

Yeah, I was thinking the same. A dummy OSGi which only supported static configurations (ie, no runtime loading/unloading) would probably be the best way, both because a full functional OSGi framework would not be the most important functionality of the Eclipse platform to have first, and because it doesn't seem DDL is mature enough for this task. -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Sep 15 2008
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Bruno Medeiros a crit :
 Frank Benoit wrote:
 Ary Borenszweig Wrote:

 How can one implement plugins in D?

In theory this can be made with a DDL like mechanism. IMO in the first run, it can be ignored and you just compile the configuration you want. A dummy OSGi/Equinox API could be used, so the code is still compatible.

Yeah, I was thinking the same. A dummy OSGi which only supported static configurations (ie, no runtime loading/unloading) would probably be the best way, both because a full functional OSGi framework would not be the most important functionality of the Eclipse platform to have first, and because it doesn't seem DDL is mature enough for this task.

The problem with that approach is that there are a lot of things in Eclipse that you might or might not use depending on what you do or not in a session. Eclipse loads *a lot* of things lazily, and tries to populate the UI using as much stuff from the plugin.xml files as possible. If you don't make that lazy, then Declipse will probably be as slow as Eclipse, or worse.
Sep 15 2008
parent Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Ary Borenszweig wrote:
 Bruno Medeiros a crit :
 Frank Benoit wrote:
 Ary Borenszweig Wrote:

 How can one implement plugins in D?

In theory this can be made with a DDL like mechanism. IMO in the first run, it can be ignored and you just compile the configuration you want. A dummy OSGi/Equinox API could be used, so the code is still compatible.

Yeah, I was thinking the same. A dummy OSGi which only supported static configurations (ie, no runtime loading/unloading) would probably be the best way, both because a full functional OSGi framework would not be the most important functionality of the Eclipse platform to have first, and because it doesn't seem DDL is mature enough for this task.

The problem with that approach is that there are a lot of things in Eclipse that you might or might not use depending on what you do or not in a session. Eclipse loads *a lot* of things lazily, and tries to populate the UI using as much stuff from the plugin.xml files as possible. If you don't make that lazy, then Declipse will probably be as slow as Eclipse, or worse.

Yeah, but in the beginning D-Eclipse would only have a few available plug-ins...: the core/Platform, a D IDE, and maybe a source control plug-in. I certainly don't see any prospects of porting JDT, CDT, Mylyn, WTP, GMF, EMF, etc.,etc. to it :P Also, with a little more developed semi-mock OSGi, the initialization could be performed lazily. Only the dynamic loading (ie, loading code) would have to performed statically to avoid having to use DDL. -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Sep 18 2008
prev sibling parent reply BLS <nanali nospam-wanadoo.fr> writes:
Ary Borenszweig schrieb:
 Frank Benoit a crit :
 Bruno Medeiros Wrote:
 The JFace Text framework in D? Pretty cool :)
 The ideia of having Eclipse functionality in D is pretty awesome! If 
 we had the whole Platform available it would be ass-kicking, but it 
 would also be an herculean effort.

I hope some D IDE devs will pick it up to create a D IDE written in pure D. *blink* What is needed from the Eclipse framework? Probably not all, and perhaps even less to start with?

How can one implement plugins in D?

I think it should be possible to use a scripting language to implement a general purpose plugin mechanism. MiniD 2 seems to be a very good choise for that task. IMO worth to think about.
Sep 13 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
BLS Wrote:
 I think it should be possible to use a scripting language to implement a 
 general purpose plugin mechanism. MiniD 2 seems to be a very good choise 
 for that task.
 IMO worth to think about.

I don't think that makes sense here. The whole eclipse platform is a set of plugins. The plugins are using each other, without any intermediate layer. The classes are just runtime loaded. So all plugins are written in the same language.
Sep 13 2008
parent BLS <nanali nospam-wanadoo.fr> writes:
Frank Benoit schrieb:
 BLS Wrote:
 I think it should be possible to use a scripting language to implement a 
 general purpose plugin mechanism. MiniD 2 seems to be a very good choise 
 for that task.
 IMO worth to think about.

I don't think that makes sense here. The whole eclipse platform is a set of plugins. The plugins are using each other, without any intermediate layer. The classes are just runtime loaded. So all plugins are written in the same language.

I think you are right. following osgi also means that eclipse plugin dev. guides are usefull. bjoern
Sep 13 2008
prev sibling parent reply BLS <nanali nospam-wanadoo.fr> writes:
Frank Benoit schrieb:
 Bruno Medeiros Wrote:
 The JFace Text framework in D? Pretty cool :)
 The ideia of having Eclipse functionality in D is pretty awesome! If we 
 had the whole Platform available it would be ass-kicking, but it would 
 also be an herculean effort.

I hope some D IDE devs will pick it up to create a D IDE written in pure D. *blink* What is needed from the Eclipse framework? Probably not all, and perhaps even less to start with?

What I miss is a docking framework. (like AUI for wxWidgets) SashForm is nice, but docking is nicer :)
Sep 13 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
BLS schrieb:
 Frank Benoit schrieb:
 Bruno Medeiros Wrote:
 The JFace Text framework in D? Pretty cool :)
 The ideia of having Eclipse functionality in D is pretty awesome! If
 we had the whole Platform available it would be ass-kicking, but it
 would also be an herculean effort.

I hope some D IDE devs will pick it up to create a D IDE written in pure D. *blink* What is needed from the Eclipse framework? Probably not all, and perhaps even less to start with?

What I miss is a docking framework. (like AUI for wxWidgets) SashForm is nice, but docking is nicer :)

with docking framework, you mean the views and perspectives? The is the eclipse workbench plugin. We will see
Sep 14 2008
parent BLS <nanali nospam-wanadoo.fr> writes:
Frank Benoit schrieb:
 BLS schrieb:
 Frank Benoit schrieb:
 Bruno Medeiros Wrote:
 The JFace Text framework in D? Pretty cool :)
 The ideia of having Eclipse functionality in D is pretty awesome! If
 we had the whole Platform available it would be ass-kicking, but it
 would also be an herculean effort.

pure D. *blink* What is needed from the Eclipse framework? Probably not all, and perhaps even less to start with?

nice, but docking is nicer :)

with docking framework, you mean the views and perspectives? The is the eclipse workbench plugin. We will see

Yes that is what I've meant. IMO this feature is a must have in order to develop a modern IDE (or something similar). ATM I don' see why this has to be a plugin. Bjoern, heh enjoy the weekend :)
Sep 14 2008