Skip to content

Commit

Permalink
Removed debugging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lbrayner committed Jun 26, 2023
1 parent 91f929d commit bdc50a9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public RefactorProcessor(PreferenceManager preferenceManager) {
}

public List<ChangeCorrectionProposal> getProposals(CodeActionParams params, IInvocationContext context, IProblemLocationCore[] locations) throws CoreException {
JavaLanguageServerPlugin.logError("RefactorProcessor.getProposals called");
ASTNode coveringNode = context.getCoveringNode();
if (coveringNode != null) {
ArrayList<ChangeCorrectionProposal> proposals = new ArrayList<>();
Expand Down Expand Up @@ -1026,20 +1025,14 @@ private boolean getChangeSignatureProposal(CodeActionParams params, IInvocationC
}

private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Collection<ChangeCorrectionProposal> proposals) {
JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal called");

if (proposals == null) {
return false;
}

JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal proposals OK");

if(context.getSelectionLength() <= 0) {
return false;
}

JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal selection length OK");

ICompilationUnit cu = context.getCompilationUnit();

CompilationUnit astRoot = context.getASTRoot();
Expand All @@ -1048,8 +1041,6 @@ private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Coll
return false;
}

JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal covered node OK");

while (selectedNode != null && !(selectedNode instanceof Statement) && !(selectedNode instanceof VariableDeclarationExpression) && !(selectedNode.getLocationInParent() == LambdaExpression.BODY_PROPERTY)
&& !(selectedNode instanceof MethodReference)) {
selectedNode = selectedNode.getParent();
Expand All @@ -1058,8 +1049,6 @@ private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Coll
return false;
}

JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal selected node OK");

int offset = selectedNode.getStartPosition();
int length = selectedNode.getLength();
int selectionEnd = context.getSelectionOffset() + context.getSelectionLength();
Expand All @@ -1076,8 +1065,6 @@ private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Coll
return false;
}

JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal activation basics OK");

refactoring.setLeaveDirty(true);

String label = CorrectionMessages.LocalCorrectionsSubProcessor_surroundwith_trycatch_description;
Expand All @@ -1090,8 +1077,6 @@ private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Coll
JavaLanguageServerPlugin.log(e);
}

JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal core exception");

return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public CodeActionHandler(PreferenceManager preferenceManager) {
}

public List<Either<Command, CodeAction>> getCodeActionCommands(CodeActionParams params, IProgressMonitor monitor) {
JavaLanguageServerPlugin.logError("CodeActionHandler.getCodeActionCommands called");
if (monitor.isCanceled()) {
return Collections.emptyList();
}
Expand Down Expand Up @@ -181,8 +180,6 @@ public List<Either<Command, CodeAction>> getCodeActionCommands(CodeActionParams
try {
List<ChangeCorrectionProposal> refactorProposals = this.refactorProcessor.getProposals(params, context, locations);
refactorProposals.sort(comparator);
JavaLanguageServerPlugin.logError(
"CodeActionHandler adding "+refactorProposals.size()+" proposal(s).");
proposals.addAll(refactorProposals);
} catch (CoreException e) {
JavaLanguageServerPlugin.logException("Problem resolving refactor code actions", e);
Expand Down Expand Up @@ -360,7 +357,6 @@ public static CompilationUnit getASTRoot(ICompilationUnit unit, IProgressMonitor
}

public static InnovationContext getContext(ICompilationUnit unit, CompilationUnit astRoot, Range range) {
JavaLanguageServerPlugin.logError("CodeActionHandler.getContext range "+range);
int start = DiagnosticsHelper.getStartOffset(unit, range);
int end = DiagnosticsHelper.getEndOffset(unit, range);
InnovationContext context = new InnovationContext(unit, start, end - start);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ public CompletableFuture<List<Either<SymbolInformation, DocumentSymbol>>> docume
@Override
public CompletableFuture<List<Either<Command, CodeAction>>> codeAction(CodeActionParams params) {
debugTrace(">> document/codeAction");
JavaLanguageServerPlugin.logError("JDTLanguageServer codeAction params "+params);
CodeActionHandler handler = new CodeActionHandler(this.preferenceManager);
return computeAsync((monitor) -> {
waitForLifecycleJobs(monitor);
Expand Down

0 comments on commit bdc50a9

Please sign in to comment.