[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform] Re: Common navigator with custom data
|
What I want to do is...
We have some .xml files containing definitions for various objects, tests
for example (with maybe an id and an outcome, and there are more than one
test per file). So I can display the file system, thats easy ;) But what I'd
like to do is to show my objects directly in the navigator, removing every
links with the file system. But I'd also like to keep the "look-and-feel"
from Eclipse (the whole New, Copy, Paste... menu mainly). So that's why I am
trying to use the CNF, but using my own tree from scratch seems complicated,
I have never worked with IAdaptable objects before...And I thought (and I am
less and less sure about this) that it would be easier to use the CNF,
because some things would already be there for me...but I think I was wrong
after all :(
François
"David Kyle" <davidk@xxxxxxxxxx> wrote in message
news:f3i07f$rvp$1@xxxxxxxxxxxxxxxxxxxx
> François,
>
> David
>
>> I think I found how to implement my own structure, but it implies having
>> all my classes implementing IAdaptable, and well...I don't think that is
>> what we want to do, at least not for now. I think I'm more gonna use the
>> default workspace and try to configure it...hopefully it might work.
>
> We simply implemented IAdaptable to return null.
>
>> But while we're at it...maybe you can help :)
>> I dont't want to include the whole
>> "org.eclipse.ui.navigator.resourceContent" contentExtension, but I'd
>> really like to use some things that are declared in it...like the drop
>> assistant for example...and well...I have no way how to do this. Do you
>> have any knowledge of how I could achieve this ?
>
> Do you mean implementing an org.eclipse.ui.navigator.navigatorContent
> extension? It can simply be an implementation of ITreeContentProvider. If
> you are familiar with JFace you will have already implemented an
> IStructuredContentProvider. If you need to implement an F5 refresh the
> saving/restoring of expanded paths can get tricky.
>
> I haven't needed to implement a drop assistant so I'm not going to be of
> much help.
>
> Do try spend the time to go through Micheal Elders articles.
>
> David
>
>