Logic Diagram - Selection in Outline View Selects Figure ?? [message #191407] |
Wed, 10 August 2005 10:31 |
Eclipse User |
|
|
|
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 #191497 is a reply to message #191407] |
Wed, 10 August 2005 16:47 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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);
}
|
|
|
Powered by
FUDForum. Page generated in 0.03772 seconds