View | Details | Raw Unified | Return to bug 172237
Collapse All | Expand All

(-)src/org/eclipse/cdt/internal/ui/search/actions/OpenDefinitionAction.java (-2 / +4 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Markus Schorn (Wind River Systems)
10
 *     Markus Schorn (Wind River Systems)
11
 *     Ed Swartz (Nokia)
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.cdt.internal.ui.search.actions;
13
package org.eclipse.cdt.internal.ui.search.actions;
13
14
Lines 88-95 Link Here
88
						IBinding binding = searchName.resolveBinding();
89
						IBinding binding = searchName.resolveBinding();
89
						if (binding != null) {
90
						if (binding != null) {
90
							final IName[] declNames = ast.getDefinitions(binding);
91
							final IName[] declNames = ast.getDefinitions(binding);
91
							if (declNames.length > 0) {
92
							for (int i = 0; i < declNames.length; i++) {
92
						    	IASTFileLocation fileloc = declNames[0].getFileLocation();
93
						    	IASTFileLocation fileloc = declNames[i].getFileLocation();
93
					    		// no source location - TODO spit out an error in the status bar
94
					    		// no source location - TODO spit out an error in the status bar
94
						    	if (fileloc != null) {
95
						    	if (fileloc != null) {
95
						    		final IPath path = new Path(fileloc.getFileName());
96
						    		final IPath path = new Path(fileloc.getFileName());
Lines 105-110 Link Here
105
						    				}
106
						    				}
106
						    			}
107
						    			}
107
						    		});
108
						    		});
109
						    		break;
108
						    	}
110
						    	}
109
							}
111
							}
110
						}
112
						}
(-)src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java (-3 / +5 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Markus Schorn (Wind River Systems)
10
 *     Markus Schorn (Wind River Systems)
11
 *     Ed Swartz (Nokia)
11
 *******************************************************************************/
12
 *******************************************************************************/
12
13
13
package org.eclipse.cdt.internal.ui.search.actions;
14
package org.eclipse.cdt.internal.ui.search.actions;
Lines 96-104 Link Here
96
										findDefinitions(index, ast, binding) :
97
										findDefinitions(index, ast, binding) :
97
										findDeclarations(index, ast, binding);
98
										findDeclarations(index, ast, binding);
98
							}
99
							}
99
							
100
100
							if (declNames.length > 0) {
101
							for (int i = 0; i < declNames.length; i++) {
101
								IASTFileLocation fileloc = declNames[0].getFileLocation();
102
								IASTFileLocation fileloc = declNames[i].getFileLocation();
102
								if (fileloc != null) {
103
								if (fileloc != null) {
103
									final IPath path = new Path(fileloc.getFileName());
104
									final IPath path = new Path(fileloc.getFileName());
104
									final int offset = fileloc.getNodeOffset();
105
									final int offset = fileloc.getNodeOffset();
Lines 113-118 Link Here
113
											}
114
											}
114
										}
115
										}
115
									});
116
									});
117
									break;
116
								}
118
								}
117
							}
119
							}
118
						}
120
						}

Return to bug 172237