Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Refreshing the palette after programmatically deselect a layer
Refreshing the palette after programmatically deselect a layer [message #1371408] Wed, 21 May 2014 11:02 Go to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi Sirius folks!

I'm struggling at refreshing my Sirius editor after programmatically disabling one of its layer:

diagram.getActivatedLayers().remove(myLayer);


Then, I refresh the representation with refreshrepresentationcommand, but the tool palette isn't updated (there are always the tools that were added by the previously deactivated layer).

Have you any clue on this?

Best regards, and kiss from Paris.

Charlie
Re: Refreshing the palette after programmatically deselect a layer [message #1371827 is a reply to message #1371408] Wed, 21 May 2014 15:01 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Charlie,

Take a look on
org.eclipse.sirius.diagram.ui.tools.internal.commands.ChangeLayerActivationCommand.
This command change the layer activation and performs next a refresh of
the representation.

Regards,

Florian

On 05/21/2014 01:02 PM, Charlie Mordant wrote:
> Hi Sirius folks!
>
> I'm struggling at refreshing my
> http://fr.wikipedia.org/wiki/Sirius#Sirius_A_et_Sirius_B editor after
> programmatically disabling one of its layer:
>
> diagram.getActivatedLayers().remove(myLayer);
>
> Then, I refresh the representation with refreshrepresentationcommand,
> but the tool palette isn't updated (there are always the tools that were
> added by the previously deactivated layer).
>
> Have you any clue on this?
>
> Best regards, and kiss from Paris.
>
> Charlie
Re: Refreshing the palette after programmatically deselect a layer [message #1371966 is a reply to message #1371827] Wed, 21 May 2014 16:12 Go to previous messageGo to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi Florian,

You're the man, it's totally what I was looking for!
I didn't saw this command (but I can tell that I searched).

Many thanks.

Best regards
Re: Refreshing the palette after programmatically deselect a layer [message #1376527 is a reply to message #1371966] Fri, 23 May 2014 13:04 Go to previous message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi Florian,

I speaked too early, the palette is not refreshed, even with the Command.
Another idea?

Regards,
Previous Topic:Using Java script as a service
Next Topic:Computed color for edges
Goto Forum:
  


Current Time: Thu Apr 25 05:32:05 GMT 2024

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

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

Back to the top