开发者

Flash Builder 4 suddenly stops doing auto-complete for some classes

A project we've been working on for weeks in Flash Builder suddenly has stopped being navigable: all the nice features of Flash Builder like auto-completion, jump to definition, even search for References are only partially working -- they work for some classes but not for others. I've tried restarting Flash Builder, closing and opening the project, re-creating the project, but this bad situation persists. Moreover, it happened at about the same time for 2 other developers on the same project, each with a somewhat different configuration. It seems perhaps we have exceeded some internal limit of FlashBuilder, yet our p开发者_运维知识库roject is not even that large yet. I'm not sure where I can look to troubleshoot this.


Usually an Eclipse shut down and relaunch solves the problem for me. But, here are a few other things to try:

  1. Since this has happened across three work stations, on a discrete set of classes, have you looked for a weird, or non-standard syntax bug? I'm sure I have seen situations where something will not cause a compiler error, but do cause code hinting to break. I'd look for things like single quotes inside of double quotes or ASDocs that aren't properly terminated. [It does seem wildly inconsistent, though, so it is a bit of a stab in the dark].
  2. Try cleaning the work space. When you launch Flash Builder (or Eclipse) use the '-clean' argument. I do this in a Windows shortcut; I'm not sure how to do it on a Mac
  3. Try re-creating the component in question. Slowly copy code over in chunks until you find out what breaks the code hinting.


This is a common problem in eclipse (aka Flash Builder).

Try increasing the available memory for it's "type caching" (I forget the specific term). You can do this by editing the FlashBuilder.ini in your flex home to look something like this:

-vmargs
-Xms64m
-Xmx1024m
-XX:MaxPermSize=1024m
-XX:PermSize=64m

(snipped out the irrelevant options)

You may also need to completely delete your workspace cache and recreate it. I haven't had this problem since I increased the max memory limit.

You probably don't need more then 512m on the max size, but I am working with a particularly large project with a lot of open library dependencies...


Removing then re-adding the project seemed to fix this for me.


None of these worked for me. My solution is to run a textfactory in BBedit (I'm on Mac) that replaces every tab in my entire codebase with four spaces, then another one that does the reverse. Then I refresh my project in FB. This modifying of every file seems to force FB to rebuild it's references. I have to do it every time I start FB. I'm sure there's a better, command-line way to achieve this (though unix 'touch' doesn't work).


I got significant improvement by turning of 'Enable Design Mode'


I had the same problems, sometimes even code autocomplete was crashing on custom classes.

I would suggest you to try to remove the .codemodel folder from your workspace ,see descriptions here: http://www.redcodelabs.com/2010/05/flash-builder-content-assist-did-not-complete-normally/

And later, to improved performance you can follow this steps: http://www.redcodelabs.com/2012/03/eclipse-speed-up-flashbuilder/


This happened when I added a model declaration to the MXML application. When I commented this out auto complete worked again.

<fx:Model id="testTextFlow">
    <flow:TextFlow version='3.0.0' xmlns:flow='http://ns.adobe.com/textLayout/2008' fontSize='11' 
        textIndent='10' paragraphSpaceBefore='6' paddingTop='8' paddingLeft='8' paddingRight='8'>
        <flow:p paragraphSpaceBefore='inherit' clearFloats='start'>
        <flow:img source="http://imgs.xkcd.com/comics/trapped.png" width="600" height="300" float="right"/>
        <flow:span>Bacon ipsum. Permanent link to this comic: http://xkcd.com/876/ Image URL (for hotlinking/embedding): http://imgs.xkcd.com/comics/trapped.png</flow:span>
        <flow:TextFlow version='3.0.0' xmlns:flow='http://ns.adobe.com/textLayout/2008' fontSize='15'>  
        <flow:p paragraphSpaceBefore='inherit' >Here is an embedded text flow.</flow:p>
        </flow:TextFlow>
        </flow:p>
    </flow:TextFlow>
</fx:Model>


Right click on a class and select 'refresh' fixed this issue for me :)

I also noticed it opens a weird second class where code hinting is not working when you click on a hyperlink to that class from a different class. If you double click the 'Class.as' file in the documents tree then it works fine. Very strange

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