View unanswered posts | View active topics



Reply to topic  [ 4 posts ] 
How to: Adding Java Support for Using Templates and Snippets 
Author Message
Member

Joined: Tue Oct 02, 2007 12:32 am
Posts: 69
*This is not real java support guys..*

I wanted:
- ProjectFile templates (I create all kinds of extra formatting stuff)
- Code Snippets (Ctrl+B)
(and a teeny bit of code coloring..just so I can do my thing quickly)

To add (fake) "Java Support" to FlashDevelop.

Open up: C:\Program Files\FlashDevelop\Settings\Languages\AS2.xml
find and edit the following line adding java to the end...
<file-extensions>as,asc,mx,java</file-extensions>

and restart flashdevelop. Edit your existing project adding the java build folder (java src) to the classpath so that you can get support like this.
$(FileNameWithPackage);

You now can edit java files in FlashDevelop it has some code coloring and you can use snippets and templates as you pop back and forth between Eclipse or Netbeans.

Then create some templates and Snippets
C:\Program Files\FlashDevelop\Templates\ProjectFiles\AS3Project\Java\JavaModel.java.fdt
C:\Program Files\FlashDevelop\Snippets\as2\Java\println_var.fds

with stuff like this inside:
package $(FileNameWithPackage);

Anyway it works. The snippets will show up because its associated with an AS2 context.
And it'll still open when you have an AS3Project open because the .java is only associated with the AS2 context. (Don't use AS2 anymore)

Anyway, I'm happy :) Use it if you like. I do because I love the snippets/templates workflow of FD.

Only thing that would make me happier is real Java code completion/syntax coloring... :)


Sat Feb 05, 2011 9:13 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
You may want to add .java to the JScript syntax so you won't get AS2 completion in the way.

True Java (or any C/C++/C# language) completion isn't going to happen as the typing syntax isn't compatible with FD parsers.


Sat Feb 05, 2011 10:19 am
Profile WWW
Member

Joined: Sun Jul 10, 2011 10:37 pm
Posts: 10
Philippe wrote:
You may want to add .java to the JScript syntax so you won't get AS2 completion in the way.

True Java (or any C/C++/C# language) completion isn't going to happen as the typing syntax isn't compatible with FD parsers.


Can you elaborate on this? How are they not compatible? Can they be made compatible?


Tue Sep 27, 2011 1:01 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
It's about the way things are declared:
Code:
var foo:Bar; // Flash
Bar foo; // java, c++

This isn't supported at all by the parser & the completion.


Wed Sep 28, 2011 12:46 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.