Community
Participate
Working Groups
Build ID: 3.3.2 Steps To Reproduce: 1. Create a Java Class Ca in package pa in Java Project JP 2. Ensure that the Project Explorer has either not been activated or at the very least, the JP node has not been expanded to reveal Ca. 3. Execute code indicated below using the IType handle representing Ca as the selection RESULT: Project Explorer view is created / given focus but JP is not expanded to reveal Ca. 4. Now manually expand JP to reveal Ca. Select any element on the Project Explorer. 5. Re-execute Step 3. RESULT: Ca is now selected. *Requires an Action / client code that uses ISetSelectionTarget.selectReveal(<selection containing JDT IType>) on the Project Explorer view (org.eclipse.ui.navigator.ProjectExplorer). More information: The problem appears to be in AbstractTreeViewer.internalExpand(Object elementOrPath, boolean expand) where after recursively going up the parent path to Workspace root ... it is unable to obtain a widget for the project (JP in this example).
Any estimate on when this would be resolved? This is blocking customer requested functionality for us.
Can you verify this is still happening in 3.4? I tried link with editor using the project exlorer in 3.4 and closed the Java project and selected the file contained in that project in the editor and it worked fine. It uses a similar method calling selectReveal() on the CommonNavigator. If it's still a problem and you really want it fixed quickly, submit a patch for a test case for this in org.eclipse.ui.tests.navigator.
Created attachment 124895 [details] Suggested patch The problem is the CNF cannot resolve the parent of the java element because of a mis configuration. The possibleChildren need to include anything for which a parent is sought.
*** This bug has been marked as a duplicate of bug 275847 ***