Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 57856 Details for
Bug 172237
[patch] [navigation] Try harder to find resolvable declaration/definition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for described solution
172237-open-decl-defn-actions-try-all-candidates.patch (text/plain), 3.06 KB, created by
Ed Swartz
on 2007-01-30 16:04:02 EST
(
hide
)
Description:
Patch for described solution
Filename:
MIME Type:
Creator:
Ed Swartz
Created:
2007-01-30 16:04:02 EST
Size:
3.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.ui >Index: src/org/eclipse/cdt/internal/ui/search/actions/OpenDefinitionAction.java >=================================================================== >RCS file: /n/cdt/joey_40/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDefinitionAction.java,v >retrieving revision 1.1 >diff -u -r1.1 OpenDefinitionAction.java >--- src/org/eclipse/cdt/internal/ui/search/actions/OpenDefinitionAction.java 24 Jan 2007 16:24:19 -0000 1.1 >+++ src/org/eclipse/cdt/internal/ui/search/actions/OpenDefinitionAction.java 29 Jan 2007 21:02:05 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Markus Schorn (Wind River Systems) >+ * Ed Swartz (Nokia) > *******************************************************************************/ > package org.eclipse.cdt.internal.ui.search.actions; > >@@ -88,8 +89,8 @@ > IBinding binding = searchName.resolveBinding(); > if (binding != null) { > final IName[] declNames = ast.getDefinitions(binding); >- if (declNames.length > 0) { >- IASTFileLocation fileloc = declNames[0].getFileLocation(); >+ for (int i = 0; i < declNames.length; i++) { >+ IASTFileLocation fileloc = declNames[i].getFileLocation(); > // no source location - TODO spit out an error in the status bar > if (fileloc != null) { > final IPath path = new Path(fileloc.getFileName()); >@@ -105,6 +106,7 @@ > } > } > }); >+ break; > } > } > } >Index: src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java >=================================================================== >RCS file: /n/cdt/joey_40/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java,v >retrieving revision 1.1 >diff -u -r1.1 OpenDeclarationsAction.java >--- src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java 24 Jan 2007 16:24:19 -0000 1.1 >+++ src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java 29 Jan 2007 21:02:05 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Markus Schorn (Wind River Systems) >+ * Ed Swartz (Nokia) > *******************************************************************************/ > > package org.eclipse.cdt.internal.ui.search.actions; >@@ -96,9 +97,9 @@ > findDefinitions(index, ast, binding) : > findDeclarations(index, ast, binding); > } >- >- if (declNames.length > 0) { >- IASTFileLocation fileloc = declNames[0].getFileLocation(); >+ >+ for (int i = 0; i < declNames.length; i++) { >+ IASTFileLocation fileloc = declNames[i].getFileLocation(); > if (fileloc != null) { > final IPath path = new Path(fileloc.getFileName()); > final int offset = fileloc.getNodeOffset(); >@@ -113,6 +114,7 @@ > } > } > }); >+ break; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 172237
: 57856