Re: File Type tutorial - Action next step

2022-07-18 Thread Geertjan Wielenga
You'll receive the FileObject in the ActionListener's constructor. Just put
it there and NetBeans will provide it. From the FileObject you can get the
File via FiltUtil.getFile(FileObject) or you can use the FileObject
directly and use UrlDisplayer to display it.

Gj

On Mon, Jul 18, 2022 at 12:37 PM Peter Rushforth 
wrote:

> Hi
>
> I successfully followed the tutorial on how to create a new file type over
> here: https://netbeans.apache.org/tutorials/nbm-filetype.html
>
> I created the stub Action listener/handler. The action I would like to
> code up is to run/view the new file in a browser, just like you can do with
> an html file with its "Run File  Shift+F6"  right-click menu item.
>
> I was looking for the code that implements that action, or some other clue
> as to how to go about it.
>
> Thanks for any pointers!
>
> Peter
>


File Type tutorial - Action next step

2022-07-18 Thread Peter Rushforth
Hi

I successfully followed the tutorial on how to create a new file type over
here: https://netbeans.apache.org/tutorials/nbm-filetype.html

I created the stub Action listener/handler. The action I would like to code
up is to run/view the new file in a browser, just like you can do with an
html file with its "Run File  Shift+F6"  right-click menu item.

I was looking for the code that implements that action, or some other clue
as to how to go about it.

Thanks for any pointers!

Peter