Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Pros and Cons about Using a tree view inside the editor
Pros and Cons about Using a tree view inside the editor [message #203931] Tue, 29 November 2005 10:19 Go to next message
Eclipse UserFriend
Originally posted by: seshasai.aesv.softwareag.com

Hi All

I needed to know the Pros and Cons about

1)Using a tree view inside the editor

for this my understanding is I could use the
"org.eclipse.gef.ui.parts.TreeViewer"

My Question is how different is it from the
"org.eclipse.jface.viewers.TreeViewer"

2)Using the Editor inside a treeview

for this I could see this link and found out that it is not possible in
present eclipse 3.1
http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg044 88.html

Also please suggest for the folowing:-

In our project there is a requiremnet to show a tree view and a multipage
editor with two tabs one which has a source view "an xml file" and a
design view which is again a structured tree view where I could drag and
drop elements from the palette.(I think of using GEF for this)

How difficult is this for this I need to divide the Editor into tow parts
one with the tree view and another part with multitab editor and a palette.

Thanks & regards
Seshasai Venkat




Thanks & regards
AESV Seshasai
Re: Pros and Cons about Using a tree view inside the editor [message #204025 is a reply to message #203931] Tue, 29 November 2005 20:52 Go to previous messageGo to next message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
A few answers:

- The org.eclipse.gef.ui.parts.TreeViewer is very easy to use in conjunction
with GEF, you just need to create a few EditParts, a factory and an
IContentOutlinePage.

- Why do you want to use a view within an editor? In Eclipse, you can have
the view beside the editor and synchronize the two.
Re: Pros and Cons about Using a tree view inside the editor [message #204052 is a reply to message #204025] Wed, 30 November 2005 05:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: seshasai.aesv.softwareag.com

Hi Felix

Thanks for answering the question

It is our project requiremnt.

Also do you refer me to some examples for bringing the treview inside the
editor.

Thanks
Venkat
Re: Pros and Cons about Using a tree view inside the editor [message #204256 is a reply to message #204052] Thu, 01 December 2005 17:32 Go to previous messageGo to next message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
"venkat" <seshasai.aesv@softwareag.com> wrote in message
news:663fa717d03da6cdd9fdaefef98a1913$1@www.eclipse.org...
> Hi Felix
> Thanks for answering the question
> It is our project requiremnt.
>
> Also do you refer me to some examples for bringing the treview inside the
> editor.
>
> Thanks Venkat
>

I don't know the details of your project, but I would say that your
requirement contradicts basic Eclipse UI design guidelines and should be
changed ;)

Sorry, I don't have know of any examples.
Re: Pros and Cons about Using a tree view inside the editor [message #204324 is a reply to message #204256] Thu, 01 December 2005 19:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I think you are confusing Viewer and View. He just wants a tree control
inside his editor.

Or maybe I'm confused...

"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dmnc3u$ttu$1@news.eclipse.org...
> "venkat" <seshasai.aesv@softwareag.com> wrote in message
> news:663fa717d03da6cdd9fdaefef98a1913$1@www.eclipse.org...
>> Hi Felix
>> Thanks for answering the question
>> It is our project requiremnt.
>>
>> Also do you refer me to some examples for bringing the treview inside the
>> editor.
>>
>> Thanks Venkat
>>
>
> I don't know the details of your project, but I would say that your
> requirement contradicts basic Eclipse UI design guidelines and should be
> changed ;)
>
> Sorry, I don't have know of any examples.
>
Re: Pros and Cons about Using a tree view inside the editor [message #204362 is a reply to message #204324] Fri, 02 December 2005 06:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: seshasai.aesv.softwareag.com

Hi All

Okay I will state my query once more,

My specefic requiremnet is in Multipage editor on one tab I need to show a
tree editor where i can show a tree which I could manipulate to listen to
drag and drop ,also I need to show a palette for this page.

For the above case I was able to get a tree with out using treeeditor
following is the code but I cannot figure out how to create a palette for
a multipage editor I need some hints on this
************************************************************ ******************
void createPage1() {

Composite composite = new Composite(getContainer(), SWT.NONE);
//GridLayout layout = new GridLayout();
composite.setLayout(new FillLayout());



final Tree tree = new Tree(composite, SWT.BORDER);
File[] roots = File.listRoots();
for (int i = 0; i < roots.length; i++) {
TreeItem root = new TreeItem(tree, 0);
root.setText(roots[i].toString());
root.setData(roots[i]);
new TreeItem(root, 0);
}
tree.addListener(SWT.Expand, new Listener() {
public void handleEvent(final Event event) {
final TreeItem root = (TreeItem) event.item;
TreeItem[] items = root.getItems();
for (int i = 0; i < items.length; i++) {
if (items[i].getData() != null)
return;
items[i].dispose();
}
File file = (File) root.getData();
File[] files = file.listFiles();
if (files == null)
return;
for (int i = 0; i < files.length; i++) {
TreeItem item = new TreeItem(root, 0);
item.setText(files[i].getName());
item.setData(files[i]);
if (files[i].isDirectory()) {
new TreeItem(item, 0);
}
}
}
});
int index = addPage(composite);
setPageText(index, "Design");
}
************************************************************ ******************

On the second page I need to show an XML structure which would show a XML
file. Which is not a problem as I can use the XML editor for this.

Randy I need some hints so as to how can I make a palette for Multipage
Editor

Thanks
Sai
Re: Pros and Cons about Using a tree view inside the editor [message #204371 is a reply to message #203931] Fri, 02 December 2005 06:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: awd.ad.net

what
Re: Pros and Cons about Using a tree view inside the editor [message #204379 is a reply to message #204362] Fri, 02 December 2005 08:50 Go to previous message
Eclipse UserFriend
Originally posted by: seshasai.aesv.softwareag.com

okay I was able to create a paleete for the multipage editor
I created a simple editor "SimpleEditor extends GraphicalEditorWithPalette
"

and did
addPage(simpleeditor, getEditorInput()); inside one page of the
multieditor

Now I am Grappling with bringing in a tree inside this simpleeditor how
could I achieve this

simpleeditor is a GraphicalViewer so is it possible to put treeviewer
inside the Graphicalviewer

Thanks
Sai
Previous Topic:ScrollingGraphicalViewer in a FormPage
Next Topic:How to call a Treeviewer inside the Graphicalviewer
Goto Forum:
  


Current Time: Wed Jan 22 12:15:58 GMT 2025

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

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

Back to the top