1
0
Fork 0
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:
Doug Schaefer 2006-05-01 01:58:05 +00:00
parent 34ff5e15b0
commit 8dc786af3b

View file

@ -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);
}
}
});
}
}
}