You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jaroslav Tulach (JIRA)" <ji...@apache.org> on 2017/10/26 14:44:00 UTC
[jira] [Created] (NETBEANS-103) Cannot open Maven and node.js
projects after New Project wizard
Jaroslav Tulach created NETBEANS-103:
----------------------------------------
Summary: Cannot open Maven and node.js projects after New Project wizard
Key: NETBEANS-103
URL: https://issues.apache.org/jira/browse/NETBEANS-103
Project: NetBeans
Issue Type: Bug
Components: projects - Generic Projects UI, projects - Maven
Affects Versions: 8.2
Reporter: Jaroslav Tulach
Priority: Minor
I have a [wizard that creates two projects|https://github.com/JaroslavTulach/graal-js-archetype/commit/379693f2a47c21bffd5bdad9321d727c7affdcbe] - one Maven and inside of it a node.js
ready folder with `packages.json` file. I'd like the *New Project* wizard to open both projects.
Currently only the Maven project is opened. Only if I patch *NetBeans* as:
{code:diff}
netbeans$ hg diff
diff -r fcaaa60addf7 maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java
--- a/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java Tue Oct 17 16:38:27 2017 +0200
+++ b/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java Thu Oct 26 16:43:23 2017 +0200
@@ -912,11 +912,17 @@
if (obj instanceof NbMavenProjectImpl) {
impl = ((NbMavenProjectImpl) obj);
} else {
- impl = ((Project) obj).getLookup().lookup(NbMavenProjectImpl.class);
+ NbMavenProjectImpl realMaven = ((Project) obj).getLookup().lookup(NbMavenProjectImpl.class);
+ if (realMaven != null && realMaven.getProjectDirectory().equals(((Project) obj).getProjectDirectory())) {
+ impl = realMaven;
+ } else {
+ impl = null;
+ }
}
if (impl != null) {
return getPOMFile().equals(impl.getPOMFile());
}
+
}
return false;
}
diff -r fcaaa60addf7 projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java
--- a/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java Tue Oct 17 16:38:27 2017 +0200
+++ b/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java Thu Oct 26 16:43:23 2017 +0200
@@ -198,7 +198,7 @@
if (newFo.isFolder()) {
try {
Project p = ProjectManager.getDefault().findProject(newFo);
- if (p != null && !ProjectConvertors.isConvertorProject(p)) {
+ if (p != null) {
// It is a project, so schedule it to open:
projectsToOpen.add(p);
} else {
{code}
I am sure my patch isn't 100% correct and I am ready to adjust it according to here in provided suggestions.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)