From bdc50a93337fd8ef0f38a60404e819e027fdd44a Mon Sep 17 00:00:00 2001 From: lbrayner Date: Fri, 23 Jun 2023 00:05:40 -0300 Subject: [PATCH] Removed debugging messages --- .../internal/corrections/RefactorProcessor.java | 15 --------------- .../core/internal/handlers/CodeActionHandler.java | 4 ---- .../core/internal/handlers/JDTLanguageServer.java | 1 - 3 files changed, 20 deletions(-) diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/RefactorProcessor.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/RefactorProcessor.java index de2cf88160..c8991018ed 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/RefactorProcessor.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/RefactorProcessor.java @@ -125,7 +125,6 @@ public RefactorProcessor(PreferenceManager preferenceManager) { } public List getProposals(CodeActionParams params, IInvocationContext context, IProblemLocationCore[] locations) throws CoreException { - JavaLanguageServerPlugin.logError("RefactorProcessor.getProposals called"); ASTNode coveringNode = context.getCoveringNode(); if (coveringNode != null) { ArrayList proposals = new ArrayList<>(); @@ -1026,20 +1025,14 @@ private boolean getChangeSignatureProposal(CodeActionParams params, IInvocationC } private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Collection 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(); @@ -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(); @@ -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(); @@ -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; @@ -1090,8 +1077,6 @@ private boolean getSurroundWithTryCatchProposal(IInvocationContext context, Coll JavaLanguageServerPlugin.log(e); } - JavaLanguageServerPlugin.logError("getSurroundWithTryCatchProposal core exception"); - return false; } } diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CodeActionHandler.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CodeActionHandler.java index e7bfcf3388..c4445013cc 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CodeActionHandler.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CodeActionHandler.java @@ -96,7 +96,6 @@ public CodeActionHandler(PreferenceManager preferenceManager) { } public List> getCodeActionCommands(CodeActionParams params, IProgressMonitor monitor) { - JavaLanguageServerPlugin.logError("CodeActionHandler.getCodeActionCommands called"); if (monitor.isCanceled()) { return Collections.emptyList(); } @@ -181,8 +180,6 @@ public List> getCodeActionCommands(CodeActionParams try { List 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); @@ -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); diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java index 9fd58eabe8..0c17a9fd6e 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java @@ -736,7 +736,6 @@ public CompletableFuture>> docume @Override public CompletableFuture>> codeAction(CodeActionParams params) { debugTrace(">> document/codeAction"); - JavaLanguageServerPlugin.logError("JDTLanguageServer codeAction params "+params); CodeActionHandler handler = new CodeActionHandler(this.preferenceManager); return computeAsync((monitor) -> { waitForLifecycleJobs(monitor);