This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Scenario: * Eclipse projA depend on projB; they are imported to NB * "exported" classpath entry C is added to Eclipse projB * projB is synchronized in NB The problem is that C is not added to projA.
(Note: projC has to also be imported before synchronizing projB.) I would not expect projA to be changed when I asked to synchronize projB. Currently asking to synch projA reports that it is already up to date, which is incorrect. If however you force it - e.g. remove B from A in Eclipse, synch, readd B to A in Eclipse and synch again - then A correctly gets B and C.
Re. "projC" - or C can be exported jar file entry - it does not have to be project. Anything on eclipse project classpath can be exported. Re. "I would not expect projA to be changed when I asked to synchronize projB" - not doing so you force user to go up the project dependency tree and synch project one by one and most importantly in *correct order*. Perhaps it is artificial but in case of deeper dependencies (eg. projA <- projB <- projC <- projD) it could be really confusing for end user (eg. export jar file in projD and synch in following order: projC, projB, projA, projD; still requires to synch projC, projB and projA to propagate projD's new JAR entry) I'm starting to wonder whether per-project synchronization make sense at all. Perhaps "Sych with Eclipse" should synch all opened imported projects from Eclipse in one go. We could still trigger this action from ProjectOpenHook but coalesce it: * after IDE startup it would be called just once regardless of number of eclipse based projects; * opening a single eclipse based project would trigger synch; * we could still keep action on project's popup menu for easy discoverability; * perhaps executing action should show dialog listing all updated and all uptodate projects to make it clear what happend What do you think?
Would be great if NB simply listened to the .classpath (and whatever other metadata it cares about) of the Eclipse workspace and synched automatically whenever it detected a change. Or there could be a menu item File > Import > Resynchronize Open Projects. Would be pretty discoverable (you would have seen it when you first ran File > Import > Eclipse Workspace) but otherwise out of the way.
Synchronization rewritten to be workspace based and that resolves this issue as well. f1de3c52bf8a
Integrated into 'main-golden', available in NB_Trunk_Production #324 build Changeset: http://hg.netbeans.org/main/rev/f1de3c52bf8a User: David Konecny <dkonecny@netbeans.org> Log: #137510 - synchronization rewritten to be workspace based instead of project based