Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Performance: calculateEnabled called twice in refresh method of some DiagramAction
Performance: calculateEnabled called twice in refresh method of some DiagramAction [message #986252] Mon, 19 November 2012 11:10 Go to next message
Laurent Redor is currently offline Laurent Redor
Messages: 25
Registered: July 2009
Junior Member
Hi,

For example in AutoSizeAction the method refresh is like this :

public void refresh() {
super.refresh();
setEnabled(calculateEnabled());
}

and the code of the super class DiagramAction is like this :

public void refresh() {
_operationSet = null; // invalidate the cached set
updateTargetRequest();
setEnabled(calculateEnabled());
}

As result, the "setEnabled(calculateEnabled());" is called twice. I do
not think there was a valid reason. Is that correct?

Regards,

Laurent
Re: Performance: calculateEnabled called twice in refresh method of some DiagramAction [message #986352 is a reply to message #986252] Tue, 20 November 2012 03:25 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi Laurent,

you should open a bug on this with runtime as component. https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMP

Ralph
Re: Performance: calculateEnabled called twice in refresh method of some DiagramAction [message #986378 is a reply to message #986352] Tue, 20 November 2012 04:48 Go to previous message
Laurent Redor is currently offline Laurent Redor
Messages: 25
Registered: July 2009
Junior Member
Hi Ralph,

I create https://bugs.eclipse.org/bugs/show_bug.cgi?id=394627 for this
problem.

Laurent

On 20/11/2012 09:25, Ralph Gerbig wrote:
> Hi Laurent,
>
> you should open a bug on this with runtime as component.
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMP
>
> Ralph
Previous Topic:Change fill color on Text doesn't change it
Next Topic:how to center align the label name in gmfgraph?
Goto Forum:
  


Current Time: Wed Aug 20 03:01:48 EDT 2014

Powered by FUDForum. Page generated in 0.01637 seconds