Skip to content

Commit

Permalink
refact: remove duplicate code from lsp4e.debug
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Aug 20, 2024
1 parent a651ebd commit d135a76
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 202 deletions.
3 changes: 2 additions & 1 deletion org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ui.ide;bundle-version="[3.16.0,4.0.0)",
org.eclipse.jface.text,
org.eclipse.ui.genericeditor,
org.eclipse.core.variables
org.eclipse.core.variables,
org.eclipse.lsp4e;bundle-version="0.18.13"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Import-Package: com.google.gson,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.lsp4e.LSPEclipseUtils;
import org.eclipse.lsp4e.debug.DSPPlugin;
import org.eclipse.lsp4e.debug.debugmodel.DSPDebugTarget;
import org.eclipse.lsp4e.debug.debugmodel.DSPStackFrame;
Expand Down Expand Up @@ -121,7 +122,7 @@ private boolean match(IDocument document, DSPStackFrame frame) {
return false;

if (sourceLocator.getSourceElement(frame) instanceof String sourceElement) {
final var uri = DocumentUtils.toUri(document);
final var uri = LSPEclipseUtils.toUri(document);
if (uri == null)
return false;
return Objects.equals(uri.getPath(), sourceElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*******************************************************************************/
package org.eclipse.lsp4e.debug.debugmodel;

import static org.eclipse.lsp4e.debug.internal.NullSafetyHelper.*;
import static org.eclipse.lsp4e.internal.NullSafetyHelper.*;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*******************************************************************************/
package org.eclipse.lsp4e.debug.debugmodel;

import static org.eclipse.lsp4e.debug.internal.NullSafetyHelper.*;
import static org.eclipse.lsp4e.internal.NullSafetyHelper.lateNonNull;

import java.io.IOException;
import java.io.InputStream;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*******************************************************************************/
package org.eclipse.lsp4e.debug.launcher;

import static org.eclipse.lsp4e.debug.internal.NullSafetyHelper.*;
import static org.eclipse.lsp4e.internal.NullSafetyHelper.castNonNull;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*******************************************************************************/
package org.eclipse.lsp4e.debug.launcher;

import static org.eclipse.lsp4e.debug.internal.NullSafetyHelper.*;
import static org.eclipse.swt.events.SelectionListener.*;
import static org.eclipse.lsp4e.internal.NullSafetyHelper.lateNonNull;
import static org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter;

import java.util.Arrays;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*******************************************************************************/
package org.eclipse.lsp4e.debug.presentation;

import static org.eclipse.lsp4e.debug.internal.NullSafetyHelper.*;
import static org.eclipse.lsp4e.internal.NullSafetyHelper.castNonNull;

import org.eclipse.core.runtime.Adapters;
import org.eclipse.debug.core.DebugException;
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.lsp4e.jdt/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
requiresUIThread="false">
</javaCompletionProposalComputer>
</extension>

<extension
id="ls-based-java-hover-provider"
point="org.eclipse.jdt.ui.javaEditorTextHovers">
Expand All @@ -24,7 +24,7 @@
id="org.eclipse.lsp4e.jdt.hoverprovider">
</hover>
</extension>

<extension
point="org.eclipse.core.filebuffers.documentSetup">
<participant
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.lsp4e/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ Bundle-ClassPath: .
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.lsp4e.LanguageServerPlugin
Export-Package: org.eclipse.lsp4e;x-internal:=true,
Export-Package: org.eclipse.lsp4e;x-friends:="org.eclipse.lsp4e.debug,org.eclipse.lsp4e.jdt",
org.eclipse.lsp4e.command;x-internal:=true,
org.eclipse.lsp4e.format;x-internal:=true,
org.eclipse.lsp4e.internal;x-friends:="org.eclipse.lsp4e.jdt",
org.eclipse.lsp4e.internal;x-friends:="org.eclipse.lsp4e.debug,org.eclipse.lsp4e.jdt",
org.eclipse.lsp4e.operations.codeactions;x-internal:=true,
org.eclipse.lsp4e.operations.completion;x-internal:=true,
org.eclipse.lsp4e.operations.format;x-internal:=true,
Expand Down

0 comments on commit d135a76

Please sign in to comment.