View mode: basic / threaded / horizontal-split · Log in · Help
October 13, 2010
Qt Creator with D
Adding D support to the cross-platform C++ IDE for Qt, "Qt Creator":

http://qt.nokia.com/products/developer-tools
http://qt.nokia.com/products/library


It uses the "CPlusPlus" Open Source front-end for C++ (license MIT),
enhanced for use in Qt Creator, to do C/C++ completion / highlighting.
For QML/JavaScript parsing there is a custom qscript parser included.
Like Qt SDK all is available under both Qt Commercial License and LGPL.

For doing the actual building, it calls qmake to generate Makefiles.
(generic support for CMake and make is also available, if needed...)
For debugging it calls out to gdb, there is also version control and
interface/resource handlers - all integrated in the form of plugins.


It does require C++, and it does require Make. It's no D-only solution.

Makefile snippet: (where "dmd" could be "gdmd" or "ldmd" too eventually)
 CC            = gcc
 CXX           = g++
+DMD           = dmd

 CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
 CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+DFLAGS        =

 .cpp.o:
         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

 .c.o:
         $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

+.d.o:
+        $(DMD) -c $(DFLAGS) -of"$@" "$<"
+


So the first thing needed was to patch in D support to qmake/qtcreator,
and the second thing is writing the actual new "deditor" editor plugin.
The basic "texteditor" does most of the editing, so the two main needed
additions are code completion and syntax highlighting (i.e. parsing D).

I just used "dmd -X" and QJson for analyzing D, it would also need a
http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.
Building requires Qt 4.5 or later, but Qt Creator can build itself.
Screenshot at: http://www.algonet.se/~afb/d/qt-creator-d.png (1.3.1)


http://gitorious.org/qt-creator
http://gitorious.org/qjson

If someone is interested in continuing this, then please contact me...
October 13, 2010
Re: Qt Creator with D
On Wed, 13 Oct 2010 14:32:28 +0400, Anders F Björklund <afb@algonet.se>  
wrote:

>
> Adding D support to the cross-platform C++ IDE for Qt, "Qt Creator":
>
> http://qt.nokia.com/products/developer-tools
> http://qt.nokia.com/products/library
>
>
> It uses the "CPlusPlus" Open Source front-end for C++ (license MIT),
> enhanced for use in Qt Creator, to do C/C++ completion / highlighting.
> For QML/JavaScript parsing there is a custom qscript parser included.
> Like Qt SDK all is available under both Qt Commercial License and LGPL.
>
> For doing the actual building, it calls qmake to generate Makefiles.
> (generic support for CMake and make is also available, if needed...)
> For debugging it calls out to gdb, there is also version control and
> interface/resource handlers - all integrated in the form of plugins.
>
>
> It does require C++, and it does require Make. It's no D-only solution.
>
> Makefile snippet: (where "dmd" could be "gdmd" or "ldmd" too eventually)
>   CC            = gcc
>   CXX           = g++
> +DMD           = dmd
>
>   CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
>   CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
> +DFLAGS        =
>
>   .cpp.o:
>           $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
>
>   .c.o:
>           $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
>
> +.d.o:
> +        $(DMD) -c $(DFLAGS) -of"$@" "$<"
> +
>
>
> So the first thing needed was to patch in D support to qmake/qtcreator,
> and the second thing is writing the actual new "deditor" editor plugin.
> The basic "texteditor" does most of the editing, so the two main needed
> additions are code completion and syntax highlighting (i.e. parsing D).
>
> I just used "dmd -X" and QJson for analyzing D, it would also need a
> http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.
> Building requires Qt 4.5 or later, but Qt Creator can build itself.
> Screenshot at: http://www.algonet.se/~afb/d/qt-creator-d.png (1.3.1)
>
>
> http://gitorious.org/qt-creator
> http://gitorious.org/qjson
>
> If someone is interested in continuing this, then please contact me...
>

I'm currently working on making ddmd usable in IDE (fixing various memory  
leaks, allowing many instances co-exist in memory etc) so that same  
compiler instance could be used for both compilation (which is now even  
faster because most of the stuff is still in memory) and auto-completion.  
Most of the work I did so far, I'd call it an IDE backend because it's GUI  
agnostic.

