Bug 85016 - Request: please add ActionScript to supported languages under Highlight Mode
Summary: Request: please add ActionScript to supported languages under Highlight Mode
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (other bugs)
Version First Reported In: 0.2
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-12 17:33 UTC by lhoffner
Modified: 2010-11-20 13:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 4.0
Sentry Crash Report:


Attachments
Highlighting file for Actionscript 1.0 (19.87 KB, text/xml)
2004-07-13 12:48 UTC, lhoffner
Details
Test Actionscript 1.0 document. (11.64 KB, text/plain)
2004-07-13 18:41 UTC, lhoffner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lhoffner 2004-07-12 17:33:08 UTC
Version:           3.2.1 (using KDE 3.2 BRANCH >= 20040204, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
OS:                Linux (i686) release 2.6.3-14mdk

I *love* Quanta for its code folding and highlighting features. It is a real help to me in writing PHP, XML and CSS. However, I also have to write a lot of ActionScript and would appreciate the addition of that language to the Highlighting schemes. Are there any plans to include it? (Flash's native editor gets unwieldy when code begins to exceed 100 lines...)

Thank you!
Comment 1 lhoffner 2004-07-13 01:55:33 UTC
Since posting this request, I have read a HOWTO on creating syntax highlighting files in XML. It was remarkably simple and I have written a first pass. After a mere 2 hours, I have the beginnings of an Actionscript highlighter that I'm happy with. (This is especially remarkable, considering I'm not an engineer, but am a scripter. Thanks for providing a framework that permits me to do this!)

Would you like me to give you what I've done?
Comment 2 Anders Lund 2004-07-13 09:47:04 UTC
Yes please. Either attach here, or mail to kwrite-devel@kde.org.
You can get live support for writing syntax files in channel #kate at the irc.freenode.net network, look for wbsoft, dominik or anders.
Comment 3 lhoffner 2004-07-13 12:48:41 UTC
Created attachment 6648 [details]
Highlighting file for Actionscript 1.0

Actionscript 1.0. Will support authoring efforts for Macromedia Flash MX and
Macromedia Flash 5.0. Support for Actionscript 2.0 and Macromedia Flash MX 2004
coming soon.
Comment 4 lhoffner 2004-07-13 12:53:10 UTC
[This comment was missing from my attachment post.]

It should be noted that, with this highlighting file in use, if I am editing an Actionscript document (*.as) in Quanta, and then I open a new document and start typing, Quanta crashes immediately. Quanta will not crash if the .as document is closed first. Kate does not seem to be bothered. 

This behavior wasn't happening before I wrote this highlighting file, so I may have written something that Quanta is not liking. Forewarned is forearmed.

Thanks!
Comment 5 Anders Lund 2004-07-13 17:46:16 UTC
I don't know why it would disturb quanta, hopefully Andras can answer that.

Regarding the xml file -- It looks fine, except i believe you have an error in your string contexts, namely the second one is started and ended with a single quote, but does not escape that or continue its own context.

We have a property for "Author" in the language tag, you should add your self.
Are you willing to be listed as maintainer? That means that we will ask you in case of problems, and alert you about new features.

Do you have a sample .as file that we can use as a test case? preferable on that covers all the features supported by the xml file.
Comment 6 lhoffner 2004-07-13 18:41:53 UTC
Created attachment 6650 [details]
Test Actionscript 1.0 document.

Does not cover every statement in the language, but gives a fair representation
of commonly used ones. Good for initial test.
Comment 7 lhoffner 2004-07-13 18:44:13 UTC
Hi! 

A few points to clarify:
I wrote this file using the already existing javascript.xml file as a template. (The two languages are ECMA-262 based.) So, my contexts were cut and pasted from there. Do you see the same context error in that file? I'd be happy to fix it, but I could use a line number reference from the Actionscript-1.0.xml file if you could oblige.

Since I am brand spanking new at writing an XML syntax highlighting file, I have some things to learn (for instance, the meaning of #pop and #stay...). I would be happy to be listed as maintainer, if you will understand that I may need to have myself un-listed if (only if) I begin to feel out of my depth. You should also not hesitate to step in if you feel I am unable to perform.

Since this syntax file did derive from the effort that went in to another (javascript.xml) file, I'll ask you whether you think it's appropriate that I be listed as "Author" here. If you do, then I will add that attribute.

Sample .as file for testing was submitted in another post. It does not cover *all* functions (I'd have to write one special to do that -- and I will), but it should get you started.
Comment 8 Thomas Friedrichsmeier 2007-12-12 17:21:05 UTC
Ouch, it seems this report was simply forgotten. By now we do have an actionscript highlighting definition. I'm sending the author a notice similar to this one.

Could you two get together and compare your definitions, to see whether some portions of this definition should be merged into the one shipped with kate, now (or the other way around)?

A testcase specifically designed to show the features of the highlighting definition would also be nice, as it will make it easier to check any modifications that may be done in the future for correctness.

Once you've had the chance to take a look, a comment to this bug report would be appreciated, so we can close it, when no longer needed.

Thanks!
Comment 9 Dominik Haumann 2010-11-20 13:30:43 UTC
Close as fixed. No reaction anymore. If you feel like improving the existing ActionScript 2.0 highlighting, please do so and open a new report.