Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » DiagramEditor.isDirty() + FileDiagramModificationListener
DiagramEditor.isDirty() + FileDiagramModificationListener [message #76589] Fri, 10 November 2006 09:27 Go to next message
Eclipse UserFriend
Hello!

Currently FileDiagramModificationListener is responsible for listening resource
changes and setting editor state to dirty. The problem with this approach
is: editor will not became “!isDirty()” on undoing modification(s). Different
approach used in EMF-generated editor - BasicCommandStack.isSaveNeeded()
called to determine editor dirty state. As a result, editor.isDirty() returns
false if all the operations performed on current CommandStack since last
saving will be undone. Can we use the same approach in GMF diagram editor
or are there any ideas forcing GMF to listen for the resource changes?

-----------------
Alex Shatalin
Re: DiagramEditor.isDirty() + FileDiagramModificationListener [message #76700 is a reply to message #76589] Fri, 10 November 2006 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Alex,

I'm not aware of any reason why we couldn't fix this by keeping track of
the operations that have affected the diagram. Bugzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=149214 reports the same
defect.

Alex Shatalin wrote:
> Hello!
>
> Currently FileDiagramModificationListener is responsible for listening
> resource changes and setting editor state to dirty. The problem with
> this approach is: editor will not became “!isDirty()” on undoing
> modification(s). Different approach used in EMF-generated editor -
> BasicCommandStack.isSaveNeeded() called to determine editor dirty state.
> As a result, editor.isDirty() returns false if all the operations
> performed on current CommandStack since last saving will be undone. Can
> we use the same approach in GMF diagram editor or are there any ideas
> forcing GMF to listen for the resource changes?
>
> -----------------
> Alex Shatalin
>
>
Re: DiagramEditor.isDirty() + FileDiagramModificationListener [message #76716 is a reply to message #76589] Fri, 10 November 2006 11:00 Go to previous messageGo to next message
Eclipse UserFriend
So the use case is :

Open diagram
Dirty
Undo

and the result is the diagram is still dirty?

Can you raise a Bugzilla for this and we will check it out?

Cheers...
Anthony

"Alex Shatalin" <vano@borland.com> wrote in message
news:cd695fb312a498c8d2f3d21a0841@news.eclipse.org...
> Hello!
>
> Currently FileDiagramModificationListener is responsible for listening
> resource changes and setting editor state to dirty. The problem with this
> approach is: editor will not became "!isDirty()" on undoing
> modification(s). Different approach used in EMF-generated editor -
> BasicCommandStack.isSaveNeeded() called to determine editor dirty state.
> As a result, editor.isDirty() returns false if all the operations
> performed on current CommandStack since last saving will be undone. Can we
> use the same approach in GMF diagram editor or are there any ideas forcing
> GMF to listen for the resource changes?
>
> -----------------
> Alex Shatalin
>
>
Re: DiagramEditor.isDirty() + FileDiagramModificationListener [message #76778 is a reply to message #76700] Fri, 10 November 2006 12:00 Go to previous message
Eclipse UserFriend
Hello Linda,

Thank you for pointing to the correct request - I had to search bugzilla
first ;-)

-----------------
Alex Shatalin
Previous Topic:save diagram to RDB
Next Topic:Connection Handles
Goto Forum:
  


Current Time: Sun May 11 08:47:16 EDT 2025

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

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

Back to the top