Community
Participate
Working Groups
Build Identifier: For two remote projects that share a same header file, OpenDeclaration can't find a class decalared in the shared header file properly in one of these two projects. Reproducible: Always
The problem is becuase OpenDeclarationHandler uses a global index which contains all of projects index fragments to parse the given working copy to interpret the selection, since the hearder file is shared between two projects, two bindings (from two projects) will be found out to a selection which binds to a class declaration in the hearder file, these two bindings will be finially merged into one by CDT index binding look up process. As a result of this merge, one of bindings (from one of two projects) is lost, then OpenDeclarationHandler won't be able to interpret the selection that binds to the lost binding.
Created attachment 180778 [details] fix patch applied to org.eclipse.ptp.internal.rdt.core.miners.OpenDeclarationHandler The fix modifies OpenDeclarationHandler to use project specific index to parse the given working copy to interpret the selection.
Created attachment 180888 [details] proposed patch for remote type hierarchy
There is a similar problem for remote type hierarchy. I have attached a patch for that as well.
Update the summary since this is not an only open declaration problem.
Update Vivian's fix by update the code at server side, CDTMinner, need a workspace scope index to do the search.
Also found this problem in content assistant, search, Fix for content assist is in AbstractCompletionProposalAdapter, line 82. Fix for search: org.eclipse.ptp.internal.rdt.ui.search.actions.FindAction RemoteSearchQuery, RemoteSearchElementQuery, RemoteSearchPatternQuery, RemoteSearchTextSelectionQuery, CDTMinner - handleRunQuery
Created attachment 182077 [details] a completed patch applied to rdt.core and rct.ui This is a completed patch to fix the problem in this files: org/eclipse/ptp/internal/rdt/ui/typehierarchy/TypeHierarchyUtil.java org/eclipse/ptp/internal/rdt/ui/contentassist/AbstractCompletionProposalAdapter.java org.eclipse.ptp.internal.rdt.ui.search.actions.FindAction org.eclipse.ptp.internal.rdt.ui.callhierarchy.CHContentProvider Under package, org.eclipse.ptp.internal.rdt.core.search: RemoteSearchQuery, RemoteSearchElementQuery, RemoteSearchPatternQuery, RemoteSearchTextSelectionQuery Under package, org.eclipse.ptp.internal.rdt.core.miners: CDTMinner, RemoteIndexManager org/eclipse/ptp/internal/rdt/core/miners/OpenDeclarationHandler.java
Created attachment 182139 [details] John's patch for HEAD Modified John's patch for HEAD
Patch applied to ptp_4_0 and HEAD. Thanks John.
Created attachment 182314 [details] an updated patch to be applied on top of the previous patch Update the index acquiring lock and releasing lock sequence to keep a sequential sequence.
(In reply to comment #11) > Created an attachment (id=182314) [details] > an updated patch to be applied on top of the previous patch > > Update the index acquiring lock and releasing lock sequence to keep a > sequential sequence. Thanks John. I have applied your patch to ptp_4_0 and a modified version to HEAD.