How to force workbench to query ISaveableParts [message #275600] |
Tue, 09 November 2004 15:32  |
Eclipse User |
|
|
|
Originally posted by: cebarne2.rockwellcollins.REMOVETHIS.com
I have a view that implements ISaveablePart. If I mark the view as dirty,
nothing happens regarding the workbench save icon until I switch to another
view and back to my view. It seems that when the view is brought to the
front, it notifies the workbench and the isDirty() method is called.
I would like to force the workbench to respond when I manually set the view
as dirty. I have a task list in the view. When I add a new task, I want to
set the view dirty and make the workbench change its save icon to reflect
the view's state. How can I do this? What command causes the workbench to
run this query?
Thanks,
Chad Barnes
Rockwell Collins Inc.
|
|
|
|
|
Re: How to force workbench to query ISaveableParts [message #275646 is a reply to message #275615] |
Wed, 10 November 2004 09:46  |
Eclipse User |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
FAQ 206 outlines the "rules of engagement" for Views and Editors. It is
based on 3.0
(hence the title of the book).
You are showing API introduced after 3.0 was released.
The reason was that enough people have been "breaking the rules" for Eclipse
to adapt.
Being a flexible open source project, it will support changes requested by
the community.
If you have a view that really needs a dirty state and needs to be saved
when closed,
reconsider, and see if an editor is more appropriate.
Users have expectations, and it is appropriate to abide by them.
Chris
"Chad Barnes" <cebarne2@rockwellcollins.REMOVETHIS.com> wrote in message
news:cmrq5t$sqj$1@eclipse.org...
> Chris,
>
> Thanks for the quick reply.
>
> I think I found the answer in the following thread:
>
> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg00419.html
>
> To make this work correctly, I needed to call
> firePropertyChange(ISaveablePart.PROP_DIRTY) in my setDirty() method.
>
> Are the official Eclipse 3.0 faqs still valid to say a view cannot be
dirty
> in light of this functionality?
>
> Thanks
>
> Chad Barnes
> Rockwell Collins Inc.
>
> "Chris Laffra" <Chris_Laffra@ca.ibm.com> wrote in message
> news:cmrd59$81m$1@eclipse.org...
> > You are confusing Views with Editors. Views cannot become 'dirty'.
> > Only editors can. See
http://www.eclipsefaq.org/chris/faq/html/faq206.html
> >
> > Chris
> >
> > "Chad Barnes" <cebarne2@rockwellcollins.REMOVETHIS.com> wrote in message
> > news:cmr9fj$18b$1@eclipse.org...
> > > I have a view that implements ISaveablePart. If I mark the view as
> dirty,
> > > nothing happens regarding the workbench save icon until I switch to
> > another
> > > view and back to my view. It seems that when the view is brought to
the
> > > front, it notifies the workbench and the isDirty() method is called.
> > >
> > > I would like to force the workbench to respond when I manually set the
> > view
> > > as dirty. I have a task list in the view. When I add a new task, I
> want
> > to
> > > set the view dirty and make the workbench change its save icon to
> reflect
> > > the view's state. How can I do this? What command causes the
workbench
> > to
> > > run this query?
> > >
> > > Thanks,
> > >
> > > Chad Barnes
> > > Rockwell Collins Inc.
> > >
> > >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.11049 seconds