MIMEResolver, Favorites and Nodes

View: New views
4 Messages — Rating Filter:   Alert me  

MIMEResolver, Favorites and Nodes

by Gregor Kovač :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi!

I have three questions how to do things in NetBeans Platform 6.1:
1.) I want to create a MIMEResolver subclass that will return a MIME
type for files displayed in Favorites.
I know how to do that using layer.xml and special file that is
registed in Services/MIMEResolver folder. I also created my
MIMEResolver that takes a setting from NbPreferences and returns
correct MIME for giver FileObject. How do I now register it in defualt
Lookup?
2.) How do I use Nodes and Explorer API to display a tree of files in
a directory?
3.) Since I don't know how to do that I'm using Favorites to display a
tree of files. I also created a special Action that is displayed on
popup menu when a node is right-clicked. Of course now this Action is
tied to a MIMEs that are defined in Services/MIMEResolver. Now if I
use my MIMEResolver. If I open a subfolder in Favorites, will MIMEs be
resolved everytime the node is opened or only once? I'm asking this
because I'd like to resolve MIME for a FileObject according to
settings in NbPreferences.

Best regards,
    Kovi

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
| Gregor Kovac |    Gregor.Kovac@...   |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|  In A World Without Fences Who Needs Gates?  |
|              Experience Linux.               |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

RE: MIMEResolver, Favorites and Nodes

by Michael Darragh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Did you get any good input for these questions? If so could you forward/direct me to the answers as well?

 

Thanks in advance,

 

-Mike

 

From: Gregor.Kovac@... [mailto:Gregor.Kovac@...]
Sent: Tuesday, May 13, 2008 2:17 PM
To: nbdev@...
Subject: [nbdev] MIMEResolver, Favorites and Nodes

 


Hi!

I have three questions how to do things in NetBeans Platform 6.1:
1.) I want to create a MIMEResolver subclass that will return a MIME
type for files displayed in Favorites.
I know how to do that using layer.xml and special file that is
registed in Services/MIMEResolver folder. I also created my
MIMEResolver that takes a setting from NbPreferences and returns
correct MIME for giver FileObject. How do I now register it in defualt
Lookup?
2.) How do I use Nodes and Explorer API to display a tree of files in
a directory?
3.) Since I don't know how to do that I'm using Favorites to display a
tree of files. I also created a special Action that is displayed on
popup menu when a node is right-clicked. Of course now this Action is
tied to a MIMEs that are defined in Services/MIMEResolver. Now if I
use my MIMEResolver. If I open a subfolder in Favorites, will MIMEs be
resolved everytime the node is opened or only once? I'm asking this
because I'd like to resolve MIME for a FileObject according to
settings in NbPreferences.

Best regards,
    Kovi

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
| Gregor Kovac |    Gregor.Kovac@...   |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|  In A World Without Fences Who Needs Gates?  |
|              Experience Linux.               |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~


Re: MIMEResolver, Favorites and Nodes

by Gregor Kovač :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, nobody answered yet.

Best regards,
    Kovi

Michael Darragh pravi:

>
> Did you get any good input for these questions? If so could you
> forward/direct me to the answers as well?
>
>  
>
> Thanks in advance,
>
>  
>
> -Mike
>
>  
>
> *From:* Gregor.Kovac@... [mailto:Gregor.Kovac@...]
> *Sent:* Tuesday, May 13, 2008 2:17 PM
> *To:* nbdev@...
> *Subject:* [nbdev] MIMEResolver, Favorites and Nodes
>
>  
>
>
> Hi!
>
> I have three questions how to do things in NetBeans Platform 6.1:
> 1.) I want to create a MIMEResolver subclass that will return a MIME
> type for files displayed in Favorites.
> I know how to do that using layer.xml and special file that is
> registed in Services/MIMEResolver folder. I also created my
> MIMEResolver that takes a setting from NbPreferences and returns
> correct MIME for giver FileObject. How do I now register it in defualt
> Lookup?
> 2.) How do I use Nodes and Explorer API to display a tree of files in
> a directory?
> 3.) Since I don't know how to do that I'm using Favorites to display a
> tree of files. I also created a special Action that is displayed on
> popup menu when a node is right-clicked. Of course now this Action is
> tied to a MIMEs that are defined in Services/MIMEResolver. Now if I
> use my MIMEResolver. If I open a subfolder in Favorites, will MIMEs be
> resolved everytime the node is opened or only once? I'm asking this
> because I'd like to resolve MIME for a FileObject according to
> settings in NbPreferences.
>
> Best regards,
>     Kovi
>
> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
> | Gregor Kovac |    Gregor.Kovac@...   |
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> |  In A World Without Fences Who Needs Gates?  |
> |              Experience Linux.               |
> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
>

--
____________________________
|http://kovica.blogspot.com|
-----------------------------~-~-~-~-~-~-~-~-~-~-
|  In A World Without Fences Who Needs Gates? |
|              Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-


Re: MIMEResolver, Favorites and Nodes

by Jesse Glick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

BTW questions like these belong better to dev@....

Gregor.Kovac@... wrote:
> I also created my MIMEResolver that takes a setting from
> NbPreferences and returns correct MIME for given FileObject. How do I
> now register it in defualt Lookup?

Use META-INF/services as usual.

> 2.) How do I use Nodes and Explorer API to display a tree of files in
> a directory?

Most simply, use DataObject.find(root).getNodeDelegate() to make a node,
then create a panel which is an ExplorerManager.Provider and add a
BeanTreeView to it.