Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to close the editor if it is open when the file is deleted programmatically?
How to close the editor if it is open when the file is deleted programmatically? [message #222066] Mon, 05 April 2004 12:20
Eclipse UserFriend
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);
Previous Topic:Problem installing an Eclipse plugin (plugin1080722447937.xml)
Next Topic:servlet issue
Goto Forum:
  


Current Time: Thu Jul 10 03:50:29 EDT 2025

Powered by FUDForum. Page generated in 0.07416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top