View unanswered posts | View active topics


Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
AutoFormat / Indent Plugin 
Author Message
Member

Joined: Thu Oct 02, 2008 11:01 am
Posts: 31
Post Re: AutoFormat / Indent Plugin
Hey i'm glad you can carry on with your 'comment line' mania ;)
This plugin needs some major modifications to perform full syntax recognition so it could format even 'dirty' code and style it to user's preference. However it will take some more time, for now it's just bug/case fixing ;)

About import bug: could you provide some simple code that would generate the bug, since i was unable to reproduce it. Thanks for feedback anyway.

Regards,


Sat Oct 24, 2009 7:35 am
Profile
Member

Joined: Tue Oct 20, 2009 3:23 pm
Posts: 11
Post Re: AutoFormat / Indent Plugin
Having a little bug with this one:

Before (this is nested; sub.notify() is too far to the right)
Code:
        public function notify(){
            for each(var sub in subs) {
                    sub.notify();
            }
        }


After selecting just these three lines and AutoFormatting
Code:
        public function notify(){
            for each(var sub in subs) {
    sub.notify();
}
        }




Would it make sense to apply auto-format automatically? Or is there a "select line" command followed by an indent command...? (in vi/vim it would just be '>>'... but i wont start comparing)


Fri Oct 30, 2009 3:28 pm
Profile
Member

Joined: Thu Oct 02, 2008 11:01 am
Posts: 31
Post Re: AutoFormat / Indent Plugin
well, i was unable to reproduce this bug, it performs as it should. Maybe your selection was incorrect (you should select whole line, not only text, as it will get current indent from the first line). Or maybe you could give more detailed decription of this bug.
Thanks,
Jake


Mon Nov 02, 2009 8:09 pm
Profile
Member

Joined: Tue Oct 20, 2009 3:23 pm
Posts: 11
Post Re: AutoFormat / Indent Plugin
Also, when it performs an auto-sorting of imports, it seems to throw out imports of constant classes that are used. I noticed this with org.papervision3d.cameras.CameraType. Let me know if i can clarify...


Fri Nov 06, 2009 4:56 pm
Profile
Member

Joined: Thu Oct 02, 2008 11:01 am
Posts: 31
Post Re: AutoFormat / Indent Plugin
@Girou: It's a good tip, however some time ago (even befor line comment bug) i've updated it and it should resolve this case without extra space (it was a silent update though ;)

@Ethan: Please chack if you are using most update version and if problem persists, please post your lines where class is referenced.


Fri Nov 06, 2009 8:09 pm
Profile
Member

Joined: Mon Nov 16, 2009 8:34 pm
Posts: 9
Post Re: AutoFormat / Indent Plugin
Jake,

From what I've read on this discussion your AutoFormat Plugin is a welcome addition to FD3. However, I have not been able to download it! There appear to be two different links listed. The link "http://jpj82.webpark.pl/AutoFormat.dll" is listed by TrendMicro as dangerous. The link "http://www.filefactory.com/file/ad1955/n/AutoFormat_dll" does not work either. I first created an account on FileFactory, logged in and then pasted the above link into the address bar. I got a message that said that I needed to login. After searching the FileFactory website I found that the format of a download link did not include a modifier similar to /ad1955/. After /ad1955/ was removed from the link, FileFactory returned a page that said "Sorry, this file is no longer available. It might have been deleted by the uploader, or has expired."

Please advise on how I might download your dll.


Sun Dec 06, 2009 5:22 pm
Profile
Member

Joined: Thu Oct 02, 2008 11:01 am
Posts: 31
Post Re: AutoFormat / Indent Plugin
Sorry for the delay. Well the dll should be obtained from the site in first post (at webpark) the other one was temporary. It might be recognized as a thread since it's dll, but plugin itself is clean. So i would discard the TrendMicro warning and download it or i can email you this file, if you send me your address.


Fri Dec 11, 2009 9:53 am
Profile
Member

Joined: Mon Nov 16, 2009 8:34 pm
Posts: 9
Post Re: AutoFormat / Indent Plugin
jjeziorski.

Thanks for the reply and plugin, I finally did find a link to download the AutoFormat DLL. It's working great!


Fri Dec 11, 2009 5:35 pm
Profile
Member

Joined: Mon Nov 16, 2009 8:34 pm
Posts: 9
Post Re: AutoFormat / Indent Plugin
Jake,

I think that there is a minor Oops in formating the switch structure. When my code includes "default:" the indentation is correct, but if there is a space between dafault and the colon "default :" wierd things happen.

I'd send you a copy of my code example, but for some reason I can't get paste to work :?:


Sat Dec 12, 2009 4:36 pm
Profile
Member

Joined: Thu Oct 02, 2008 11:01 am
Posts: 31
Post Re: AutoFormat / Indent Plugin
OK, fixed. Please redownload and enjoy ;)


Mon Dec 14, 2009 5:10 pm
Profile
Member

Joined: Thu Apr 15, 2010 4:57 am
Posts: 1
Post Re: AutoFormat / Indent Plugin
Hi,
I have developing flash as2 applications for last 3 years.But did not use any other editor than flash IDE one.
Recently thought of using a editor and landed up with FlashDevelop.
Its a great tool but since i am used to pressing ctrl+T and ctrl+shft+F i found this one little difficult to use.
I started searching for Auto Indent plugin and i found this. Its very good and even though the shortcut key was different.
Thanks for creating this plugin.

One more small thing i noticed with the AutoFormatter is that it does not recognized the end brace if it is on the same line.

if the code is something like this-
Code:
function somefunction(){
 if(something){
 }else{
      if(again){}else{}
 }
}


it does not changes to-
Code:
function somefunction(){
  if(something){
  }else{
      if(again){
      }else{
      }
  }
}


And also if the code is like this-
Code:
function somefunction(){
   if(something){
   }else{
        if(again){
        }else{
          ....}
  }
}


Auto format will change like this-
Code:
function somefunction(){
   if(something){
   }else{
        if(again){
        }else{
          ....}
        }
   }

I was searching for the ending brace for some time then realized this.. :D I think both the code examples points to the same thing.


Thu Apr 15, 2010 5:17 am
Profile
Member

Joined: Thu Mar 25, 2010 10:19 pm
Posts: 12
Post Re: AutoFormat / Indent Plugin
Hi all.
I have an error with plugin:
Quote:
Индекс находился вне границ массива. (Index is out of range)

в AutoFormatPlugin.PluginMain.importUsedInLine(String line, String import)
в AutoFormatPlugin.PluginMain.AutoFormatString(String input, Boolean performImportCheck)
в AutoFormatPlugin.PluginMain.HandleEvent(Object sender, NotifyEvent e, HandlingPriority prority)
в PluginCore.Managers.EventManager.DispatchEvent(Object sender, NotifyEvent e)


Wed Apr 21, 2010 5:05 pm
Profile
Member

Joined: Sun Apr 25, 2010 10:22 am
Posts: 1
Post Re: AutoFormat / Indent Plugin
Hi there,

i just found a problem with formatting an if-else inside a switch case:

Code:
function func():void
{
   switch(var)
   {
      case var:
         if (something)
         {
            ...
         }else {
            ...
         }
         break;

      case var:
         ...
         break;
   }
}


after autoformat:

Code:
function func():void
{
   switch(var)
   {
      case var:
         if (something)
         {
            ...
      }else {
         ...
      }
      break;

   case var:
      ...
   break;
}
}


it really messes up the format. but continues fine after that codeblock.
maybe have a look at it.

david


Sun Apr 25, 2010 10:30 am
Profile
Member

Joined: Sun May 09, 2010 3:23 am
Posts: 1
Post Re: AutoFormat / Indent Plugin
I also found this problem

maybe you could use my solution, as follow:

Code:
switch (x)
{
    case 3: {
        if(condition)
        {
             statement..
        }
    } break;
}


use this -> { }
when you execute auto formate function
it will work be fine.


Sun May 09, 2010 3:29 am
Profile
Member

Joined: Tue Jun 08, 2010 10:16 am
Posts: 35
Post Re: AutoFormat / Indent Plugin
Hi everyone

Just installed this plugin in 3.2.1 and I think I'm missing some configuration xml of some sort. As far as I can remember there was one in previous versions (or I'm completely lost :)) Right now the plugin only inserts white space between ending braces. Doesn't change how braces are positioned (inline or below header) and a lot other stuff.

Any clues?


Thu Jun 17, 2010 2:50 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

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

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