Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » auto update policy
auto update policy [message #669687] Wed, 11 May 2011 07:05 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 254
Registered: July 2009
Senior Member
Hi,

today I tried to switch from the default update policy to auto update in all three cases.

I observed that only the update feature for the Diagram is called.
If I set the RECURSIVE_CHECK_FOR_UPDATE_ACTIVE to true it seems that all children are asked if they need an update. But the update
of the children isn't executed.

Am I supposed to do the recursive update calls explicitly?

Thanks,
Henrik

PS: I'm using Graphiti 0.8.0 (3.5.2011)

PPS: to change the preference setting I accessed it directly from the constructor of my DiagramTypeProvider

IEclipsePreferences node = new DefaultScope().getNode(GraphitiPlugin.PLUGIN_ID);
if (node!=null)
node.putBoolean(GFPreferences.RECURSIVE_CHECK_FOR_UPDATE_ACT IVE, true);

Is there a better way to do this?
Re: auto update policy [message #669815 is a reply to message #669687] Wed, 11 May 2011 14:07 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1920
Registered: July 2009
Location: Walldorf, Germany
Senior Member
In case RECURSIVE_CHECK_FOR_UPDATE_ACTIVE is set and the method updateNeeded
of the feature returns true, the update method should be called, otherwise
that would be a bug.

Nevertheless, if you need to update any children inside the top-level
shapes, you would need to delegate explicitly.

Michael


"Henrik Rentz-Reichert" wrote in message
news:iqdc08$aie$1@news.eclipse.org...

Hi,

today I tried to switch from the default update policy to auto update in all
three cases.

I observed that only the update feature for the Diagram is called.
If I set the RECURSIVE_CHECK_FOR_UPDATE_ACTIVE to true it seems that all
children are asked if they need an update. But the update
of the children isn't executed.

Am I supposed to do the recursive update calls explicitly?

Thanks,
Henrik

PS: I'm using Graphiti 0.8.0 (3.5.2011)

PPS: to change the preference setting I accessed it directly from the
constructor of my DiagramTypeProvider

IEclipsePreferences node = new
DefaultScope().getNode(GraphitiPlugin.PLUGIN_ID);
if (node!=null)
node.putBoolean(GFPreferences.RECURSIVE_CHECK_FOR_UPDATE_ACT IVE, true);

Is there a better way to do this?
Re: auto update policy [message #669979 is a reply to message #669815] Thu, 12 May 2011 09:46 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 254
Registered: July 2009
Senior Member
Hi Michael,

RECURSIVE_CHECK_FOR_UPDATE_ACTIVE is set.
Then in the case of auto-update updateNeeded() is called recursively (for all ContainerShapes). But update is called only once
(with the Diagram as context). Is that a bug?

I could change that to have the nested ContainerShapes be updated together with the top-level ContainerShape.
But in the case of manual update I preferred to have the updates on a finer granularity.

And could you please also answer my question in the PPS below?

Thanks,
Henrik

Am 11.05.2011 16:07, schrieb Michael Wenz:
> In case RECURSIVE_CHECK_FOR_UPDATE_ACTIVE is set and the method updateNeeded of the feature returns true, the update method should
> be called, otherwise that would be a bug.
>
> Nevertheless, if you need to update any children inside the top-level shapes, you would need to delegate explicitly.
>
> Michael
>
>
> "Henrik Rentz-Reichert" wrote in message news:iqdc08$aie$1@news.eclipse.org...
>
> Hi,
>
> today I tried to switch from the default update policy to auto update in all three cases.
>
> I observed that only the update feature for the Diagram is called.
> If I set the RECURSIVE_CHECK_FOR_UPDATE_ACTIVE to true it seems that all children are asked if they need an update. But the update
> of the children isn't executed.
>
> Am I supposed to do the recursive update calls explicitly?
>
> Thanks,
> Henrik
>
> PS: I'm using Graphiti 0.8.0 (3.5.2011)
>
> PPS: to change the preference setting I accessed it directly from the constructor of my DiagramTypeProvider
>
> IEclipsePreferences node = new DefaultScope().getNode(GraphitiPlugin.PLUGIN_ID);
> if (node!=null)
> node.putBoolean(GFPreferences.RECURSIVE_CHECK_FOR_UPDATE_ACT IVE, true);
>
> Is there a better way to do this?
Re: auto update policy [message #670270 is a reply to message #669979] Fri, 13 May 2011 10:26 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1920
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Henrik,

sounds like a bug, would you please open a bugzilla? Thanks!

Sorry, I've simply looked over the PPS: no, currently there is no better
API, the intention behind this switch was so far only testing. But I
understand why you would need it, so probably we should consider to have an
API for that.

Michael


"Henrik Rentz-Reichert" wrote in message
news:iqg9pk$hed$1@news.eclipse.org...

Hi Michael,

RECURSIVE_CHECK_FOR_UPDATE_ACTIVE is set.
Then in the case of auto-update updateNeeded() is called recursively (for
all ContainerShapes). But update is called only once
(with the Diagram as context). Is that a bug?

I could change that to have the nested ContainerShapes be updated together
with the top-level ContainerShape.
But in the case of manual update I preferred to have the updates on a finer
granularity.

And could you please also answer my question in the PPS below?

Thanks,
Henrik

Am 11.05.2011 16:07, schrieb Michael Wenz:
> In case RECURSIVE_CHECK_FOR_UPDATE_ACTIVE is set and the method
> updateNeeded of the feature returns true, the update method should
> be called, otherwise that would be a bug.
>
> Nevertheless, if you need to update any children inside the top-level
> shapes, you would need to delegate explicitly.
>
> Michael
>
>
> "Henrik Rentz-Reichert" wrote in message
> news:iqdc08$aie$1@news.eclipse.org...
>
> Hi,
>
> today I tried to switch from the default update policy to auto update in
> all three cases.
>
> I observed that only the update feature for the Diagram is called.
> If I set the RECURSIVE_CHECK_FOR_UPDATE_ACTIVE to true it seems that all
> children are asked if they need an update. But the update
> of the children isn't executed.
>
> Am I supposed to do the recursive update calls explicitly?
>
> Thanks,
> Henrik
>
> PS: I'm using Graphiti 0.8.0 (3.5.2011)
>
> PPS: to change the preference setting I accessed it directly from the
> constructor of my DiagramTypeProvider
>
> IEclipsePreferences node = new
> DefaultScope().getNode(GraphitiPlugin.PLUGIN_ID);
> if (node!=null)
> node.putBoolean(GFPreferences.RECURSIVE_CHECK_FOR_UPDATE_ACT IVE, true);
>
> Is there a better way to do this?
Previous Topic:Inactive PE disappears
Next Topic:Block diagram editor
Goto Forum:
  


Current Time: Fri Jul 03 20:32:01 GMT 2020

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

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

Back to the top