Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Logic Diagram - Selection in Outline View Selects Figure ??
Logic Diagram - Selection in Outline View Selects Figure ?? [message #191407] Wed, 10 August 2005 10:31 Go to next message
Eclipse UserFriend
Originally posted by: a.morgan.pilz.ie

Hello,

I am currently trying to figure out how selecting an object in an Outline
View can lead to it being highlighted in the Graphical Editor.

I ran the Logic example and noted that it is implemented here.
However I have been unable to figure out where in the code that this is
done.

I would appreciate it if someone could point me in the right direction.

Thanks,
Alan.
Re: Logic Diagram - Selection in Outline View Selects Figure ?? [message #191458 is a reply to message #191407] Wed, 10 August 2005 15:01 Go to previous messageGo to next message
Michael Strothjohann is currently offline Michael StrothjohannFriend
Messages: 52
Registered: July 2009
Member
see the simplified shapes-example
michael
"Alan Morgan" <a.morgan@pilz.ie> schrieb im Newsbeitrag
news:ddclad$7pf$2@news.eclipse.org...
> Hello,
>
> I am currently trying to figure out how selecting an object in an Outline
> View can lead to it being highlighted in the Graphical Editor.
>
> I ran the Logic example and noted that it is implemented here.
> However I have been unable to figure out where in the code that this is
> done.
>
> I would appreciate it if someone could point me in the right direction.
>
> Thanks,
> Alan.
>
Re: Logic Diagram - Selection in Outline View Selects Figure ?? [message #191497 is a reply to message #191407] Wed, 10 August 2005 16:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Look at the SelectionSynchronizer class.

"Alan Morgan" <a.morgan@pilz.ie> wrote in message
news:ddclad$7pf$2@news.eclipse.org...
> Hello,
>
> I am currently trying to figure out how selecting an object in an Outline
> View can lead to it being highlighted in the Graphical Editor.
>
> I ran the Logic example and noted that it is implemented here.
> However I have been unable to figure out where in the code that this is
> done.
>
> I would appreciate it if someone could point me in the right direction.
>
> Thanks,
> Alan.
>
>
Re: Logic Diagram - Selection in Outline View Selects Figure ?? [message #191505 is a reply to message #191458] Wed, 10 August 2005 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: a.morgan.pilz.ie

Michael,

Thanks for that. I think the problem seems to be that I was using a
TreeViewer from JFace as opposed to the GEF TreeViewer.

But I'm not sure if this solves the problem I will have eventually.
What I mean to say is, if I select item in Outline View and its figure is
selected is great.

But what if I create my own view and want an item selected in this to select
the figure ?

Ok an example is needed here I think.

I have a C like language in which I right a control program.
I used GEF as a graphical builder to build graphical visualisation of my
program.
A variable from the control program is assoicated with a figure.

I have a view which lists all variables in program. I want to select a
variable from this and have figure its attached to highlighted.
Can I do this ?


"Michael" <strothjohann@strothjohann.de> wrote in message
news:ddd4tc$rq0$1@news.eclipse.org...
> see the simplified shapes-example
> michael
> "Alan Morgan" <a.morgan@pilz.ie> schrieb im Newsbeitrag
> news:ddclad$7pf$2@news.eclipse.org...
>> Hello,
>>
>> I am currently trying to figure out how selecting an object in an Outline
>> View can lead to it being highlighted in the Graphical Editor.
>>
>> I ran the Logic example and noted that it is implemented here.
>> However I have been unable to figure out where in the code that this is
>> done.
>>
>> I would appreciate it if someone could point me in the right direction.
>>
>> Thanks,
>> Alan.
>>
>
>
Re: Logic Diagram - Selection in Outline View Selects Figure ?? [message #191589 is a reply to message #191505] Wed, 10 August 2005 17:17 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> But what if I create my own view and want an item selected in this to
> select the figure ?

Just write some code to set the selection based on a collection of model
objects:

public void showSelectionInViewer(EditPartViewer viewer, Collection
selection) {
Map map = viewer.getEditPartRegistry();
List newSelection = new ArrayList();
Iterator iter = selection.iter();
while (iter.hasNext())
newSelection.add(map.get(iter.next());
viewer.setSelection(newSelection);
}
Previous Topic:Bug in PolylineConnection#getRoutingConstraint?
Next Topic:How to change the focus color?
Goto Forum:
  


Current Time: Mon Dec 02 20:04:05 GMT 2024

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

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

Back to the top