Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Eclipse Foundation » Deleting IFile instance
Deleting IFile instance [message #38186] Mon, 07 August 2006 12:13 Go to next message
Eclipse UserFriend
Originally posted by: nagel.trium.de

Hi all,

In my RCP application I want to delete an IFile instance by calling its
delete() method. If the file was changed (in an editor) before, I always
get a ResourceException and the file is not deleted. Is it possible to
force the deletion?

Thanks in advance,
Lars
Re: Deleting IFile instance [message #38222 is a reply to message #38186] Mon, 07 August 2006 12:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lars,

Ask general questions like this on the platform newsgroup. I know that
delete fails if the file in the workspace is out of sync with the file
system, so maybe you just need to refresh it. (See
IResource.isSynchronized/refreshLocal.) Is your editor saving using the
workspace API or is it saving directly to the file system? The later
would cause a problem like this.


Lars Nagel wrote:
> Hi all,
>
> In my RCP application I want to delete an IFile instance by calling
> its delete() method. If the file was changed (in an editor) before, I
> always get a ResourceException and the file is not deleted. Is it
> possible to force the deletion?
>
> Thanks in advance,
> Lars
>
Re: Deleting IFile instance [message #38252 is a reply to message #38222] Mon, 07 August 2006 13:50 Go to previous message
Eclipse UserFriend
Originally posted by: nagel.trium.de

Ed Merks wrote:

> Lars,

> Ask general questions like this on the platform newsgroup. I know that

Okay, thanks.

> delete fails if the file in the workspace is out of sync with the file
> system, so maybe you just need to refresh it. (See

It is in sync, and I also set the FORCE flag.

> IResource.isSynchronized/refreshLocal.) Is your editor saving using the
> workspace API or is it saving directly to the file system? The later
> would cause a problem like this.

I use AbstractTextEditor.doSave(null).




> Lars Nagel wrote:
>> Hi all,
>>
>> In my RCP application I want to delete an IFile instance by calling
>> its delete() method. If the file was changed (in an editor) before, I
>> always get a ResourceException and the file is not deleted. Is it
>> possible to force the deletion?
>>
>> Thanks in advance,
>> Lars
>>
Previous Topic:members not meeting the engagements
Next Topic:"NoClassDefFoundError" when use the ant in eclipse
Goto Forum:
  


Current Time: Fri Apr 19 07:41:46 GMT 2024

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

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

Back to the top