Community
Participate
Working Groups
I have a project that adds a jar file to its Libraries tab which adds the jar to the build path. When I recompile this jar elsewhere, and copying it overtop the file being referenced by the project, the path is not properly updated. Nothing I can do will get this path to update short of removing and readding the jar in the libraries page. Some things are recognized, but some things are not. That is, some aspects of the change of the jar are noticed. I think maybe the code completions are not, and some other thigns because I get red dots that I can not get rid of. Refresh does not fix it. I will try to be more specific when I change my library again.
Could you please: - be more specific about the problems you get; - single out one scenario that leads to those problems. Another thing of interest is the nature of the changes in a) the jar file b) your workspace (no change?).
I knew I needed to provide more info. I just wanted to enter it before I started digging in case it was a dupe. So here we go... This happens on plugin projects. It does not happen on standard Java projects. 1. Have a plugin project that has a jar file on its libraries tab. 2. Go to the creator of that jar file's project, and add a new method to one of its classes. 3. Export the jar file ontop of the one in the plugin project's libraries tab. 4. Attempt to refence the new method, or simply open the jar listed in the package explorer and notice the new method is not listed. Again, this does not happen on a standard java project. The new method is instantly available. on a plugin project it does not appear until the jar file is removed as a library and readded.
Did you try to 'refresh' the project or the jar file explicitly ?
yes.
I could reproduce a behavior that looks like what is described here with M20060921-0945, provided that I leave autobuild off. What is your setting for Project/Build Automatically?
Sometimes I use autobuild, sometimes I do not. Mostly it is on though. And it would have been on during these incidents. Note that even a manual build will not fix this. Only a remove and readd of the jar to the project.
Reproduced: - build M20060921-0945, autobuild off; - created Java project P1, separated src and bin dir; - created class p.Main in P1 with method public void foo(); saved and built; - created plugin project P2 with activator and Java project, no template; - exported P1 as p1.jar at the root of P2; - edited P2/META-INF/MANIFEST.MF; - navigated to Runtime tab; added p1.jar to the Classpath entries; - saved everything and built; - opened P2/p2/Activator.java; placed the cursor into the constructor; typed new p.Main().f and hit Ctrl-Space; got foo() proposed; accepted, saved, built; - added method bar() into Main; saved and built; exported P1 over P2/p1.jar; - placed the cursor behind p.Main(). in the activator constructor and hit Ctrl-Space, no bar proposed; - refreshed P2, pressed the build button; - placed the cursor behind p.Main(). in the activator constructor and hit Ctrl-Space again, no bar proposed. Deploying p1.jar node under P2 only shows one method (foo) and one constructor (the default one) within Main.class.
Restarting Eclipse makes bar show up in the class.
Interesting. Ill have to see if its more convenient a workaround to restart eclipse or remove/add the jar file. Could you not reproduce this with autobuild on?
Not tried yet. Will see what 3.2.2 and 3.3 M6 do first.
3.2.2 (build M20070212-1330) and 3.3 (build I20070323-1616) behave OK on the test case above. I hence searched for a dup. Bug 162621 has a lots of duplicates, some of which having the very same symptoms as this one. Closing as duplicate. *** This bug has been marked as a duplicate of bug 162621 ***
This is not a duplicate. It could turn out to be related, but that has not been determined yet. Bug 162621 Autobuild off Java project Bug 174833 Autobuild on Plugin project Not the same. Bug 174833 does not even occur on Java projects. The test case you created is designed to reproduce bug 162621. It does not follow the guidelines I laid out for this bug which is 'autobuild on' and 'plugin project.'
Bug 162621 is a JavaModel cache issue which affects code assist, etc. It does not affect the Java builder/compiler. Please be more specific about the problems you are seeing. Do the red X's have corresponding problems in the Problems view or do the problems just appear in the editor margin? Does code assist show the newly added methods?
code assist does not show the new or changed method. Opening the jar in the project view will not list the new method.
IIRC, it was more of a code assist issue than a build issue. They certainly both could be fixed by that patch. When that is available I will be happy to test.
3.2.2 has been available for a couple months. You can download 3.2.2 or the latest 3.3M6 build right now and try it. So you're not experiencing any build/compile problems? You can compile a reference to a newly added method & run the code, but it appears missing in the editor? If so then your problem is likely fixed by bug 162621
downloading. When I looked at the list of bugs fixed in 3.2.2 I did not see any that I thought woudld impact me. I guess I miseed that one.
(In reply to comment #12) > This is not a duplicate. I believe it is, because the symptoms look very much the same as other bugs that have been declared as duplicates of 162621. > It could turn out to be related, but that has not > been determined yet. > > Bug 162621 > Autobuild off > Java project > > Bug 174833 > Autobuild on > Plugin project > > Not the same. Bug 174833 does not even occur on Java projects. The test case > you created is designed to reproduce bug 162621. In earnest, no. I created a test case to attempt to reproduce this bug. I reproduced it on 3.2.1, then I tested on 3.2.2 and 3.3, which both worked, hence I digged into bugzilla to find out which (set of) bug(s) could have motivated the fix. However, if you prefer so and unless you find out that 3.2.2 still causes you grief in the same manner, I'll close this as WORKSFORME.
I understand what you attempted to do. But look at what you actually did. You created a scenario that perfectly matches how to reproduce bug 162621. What you created violates the the reproduction I gave for this bug in 2 ways. You know thats not fair. I consider these very different in the sense that I was not able to get my bug to occur on Java projects, and that other bug specifically occurs on Java projects. Anyway, I will test this by Monday and if its fixed in 3.2.2 I will close it as a duplicate if that is fine with everyone. If not I will state my results here.
So what did you find?
Adding needinfo keyword. Please note that we cannot proceed without further input.
Yes of course. I am still here. Just busy. Will test ASAP.
Great, thx.
After retesting I realized that my plugin project references two jars hibServerCore-5.1-0.jar hibServerCoreSrc-5.1-0.jar With the source in the 2nd jar. I was updating the first jar, but not the 2nd jar. This caused the code assist feature to not see the method. The method does show when the jar file is expanded under the project that is importing it. I recall that not happening before. I am probably missing something, but in any event I do think the source of this was my mistake.
Thanks for the update.
Verified for 3.3M7.