I will hopefully turn it into a full-featured IDE, but I didn't decide  
what should it be based on (if anything), and Qt Creator is certainly an  
option.

I'm not familiar with Qt Creator building process, but I hope it can be  
managed manually and doesn't rely on (C/Q)makefiles only because ddmd  
builds stuff itself (well, the whole "building" is actually writing out  
stuff which is already pre-built in memory in most cases). All it needs is  
a set of source files in text form, and a notification once any of those  
have changed.
October 13, 2010
Re: Qt Creator with D
Denis Koroskin wrote:
...
>> It does require C++, and it does require Make. It's no D-only solution.
...
> I'm currently working on making ddmd usable in IDE (fixing various 
> memory leaks, allowing many instances co-exist in memory etc) so that 
> same compiler instance could be used for both compilation (which is now 
> even faster because most of the stuff is still in memory) and 
> auto-completion. Most of the work I did so far, I'd call it an IDE 
> backend because it's GUI agnostic.
> 
> I will hopefully turn it into a full-featured IDE, but I didn't decide 
> what should it be based on (if anything), and Qt Creator is certainly an 
> option.
> 
> I'm not familiar with Qt Creator building process, but I hope it can be 
> managed manually and doesn't rely on (C/Q)makefiles only because ddmd 
> builds stuff itself (well, the whole "building" is actually writing out 
> stuff which is already pre-built in memory in most cases). All it needs 
> is a set of source files in text form, and a notification once any of 
> those have changed.

It relies on Makefiles, and is in C++ so I'm not sure if ddmd is needed.
The dmdfe could be used to add a D2 parser I suppose, to avoid the JSON.
But that was the big part left to implement to make it par with the C++.

It *is* possible to use it as a editor only for "other build systems":
http://doc.qt.nokia.com/qtcreator-1.3/creator-generic-projects.html
http://doc.qt.nokia.com/qtcreator-2.0/creator-project-generic.html

Though that (avoiding make) only changes the building, not the editing.

But it's something to build on, if pushing QtD as the new official GUI ?

--anders
October 13, 2010
Re: Qt Creator with D
Am 13.10.2010 12:32, schrieb Anders F Björklund:
>
> Adding D support to the cross-platform C++ IDE for Qt, "Qt Creator":
>
> http://qt.nokia.com/products/developer-tools
> http://qt.nokia.com/products/library
>
>
> It uses the "CPlusPlus" Open Source front-end for C++ (license MIT),
> enhanced for use in Qt Creator, to do C/C++ completion / highlighting.
> For QML/JavaScript parsing there is a custom qscript parser included.
> Like Qt SDK all is available under both Qt Commercial License and LGPL.
>
> For doing the actual building, it calls qmake to generate Makefiles.
> (generic support for CMake and make is also available, if needed...)
> For debugging it calls out to gdb, there is also version control and
> interface/resource handlers - all integrated in the form of plugins.
>
>
> It does require C++, and it does require Make. It's no D-only solution.
>
> Makefile snippet: (where "dmd" could be "gdmd" or "ldmd" too eventually)
> CC = gcc
> CXX = g++
> +DMD = dmd
>
> CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
> CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
> +DFLAGS =
>
> .cpp.o:
> $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
>
> .c.o:
> $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
>
> +.d.o:
> + $(DMD) -c $(DFLAGS) -of"$@" "$<"
> +
>
>
> So the first thing needed was to patch in D support to qmake/qtcreator,
> and the second thing is writing the actual new "deditor" editor plugin.
> The basic "texteditor" does most of the editing, so the two main needed
> additions are code completion and syntax highlighting (i.e. parsing D).
>
> I just used "dmd -X" and QJson for analyzing D, it would also need a
> http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.

Syntaxhighlighting and code-folding is already working through the 
generichighlighter:
http://www.freeimagehosting.net/image.php?efbefe290f.png


> Building requires Qt 4.5 or later, but Qt Creator can build itself.
> Screenshot at: http://www.algonet.se/~afb/d/qt-creator-d.png (1.3.1)
>
>
> http://gitorious.org/qt-creator
> http://gitorious.org/qjson
>
> If someone is interested in continuing this, then please contact me...
>

I've also worked on a plugin with D-projectmanagment for Qt-Creator , 
but I've halted the work, cause lack of time.
But I would be interrested, to share my work or help on an existing project.
Are you still working on this D-support in Qt-Creator?

