Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » View - Editor, notification system
View - Editor, notification system [message #174642] Thu, 31 March 2005 08:46 Go to next message
Eclipse UserFriend
Originally posted by: dan.vaum.net

Hi!

How does a view notify a coresponding editor of changes? Does it have to
implement a certain interface?

Thank you
Re: View - Editor, notification system [message #174697 is a reply to message #174642] Thu, 31 March 2005 13:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Dan wrote:
> Hi!
>
> How does a view notify a coresponding editor of changes? Does it have to
> implement a certain interface?
>
> Thank you
>
>


AFAIK, a view does not make changes.

CL
Re: View - Editor, notification system [message #174704 is a reply to message #174697] Thu, 31 March 2005 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dan.vaum.net

Yes, you are right!

I am sorry. What I really ment was how can I make a view aware of changes in
the editor!

Thanks


"CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> wrote in message
news:d2gsgs$gl2$3@news.eclipse.org...
> Dan wrote:
>> Hi!
>>
>> How does a view notify a coresponding editor of changes? Does it have to
>> implement a certain interface?
>>
>> Thank you
>
>
> AFAIK, a view does not make changes.
>
> CL
Re: View - Editor, notification system [message #174737 is a reply to message #174704] Thu, 31 March 2005 18:04 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
If they're both working on the same model, and are listening for changes,
they should stay in synch automatically. Your editor would change the model
and both the editor's editparts and the view's editparts would be notified.

BTW, the view can make changes. In the logic example, you can create new
parts in the outline view, increment/decrement LED values, reparent parts,
reorder parts (change z-order to determine which part paints on top), etc.

"Dan" <dan@vaum.net> wrote in message news:d2gut5$khn$1@news.eclipse.org...
> Yes, you are right!
>
> I am sorry. What I really ment was how can I make a view aware of changes
in
> the editor!
>
> Thanks
>
>
> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> wrote in message
> news:d2gsgs$gl2$3@news.eclipse.org...
> > Dan wrote:
> >> Hi!
> >>
> >> How does a view notify a coresponding editor of changes? Does it have
to
> >> implement a certain interface?
> >>
> >> Thank you
> >
> >
> > AFAIK, a view does not make changes.
> >
> > CL
>
>
Re: View - Editor, notification system [message #174808 is a reply to message #174704] Fri, 01 April 2005 04:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Are we talking about a "view", or a "ViewPart"?
Re: View - Editor, notification system [message #174837 is a reply to message #174808] Fri, 01 April 2005 06:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dan.vaum.net

I'm sorry, but don't they stick to each-other? The ViewPart implementation
has a comment that says: "Abstract base implementation of all workbench
views." Please correct me if I am wrong. I am still learning the framework.

Thanks!

"Randy Hudson" <none@us.ibm.com> wrote in message
news:d2ihs4$phk$1@news.eclipse.org...
> Are we talking about a "view", or a "ViewPart"?
>
Re: View - Editor, notification system [message #174853 is a reply to message #174737] Fri, 01 April 2005 10:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dan.vaum.net

How can I make an Editor aware of a View?


"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d2he5v$cbe$1@news.eclipse.org...
> If they're both working on the same model, and are listening for changes,
> they should stay in synch automatically. Your editor would change the
> model
> and both the editor's editparts and the view's editparts would be
> notified.
>
> BTW, the view can make changes. In the logic example, you can create new
> parts in the outline view, increment/decrement LED values, reparent parts,
> reorder parts (change z-order to determine which part paints on top), etc.
>
> "Dan" <dan@vaum.net> wrote in message
> news:d2gut5$khn$1@news.eclipse.org...
>> Yes, you are right!
>>
>> I am sorry. What I really ment was how can I make a view aware of changes
> in
>> the editor!
>>
>> Thanks
>>
>>
>> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> wrote in message
>> news:d2gsgs$gl2$3@news.eclipse.org...
>> > Dan wrote:
>> >> Hi!
>> >>
>> >> How does a view notify a coresponding editor of changes? Does it have
> to
>> >> implement a certain interface?
>> >>
>> >> Thank you
>> >
>> >
>> > AFAIK, a view does not make changes.
>> >
>> > CL
>>
>>
>
>
Re: View - Editor, notification system [message #174860 is a reply to message #174853] Fri, 01 April 2005 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dan.vaum.net

This is a multi-part message in MIME format.

------=_NextPart_000_0077_01C536C9.10A93C20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I found the right question:

"How can I make a View (ViewPart) respond to changes (i.e. figure =
selections) in the Editor?"

It would help to know where in the editor's code to do this or what does =
the editor (code) need (i.e. interfaces)


Thank you!

"Dan" <dan@vaum.net> wrote in message =
news:d2j6oa$ls1$1@news.eclipse.org...
> How can I make an Editor aware of a View?
>=20
>=20
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message=20
> news:d2he5v$cbe$1@news.eclipse.org...
>> If they're both working on the same model, and are listening for =
changes,
>> they should stay in synch automatically. Your editor would change =
the=20
>> model
>> and both the editor's editparts and the view's editparts would be=20
>> notified.
>>
>> BTW, the view can make changes. In the logic example, you can create =
new
>> parts in the outline view, increment/decrement LED values, reparent =
parts,
>> reorder parts (change z-order to determine which part paints on top), =
etc.
>>
>> "Dan" <dan@vaum.net> wrote in message=20
>> news:d2gut5$khn$1@news.eclipse.org...
>>> Yes, you are right!
>>>
>>> I am sorry. What I really ment was how can I make a view aware of =
changes
>> in
>>> the editor!
>>>
>>> Thanks
>>>
>>>
>>> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> wrote in =
message
>>> news:d2gsgs$gl2$3@news.eclipse.org...
>>> > Dan wrote:
>>> >> Hi!
>>> >>
>>> >> How does a view notify a coresponding editor of changes? Does it =
have
>> to
>>> >> implement a certain interface?
>>> >>
>>> >> Thank you
>>> >
>>> >
>>> > AFAIK, a view does not make changes.
>>> >
>>> > CL
>>>
>>>
>>
>>=20
>=20
>
------=_NextPart_000_0077_01C536C9.10A93C20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I found the right =
question:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>"How can I make a View (ViewPart) respond to =
changes (i.e.=20
figure selections) in the Editor?"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>It would help to know where in the =
editor's code to=20
do this or what does the editor (code) need (i.e. =
interfaces)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Dan" &lt;</FONT><A=20
href=3D"mailto:dan@vaum.net"><FONT face=3DArial =
size=3D2>dan@vaum.net</FONT></A><FONT=20
face=3DArial size=3D2>&gt; wrote in message </FONT><A=20
href=3D"news:d2j6oa$ls1$1@news.eclipse.org"><FONT face=3DArial=20
size=3D2>news:d2j6oa$ls1$1@news.eclipse.org</FONT></A><FONT face=3DArial =

size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; How can I make =
an Editor=20
aware of a View?<BR>&gt; <BR>&gt; <BR>&gt; "Pratik Shah" &lt;</FONT><A=20
href=3D"mailto:ppshah@us.ibm.com"><FONT face=3DArial=20
size=3D2>ppshah@us.ibm.com</FONT></A><FONT face=3DArial size=3D2>&gt; =
wrote in message=20
<BR>&gt; </FONT><A href=3D"news:d2he5v$cbe$1@news.eclipse.org"><FONT =
face=3DArial=20
size=3D2>news:d2he5v$cbe$1@news.eclipse.org</FONT></A><FONT face=3DArial =

size=3D2>...<BR>&gt;&gt; If they're both working on the same model, and =
are=20
listening for changes,<BR>&gt;&gt; they should stay in synch=20
automatically.&nbsp; Your editor would change the <BR>&gt;&gt; =
model<BR>&gt;&gt;=20
and both the editor's editparts and the view's editparts would be =
<BR>&gt;&gt;=20
notified.<BR>&gt;&gt;<BR>&gt;&gt; BTW, the view can make changes.&nbsp; =
In the=20
logic example, you can create new<BR>&gt;&gt; parts in the outline view, =

increment/decrement LED values, reparent parts,<BR>&gt;&gt; reorder =
parts=20
(change z-order to determine which part paints on top),=20
etc.<BR>&gt;&gt;<BR>&gt;&gt; "Dan" &lt;</FONT><A=20
href=3D"mailto:dan@vaum.net"><FONT face=3DArial =
size=3D2>dan@vaum.net</FONT></A><FONT=20
face=3DArial size=3D2>&gt; wrote in message <BR>&gt;&gt; </FONT><A=20
href=3D"news:d2gut5$khn$1@news.eclipse.org"><FONT face=3DArial=20
size=3D2>news:d2gut5$khn$1@news.eclipse.org</FONT></A><FONT face=3DArial =

size=3D2>...<BR>&gt;&gt;&gt; Yes, you are =
right!<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; I=20
am sorry. What I really ment was how can I make a view aware of=20
changes<BR>&gt;&gt; in<BR>&gt;&gt;&gt; the=20
editor!<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;=20
Thanks<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; "CL [dnoyeb] =
Gilbert"=20
&lt;</FONT><A href=3D"mailto:Lamont_Gilbert@rigidsoftware.com"><FONT =
face=3DArial=20
size=3D2>Lamont_Gilbert@rigidsoftware.com</FONT></A><FONT face=3DArial =
size=3D2>&gt;=20
wrote in message<BR>&gt;&gt;&gt; </FONT><A=20
href=3D"news:d2gsgs$gl2$3@news.eclipse.org"><FONT face=3DArial=20
size=3D2>news:d2gsgs$gl2$3@news.eclipse.org</FONT></A><FONT face=3DArial =

size=3D2>...<BR>&gt;&gt;&gt; &gt; Dan wrote:<BR>&gt;&gt;&gt; &gt;&gt;=20
Hi!<BR>&gt;&gt;&gt; &gt;&gt;<BR>&gt;&gt;&gt; &gt;&gt; How does a view =
notify a=20
coresponding editor of changes? Does it have<BR>&gt;&gt; =
to<BR>&gt;&gt;&gt;=20
&gt;&gt; implement a certain interface?<BR>&gt;&gt;&gt; =
&gt;&gt;<BR>&gt;&gt;&gt;=20
&gt;&gt; Thank you<BR>&gt;&gt;&gt; &gt;<BR>&gt;&gt;&gt; =
&gt;<BR>&gt;&gt;&gt;=20
&gt; AFAIK, a view does not make changes.<BR>&gt;&gt;&gt; =
&gt;<BR>&gt;&gt;&gt;=20
&gt; CL<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; <BR>&gt;&gt;<BR>&gt;&gt; <BR>&gt; =

<BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_0077_01C536C9.10A93C20--
Re: View - Editor, notification system [message #175009 is a reply to message #174860] Fri, 01 April 2005 17:13 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_00A3_01C536B4.26165C60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

So, the EditorPart should hook a SelectionProvider into the site's =
Selection Service. The ViewPart should listen to the workbench's =
SelectionSErvice by adding a selection listener.

You'll get editor selection, but also other selection's you'll have to =
ignore.
------=_NextPart_000_00A3_01C536B4.26165C60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>So, the EditorPart should hook a =
SelectionProvider=20
into the site's Selection Service.&nbsp; The ViewPart should listen to =
the=20
workbench's SelectionSErvice by adding a selection =
listener.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You'll get editor selection, but also =
other=20
selection's you'll have to ignore.</FONT></DIV></BODY></HTML>

------=_NextPart_000_00A3_01C536B4.26165C60--
Previous Topic:Displaying Values in Third column of Proprties View
Next Topic:problem with the model class
Goto Forum:
  


Current Time: Sun Sep 22 23:06:20 GMT 2024

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

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

Back to the top