Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to close editor when file is deleted programatically
How to close editor when file is deleted programatically [message #220763] Fri, 02 April 2004 11:12
Eclipse UserFriend
Originally posted by: crscca.bol.net.in

Hi,

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:How do I get DirectoryDialog to appear during Install?
Next Topic:Problem with Eclipse 3.0 M8 and debug mode : please help!!!
Goto Forum:
  


Current Time: Mon Jul 14 20:04:09 EDT 2025

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

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

Back to the top