Community
Participate
Working Groups
Build Identifier: 20110218-0911 We created a plugin project (using the "Plugin with an incremental project builder" template). In each build we look at all new or modified java files and create the AST of them using the ASTParser. Afterwards our AST visitor (SampleASTVisitor) walks over the AST and checks the bindings of constructor invocations. When we copy files with constructor calls to non-public classes which are definied in another compilationunit (see the attached example code) the bindings for these constructor invocations is null, although the code does not contain syntax errors. If we force a full build (for example by a clean), these bindings are resolved and not null. This would be the expected result in the step before. Reproducible: Always Steps to Reproduce: 1. load attached project "SampleProject" to your workspace 2. Run project as eclipse application 3. create empty java project in the runtime workspace 4. add Sample nature to the project 5. copy attached test code to the java project 6. now a message appears in the console, which says, that the binding is null
Created attachment 195344 [details] Plugin Project mentioned in the desription
Created attachment 195345 [details] Testcode which should be added to the runtime workspace
If I attach the test code in a source folder, I don't see any problem.
Satyam, please follow up.
Maybe our description was not clear, steph 5 should be: 5. drag and drop the test code from windows explorer to the java project in eclipse the message, saying that the binding is null should always appear if you do it like this
(In reply to comment #5) > Maybe our description was not clear, steph 5 should be: > 5. drag and drop the test code from windows explorer to the java project in > eclipse > > the message, saying that the binding is null should always appear if you do it > like this Are you having the problem even if you drag and drop to a source folder of the java project?
yes, i tested it with a source folder. can you try to delete the files from your project and then copy them again? then the message should appear.
any news? can you reproduce the problem?
(In reply to comment #8) > any news? can you reproduce the problem? Sorry for the delay. Yes, I am able to reproduce the problem when copying from the windows explorer. If used by importing the file system, it works good. This is a timing issues. Compiler gets the list of the secondary types from the search module and the indexing runs in another thread and if that isn't ready, we seem to end up in this problem. I will investigate further.
AST creation doesn't wait for indexing to complete causing this problem. One way to fix is by waiting for the indexing to complete, which will cause considerable performance degradation. I will see if I can find a fix, but that looks to be hard :(. A workaround is to call a dummy search.
(In reply to comment #10) > AST creation doesn't wait for indexing to complete causing this problem. One > way to fix is by waiting for the indexing to complete, which will cause > considerable performance degradation. I will see if I can find a fix, but that > looks to be hard :(. > > A workaround is to call a dummy search. or even wait for a while!
thx for your effort, we will try the workaround
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.