unable to look up current project

"mcheung63" <[email protected]>
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <[email protected]>
Hi All, i popup a JDialog, inside that i execute "Project project = OpenProjects.getDefault().getMainProject();", it always null. If i do:

Lookup lookup = Utilities.actionsGlobalContext();
Project project = lookup.lookup(Project.class);

I can get current project only i click on the project node in projects window. If i click another node, such as any file within any project. The above code return null.

Please help
thanks
from Peter ([email protected])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.