Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » catching the "close editor" event.
catching the "close editor" event. [message #4653] Tue, 22 April 2003 16:50 Go to next message
Eclipse UserFriend
Originally posted by: kfarnand.bowstreet.com

news://news.eclipse.org:119/3E967A4F.3060506@es.ibm.com
news://news.eclipse.org:119/aq62a1$mg5$1@rogue.oti.com
news://news.eclipse.org:119/aich2g$ogr$1@rogue.oti.com
.......

The above messages reference this topic but don't have an answer.

I am trying to catch the closing of an editor (that extends EditorPart).
According to my interpretation of the javadoc, I should be able to
handle it by overwriting the isSaveNeededOnClose() method (from
EditorPart). I have set a break point in this overwritten method but it
is never hit. news://news.eclipse.org:119/3E967A4F.3060506@es.ibm.com
news://news.eclipse.org:119/aq62a1$mg5$1@rogue.oti.com
news://news.eclipse.org:119/aich2g$ogr$1@rogue.oti.com
.......

The above messages reference this topic but don't have a good answer.

I am trying to catch the closing of an editor (that extends EditorPart).
According to my interpretation of the javadoc, I should be able to
handle it by overwriting the isSaveNeededOnClose() method (from
EditorPart). I have set a break point in this overwritten method but it
is never hit. Is there some event I can be listening for instead?

Here is javadoc:

public boolean isSaveOnCloseNeeded()
Description copied from interface: IEditorPart
Returns whether the contents of this editor should be saved when the
editor is closed.
Re: catching the "close editor" event. [message #6170 is a reply to message #4653] Wed, 23 April 2003 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kfarnand.bowstreet.com

Woops, let me clean that up.

I am trying to catch the closing of an editor (that extends EditorPart).
According to my interpretation of the javadoc, I should be able to
handle it by overwriting the isSaveNeededOnClose() method (from
EditorPart). I have set a break point in this overwritten method but it
is never hit. Is there some event I can be listening for instead?

kyle farnand wrote:
> news://news.eclipse.org:119/3E967A4F.3060506@es.ibm.com
> news://news.eclipse.org:119/aq62a1$mg5$1@rogue.oti.com
> news://news.eclipse.org:119/aich2g$ogr$1@rogue.oti.com
> ......
>
> The above messages reference this topic but don't have an answer.
>
> I am trying to catch the closing of an editor (that extends EditorPart).
> According to my interpretation of the javadoc, I should be able to
> handle it by overwriting the isSaveNeededOnClose() method (from
> EditorPart). I have set a break point in this overwritten method but it
> is never hit. news://news.eclipse.org:119/3E967A4F.3060506@es.ibm.com
> news://news.eclipse.org:119/aq62a1$mg5$1@rogue.oti.com
> news://news.eclipse.org:119/aich2g$ogr$1@rogue.oti.com
> ......
>
> The above messages reference this topic but don't have a good answer.
>
> I am trying to catch the closing of an editor (that extends EditorPart).
> According to my interpretation of the javadoc, I should be able to
> handle it by overwriting the isSaveNeededOnClose() method (from
> EditorPart). I have set a break point in this overwritten method but it
> is never hit. Is there some event I can be listening for instead?
>
> Here is javadoc:
>
> public boolean isSaveOnCloseNeeded()
> Description copied from interface: IEditorPart
> Returns whether the contents of this editor should be saved when the
> editor is closed.
>
Re: catching the "close editor" event. [message #6227 is a reply to message #6170] Wed, 23 April 2003 10:53 Go to previous message
Eclipse UserFriend
Originally posted by: mccull1.does.not.like.spam.us.ibm.com

Look at the IPartListener and IPartService. It will notify you anytime a
view/editor is opened, closed, activated or deactivated. An "instanceof
IEditorPart" check will tell you if it is an Editor in the partClosed()
callback.

The EditorService class in TabNavigator
(http://sourceforge.net/projects/zclipse) uses the part service to listen
for all editor openings.

-Andrew


"kyle farnand" <kfarnand@bowstreet.com> wrote in message
news:b863qv$37s$1@rogue.oti.com...
> Woops, let me clean that up.
>
> I am trying to catch the closing of an editor (that extends EditorPart).
> According to my interpretation of the javadoc, I should be able to
> handle it by overwriting the isSaveNeededOnClose() method (from
> EditorPart). I have set a break point in this overwritten method but it
> is never hit. Is there some event I can be listening for instead?
>
> kyle farnand wrote:
> > news://news.eclipse.org:119/3E967A4F.3060506@es.ibm.com
> > news://news.eclipse.org:119/aq62a1$mg5$1@rogue.oti.com
> > news://news.eclipse.org:119/aich2g$ogr$1@rogue.oti.com
> > ......
> >
> > The above messages reference this topic but don't have an answer.
> >
> > I am trying to catch the closing of an editor (that extends EditorPart).
> > According to my interpretation of the javadoc, I should be able to
> > handle it by overwriting the isSaveNeededOnClose() method (from
> > EditorPart). I have set a break point in this overwritten method but it
> > is never hit. news://news.eclipse.org:119/3E967A4F.3060506@es.ibm.com
> > news://news.eclipse.org:119/aq62a1$mg5$1@rogue.oti.com
> > news://news.eclipse.org:119/aich2g$ogr$1@rogue.oti.com
> > ......
> >
> > The above messages reference this topic but don't have a good answer.
> >
> > I am trying to catch the closing of an editor (that extends EditorPart).
> > According to my interpretation of the javadoc, I should be able to
> > handle it by overwriting the isSaveNeededOnClose() method (from
> > EditorPart). I have set a break point in this overwritten method but it
> > is never hit. Is there some event I can be listening for instead?
> >
> > Here is javadoc:
> >
> > public boolean isSaveOnCloseNeeded()
> > Description copied from interface: IEditorPart
> > Returns whether the contents of this editor should be saved when the
> > editor is closed.
> >
>
Previous Topic:How to contribute Eclipse development?
Next Topic:Dynamic file associations in the workbench
Goto Forum:
  


Current Time: Thu May 08 03:15:16 EDT 2025

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

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

Back to the top