You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/04/26 14:38:58 UTC
[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2915: Build & Rebuild actions are disabled in mx projects!
JaroslavTulach commented on a change in pull request #2915:
URL: https://github.com/apache/netbeans/pull/2915#discussion_r620360834
##########
File path: java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteActionProvider.java
##########
@@ -139,27 +141,50 @@ public void invokeAction(String action, Lookup context) throws IllegalArgumentEx
return;
}
ListeningDICookie ldic = ListeningDICookie.create(-1);
- Object obj = ldic.getArgs().get("port"); // NOI18N
DebuggerInfo di = DebuggerInfo.create(ListeningDICookie.ID, ldic);
- DebuggerEngine[] engines = { null };
- RequestProcessor.getDefault().post(() -> {
- DebuggerEngine[] engs = DebuggerManager.getDebuggerManager().startDebugging(di);
- engines[0] = engs[0];
+ ASYNC.post(() -> {
+ DebuggerManager.getDebuggerManager().startDebugging(di);
});
int port = ldic.getPortNumber();
- runMx(Bundle.MSG_Unittest(fo.getName()), "--attach", "" + port, "unittest", fo.getName() + testSuffix); // NOI18N
+ running = runBuildAndMx(null, Bundle.MSG_Unittest(fo.getName()), "--attach", "" + port, "unittest", fo.getName() + testSuffix); // NOI18N
break;
default:
throw new UnsupportedOperationException(action);
}
+ if (running != null) {
+ ActionProgress progress = ActionProgress.start(context);
+ running.handle((exitCode, error) -> {
+ progress.finished(exitCode == 0 && error == null);
+ return null;
+ });
+ }
}
- private boolean runMx(String taskName, String... args) {
+ private CompletionStage<Integer> ensureBuilt(FileObject fo) {
+ if (fo != null) {
+ SuiteSources.Group grp = prj.getSources().findGroup(fo);
+ if (grp != null) {
+ final String name = grp.getDisplayName();
+ return runMx(Bundle.MSG_BuildOnly(prj.getName(), name), "build", "--only", name); // NOI18N
Review comment:
`prj.getDisplayName()` doesn't exist. the `name` isn't a project (e.g. suite in mx terms) name, but rather a name of the source group - e.g. project in mx terms.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists