NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
remya
Joined: 24 Sep 2012 Posts: 13
|
Posted: Fri Dec 07, 2012 5:03 am Post subject: How to get the dataobject of file that is opened using "Open file" in netbeans |
|
|
Hi,
I opened a file in netebeans platform using "Open file" under file menu.
I need to get the dataobject of the opened file.
Is there any listener that listenes to opening a file.
Please help. |
|
| Back to top |
|
 |
Monezz
Joined: 18 Feb 2009 Posts: 254
|
Posted: Fri Dec 07, 2012 9:36 pm Post subject: [platform-dev] Re: How to get the dataobject of file that is opened using "Open file" in netbeans |
|
|
| Quote: | I opened a file in netebeans platform using "Open file" under file menu.
I need to get the dataobject of the opened file.
Is there any listener that listenes to opening a file.
| You could probably use the |
|
| Back to top |
|
 |
markiewb
Joined: 29 Aug 2012 Posts: 271
|
Posted: Fri Dec 07, 2012 9:46 pm Post subject: [platform-dev] Re: How to get the dataobject of file that is opened using "Open file" in netbeans |
|
|
When you have a file or fileobject then you can get the dataobject the following way: [url=http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/openide/loaders/DataObject.html#find(org.openide.filesystems.FileObject)]http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/openide/loaders/DataObject.html#find(org.openide.filesystems.FileObject)[/url]
Greetings markiewb Am 07.12.2012 21:59 schrieb "remya" <address-removed ([email]address-removed[/email])>: | Quote: | Hi,
I opened a file in netebeans platform using "Open file" under file menu.
I need to get the dataobject of the opened file.
Is there any listener that listenes to opening a file.
Please help.
|
|
|
| Back to top |
|
 |
remya
Joined: 24 Sep 2012 Posts: 13
|
Posted: Mon Dec 10, 2012 5:35 am Post subject: How to get the file opened in netbeans platform using "open file" under file menu. |
|
|
Thanks for the reply.
I think I didnt clearly mention the requirement.
When I open a file in netbeans platform, I want to get the file that I opened using the JFilechooser provided by the netbeans platform.
The purpose of this is to maintain an arraylist for all the files that is opened using netbeans platform's "Open File" under File Menu. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|