Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » auto update feature doesn't check whether an update is needed
auto update feature doesn't check whether an update is needed [message #677096] Tue, 07 June 2011 14:29 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi,

the auto update feature doesn't check whether an update is needed.
It also doesn't check whether the update was successful.

See
org.eclipse.graphiti.features.impl.AbstractFeatureProvider.updateIfPossible(IUpdateContext)

So if a diagram is opened it will always be dirty initially (unless an Exception is thrown during the auto update).

Does this behavior really make sense?

Thanks,
Henrik
Re: auto update feature doesn't check whether an update is needed [message #677126 is a reply to message #677096] Tue, 07 June 2011 16:14 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi,

I just observed that it's no good idea to throw an exception if nothing was changed.
The editor is left in a state where no further changes are possible...

The DiagramEditorInternal could provide hooks to customize the auto update behavior.
Actually there already are methods
handleAutoUpdateAtStartup()
handleAutoUpdateAtReset()
autoUpdate
which potentially could be overridden.

Unfortunately all three methods are private (besides the problem that the code resides in an internal package as discussed in bug
336488).

My desired behavior would be (with commands only executed when updates are needed)
- auto update when diagram is opened
- auto update on reset (i.e. when the user decides to discard his changes)
- auto update in clean editors

Is there a way to achieve this with the current implementation?

Thanks,
Henrik

Am 07.06.2011 16:29, schrieb Henrik Rentz-Reichert:
> Hi,
>
> the auto update feature doesn't check whether an update is needed.
> It also doesn't check whether the update was successful.
>
> See
> org.eclipse.graphiti.features.impl.AbstractFeatureProvider.updateIfPossible(IUpdateContext)
>
> So if a diagram is opened it will always be dirty initially (unless an Exception is thrown during the auto update).
>
> Does this behavior really make sense?
>
> Thanks,
> Henrik
Re: auto update feature doesn't check whether an update is needed [message #681977 is a reply to message #677126] Fri, 10 June 2011 07:21 Go to previous message
Christian Brand is currently offline Christian BrandFriend
Messages: 36
Registered: July 2009
Location: Walldorf/Germany
Member
You can do some configuration in your diagram type provider. If this does not fit your needs we have to think about some framework extensions.

Christian Brand
SAP AG - Walldorf - Germany
Previous Topic:Re: Image resize and rotate
Next Topic:Double lined arrow
Goto Forum:
  


Current Time: Wed Apr 24 17:29:22 GMT 2024

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

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

Back to the top