Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse editor(Closing eclipse custom editor problem)
Eclipse editor [message #762706] Thu, 08 December 2011 14:29 Go to next message
roman  is currently offline roman Friend
Messages: 8
Registered: December 2010
Junior Member
So I have a Mulitipart Editor which I use to edit the files of the type *.event
I need to achieve the functionality : when the file is deleted and open in the editor, the editor is close.
I wrote a EventResourceChangeListener to listen to the delete event and at that point invoke the Editor.close(). however if there are more tahn one *.event files are opened , then all these files are closed and not only the deleted filed, and this is because the Editor instance is same for all the files opened,
What shall I do ?

[Updated on: Thu, 08 December 2011 14:31]

Report message to a moderator

Re: Eclipse editor [message #762713 is a reply to message #762706] Thu, 08 December 2011 14:39 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Which editor close are you invoking? You would need to search for the IEditorReference that has the IEditorInput (that implements IFileEditorInput) that matches your specific .event resource.

PW


Re: Eclipse editor [message #762793 is a reply to message #762713] Thu, 08 December 2011 16:20 Go to previous message
roman  is currently offline roman Friend
Messages: 8
Registered: December 2010
Junior Member
Two things ,
I was watching the constructor for my editor and it was only invoked once, hence no many how many files i open, they seam to share the same Editor instance.
Hence I am back to where I started ?
Maybe I am wrong in my assumption >?
Also : How would I search for editor that matches my specific .event
Regards
Previous Topic:Runtime defined "Pluglet" functionality
Next Topic:Creating problem markers referring to files outside workspace
Goto Forum:
  


Current Time: Thu Apr 25 14:05:48 GMT 2024

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

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

Back to the top