AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syntax highlighter for Eclipse IDE
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Fri May 19, 2006 2:06 pm    Post subject: Reply with quote

jonib wrote:
RobOtter wrote:

Unfortunately, I donīt have any expertise in programming plugins for the Eclipse IDE

Did you look at Colorer? it is a working syntax highlighter with a Eclipse plugin no programming needed, all it needs is AHK support and I'm working on it, I even downloaded Eclipse to test it works.


Sorry, I havenīt had the time yet. Hopefully I can do so on Sunday.
Have a nice weekend,
Rob
Back to top
View user's profile Send private message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Tue May 23, 2006 10:57 am    Post subject: Reply with quote

Finally, I took a look. It seems quite promising but I think it can really only serve the purpose of syntax highlighting. This will be a good start, though, but there are several other tasks to make a good AHK editor.

Best regards,
Rob
Back to top
View user's profile Send private message
jonib



Joined: 09 May 2006
Posts: 66

PostPosted: Tue May 23, 2006 7:00 pm    Post subject: Reply with quote

RobOtter wrote:
Finally, I took a look. It seems quite promising but I think it can really only serve the purpose of syntax highlighting. This will be a good start, though, but there are several other tasks to make a good AHK editor.


Did you try it in Eclipse?
and do you want to test my unfinished AutoHotkey support?

And colorer seems to support a bit more then syntax highlighting:
Eclipse Colorer

* Powerful and flexible outliner for all common languages.
* Errors list could be showed in outline view.
* Shortcuts for pairs matching.
* Replace tabs with spaces option.
* Soft linebreakes option.
* Colored sources generation into HTML files.
Back to top
View user's profile Send private message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Wed May 24, 2006 4:01 pm    Post subject: Reply with quote

jonib wrote:

Did you try it in Eclipse?
and do you want to test my unfinished AutoHotkey support?


Over the next days, I think I have the time to test it in Eclipse (need to install Eclipse on my home system anyway). Can you provide a link to your current work?

jonib wrote:

And colorer seems to support a bit more then syntax highlighting:
Eclipse Colorer

* Powerful and flexible outliner for all common languages.
* Errors list could be showed in outline view.
* Shortcuts for pairs matching.
* Replace tabs with spaces option.
* Soft linebreakes option.
* Colored sources generation into HTML files.


I was not aware that Colorer can serve as an outliner as well. Great! This would be one of the biggest advantages over other editors, imho.
What I like (best) in Eclipseī Java editor is the highlighting of all occurences of a variable in its actual scope. I would really like to see this feature in an AHK editor as well, since I miss it in every other AHK-supported editor.
Is it clear to you which feature I mean?
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed May 24, 2006 4:28 pm    Post subject: Reply with quote

I guess that getting the scope of a variable in AutoHotkey will not be obvious... The relevant chapter in the Scripts page has to be read carefully...
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
jonib



Joined: 09 May 2006
Posts: 66

PostPosted: Fri May 26, 2006 5:00 pm    Post subject: Reply with quote

RobOtter wrote:
Can you provide a link to your current work?

Hi
Sorry for the delay, I have not been home for the last two days.

You need to install the Colorer Eclipse plugin and then unpack my zipfile, run "ColorerInstall.ahk" install script and when the script asks for "catalog.xml" go to Colorerplugins folder in Eclipse's plugins folder and choose the catalog file.

Like I said before it's not complete, but should have some functionality.

In this Zipfile there are three files
AHKColorer.zip
Code:

ColorerInstall.ahk   Install script.
protomod.hrc         Modification to Colorers proto.hrc file to add support for AHK.
ahk.hrc              This is the syntax highlighting file for Colorer.
Back to top
View user's profile Send private message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Mon May 29, 2006 10:43 am    Post subject: Reply with quote

Hi jonib,

this looks really promising! I did a not too extensive check yesterday and I am amazed! Although it is not complete, it offers more functionality than every other editor with AHK support I have tested so far!

First thing Iīve noticed as a bug are functions not showing correctly in outline view (some are not visible at all, others are shown as child nodes of GoTo-labels). I think this is because the end of such a jump label is not (or incorrectly) tested (need to end with "Return").

I donīt know if folding needs to be supported by the Colorer plugin or by you, but this is something I would really wish for the future.

If you donīt mind, I will keep you informed about other issues I find. Or maybe you have a rough todo list that I can check against?

Best regards,
Rob
Back to top
View user's profile Send private message
jonib



Joined: 09 May 2006
Posts: 66

PostPosted: Tue May 30, 2006 12:51 am    Post subject: Reply with quote

RobOtter wrote:
this looks really promising! I did a not too extensive check yesterday and I am amazed! Although it is not complete, it offers more functionality than every other editor with AHK support I have tested so far!

Hi and now I'm getting nervus. Shocked
Quote:

First thing Iīve noticed as a bug are functions not showing correctly in outline view (some are not visible at all, others are shown as child nodes of GoTo-labels). I think this is because the end of such a jump label is not (or incorrectly) tested (need to end with "Return").

Yes outline functionality is very experimental for me, labels should work and functions that have "{" on the same line should work somewhat, I have to studie some more.
How did you get outlines to show in Eclipse? it says "An outline is not available" even if I try pascal source.
Quote:
I donīt know if folding needs to be supported by the Colorer plugin or by you, but this is something I would really wish for the future.

