Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JFaceNodeAdapter questions
JFaceNodeAdapter questions [message #190516] Wed, 28 March 2007 01:10 Go to next message
Eclipse User
Originally posted by: konigsberg.at.geemail.dot.com

Hello,

1. What is the difference between IJFaceNodeAdapter.getElements and
IJFaceNodeAdapter.getChildren()? I'm not clear on this.

2. If I have XML like so:

<foo>
<bar val=1/>
<bar val=2/>
<quux val=3/>
<quux val=4/>
</foo>

And I want the outline to look like this:

Foo
+-bars
+-bar val=1
-bar val=2
+-quuxes
+-quux val=3
-quux val=4

I imagine I can play with getChildren and getElements to create a fake
sub-heirarchy. I can imagine that there may be some problems with this,
such as with the double-click listener and so on. Am I looking to do
something abominable, or is this somewhat standard? Thanks!

Thanks, Robert
Re: JFaceNodeAdapter questions [message #190571 is a reply to message #190516] Wed, 28 March 2007 13:46 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2250
Registered: July 2009
Senior Member
Robert Konigsberg wrote:
> Hello,
>
> 1. What is the difference between IJFaceNodeAdapter.getElements and
> IJFaceNodeAdapter.getChildren()? I'm not clear on this.
>
> 2. If I have XML like so:
>
> <foo>
> <bar val=1/>
> <bar val=2/>
> <quux val=3/>
> <quux val=4/>
> </foo>
>
> And I want the outline to look like this:
>
> Foo
> +-bars
> +-bar val=1
> -bar val=2
> +-quuxes
> +-quux val=3
> -quux val=4
>
> I imagine I can play with getChildren and getElements to create a fake
> sub-heirarchy. I can imagine that there may be some problems with this,
> such as with the double-click listener and so on. Am I looking to do
> something abominable, or is this somewhat standard? Thanks!

1. The differences are documented in the method documentation in the
IStructuredContentProvider and ITreeContentProvider interfaces.

2. I wouldn't expect any problems with double-click as its only
implemented for known object types. If you do run across any
problems, just open a bug report. As for faking the tree hierarchy,
the DTD outline already does something similar for its "Group items
logically" mode, so it's not "abominable" at all.

--
Nitin Dahyabhai
Structured Source Editor


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JFaceNodeAdapter questions [message #190631 is a reply to message #190571] Wed, 28 March 2007 17:29 Go to previous message
Eclipse User
Originally posted by: konigsberg.at.geemail.dot.com

Nitin Dahyabhai wrote:
> Robert Konigsberg wrote:
>
>> Hello,
>>
>> 1. What is the difference between IJFaceNodeAdapter.getElements and
>> IJFaceNodeAdapter.getChildren()? I'm not clear on this.
>>
>> 2. If I have XML like so:
>>
>> <foo>
>> <bar val=1/>
>> <bar val=2/>
>> <quux val=3/>
>> <quux val=4/>
>> </foo>
>>
>> And I want the outline to look like this:
>>
>> Foo
>> +-bars
>> +-bar val=1
>> -bar val=2
>> +-quuxes
>> +-quux val=3
>> -quux val=4
>>
>> I imagine I can play with getChildren and getElements to create a fake
>> sub-heirarchy. I can imagine that there may be some problems with
>> this, such as with the double-click listener and so on. Am I looking
>> to do something abominable, or is this somewhat standard? Thanks!
>
>
> 1. The differences are documented in the method documentation in the
> IStructuredContentProvider and ITreeContentProvider interfaces.

Sorry, I didn't look that far down the interface chain. Thanks.

> 2. I wouldn't expect any problems with double-click as its only
> implemented for known object types. If you do run across any problems,
> just open a bug report. As for faking the tree hierarchy, the DTD
> outline already does something similar for its "Group items logically"
> mode, so it's not "abominable" at all.

Awesome, thanks. Nitin comes to the rescue, again.

> --
> Nitin Dahyabhai
> Structured Source Editor
Previous Topic:BEA WebLogic Server support in WTP 2.0
Next Topic:Accessing an SSL website within Web Services Explorer
Goto Forum:
  


Current Time: Thu Aug 21 16:15:31 EDT 2014

Powered by FUDForum. Page generated in 0.01840 seconds