www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - auto-complete implementation idea - need feedback

reply Rakan Alhneiti <rakan nospam.gmail.com> writes:
Hello
As you might have noticed on dsource, i am implementing a text-editor 
using DWT called IntelliD.

I have an idea about implementing auto-complete and need professional 
feedback about it.
As i am not experienced with writing a full-front-end parser, i got this 
idea about implementing auto-complete for object oriented features as 
follows:

a folder called Editor will be the parent directory,
/Editor
-- /D which will be a directory for D language, i am planning to support 
other langs as well
---- /tango
/phobos
/dwt
/gtkD
...etc

each sub folder in parent "D" folder will contain a set of files related 
to the library involved. These files will represent a class in related 
library folder that will contain defintions of methods and properties 
available in that class.
example
/Editor/D/DWT/Button.d
will contain all methods and properties available in DWT's button class 
in this format

void setText(char[] text)

my editor will parse that and provide it in the list of Intellisense or 
auto-complete functionality in addition to using it in providing 
call-tips which will show a small label when calling that function 
providing information about the parameters, names, types ...etc

What do you think?

Thanks,
Rakan
Jul 24 2008
parent reply davidl <davidl 126.com> writes:
在 Thu, 24 Jul 2008 23:00:09 +0800,Rakan Alhneiti  
<rakan nospam.gmail.com> 写道:

 Hello
 As you might have noticed on dsource, i am implementing a text-editor  
 using DWT called IntelliD.

 I have an idea about implementing auto-complete and need professional  
 feedback about it.
 As i am not experienced with writing a full-front-end parser, i got this  
 idea about implementing auto-complete for object oriented features as  
 follows:

 a folder called Editor will be the parent directory,
 /Editor
 -- /D which will be a directory for D language, i am planning to support  
 other langs as well
 ---- /tango
 /phobos
 /dwt
 /gtkD
 ...etc

 each sub folder in parent "D" folder will contain a set of files related  
 to the library involved. These files will represent a class in related  
 library folder that will contain defintions of methods and properties  
 available in that class.
 example
 /Editor/D/DWT/Button.d
 will contain all methods and properties available in DWT's button class  
 in this format

 void setText(char[] text)

 my editor will parse that and provide it in the list of Intellisense or  
 auto-complete functionality in addition to using it in providing  
 call-tips which will show a small label when calling that function  
 providing information about the parameters, names, types ...etc

 What do you think?

 Thanks,
 Rakan
of course it's useful & cool! -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
Jul 24 2008
parent reply Rakan Alhneiti <rakan nospam.gmail.com> writes:
davidl wrote:
 在 Thu, 24 Jul 2008 23:00:09 +0800,Rakan Alhneiti 
 <rakan nospam.gmail.com> 写道:
 
 Hello
 As you might have noticed on dsource, i am implementing a text-editor 
 using DWT called IntelliD.

 I have an idea about implementing auto-complete and need professional 
 feedback about it.
 As i am not experienced with writing a full-front-end parser, i got 
 this idea about implementing auto-complete for object oriented 
 features as follows:

 a folder called Editor will be the parent directory,
 /Editor
 -- /D which will be a directory for D language, i am planning to 
 support other langs as well
 ---- /tango
 /phobos
 /dwt
 /gtkD
 ...etc

 each sub folder in parent "D" folder will contain a set of files 
 related to the library involved. These files will represent a class in 
 related library folder that will contain defintions of methods and 
 properties available in that class.
 example
 /Editor/D/DWT/Button.d
 will contain all methods and properties available in DWT's button 
 class in this format

 void setText(char[] text)

 my editor will parse that and provide it in the list of Intellisense 
 or auto-complete functionality in addition to using it in providing 
 call-tips which will show a small label when calling that function 
 providing information about the parameters, names, types ...etc

 What do you think?

 Thanks,
 Rakan
of course it's useful & cool!
Thanks, Would you think that the implementation of such an idea is any good too?
Jul 25 2008
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Rakan Alhneiti a écrit :
 davidl wrote:
 在 Thu, 24 Jul 2008 23:00:09 +0800,Rakan Alhneiti 
 <rakan nospam.gmail.com> 写道:

 Hello
 As you might have noticed on dsource, i am implementing a text-editor 
 using DWT called IntelliD.

 I have an idea about implementing auto-complete and need professional 
 feedback about it.
 As i am not experienced with writing a full-front-end parser, i got 
 this idea about implementing auto-complete for object oriented 
 features as follows:

 a folder called Editor will be the parent directory,
 /Editor
 -- /D which will be a directory for D language, i am planning to 
 support other langs as well
 ---- /tango
 /phobos
 /dwt
 /gtkD
 ...etc

 each sub folder in parent "D" folder will contain a set of files 
 related to the library involved. These files will represent a class 
 in related library folder that will contain defintions of methods and 
 properties available in that class.
 example
 /Editor/D/DWT/Button.d
 will contain all methods and properties available in DWT's button 
 class in this format

 void setText(char[] text)

 my editor will parse that and provide it in the list of Intellisense 
 or auto-complete functionality in addition to using it in providing 
 call-tips which will show a small label when calling that function 
 providing information about the parameters, names, types ...etc

 What do you think?

 Thanks,
 Rakan
