Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Using PDE View in a Wizard Page?
Using PDE View in a Wizard Page? [message #299844] Sat, 25 February 2006 19:16 Go to next message
Eclipse UserFriend
Originally posted by: ed.ed4becky.org

I have been playing with PDE and have created a view I like. Now I am
playing the NewTypeWizard, and I would like to use the view logic in
the context of a wizard page. I tried a couple of things, but being new
to SWT AND PDE, I am not getting it.

What is the best strategy for attacking this?
Re: Using PDE View in a Wizard Page? [message #299848 is a reply to message #299844] Sun, 26 February 2006 12:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ed.ed4becky.org

OK, there is a clearer way to ask for what I am looking to do.

I want to use a ContainerCheckedTreeViewer on a Wizard Page, but am
having a tough time figuring out how to make that work. I keep getting
an empty box.

For instnace, I have tried:

private void createTableViewControls(Composite parent)
{
viewer = new ContainerCheckedTreeViewer(parent, SWT.MULTI |
SWT.H_SCROLL | SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setSorter(new NameSorter());
}
Re: Using PDE View in a Wizard Page? [message #299862 is a reply to message #299848] Mon, 27 February 2006 05:18 Go to previous messageGo to next message
Eclipse UserFriend
Ed Thompson wrote:
> OK, there is a clearer way to ask for what I am looking to do.
>
> I want to use a ContainerCheckedTreeViewer on a Wizard Page, but am
> having a tough time figuring out how to make that work. I keep getting
> an empty box.
>
> For instnace, I have tried:
>
> private void createTableViewControls(Composite parent)
> {
> viewer = new ContainerCheckedTreeViewer(parent, SWT.MULTI |
> SWT.H_SCROLL | SWT.V_SCROLL);
> drillDownAdapter = new DrillDownAdapter(viewer);
> viewer.setContentProvider(new ViewContentProvider());
> viewer.setLabelProvider(new ViewLabelProvider());
> viewer.setSorter(new NameSorter());
> }

What do you mean by "empty box"? Is that the area, where usually the
tree is shown, but the tree contents are not visible? In this case
you missed to provide input for the tree viewer (use the setInput method
for that).

HTH,

Daniel Krügler
Re: Using PDE View in a Wizard Page? [message #299864 is a reply to message #299862] Mon, 27 February 2006 06:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ed.ed4becky.org

Daniel Krügler wrote:
> Ed Thompson wrote:
>
>> OK, there is a clearer way to ask for what I am looking to do.
>>
>> I want to use a ContainerCheckedTreeViewer on a Wizard Page, but am
>> having a tough time figuring out how to make that work. I keep
>> getting an empty box.
>>
>> For instnace, I have tried:
>>
>> private void createTableViewControls(Composite parent)
>> {
>> viewer = new ContainerCheckedTreeViewer(parent, SWT.MULTI |
>> SWT.H_SCROLL | SWT.V_SCROLL);
>> drillDownAdapter = new DrillDownAdapter(viewer);
>> viewer.setContentProvider(new ViewContentProvider());
>> viewer.setLabelProvider(new ViewLabelProvider());
>> viewer.setSorter(new NameSorter());
>> }
>
>
> What do you mean by "empty box"? Is that the area, where usually the
> tree is shown, but the tree contents are not visible? In this case
> you missed to provide input for the tree viewer (use the setInput method
> for that).
>
> HTH,
>
> Daniel Krügler


What do I setInput() to? I am unclear on this point.
Re: Using PDE View in a Wizard Page? [message #299867 is a reply to message #299864] Mon, 27 February 2006 07:03 Go to previous messageGo to next message
Eclipse UserFriend
Ed Thompson wrote:
> What do I setInput() to? I am unclear on this point.

Invoking setInput initializes the tree with your domain model.
I recommend to have a look at the articles

http://www.eclipse.org/articles/treeviewer-cg/TreeViewerArti cle.htm
http://www-128.ibm.com/developerworks/library/os-ecgui1/

for better understanding.

In short: The key problem is that the tree content provider's
getElements method is only called on input change (getElements returns
your root objects).

Greetings from Bremen,

Daniel
Re: Using PDE View in a Wizard Page? [message #299908 is a reply to message #299867] Mon, 27 February 2006 21:35 Go to previous message
Eclipse UserFriend
Originally posted by: ed.ed4becky.org

Thanx - those artices helped a lot. I didn't find them when I
googled, but I may have been too specific.

That did the trick - got everything up and running

Appreciate the help!
Previous Topic:Installing Java 1.5 SDK on Macintosh TIger OS
Next Topic:IOConsole
Goto Forum:
  


Current Time: Fri May 09 12:12:39 EDT 2025

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

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

Back to the top