How to close the editor if it is open when the file is deleted programmatically? [message #222066] |
Mon, 05 April 2004 12:20 |
Eclipse User |
|
|
|
Originally posted by: crscca.bol.net.in
Hi guys,
I have posted this same message previously too and didnt get any reply. I
hope someone does reply this time.
When I delete a code file using the following code from my plugin how can
I check whether the code is lying open in a editor and accordingly also
close the editor?
ICompilationUnit cu = packageFragment.getCompilationUnit(
"SomeCode.java");
if (cu.exists())
{
cu.delete(true, monitor);
}
Thanks.
P.S.: In case you can recogonize this folowing code I think need its
opposite functionality
IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
IDE.openEditor(page, file, true);
|
|
|
Powered by
FUDForum. Page generated in 0.06189 seconds