Errors and completions in NetBeans 24+ (#11531)

This commit is contained in:
Jaroslav Tulach 2024-11-14 06:47:29 +01:00 committed by GitHub
parent af0b95b1d9
commit 0a9478c967
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 4 deletions

View File

@ -5,7 +5,7 @@
<artifactId>enso4igv</artifactId>
<packaging>nbm</packaging>
<name>Enso Language Support for NetBeans &amp; Ideal Graph Visualizer</name>
<version>1.40-SNAPSHOT</version>
<version>1.41-SNAPSHOT</version>
<build>
<plugins>
<plugin>

View File

@ -63,6 +63,7 @@ public final class EnsoActionProvider implements ActionProvider {
@Override
public void invokeAction(String action, Lookup lkp) throws IllegalArgumentException {
var enableDebug = COMMAND_DEBUG_SINGLE.equals(action) || COMMAND_DEBUG.equals(action);
var process = ActionProgress.start(lkp);
var params = ExplicitProcessParameters.buildExplicitParameters(lkp);
var fo = lkp.lookup(FileObject.class);
@ -89,7 +90,7 @@ public final class EnsoActionProvider implements ActionProvider {
var b = ProcessBuilder.getLocal();
b.setExecutable(file.getPath());
b.setArguments(prepareArguments(script));
b.setArguments(prepareArguments(script, enableDebug));
b.setWorkingDirectory(script.getParent());
b.setRedirectErrorStream(true);
@ -135,7 +136,7 @@ public final class EnsoActionProvider implements ActionProvider {
} else {
descriptor = descriptor.controllable(true);
}
var launch = COMMAND_DEBUG_SINGLE.equals(action) || COMMAND_DEBUG.equals(action) ?
var launch = enableDebug ?
new DebugAndLaunch(fo, builder, params) : builder;
var service = ExecutionService.newService(launch, descriptor, script.getName());
service.run();
@ -199,8 +200,11 @@ public final class EnsoActionProvider implements ActionProvider {
}
private static List<String> prepareArguments(File script) {
private static List<String> prepareArguments(File script, boolean enableJvm) {
var list = new ArrayList<String>();
if (enableJvm) {
list.add("--jvm");
}
list.add("--run");
list.add(script.getPath());
return list;

View File

@ -32,6 +32,19 @@
<folder name="ToolTips">
<file name="org-netbeans-modules-debugger-jpda-truffle-vars-tooltip-ToolTipAnnotation.instance"/>
</folder>
<file name="org-netbeans-modules-lsp-client-bridge-BridgingLanguageServerProvider.instance">
<!--org.netbeans.modules.lsp.client.newpackage-->
<attr name="instanceOf" stringvalue="org.netbeans.modules.lsp.client.spi.LanguageServerProvider"/>
</file>
<folder name="SideBar">
<file name="breadcrumbs.instance">
<!--org.netbeans.modules.lsp.client.newpackage-->
<attr name="location" stringvalue="South"/>
<attr intvalue="5237" name="position"/>
<attr boolvalue="false" name="scrollable"/>
<attr methodvalue="org.netbeans.modules.editor.breadcrumbs.spi.BreadcrumbsController.createSideBarFactory" name="instanceCreate"/>
</file>
</folder>
</folder>
</folder>
</folder>