greets
Matthias
October 13, 2010
Re: Qt Creator with D
Am 13.10.2010 13:16, schrieb Denis Koroskin:
> On Wed, 13 Oct 2010 14:32:28 +0400, Anders F Björklund <afb@algonet.se>
> wrote:
>
>>
>> Adding D support to the cross-platform C++ IDE for Qt, "Qt Creator":
>>
>> http://qt.nokia.com/products/developer-tools
>> http://qt.nokia.com/products/library
>>
>>
>> It uses the "CPlusPlus" Open Source front-end for C++ (license MIT),
>> enhanced for use in Qt Creator, to do C/C++ completion / highlighting.
>> For QML/JavaScript parsing there is a custom qscript parser included.
>> Like Qt SDK all is available under both Qt Commercial License and LGPL.
>>
>> For doing the actual building, it calls qmake to generate Makefiles.
>> (generic support for CMake and make is also available, if needed...)
>> For debugging it calls out to gdb, there is also version control and
>> interface/resource handlers - all integrated in the form of plugins.
>>
>>
>> It does require C++, and it does require Make. It's no D-only solution.
>>
>> Makefile snippet: (where "dmd" could be "gdmd" or "ldmd" too eventually)
>> CC = gcc
>> CXX = g++
>> +DMD = dmd
>>
>> CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
>> CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
>> +DFLAGS =
>>
>> .cpp.o:
>> $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
>>
>> .c.o:
>> $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
>>
>> +.d.o:
>> + $(DMD) -c $(DFLAGS) -of"$@" "$<"
>> +
>>
>>
>> So the first thing needed was to patch in D support to qmake/qtcreator,
>> and the second thing is writing the actual new "deditor" editor plugin.
>> The basic "texteditor" does most of the editing, so the two main needed
>> additions are code completion and syntax highlighting (i.e. parsing D).
>>
>> I just used "dmd -X" and QJson for analyzing D, it would also need a
>> http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.
>> Building requires Qt 4.5 or later, but Qt Creator can build itself.
>> Screenshot at: http://www.algonet.se/~afb/d/qt-creator-d.png (1.3.1)
>>
>>
>> http://gitorious.org/qt-creator
>> http://gitorious.org/qjson
>>
>> If someone is interested in continuing this, then please contact me...
>>
>
> I'm currently working on making ddmd usable in IDE (fixing various
> memory leaks, allowing many instances co-exist in memory etc) so that
> same compiler instance could be used for both compilation (which is now
> even faster because most of the stuff is still in memory) and
> auto-completion. Most of the work I did so far, I'd call it an IDE
> backend because it's GUI agnostic.
>
> I will hopefully turn it into a full-featured IDE, but I didn't decide
> what should it be based on (if anything), and Qt Creator is certainly an
> option.
>
> I'm not familiar with Qt Creator building process, but I hope it can be
> managed manually and doesn't rely on (C/Q)makefiles only because ddmd
> builds stuff itself (well, the whole "building" is actually writing out
> stuff which is already pre-built in memory in most cases). All it needs
> is a set of source files in text form, and a notification once any of
> those have changed.

Qt-Creator's main application is very small and nearly everything is 
implemented through plugins. So customization or adding new feature 
isn't that hard.
Is your 'IDE-backend' already working? Implementing this to Qt-Creator 
would be really cool.  :)

