NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

how to get selected file in netbeans project

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
chimomura



Joined: 28 Sep 2010
Posts: 2

PostPosted: Tue Sep 28, 2010 12:33 pm    Post subject: how to get selected file in netbeans project Reply with quote

hello everybody
I am not good in English but I'll try to do my best to express my issue so that you will understand my problem and tell me if you can and i will appreciate it very much.

so, I am developing a netbeans plugin using Netbeans API.
and I need to get the selected file of the main project in File view.

I already get the Main project by this code :
OpenProjects op=OpenProjects.getDefault();
Project prj=op.getMainProject();

but I don't now how to get the selected file (.java, .xml or, any extension )inside this Main Project using netbeans API or other API.

please, if you can help me, I will very appreciate it.

thanks
Back to top
chimomura



Joined: 28 Sep 2010
Posts: 2

PostPosted: Thu Sep 30, 2010 8:59 am    Post subject: Reply with quote

Hi

I don't Know if my question was not clear but I can give more details
I am working on a project to develope a Netbeans Plugin using netbeans module
so, in my program I need to get the path of the selected file of the main project in netbeans project view (the project navigation treeon netbeans IDE).

so, I have already get the main Project using the code I have post the last one but i can't get the selected file in the current main projet to manipulate it.
I searched in netbeans API but i did not find th class to do it.

I hope i made it clear now

if someone have worked with this API and can help me i will apreciate it

thanks
Back to top
Mark Wade
Posted via mailing list.





PostPosted: Fri Oct 01, 2010 2:17 pm    Post subject: how to get selected file in netbeans project Reply with quote

On Sep 30, 2010, at 4:59 AM, chimomura wrote:

Quote:
Hi

I don't Know if my question was not clear but I can give more details
I am working on a project to develope a Netbeans Plugin using
netbeans module
so, in my program I need to get the path of the selected file of
the main project in netbeans project view (the project navigation
treeon netbeans IDE).

so, I have already get the main Project using the code I have post
the last one but i can't get the selected file in the current main
projet to manipulate it.
I searched in netbeans API but i did not find th class to do it.

I hope i made it clear now

if someone have worked with this API and can help me i will
apreciate it

thanks



As you haven't received any responses I thought I might try to offer
some help, though I don't know the answer.

If I were to try I would look into the Explorer and Property Sheet
API, specifically
org.openide.explorer.view.NodeListModel.getSelectedItem().
Also org.netbeans.spi.viewmodel for events and listeners.


Mark Wade
address-removed
Back to top
Mark Wade
Posted via mailing list.





PostPosted: Fri Oct 01, 2010 9:31 pm    Post subject: how to get selected file in netbeans project Reply with quote

On Oct 1, 2010, at 10:15 AM, Mark Wade wrote:

Quote:
As you haven't received any responses I thought I might try to offer
some help, though I don't know the answer.

If I were to try I would look into the Explorer and Property Sheet
API, specifically
org.openide.explorer.view.NodeListModel.getSelectedItem().
Also org.netbeans.spi.viewmodel for events and listeners.

Yeah, that's not any help. Maybe you'd have a better response on the
developer forum.

http://forums.netbeans.org/netbeans-developers.html

and the mailing list archives:

http://netbeans.org/projects/platform/lists/dev/archive

subscribe to the mailing list here:

http://netbeans.org/community/lists/top.html#dev

Mark Wade
address-removed
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo