Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF TreeViewer
GEF TreeViewer [message #174137] Tue, 29 March 2005 11:36 Go to next message
Eclipse UserFriend
Originally posted by: dan.vaum.net

This is a multi-part message in MIME format.

------=_NextPart_000_0039_01C5346C.A9CD3F00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just couldn't find =
an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_0039_01C5346C.A9CD3F00
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>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I =
would like=20
to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class TreeView =
extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp; =
private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp; =
public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public void=20
createPartControl(Composite parent)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE CONTENTS =
OF&nbsp;MY=20
MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public void=20
setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point me to =
the=20
right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Dan</FONT></DIV></BODY></HTML>

------=_NextPart_000_0039_01C5346C.A9CD3F00--
Re: GEF TreeViewer [message #174245 is a reply to message #174137] Tue, 29 March 2005 16:41 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0279_01C53454.2E329010
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

All GEF examples use the TreeViewer in their outline page. You can look =
at ShapesEditor.ShapesOutlinePage.
"Dan" <dan@vaum.net> wrote in message =
news:d2bekf$1j2$1@news.eclipse.org...
Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just couldn't =
find an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_0279_01C53454.2E329010
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.2800.1491" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>All GEF examples use the TreeViewer in =
their=20
outline page.&nbsp; You can look at =
ShapesEditor.ShapesOutlinePage.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan" &lt;<A href=3D"mailto:dan@vaum.net">dan@vaum.net</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:d2bekf$1j2$1@news.eclipse.org">news:d2bekf$1j2$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I =
would like=20
to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class =
TreeView extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp; =
private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp; =
public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void createPartControl(Composite parent)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE CONTENTS=20
OF&nbsp;MY MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point me =
to the=20
right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>Dan</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0279_01C53454.2E329010--
Re: GEF TreeViewer [message #174278 is a reply to message #174245] Tue, 29 March 2005 17:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rudolf.vaum.net

This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C5349B.23CF98B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

what are the (dis-)advantages of using the treeviewer of gef instead of =
the one from jface?



Thanks
Rudi
"Pratik Shah" <ppshah@us.ibm.com> wrote in message =
news:d2c0gb$uf6$1@news.eclipse.org...
All GEF examples use the TreeViewer in their outline page. You can =
look at ShapesEditor.ShapesOutlinePage.
"Dan" <dan@vaum.net> wrote in message =
news:d2bekf$1j2$1@news.eclipse.org...
Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just couldn't =
find an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_0009_01C5349B.23CF98B0
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.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>what are the (dis-)advantages of =
using&nbsp;the=20
treeviewer of gef instead of the one from jface?</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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rudi</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pratik Shah" &lt;<A=20
href=3D"mailto:ppshah@us.ibm.com">ppshah@us.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:d2c0gb$uf6$1@news.eclipse.org">news:d2c0gb$uf6$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>All GEF examples use the TreeViewer =
in their=20
outline page.&nbsp; You can look at=20
ShapesEditor.ShapesOutlinePage.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan" &lt;<A href=3D"mailto:dan@vaum.net">dan@vaum.net</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:d2bekf$1j2$1@news.eclipse.org">news:d2bekf$1j2$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I =
would=20
like to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class =
TreeView extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void createPartControl(Composite parent)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE =
CONTENTS=20
OF&nbsp;MY MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point =
me to the=20
right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>Dan</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_0009_01C5349B.23CF98B0--
Re: GEF TreeViewer [message #174286 is a reply to message #174245] Tue, 29 March 2005 17:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rudolf.vaum.net

This is a multi-part message in MIME format.

------=_NextPart_000_0019_01C5349C.8BC1E5D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have also noticed there are only just a few lines of code required to =
customize=20
the tree view that emf generates - would you recommend using this, as an =
outline
view to a gef editor?

"Pratik Shah" <ppshah@us.ibm.com> wrote in message =
news:d2c0gb$uf6$1@news.eclipse.org...
All GEF examples use the TreeViewer in their outline page. You can =
look at ShapesEditor.ShapesOutlinePage.
"Dan" <dan@vaum.net> wrote in message =
news:d2bekf$1j2$1@news.eclipse.org...
Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just couldn't =
find an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_0019_01C5349C.8BC1E5D0
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.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have also noticed there are only =
just&nbsp;a few=20
lines of code required to customize </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the tree view that emf generates - =
would you=20
recommend using this, as an outline</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>view </FONT><FONT face=3DArial =
size=3D2>to a gef=20
editor?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pratik Shah" &lt;<A=20
href=3D"mailto:ppshah@us.ibm.com">ppshah@us.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:d2c0gb$uf6$1@news.eclipse.org">news:d2c0gb$uf6$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>All GEF examples use the TreeViewer =
in their=20
outline page.&nbsp; You can look at=20
ShapesEditor.ShapesOutlinePage.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan" &lt;<A href=3D"mailto:dan@vaum.net">dan@vaum.net</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:d2bekf$1j2$1@news.eclipse.org">news:d2bekf$1j2$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I =
would=20
like to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class =
TreeView extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void createPartControl(Composite parent)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE =
CONTENTS=20
OF&nbsp;MY MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point =
me to the=20
right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>Dan</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_0019_01C5349C.8BC1E5D0--
Re: GEF TreeViewer [message #174302 is a reply to message #174245] Tue, 29 March 2005 17:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rudolf.vaum.net

This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C5349F.B68EBF60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

last not least, can you please tell us, what the targeted eclipse & =
gef/emf version is for=20
the examples found on the cvs?

we have tried to run them on the latest versions - as there always are =
some errors in the projects

Thanks
Rudi
"Pratik Shah" <ppshah@us.ibm.com> wrote in message =
news:d2c0gb$uf6$1@news.eclipse.org...
All GEF examples use the TreeViewer in their outline page. You can =
look at ShapesEditor.ShapesOutlinePage.
"Dan" <dan@vaum.net> wrote in message =
news:d2bekf$1j2$1@news.eclipse.org...
Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just couldn't =
find an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_000F_01C5349F.B68EBF60
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.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>last not least, can you please tell us, =
what the=20
targeted eclipse &amp; gef/emf version is for </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the examples found on the =
cvs?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>we have tried to run them on the latest =
versions -=20
as there always are some errors in the projects</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rudi</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pratik Shah" &lt;<A=20
href=3D"mailto:ppshah@us.ibm.com">ppshah@us.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:d2c0gb$uf6$1@news.eclipse.org">news:d2c0gb$uf6$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>All GEF examples use the TreeViewer =
in their=20
outline page.&nbsp; You can look at=20
ShapesEditor.ShapesOutlinePage.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan" &lt;<A href=3D"mailto:dan@vaum.net">dan@vaum.net</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:d2bekf$1j2$1@news.eclipse.org">news:d2bekf$1j2$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I =
would=20
like to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class =
TreeView extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void createPartControl(Composite parent)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE =
CONTENTS=20
OF&nbsp;MY MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point =
me to the=20
right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>Dan</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_000F_01C5349F.B68EBF60--
Re: GEF TreeViewer [message #175497 is a reply to message #174302] Mon, 04 April 2005 23:51 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0323_01C5394F.C020ECB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

For code that's in CVS, the targetted GEF version is always the latest =
code in CVS. EMF version is 2.0.1.
"Rudi Vaum" <rudolf@vaum.net> wrote in message =
news:d2c428$3k6$1@news.eclipse.org...
last not least, can you please tell us, what the targeted eclipse & =
gef/emf version is for=20
the examples found on the cvs?

we have tried to run them on the latest versions - as there always are =
some errors in the projects

Thanks
Rudi
"Pratik Shah" <ppshah@us.ibm.com> wrote in message =
news:d2c0gb$uf6$1@news.eclipse.org...
All GEF examples use the TreeViewer in their outline page. You can =
look at ShapesEditor.ShapesOutlinePage.
"Dan" <dan@vaum.net> wrote in message =
news:d2bekf$1j2$1@news.eclipse.org...
Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just =
couldn't find an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_0323_01C5394F.C020ECB0
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.2800.1491" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>For code that's in CVS, the targetted =
GEF version=20
is always&nbsp;the latest code in&nbsp;CVS.&nbsp; EMF version is=20
2.0.1.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Rudi Vaum" &lt;<A =
href=3D"mailto:rudolf@vaum.net">rudolf@vaum.net</A>&gt;=20
wrote in message <A=20
=
href=3D"news:d2c428$3k6$1@news.eclipse.org">news:d2c428$3k6$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>last not least, can you please tell =
us, what the=20
targeted eclipse &amp; gef/emf version is for </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the examples found on the =
cvs?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>we have tried to run them on the =
latest versions=20
- as there always are some errors in the projects</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rudi</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pratik Shah" &lt;<A=20
href=3D"mailto:ppshah@us.ibm.com">ppshah@us.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:d2c0gb$uf6$1@news.eclipse.org">news:d2c0gb$uf6$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>All GEF examples use the TreeViewer =
in their=20
outline page.&nbsp; You can look at=20
ShapesEditor.ShapesOutlinePage.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan" &lt;<A =
href=3D"mailto:dan@vaum.net">dan@vaum.net</A>&gt; wrote in=20
message <A=20
=
href=3D"news:d2bekf$1j2$1@news.eclipse.org">news:d2bekf$1j2$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What =
I would=20
like to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class =
TreeView extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void createPartControl(Composite parent)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE =
CONTENTS=20
OF&nbsp;MY MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point =
me to=20
the right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>Dan</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BODY></=
HTML>

------=_NextPart_000_0323_01C5394F.C020ECB0--
Re: GEF TreeViewer [message #175506 is a reply to message #174278] Mon, 04 April 2005 23:53 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_032F_01C5394F.F86AB6F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

GEF's viewer gives you the familiarity of creating a viewer the way =
other GEF viewers are created. It also provides some convenience if you =
want to do things like reorder children or drop parts from the palette =
directly in the view.
"Rudi Vaum" <rudolf@vaum.net> wrote in message =
news:d2c24t$164$1@news.eclipse.org...
what are the (dis-)advantages of using the treeviewer of gef instead =
of the one from jface?



Thanks
Rudi
"Pratik Shah" <ppshah@us.ibm.com> wrote in message =
news:d2c0gb$uf6$1@news.eclipse.org...
All GEF examples use the TreeViewer in their outline page. You can =
look at ShapesEditor.ShapesOutlinePage.
"Dan" <dan@vaum.net> wrote in message =
news:d2bekf$1j2$1@news.eclipse.org...
Hi!

Is there an example of implementing an =
"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What I would like =
to do is something like this:


public class TreeView extends ViewPart {

private TreeViewer treeViewer;

public TreeView() {
super();
}

public void createPartControl(Composite parent) {
TreeViewer treeViewer =3D new TreeViewer();

// POPULATE treeViewer WITH THE CONTENTS OF MY MODEL

}

public void setFocus() {}
}

I know there must be an easy way of doing this, but I just =
couldn't find an example. Please point me to the right direction.

Thank you,


Dan
------=_NextPart_000_032F_01C5394F.F86AB6F0
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.2800.1491" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>GEF's viewer gives you the familiarity =
of creating=20
a viewer the way other GEF viewers are created.&nbsp; It also provides =
some=20
convenience if you want to do things like reorder children or drop parts =
from=20
the palette directly in the view.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Rudi Vaum" &lt;<A =
href=3D"mailto:rudolf@vaum.net">rudolf@vaum.net</A>&gt;=20
wrote in message <A=20
=
href=3D"news:d2c24t$164$1@news.eclipse.org">news:d2c24t$164$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>what are the (dis-)advantages of =
using&nbsp;the=20
treeviewer of gef instead of the one from jface?</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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rudi</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pratik Shah" &lt;<A=20
href=3D"mailto:ppshah@us.ibm.com">ppshah@us.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:d2c0gb$uf6$1@news.eclipse.org">news:d2c0gb$uf6$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>All GEF examples use the TreeViewer =
in their=20
outline page.&nbsp; You can look at=20
ShapesEditor.ShapesOutlinePage.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan" &lt;<A =
href=3D"mailto:dan@vaum.net">dan@vaum.net</A>&gt; wrote in=20
message <A=20
=
href=3D"news:d2bekf$1j2$1@news.eclipse.org">news:d2bekf$1j2$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there an example =
of&nbsp;implementing=20
an&nbsp;"org.eclipse.gef.ui.parts.TreeViewer" in a ViewPart? What =
I would=20
like to do is something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>public class =
TreeView extends=20
ViewPart {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; private=20
TreeViewer treeViewer;</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
TreeView() {</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; super();<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void createPartControl(Composite parent)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;TreeViewer&nbsp;tree=
Viewer=20
=3D new TreeViewer();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; //&nbsp;POPULATE&nbsp;treeViewer WITH THE =
CONTENTS=20
OF&nbsp;MY MODEL</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV><BR><FONT face=3DCourier color=3D#0000ff =
size=3D2>&nbsp;&nbsp;&nbsp; public=20
void setFocus() {}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff size=3D2>}</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#0000ff =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know&nbsp;there must be an easy =
way&nbsp;of=20
doing&nbsp;this, but I just couldn't find an example. Please point =
me to=20
the right direction.</FONT></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></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>Dan</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BODY></=
HTML>

------=_NextPart_000_032F_01C5394F.F86AB6F0--
Previous Topic:Frame on editor problem
Next Topic:Zoom and Thumbnail
Goto Forum:
  


Current Time: Fri Apr 26 17:24:48 GMT 2024

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

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

Back to the top