Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Resource change listener interface for deleted IFiles
Resource change listener interface for deleted IFiles [message #326107] Fri, 07 March 2008 12:00 Go to next message
Eclipse UserFriend
Originally posted by: chandra.mayamuthu.gmail.com

Hi All,
This is about handling deleted files in Eclipse workspace. My
requirement is, I have my own Resource navigator and need to show the
deleted files in RED color. That means, once we delete the file the
corresponding resource change event will be fired to the listeners and the
listeners will handle the resource change event. For delete event case, we
will not have the file physically and will get the state of the IFile from
the last saved state. If then as per my requirement, I have to show the
same IFile node in a resource navigator tree though the file is not
physically present. I tried to touch the ResourceChangeListener interface,
where we will get the ResouceDelta of the deleted IFile. But it's not
working out. Can any one help me out in this? Main point is , I should not
have my own java object to replace deleted IFile, instead I should be able
to play with the same IFile.


Thanks,
Chandra M
Re: Resource change listener interface for deleted IFiles [message #326120 is a reply to message #326107] Fri, 07 March 2008 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Chandra,

Things like IFile instances are handles and they don't necessarily need
to correspond to an existing resource. That's why there is an exists()
method. But of course the parent IFolder won't know about your desire
to show an IFile that doesn't exactly exist anymore so I don't know how
you are specializing the navigator to show what you desire. And of
course if you try to open an editor for a file that doesn't exists, the
editor won't like that either. You need to be more explicit about what
aspect of resource change listening isn't working out to get help with that.


Chandra wrote:
> Hi All,
> This is about handling deleted files in Eclipse workspace. My
> requirement is, I have my own Resource navigator and need to show the
> deleted files in RED color. That means, once we delete the file the
> corresponding resource change event will be fired to the listeners and
> the listeners will handle the resource change event. For delete event
> case, we will not have the file physically and will get the state of
> the IFile from the last saved state. If then as per my requirement, I
> have to show the same IFile node in a resource navigator tree though
> the file is not physically present. I tried to touch the
> ResourceChangeListener interface, where we will get the ResouceDelta
> of the deleted IFile. But it's not working out. Can any one help me
> out in this? Main point is , I should not have my own java object to
> replace deleted IFile, instead I should be able to play with the same
> IFile.
>
>
> Thanks,
> Chandra M
>
Re: Resource change listener interface for deleted IFiles [message #326991 is a reply to message #326107] Fri, 04 April 2008 04:57 Go to previous message
Vladimir Grishchenko is currently offline Vladimir GrishchenkoFriend
Messages: 104
Registered: July 2009
Senior Member
Phantom resources may be of some use for what you're trying to do. Have a
look at IResource's javadoc. There is also pluggable filesystems, can
potentially be helpful as well.

Cheers,
V.


"Chandra " <chandra.mayamuthu@gmail.com> wrote in message
news:bc2d863a58317e8416b6b2fc5f6cfcff$1@www.eclipse.org...
> Hi All,
> This is about handling deleted files in Eclipse workspace. My
> requirement is, I have my own Resource navigator and need to show the
> deleted files in RED color. That means, once we delete the file the
> corresponding resource change event will be fired to the listeners and the
> listeners will handle the resource change event. For delete event case, we
> will not have the file physically and will get the state of the IFile from
> the last saved state. If then as per my requirement, I have to show the
> same IFile node in a resource navigator tree though the file is not
> physically present. I tried to touch the ResourceChangeListener interface,
> where we will get the ResouceDelta of the deleted IFile. But it's not
> working out. Can any one help me out in this? Main point is , I should not
> have my own java object to replace deleted IFile, instead I should be able
> to play with the same IFile.
>
>
> Thanks,
> Chandra M
>
Previous Topic:NoClassDefFoundError for IImportStructureProvider
Next Topic:managing multiple platform specific eclipse SDKs :
Goto Forum:
  


Current Time: Sun Oct 06 07:36:27 GMT 2024

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

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

Back to the top