Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Apache NetBeans
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NetBeans
Apache NetBeans
Commits
e076145d
Unverified
Commit
e076145d
authored
Feb 11, 2021
by
Geertjan Wielenga
Committed by
GitHub
Feb 11, 2021
Browse files
Options
Downloads
Plain Diff
Merge pull request #2754 from sdedic/lsp/bugfix/after-run-delay
Removing delay after launch Project action terminates.
parents
6dd33b46
6d33c206
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchRequestHandler.java
+4
-16
4 additions, 16 deletions
...a/lsp/server/debugging/launch/NbLaunchRequestHandler.java
with
4 additions
and
16 deletions
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchRequestHandler.java
+
4
−
16
View file @
e076145d
...
...
@@ -27,9 +27,6 @@ import java.util.Collections;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeoutException
;
import
java.util.function.Consumer
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -54,7 +51,6 @@ import org.openide.util.Utilities;
public
final
class
NbLaunchRequestHandler
{
private
NbLaunchDelegate
activeLaunchHandler
;
private
final
CompletableFuture
<
Boolean
>
waitForDebuggeeConsole
=
new
CompletableFuture
<>();
public
CompletableFuture
<
Void
>
launch
(
Map
<
String
,
Object
>
launchArguments
,
DebugAdapterContext
context
)
{
CompletableFuture
<
Void
>
resultFuture
=
new
CompletableFuture
<>();
...
...
@@ -174,14 +170,9 @@ public final class NbLaunchRequestHandler {
}
protected
void
handleTerminatedEvent
(
DebugAdapterContext
context
)
{
CompletableFuture
.
runAsync
(()
->
{
try
{
waitForDebuggeeConsole
.
get
(
1
,
TimeUnit
.
SECONDS
);
}
catch
(
InterruptedException
|
ExecutionException
|
TimeoutException
e
)
{
// do nothing.
}
// Project Action has already closed the I/O streams, and even in NetBeans IDE, the output area
// is already inactive at this point.
context
.
getClient
().
terminated
(
new
TerminatedEventArguments
());
});
}
private
final
class
OutputListener
implements
Consumer
<
NbProcessConsole
.
ConsoleMessage
>
{
...
...
@@ -194,10 +185,7 @@ public final class NbLaunchRequestHandler {
@Override
public
void
accept
(
NbProcessConsole
.
ConsoleMessage
message
)
{
if
(
message
==
null
)
{
// EOF
waitForDebuggeeConsole
.
complete
(
true
);
}
else
{
if
(
message
!=
null
)
{
OutputEventArguments
outputEvent
=
convertToOutputEventArguments
(
message
.
output
,
message
.
category
,
context
);
context
.
getClient
().
output
(
outputEvent
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment