Skip navigation
matteosistisette
Currently Being Moderated

Coding aids are broken - no auto import

Apr 5, 2012 9:15 AM

I've started using Flash Builder and I'm astonished at seing that such an IDE lacks a very basic coding aid feature that even Flash Professional has: automatically added import statements.

 

In Flash Professional, if I write "new ActivityEvent", it automatically recognizes this as a known class, it gives me hints, and it automatically adds an import statement for it at the beginning of the file.

 

However, Flash Builder does not. It shows a warning that this is an unknown type until I manually add the import statement, then it recognizes it and gives me the hints.

 

This is ridiculous, and especially in an IDE which is based on Eclipse (in original Eclipse, if you write the name of a class which exists somewhere but you have not imported, you right click and have the option to choose which existing class definition to import or whether to create a new one).....

 

Is there some setting that doesn't have the proper default value and that I can change, is there any workaround, or is this so basic feature just lacking?

 

Most other coding aid features do work btw

 

thanks

m.

 
Replies
  • Currently Being Moderated
    Apr 12, 2012 10:36 PM   in reply to matteosistisette

    Hi,

    Flash Builder 4.6 does have the auto import feature.

    When say typing, 'new Butt <invoke Code hints> ' , selecting the same ideally will auto import your class.

     

    Can you post the sample code where it doesn't work or steps to reproduce the same?

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2012 4:11 AM   in reply to matteosistisette

    Hello,

     

    <invoke code hints> means that you can explicitly invoke code-hints by pressing Ctrl + Space.

    By default, there is a slight delay (of 200ms) before code-hints appears automatically. So, if you type really fast, code-hints may not appear automatically. However, you can change the delay by changing the value of 'Activate after' in Window -> Preferences -> Flash Builder -> Editors Page

     

    You might also want to try enabling 'Use additional custom triggers' checkbox in the same preference page. By enabling this, you don't need to invoke code-hints by pressing Ctrl + Space. Relevant code-hints will automatically appear on every character you type.

     

    I think the random behavior you are observing while typing and not getting the hints automatically may be attributed to the delay that I mentioned above.

     

    And, in var s:Str case, you can simply press Ctrl + Space rather than hitting backspace and typing colon again. But if you make the delay as 0 ms and enable 'Use additional custom triggers', this condition will not arise.

     

    Thanks,

    Sameer

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2012 4:43 AM   in reply to matteosistisette

    No, that's not the case. When it refuses to work it does even if I wait a minute after typing ":"

    Next time it happens, I will try by invoking the hints explicitly abd see if that works.

     

    Also, when it happens next time, it would be great if you could share the file you are working on so that we can try and find the problem you are facing.

    If you can't share the file on the forums, please let me know and I will share my e-mail id with you.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points