of course it's useful & cool!
Thanks, Would you think that the implementation of such an idea is any good too?
You'll have to give it a try. At least for me, even thinking ahead how to optimize things, a trial an error approach was necessary (I didn't want to, but it ended that way).
Jul 25 2008
parent reply Rakan Alhneiti <rakan.alhneiti nospam.gmail.com> writes:
Ary Borenszweig wrote:
 Rakan Alhneiti a écrit :
 davidl wrote:
 在 Thu, 24 Jul 2008 23:00:09 +0800,Rakan Alhneiti 
 <rakan nospam.gmail.com> 写道:

 Hello
 As you might have noticed on dsource, i am implementing a 
 text-editor using DWT called IntelliD.

 I have an idea about implementing auto-complete and need 
 professional feedback about it.
 As i am not experienced with writing a full-front-end parser, i got 
 this idea about implementing auto-complete for object oriented 
 features as follows:

 a folder called Editor will be the parent directory,
 /Editor
 -- /D which will be a directory for D language, i am planning to 
 support other langs as well
 ---- /tango
 /phobos
 /dwt
 /gtkD
 ...etc

 each sub folder in parent "D" folder will contain a set of files 
 related to the library involved. These files will represent a class 
 in related library folder that will contain defintions of methods 
 and properties available in that class.
 example
 /Editor/D/DWT/Button.d
 will contain all methods and properties available in DWT's button 
 class in this format

 void setText(char[] text)

 my editor will parse that and provide it in the list of Intellisense 
 or auto-complete functionality in addition to using it in providing 
 call-tips which will show a small label when calling that function 
 providing information about the parameters, names, types ...etc

 What do you think?

 Thanks,
 Rakan
of course it's useful & cool!
Thanks, Would you think that the implementation of such an idea is any good too?
You'll have to give it a try. At least for me, even thinking ahead how to optimize things, a trial an error approach was necessary (I didn't want to, but it ended that way).
Thanks, After all when i think deeply about it, i guess i will need to create at least a simple parser for certain language features because i have both syntax highlight and intellisense.
Jul 25 2008
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Rakan Alhneiti a écrit :
 Ary Borenszweig wrote:
 Rakan Alhneiti a écrit :
 davidl wrote:
 在 Thu, 24 Jul 2008 23:00:09 +0800,Rakan Alhneiti 
 <rakan nospam.gmail.com> 写道:

 Hello
 As you might have noticed on dsource, i am implementing a 
 text-editor using DWT called IntelliD.

 I have an idea about implementing auto-complete and need 
 professional feedback about it.
 As i am not experienced with writing a full-front-end parser, i got 
 this idea about implementing auto-complete for object oriented 
 features as follows:

 a folder called Editor will be the parent directory,
 /Editor
 -- /D which will be a directory for D language, i am planning to 
 support other langs as well
 ---- /tango
 /phobos
 /dwt
 /gtkD
 ...etc

 each sub folder in parent "D" folder will contain a set of files 
 related to the library involved. These files will represent a class 
 in related library folder that will contain defintions of methods 
 and properties available in that class.
 example
 /Editor/D/DWT/Button.d
 will contain all methods and properties available in DWT's button 
 class in this format

 void setText(char[] text)

 my editor will parse that and provide it in the list of 
 Intellisense or auto-complete functionality in addition to using it 
 in providing call-tips which will show a small label when calling 
 that function providing information about the parameters, names, 
 types ...etc

 What do you think?

 Thanks,
 Rakan
of course it's useful & cool!
Thanks, Would you think that the implementation of such an idea is any good too?
You'll have to give it a try. At least for me, even thinking ahead how to optimize things, a trial an error approach was necessary (I didn't want to, but it ended that way).
Thanks, After all when i think deeply about it, i guess i will need to create at least a simple parser for certain language features because i have both syntax highlight and intellisense.
Of course. When the user types "b.", you need to know what type is b, and for that you need a parser.
Jul 26 2008
parent Rakan Alhneiti <rakan.alhneiti nospam.gmail.com> writes:
Ary Borenszweig wrote:
 Rakan Alhneiti a écrit :
 Ary Borenszweig wrote:
 Rakan Alhneiti a écrit :
 davidl wrote:
 在 Thu, 24 Jul 2008 23:00:09 +0800,Rakan Alhneiti 
 <rakan nospam.gmail.com> 写道:

 Hello
 As you might have noticed on dsource, i am implementing a 
 text-editor using DWT called IntelliD.

 I have an idea about implementing auto-complete and need 
 professional feedback about it.
 As i am not experienced with writing a full-front-end parser, i 
 got this idea about implementing auto-complete for object oriented 
 features as follows:

 a folder called Editor will be the parent directory,
 /Editor
 -- /D which will be a directory for D language, i am planning to 
 support other langs as well
 ---- /tango
 /phobos
 /dwt
 /gtkD
 ...etc

 each sub folder in parent "D" folder will contain a set of files 
 related to the library involved. These files will represent a 
 class in related library folder that will contain defintions of 
 methods and properties available in that class.
 example
 /Editor/D/DWT/Button.d
 will contain all methods and properties available in DWT's button 
 class in this format

 void setText(char[] text)

 my editor will parse that and provide it in the list of 
 Intellisense or auto-complete functionality in addition to using 
 it in providing call-tips which will show a small label when 
 calling that function providing information about the parameters, 
 names, types ...etc

 What do you think?

 Thanks,
 Rakan
of course it's useful & cool!
Thanks, Would you think that the implementation of such an idea is any good too?
You'll have to give it a try. At least for me, even thinking ahead how to optimize things, a trial an error approach was necessary (I didn't want to, but it ended that way).
Thanks, After all when i think deeply about it, i guess i will need to create at least a simple parser for certain language features because i have both syntax highlight and intellisense.
Of course. When the user types "b.", you need to know what type is b, and for that you need a parser.
There are some specific rules for this already specified in language. The use of certain characters coming after type specification can be considered a variable. But some variables might be of type class that are user-defined. also, some other things might follow type specifications such as casting cast(int)v, int myFunc() But this should be quite a simple task, because i am not ready yet to create a parser from scratch
Jul 26 2008