View unanswered posts | View active topics

Reply to topic  [ 6 posts ] 
Actionscript panel & cleanup function 
Author Message

Joined: Sun Mar 05, 2006 2:59 am
Posts: 1
First of all, recent convert from Primalscript to FD; Huge thumbs up. So good.

This is somewhat frivolous, but it's something i'd like to see nonetheless.
As it is, the actionscript panel lists declared methods in alphabetical order, which is fine and dandy. However, it'd be nice to have an alternate mode where they're listed in order of declaration, and to be able to drag them up and down the list to restructure the class. For instance, if i have methods a, b and c declared in the order of a c and b, i could drag b up above c and the text in the .as file would be altered to reflect that restructuring.

This is mostly because i tend to write classes very quickly that have a whole heap of small methods, and it'd be nice to quickly reorganize the file instead of the copy/paste marathon i currently have to go through when cleaning up.

In addition, it'd be nice to have an auto cleanup function that:

a) places all variable declarations at the top of the class in order of variable scope and type (all static vars together, all private vars together, all static movieclip vars together, all private array vars together, you get the idea)
b) places the constructor at the very bottom of the class
c) fixes indentation
d) Automatically places :ReturnType after any declared method without one. If there is no return statement, set it to :Void. If else, set it to what it appears to be returning. If it already has a declared return type, leave it alone.

Doubly frivolous, and i'm sure it'd be somewhat of a crutch for lazy devs, but for me (who frequently has to whack out stuff at a very rapid pace), it'd be a godsend.

Sun Mar 05, 2006 3:07 am

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
It won't be possible in the current state of the parser :(

For the next version of FlashDevelop, the new parser I am working on (for AS2/AS3/haXe) will allow this kind of functionnalities. Note that I really like the idea to move code from the Actionscript panel view :) And since Nick did an amazing work on the project treeview this kind of drag&drop stuff will be easy enough to add!

Sun Mar 05, 2006 12:13 pm
Profile WWW

Joined: Thu Feb 09, 2006 10:58 am
Posts: 1094
Location: Israel
Maybe try to implement "sort by" functionality.
it would be very helpfull to sort by type, rether then alphabeticaly.


Sun Mar 05, 2006 3:09 pm

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
You're right, custom sorting may be added now.

Sun Mar 05, 2006 4:29 pm
Profile WWW

Joined: Thu Apr 27, 2006 2:54 pm
Posts: 18
Location: NYC
If it means anything, I'd like to raise my hand and say that AndreasR is not the only person who would like this kind of functionality.

Personally, I'd like to see the Properties come before the Methods in the Actionscript panel. And boy would it be awesome to be able to drag the method up and down to change its order.

Also, perhaps some functionality where if I were to right-click a property or method, a menu would appear that would allow me to quickly set some simple properties of the method or property...such as return type, variable type, public/private, etc.

Oh, and I have to say I love FlashDevelop. I used to develop in the Flash IDE and once I opened my classes in FD I just about crapped my pants. Keep up the hard work!

Thu Apr 27, 2006 3:03 pm
Profile WWW

Joined: Thu May 14, 2015 6:02 pm
Posts: 26
Was anything like this ever implemented? I'm working on sloppy source code I got from someone else. Private methods aren't together, static methods aren't together, it's not alphabetical, the constructor is right in the middle of everything else, etc. Is there any way to reorder the methods automatically?

Sat Mar 18, 2017 4:02 pm
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

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

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