mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Fixed Open Declaration to look at PDOM Bindings.
This commit is contained in:
parent
34ff5e15b0
commit
8dc786af3b
1 changed files with 12 additions and 0 deletions
|
@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
|||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditorMessages;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
@ -73,6 +74,17 @@ public class OpenDeclarationsAction extends SelectionParseAction {
|
|||
}
|
||||
};
|
||||
});
|
||||
} else if (binding instanceof PDOMBinding) {
|
||||
final IASTName name = ((PDOMBinding)binding).getFirstDeclaration();
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
open(name);
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.getDefault().log(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue