Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JFaceNodeAdapter questions
JFaceNodeAdapter questions [message #190516] Wed, 28 March 2007 05:10 Go to next message
Eclipse UserFriend
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 17:46 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
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 Web Tools Platform
Re: JFaceNodeAdapter questions [message #190631 is a reply to message #190571] Wed, 28 March 2007 21:29 Go to previous message
Eclipse UserFriend
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: Fri Apr 19 01:03:22 GMT 2024

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

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

Back to the top