I'm not sure what folding means? I have not used Eclipse other then test that Colorer worked with it.
Quote:
If you donīt mind, I will keep you informed about other issues I find. Or maybe you have a rough todo list that I can check against?

Yes keep me informed, I'll make a separet posting with more documentation and todo list later.
Back to top
View user's profile Send private message
RobOtter (not logged in)
Guest





PostPosted: Tue May 30, 2006 12:57 pm    Post subject: Reply with quote

jonib wrote:
Yes outline functionality is very experimental for me, labels should work and functions that have "{" on the same line should work somewhat, I have to studie some more.

Functions are outlined correctly only if the opening curly bracket is in the same line (with exactly ONE blank or tab after the closing round bracket) AND if they are defined before a label. If defined right after a label, they are shown as a child of the label.
If the curly bracket is on a new line or has not exactly one blank or tab, functions are not outlined at all.

jonib wrote:
How did you get outlines to show in Eclipse? it says "An outline is not available" even if I try pascal source.

Huh? No problem here with Eclipse 3.2 beta, 3.1 final and the latest version of Eclipse Colorer; I get the outline on the fly (ok, itīs a bit slow, though)

jonib wrote:
I'm not sure what folding means? I have not used Eclipse other then test that Colorer worked with it.

Folding means "collapse a block of code so that you can only see its first line". Line numbers are left untouched. Folding is usually useful in bigger software projects to see only things you need to see. In case of AHK scripts, I would suggest that folding should at least be possible on complete labels and functions but it would be best if it would work on any block of code, i.e. everything between curly brackets.
Back to top
jonib



Joined: 09 May 2006
Posts: 66

PostPosted: Tue May 30, 2006 7:39 pm    Post subject: Reply with quote

RobOtter wrote:
Functions are outlined correctly only if the opening curly bracket is in the same line (with exactly ONE blank or tab after the closing round bracket)

Yes I know, it was a quick test to get outline to work at all with functions, I'm having a problem distinguishing a function declaration and calling a function, I'm assuming only the declaration should be outlined.
RobOtter wrote:
AND if they are defined before a label. If defined right after a label, they are shown as a child of the label.

I know and is weird, I'm trying to find out why it happens.
RobOtter wrote:
jonib wrote:
How did you get outlines to show in Eclipse? it says "An outline is not available" even if I try pascal source.

Huh? No problem here with Eclipse 3.2 beta, 3.1 final and the latest version of Eclipse Colorer; I get the outline on the fly (ok, itīs a bit slow, though)

I got it working by creating a project and a ahk file in the project, but I can't find a way to open a file other then "File" "open file" and then the outline don't work, how do you open a file?
RobOtter wrote:
Folding means "collapse a block of code so that you can only see its first line".

I think Colorer has to support this and I don't think it supports it.

When I got the outline to work I saw there was a "Parse Tree" view that shows how the file is parsed by Colorer, it might be a great way to see why something is not working.
Back to top
View user's profile Send private message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Tue May 30, 2006 8:01 pm    Post subject: Reply with quote

jonib wrote:
How did you get outlines to show in Eclipse? it says "An outline is not available" even if I try pascal source.
...
I got it working by creating a project and a ahk file in the project, but I can't find a way to open a file other then "File" "open file" and then the outline don't work, how do you open a file?


I usually use the Navigator View; it shows all files / folders in your current project. Opening an AHK file via double click or by dragīnīdrop works fine then.
After playing around, I found the reason for your problem (you were on the right way to find the solution yourself):
Files need to belong to the project. Although you can open any AHK file anywhere on the file system, Outline View only works (god knows why) on files belonging to the current project. Itīs a bit strange but thatīs it Idea
Back to top
View user's profile Send private message
jonib



Joined: 09 May 2006
Posts: 66

PostPosted: Tue May 30, 2006 8:15 pm    Post subject: Reply with quote

It seems there is no way to connect a file to a project without saving the file in the projects directory.
Back to top
View user's profile Send private message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Tue May 30, 2006 8:21 pm    Post subject: Reply with quote

jonib wrote:
It seems there is no way to connect a file to a project without saving the file in the projects directory.

Thatīs right - that is what the project directory is for Wink
Keeping everything in one place for a better overview is the credo. To my knowledge, the only external files you can add to a project are Java archives (jar files), but this has obviously nothing to do with AHK...
Back to top
View user's profile Send private message
jonib



Joined: 09 May 2006
Posts: 66

PostPosted: Tue May 30, 2006 8:48 pm    Post subject: Reply with quote

It just makes it harder for me testing diffrent .ahk files, I have to move them all to the project directory.
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed May 31, 2006 9:14 am    Post subject: Reply with quote

jonib wrote:
I'm having a problem distinguishing a function declaration and calling a function, I'm assuming only the declaration should be outlined.
Yes, that's an unfortunate choice of syntax. AHK's parser solved this, of course, but for poor syntax highlighting lexers like mine, and outliners, it is hard to see the difference, as the opening brace that show that it is a definition can be far away from the initial line:
Code:
SillyFunction(p1   ; First parameter
/*
Who said disconnected?
*/
, p2)   ; Yes, that's the second one!
/*

Comments are good (if used wisely...)

*/


{ ; Whew!
   Return true
}
is perfectly legal and functionnal...
Plus it has the side effect of not allowing arbitrary braces after a function call!
Code:
{   ; Arbitrary braces are OK
   a = Bla
}
SillyFunction(1, 2)
; But not after a function call!
{
   b = Wot
}

_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group