[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-core-dev] Open Declarations for .h not in project
|
Based on CDT 1.2.1. I am using Open Declarations to open header files with declarations that are imported into the project. However, when i use Open Declaration for our SDK that is not imported into the project the header files are not opened. I know that in OpenDeclarationsAction the search is successful in both cases. When we get to the actual open call, in the first case the IMatch object contains an IResource that is really an IFile and the open succeeds. In the case of our sdk files, the resource is null, but the file i want is stored there in the IPath. I can use the following code to get an IFile from the IPath to get the file "opened" in the editor.
IPath path = element.getLocation();
Object res = ((Workspace)ResourcesPlugin.getWorkspace()).newResource(path, IResource.FILE);
IEditorPart part= EditorUtility.openInEditor(res);
Unfortunately this only gets the file tab at the top of the editor window and the editor displays the message "Resource C:/Program Files/PalmSource/Palm OS Developer Suite/sdk-6/headers/Form.h does not exist." It seems that the editor knows this file does not belong to the project. How can i get the editor to display the contents of this header file that does too exist?
-Keithen