greets
Matthias
October 13, 2010
Re: Qt Creator with D
Am 13.10.2010 21:56, schrieb Anders F Björklund:
> Denis Koroskin wrote:
> ...
>>> It does require C++, and it does require Make. It's no D-only solution.
> ...
>> I'm currently working on making ddmd usable in IDE (fixing various
>> memory leaks, allowing many instances co-exist in memory etc) so that
>> same compiler instance could be used for both compilation (which is
>> now even faster because most of the stuff is still in memory) and
>> auto-completion. Most of the work I did so far, I'd call it an IDE
>> backend because it's GUI agnostic.
>>
>> I will hopefully turn it into a full-featured IDE, but I didn't decide
>> what should it be based on (if anything), and Qt Creator is certainly
>> an option.
>>
>> I'm not familiar with Qt Creator building process, but I hope it can
>> be managed manually and doesn't rely on (C/Q)makefiles only because
>> ddmd builds stuff itself (well, the whole "building" is actually
>> writing out stuff which is already pre-built in memory in most cases).
>> All it needs is a set of source files in text form, and a notification
>> once any of those have changed.
>
> It relies on Makefiles, and is in C++ so I'm not sure if ddmd is needed.
> The dmdfe could be used to add a D2 parser I suppose, to avoid the JSON.
> But that was the big part left to implement to make it par with the C++.
>
> It *is* possible to use it as a editor only for "other build systems":
> http://doc.qt.nokia.com/qtcreator-1.3/creator-generic-projects.html
> http://doc.qt.nokia.com/qtcreator-2.0/creator-project-generic.html
The D-projectmanager, I was working on, is derived on the 
generic-projectmangaer. This way we could also use another buildsystem 
or a compiler direct. But it should be done in a way, to support all 
D-compilers (dmd,gdc,ldc,...)
I've heard, someone is working on a cmakeD2, which could be easily added 
to Qt-Creator, but there isn't a releasy yet.

>
> Though that (avoiding make) only changes the building, not the editing.
>
> But it's something to build on, if pushing QtD as the new official GUI ?
>
> --anders
October 13, 2010
Re: Qt Creator with D
Matthias Pleh wrote:
>> I just used "dmd -X" and QJson for analyzing D, it would also need a
>> http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.
> 
> Syntaxhighlighting and code-folding is already working through the 
> generichighlighter:
> http://www.freeimagehosting.net/image.php?efbefe290f.png

Cool, don't think that was available in Qt 4.6 and Qt Creator 1.3...

http://labs.qt.nokia.com/2010/09/16/generic-highlighter-in-qt-creator/

But for Qt 4.7 it could be an option, if sufficiently advanced for D2 ?

There is also http://srchiliteqt.sourceforge.net/ available under GPL.

>> http://gitorious.org/qt-creator
>> http://gitorious.org/qjson
>> If someone is interested in continuing this, then please contact me...
> 
> I've also worked on a plugin with D-projectmanagment for Qt-Creator , 
> but I've halted the work, cause lack of time.
> But I would be interrested, to share my work or help on an existing 
> project.

You should push it to gitorious.org, like I will do with my own hacks.

I don't have the time to do it, so someone will need to pick it up...

> Are you still working on this D-support in Qt-Creator?

I just wanted to get it all started, as an alternative for using QtD.

Don't think I will look at it again until DMD (or better yet GDC/LDC)
supports 64-bit and D2, to avoiding needing a 32-bit chroot for it...

Otherwise I could be just as well be using wxWidgets and Code::Blocks.

I'm sure that neither will be "enough", since they are written in C++,
but should fill the gaping hole for now... D *needs* a GUI and an IDE.

--anders
October 13, 2010
Re: Qt Creator with D
Am 13.10.2010 22:52, schrieb Anders F Björklund:
> Matthias Pleh wrote:
>>> I just used "dmd -X" and QJson for analyzing D, it would also need a
>>> http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.
>>
>> Syntaxhighlighting and code-folding is already working through the
>> generichighlighter:
>> http://www.freeimagehosting.net/image.php?efbefe290f.png
>
> Cool, don't think that was available in Qt 4.6 and Qt Creator 1.3...
>
> http://labs.qt.nokia.com/2010/09/16/generic-highlighter-in-qt-creator/
>
> But for Qt 4.7 it could be an option, if sufficiently advanced for D2 ?
the generic-highlighter is based on kate an realy powerful. The 
xml-definitionfile, I have used, is taken from the KatePart project and 
alredy mature. (for example nested comments with /++/ is already working!)

>
> There is also http://srchiliteqt.sourceforge.net/ available under GPL.
>
>>> http://gitorious.org/qt-creator
>>> http://gitorious.org/qjson
>>> If someone is interested in continuing this, then please contact me...
>>
>> I've also worked on a plugin with D-projectmanagment for Qt-Creator ,
>> but I've halted the work, cause lack of time.
>> But I would be interrested, to share my work or help on an existing
>> project.
>
> You should push it to gitorious.org, like I will do with my own hacks.
>
> I don't have the time to do it, so someone will need to pick it up...
That's the reason, I've halted my project ... lack of time :(
>
>> Are you still working on this D-support in Qt-Creator?
>
> I just wanted to get it all started, as an alternative for using QtD.
>
> Don't think I will look at it again until DMD (or better yet GDC/LDC)
> supports 64-bit and D2, to avoiding needing a 32-bit chroot for it...
>
> Otherwise I could be just as well be using wxWidgets and Code::Blocks.
I know, you're also active on the Code::Blocks forum ... (we have 
already discused there :) )
>
> I'm sure that neither will be "enough", since they are written in C++,
> but should fill the gaping hole for now... D *needs* a GUI and an IDE.
Yep, that's my thought
>
> --anders
October 14, 2010
Re: Qt Creator with D
On Wed, 13 Oct 2010 22:32:15 +0200
>>>>>> "Matthias" == Matthias Pleh <gonzo@web.at> wrote:

Matthias> The D-projectmanager, I was working on, is derived on the 
Matthias> generic-projectmangaer. This way we could also use another
Matthias> buildsystem or a compiler direct. But it should be done in a
Matthias> way, to support all D-compilers (dmd,gdc,ldc,...)

I was thinking whether to use CMake or Waf as build system for D and
decided to use the latter (http://code.google.com/p/waf/) which
already has built-in support for D and it is very extensible -
everything is just Python. 

Matthias> I've heard, someone is working on a cmakeD2, which could be
Matthias> easily added to Qt-Creator, but there isn't a releasy yet.

So, I believe that Waf can serve very nicely.

Considering that I would use Waf with CodeBlocks as well, now I'm
curious what would be the best option as D IDE:

a) adding support to CodeBlocks

b) patching QtCreator or

c) D.Dev (http://d-dev-ide.blogspot.com/)

Matthias> > But it's something to build on, if pushing QtD as the new
Matthias> > official GUI ?

I'd say that QtD looks as the best/most_complete GUI option for
D. Considering that, what would you recommend to base D-IDE on: a), b)
or c) ?


Sincerely,
Gour

-- 

Gour  | Hlapicina, Croatia  | GPG key: CDBF17CA
----------------------------------------------------------------
October 14, 2010
Re: Qt Creator with D
Am 14.10.2010 11:59, schrieb Gour D.:
> On Wed, 13 Oct 2010 22:32:15 +0200
>>>>>>> "Matthias" == Matthias Pleh<gonzo@web.at>  wrote:
>
> Matthias>  The D-projectmanager, I was working on, is derived on the
> Matthias>  generic-projectmangaer. This way we could also use another
> Matthias>  buildsystem or a compiler direct. But it should be done in a
> Matthias>  way, to support all D-compilers (dmd,gdc,ldc,...)
>
> I was thinking whether to use CMake or Waf as build system for D and
> decided to use the latter (http://code.google.com/p/waf/) which
> already has built-in support for D and it is very extensible -
> everything is just Python.
That also means, you will need a Python installation, but beside that it 
would be a considerable option.

>
> Matthias>  I've heard, someone is working on a cmakeD2, which could be
> Matthias>  easily added to Qt-Creator, but there isn't a releasy yet.
>
> So, I believe that Waf can serve very nicely.
>
> Considering that I would use Waf with CodeBlocks as well, now I'm
> curious what would be the best option as D IDE:
>
> a) adding support to CodeBlocks
>
> b) patching QtCreator or
>
> c) D.Dev (http://d-dev-ide.blogspot.com/)
>
> Matthias>  >  But it's something to build on, if pushing QtD as the new
> Matthias>  >  official GUI ?
>
> I'd say that QtD looks as the best/most_complete GUI option for
> D. Considering that, what would you recommend to base D-IDE on: a), b)
> or c) ?
If you work windows-only I would suggest VisualD. It's working great, 
good quality and is frequently updated.

If you itend to work linux or platform-independent I would suggest:
- for the short term: -> CodeBlocks - already working out of the box 
with several D compiler
- for the middle term: -> adding support to QtCreator -> it's really 
good piece of Code and through the plugin sytem very flexible.
- for the long term: -> we will need an IDE written in D, but first we 
need a good working D GUI library

As conclusion I would suggest b) QtCreator

greets Matthias

>
>
> Sincerely,
> Gour
>
« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home