| Home » Eclipse Projects » GEF » Property change does not make the editor dirty
 Goto Forum:| 
| Property change does not make the editor dirty [message #85548] | Thu, 26 June 2003 11:42  |  | 
| Eclipse User  |  |  |  |  | I have looked at the Logic example, I dont see any special handling to make the editor dirty when a property changes. But yet magically this
 seems to happen. I have done the same, but the property change does not
 make the editor dirty in my case.
 
 any ideas?
 |  |  |  |  |  |  | 
| Re: Property change does not make the editor dirty [message #85683 is a reply to message #85583] | Thu, 26 June 2003 18:44   |  | 
| Eclipse User  |  |  |  |  | Randy Hudson wrote: 
 > A property change is an executed command, which dirties the editor.
 > look for getAdapter(IPropertySheetPage.class) on IEditorPart
 
 > "Naveen Valluri" <naveen.valluri@commerceone.com> wrote in message
 > news:bdf49f$l8o$1@rogue.oti.com...
 > > I have looked at the Logic example, I dont see any special handling to
 > > make the editor dirty when a property changes. But yet magically this
 > > seems to happen. I have done the same, but the property change does not
 > > make the editor dirty in my case.
 > >
 > > any ideas?
 > >
 
 But, I'm still not sure how it gets invoked. In my case, I change a
 property value, which firesPropertyChange, but it is still not making the
 editor dirty. I have tried to step through and the only noticeable
 difference is that, in the logic example the celleditor has the
 UndoablePropertySheetEntry as a listener. In my case the propertysheet
 entry class is the listener. Even this is not set by me. So what gets
 invoked is it governed by the edit policies, edit part or the editor.
 
 since the graphical editor class already has the getAdapter method's
 default implementation, I'm assuming it should get called and make the
 editor dirty.
 
 regards,
 Naveen
 |  |  |  |  | 
| Re: Property change does not make the editor dirty [message #85703 is a reply to message #85683] | Thu, 26 June 2003 19:14   |  | 
| Eclipse User  |  |  |  |  | applyEditorValue() in UndoablePropertySheetEntry gets called when the value is changed.  This method calls setValue(...) which calls valueChanged(...).  The
 valueChanged(...) method creates a command which gets executed on the command
 stack, dirtying the editor.
 
 Naveen Valluri wrote:
 > Randy Hudson wrote:
 >
 >
 >>A property change is an executed command, which dirties the editor.
 >>look for getAdapter(IPropertySheetPage.class) on IEditorPart
 >
 >
 >>"Naveen Valluri" <naveen.valluri@commerceone.com> wrote in message
 >>news:bdf49f$l8o$1@rogue.oti.com...
 >>
 >>>I have looked at the Logic example, I dont see any special handling to
 >>>make the editor dirty when a property changes. But yet magically this
 >>>seems to happen. I have done the same, but the property change does not
 >>>make the editor dirty in my case.
 >>>
 >>>any ideas?
 >>>
 >
 >
 > But, I'm still not sure how it gets invoked. In my case, I change a
 > property value, which firesPropertyChange, but it is still not making the
 > editor dirty. I have tried to step through and the only noticeable
 > difference is that, in the logic example the celleditor has the
 > UndoablePropertySheetEntry as a listener. In my case the propertysheet
 > entry class is the listener. Even this is not set by me. So what gets
 > invoked is it governed by the edit policies, edit part or the editor.
 >
 > since the graphical editor class already has the getAdapter method's
 > default implementation, I'm assuming it should get called and make the
 > editor dirty.
 >
 > regards,
 > Naveen
 >
 >
 >
 >
 >
 |  |  |  |  |  |  | 
| Re: Property change does not make the editor dirty [message #85848 is a reply to message #85683] | Fri, 27 June 2003 14:25   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: jwoods.journee.com 
 HOW are you changing the property value?  If you do it through the property
 sheet, then it will be done with a command run on the editor's command stack
 (which makes the editor dirty - unless your editor is broken somehow).  If
 you are changing the value somehow else (not doing the change through a
 command run through the editor's command stack) - then that's your problem.
 
 If you ARE changing the property through the prop sheet, make sure you have
 something like the following in your editor's getAdapter() method:
 
 if (type == org.eclipse.ui.views.properties.IPropertySheetPage.class)
 
 {
 
 PropertySheetPage page = new PropertySheetPage();
 
 
 page.setRootEntry(new UndoablePropertySheetEntry(getCommandStack()));
 
 return page;
 
 }
 
 - Jason
 
 
 "Naveen Valluri" <naveen.valluri@commerceone.com> wrote in message
 news:bdft0r$c9j$1@rogue.oti.com...
 > Randy Hudson wrote:
 >
 > > A property change is an executed command, which dirties the editor.
 > > look for getAdapter(IPropertySheetPage.class) on IEditorPart
 >
 > > "Naveen Valluri" <naveen.valluri@commerceone.com> wrote in message
 > > news:bdf49f$l8o$1@rogue.oti.com...
 > > > I have looked at the Logic example, I dont see any special handling to
 > > > make the editor dirty when a property changes. But yet magically this
 > > > seems to happen. I have done the same, but the property change does
 not
 > > > make the editor dirty in my case.
 > > >
 > > > any ideas?
 > > >
 >
 > But, I'm still not sure how it gets invoked. In my case, I change a
 > property value, which firesPropertyChange, but it is still not making the
 > editor dirty. I have tried to step through and the only noticeable
 > difference is that, in the logic example the celleditor has the
 > UndoablePropertySheetEntry as a listener. In my case the propertysheet
 > entry class is the listener. Even this is not set by me. So what gets
 > invoked is it governed by the edit policies, edit part or the editor.
 >
 > since the graphical editor class already has the getAdapter method's
 > default implementation, I'm assuming it should get called and make the
 > editor dirty.
 >
 > regards,
 > Naveen
 >
 >
 >
 >
 >
 |  |  |  |  | 
| Re: Property change does not make the editor dirty [message #86290 is a reply to message #85703] | Wed, 02 July 2003 01:50  |  | 
| Eclipse User  |  |  |  |  | Eric Bordeau wrote: 
 > applyEditorValue() in UndoablePropertySheetEntry gets called when the value
 is
 > changed.  This method calls setValue(...) which calls valueChanged(...).
 The
 > valueChanged(...) method creates a command which gets executed on the
 command
 > stack, dirtying the editor.
 
 > Naveen Valluri wrote:
 > > Randy Hudson wrote:
 > >
 > >
 > >>A property change is an executed command, which dirties the editor.
 > >>look for getAdapter(IPropertySheetPage.class) on IEditorPart
 > >
 > >
 > >>"Naveen Valluri" <naveen.valluri@commerceone.com> wrote in message
 > >>news:bdf49f$l8o$1@rogue.oti.com...
 > >>
 > >>>I have looked at the Logic example, I dont see any special handling to
 > >>>make the editor dirty when a property changes. But yet magically this
 > >>>seems to happen. I have done the same, but the property change does not
 > >>>make the editor dirty in my case.
 > >>>
 > >>>any ideas?
 > >>>
 > >
 > >
 > > But, I'm still not sure how it gets invoked. In my case, I change a
 > > property value, which firesPropertyChange, but it is still not making the
 > > editor dirty. I have tried to step through and the only noticeable
 > > difference is that, in the logic example the celleditor has the
 > > UndoablePropertySheetEntry as a listener. In my case the propertysheet
 > > entry class is the listener. Even this is not set by me. So what gets
 > > invoked is it governed by the edit policies, edit part or the editor.
 > >
 > > since the graphical editor class already has the getAdapter method's
 > > default implementation, I'm assuming it should get called and make the
 > > editor dirty.
 > >
 > > regards,
 > > Naveen
 > >
 > >
 > >
 > >
 > >
 
 
 Thanks a ton guys!. The problem was that my root editor was a multipage
 editor which was calling someother getAdapter method, I was expecting the
 active editor's getAdapter method to be called. The problem got fixed,
 when I added the getAdapter method my multipage editor.
 
 regards,
 Naveen
 |  |  |  | 
 
 
 Current Time: Fri Oct 31 02:52:39 EDT 2025 
 Powered by FUDForum . Page generated in 0.23550 seconds |