[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
getting handles to Java files
|
HI,
Im trying to get a handle on the Java files in the CompilationUnitEditor
(the eclipse java editor), so that I can extract information about variables
in the class thats in the editor, and about scope-general debugging type
info. Ive tried creating a File object, like so:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActi
veEditor().getEditorInput().getAdapter(IFile.class)
and then I wanted to cast that to an ICompilationUnit, or some other way
create the latter from the former. But the JavaElement class and its
extenders all have protected constructors.
So how does one get the CompliationUnit from the editor currently active?
Thanks.