I am trying to create netbeans module which whould work upon standard maven java projects. Is there some better way to do that then how it was adviced in: How can I get a project type on Netbeans Platform? This seems to be pretty dependent on implmenetation (note the *Impl postfix of the implementing class found in lookup). I couldn't find any standard method in the Project API. Any ideas? Or is it safe to rely on some "NbMavenProjectImpl" string?
Currently I am going this way:
Project mainProject = OpenProjects.getDefault().getMainProject();
if (mainProject == null) {
return;
}
String projectType = mainProject.getClass().getName();
if (projectType.equals("NbMavenProjectImpl")) {
// do some action with the project here
}