Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2571: As a smith I want to update Java, Eclipse, Xtend and related dependencies #2572

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -131,7 +131,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Expand Down
2 changes: 1 addition & 1 deletion docs/org.eclipse.n4js.design/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
1 change: 0 additions & 1 deletion docs/org.eclipse.n4js.design/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ Require-Bundle: org.eclipse.help,
org.eclipse.swt,
org.eclipse.jface,
org.eclipse.ui
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: org.eclipse.n4js.design
2 changes: 1 addition & 1 deletion docs/org.eclipse.n4js.spec/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
1 change: 0 additions & 1 deletion docs/org.eclipse.n4js.spec/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ Require-Bundle: org.eclipse.help,
org.eclipse.swt,
org.eclipse.jface,
org.eclipse.ui
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: org.eclipse.n4js.spec
2 changes: 1 addition & 1 deletion plugins/org.eclipse.n4js.cli/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -147,7 +147,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Expand Down
1 change: 0 additions & 1 deletion plugins/org.eclipse.n4js.cli/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.n4js.cli,
org.eclipse.n4js.cli.compiler
Automatic-Module-Name: org.eclipse.n4js.cli
Bundle-RequiredExecutionEnvironment: JavaSE-17
2 changes: 1 addition & 1 deletion plugins/org.eclipse.n4js.common.unicode/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -131,7 +131,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.xtext;visibility:=reexport,
org.eclipse.n4js.releng.utils;resolution:=optional,
org.eclipse.equinox.common;bundle-version="3.8.0";resolution:=optional,
org.objectweb.asm;resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: org.eclipse.n4js.common.unicode,
org.eclipse.n4js.common.unicode.serializer,
org.eclipse.n4js.common.unicode.services
Expand Down
2 changes: 1 addition & 1 deletion plugins/org.eclipse.n4js.dts/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -149,7 +149,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
Expand Down
1 change: 0 additions & 1 deletion plugins/org.eclipse.n4js.dts/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ Export-Package: org.antlr.v4.runtime,
org.eclipse.n4js.dts,
org.eclipse.n4js.dts.utils
Automatic-Module-Name: org.eclipse.n4js.dts
Bundle-RequiredExecutionEnvironment: JavaSE-17
2 changes: 1 addition & 1 deletion plugins/org.eclipse.n4js.flowgraphs/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -131,7 +131,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Expand Down
1 change: 0 additions & 1 deletion plugins/org.eclipse.n4js.flowgraphs/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.n4js.flowgraphs;singleton:=true
Bundle-Version: 0.0.1.qualifier
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.n4js.ts.model,
org.eclipse.n4js.releng.utils;resolution:=optional,
org.eclipse.n4js.utils,
Expand Down
6 changes: 5 additions & 1 deletion plugins/org.eclipse.n4js.ide/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen">
<attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -131,7 +131,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Expand Down
1 change: 0 additions & 1 deletion plugins/org.eclipse.n4js.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ Export-Package: org.eclipse.n4js.ide,
org.eclipse.n4js.ide.server.hover,
org.eclipse.n4js.ide.server.util
Automatic-Module-Name: org.eclipse.n4js.ide
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* N4JS-specific customizations of {@link WorkspaceFrontend}.
*/
@SuppressWarnings({ "restriction", "deprecation" })
@SuppressWarnings({ "restriction" })
public class N4JSWorkspaceFrontend extends WorkspaceFrontend {

@Inject
Expand Down Expand Up @@ -77,9 +77,9 @@ protected Either<List<? extends SymbolInformation>, List<? extends WorkspaceSymb
IResourceAccess resourceAccess = nonLoadingResourceAccess;
XChunkedResourceDescriptions liveScopeIndex = resourceTaskManager.createLiveScopeIndex();
try {
Either<List<? extends SymbolInformation>, List<? extends WorkspaceSymbol>> symbols = workspaceSymbolService
List<? extends WorkspaceSymbol> symbols = workspaceSymbolService
.getSymbols(params.getQuery(), resourceAccess, liveScopeIndex, cancelIndicator);
return symbols;
return Either.forRight(symbols);
} catch (Throwable th) {
// It seems that if this request fails (even if due to a cancellation), then some LSP clients (e.g. VS Code)
// will never try a 'workspace/symbols' request again, effectively turning off operation "open workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.eclipse.lsp4j.Range;
import org.eclipse.lsp4j.SymbolInformation;
import org.eclipse.lsp4j.SymbolKind;
import org.eclipse.lsp4j.WorkspaceSymbol;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
import org.eclipse.n4js.ide.server.util.SymbolKindUtil;
import org.eclipse.n4js.n4JS.BindingElement;
Expand Down Expand Up @@ -65,7 +66,7 @@
* obtaining symbol information. See {@link #getSymbolLocation(IEObjectDescription)}.
*/
@Singleton
@SuppressWarnings({ "restriction", "deprecation" })
@SuppressWarnings({ "restriction" })
public class N4JSDocumentSymbolService extends XDocumentSymbolService {

@Inject
Expand Down Expand Up @@ -156,22 +157,22 @@ protected boolean filter(IEObjectDescription description, String query) {

@Override
protected void createSymbol(IEObjectDescription description, IResourceAccess resourceAccess,
Procedure1<? super SymbolInformation> acceptor) {
Procedure1<? super WorkspaceSymbol> acceptor) {

SymbolInformation symbol = createSymbol(description);
WorkspaceSymbol symbol = createSymbol(description);
if (symbol != null) {
acceptor.apply(symbol);
}
}

@Override
protected SymbolInformation createSymbol(IEObjectDescription description) {
SymbolInformation symbol = super.createSymbol(description);
protected WorkspaceSymbol createSymbol(IEObjectDescription description) {
WorkspaceSymbol symbol = super.createSymbol(description);
if (symbol == null) {
return null;
}
symbol.setContainerName(getContainerName(description));
symbol.setLocation(getSymbolLocation(description));
symbol.setLocation(Either.forLeft(getSymbolLocation(description)));
return symbol;
}

Expand Down Expand Up @@ -235,19 +236,17 @@ protected SymbolKind getSymbolKind(EClass type) {
}

@Override
public List<Either<SymbolInformation, DocumentSymbol>> getSymbols(XtextResource resource,
public List<DocumentSymbol> getSymbols(XtextResource resource,
CancelIndicator cancelIndicator) {

ArrayList<DocumentSymbol> infos = new ArrayList<>();
List<DocumentSymbol> rootSymbols = Lists
.transform(hierarchicalDocumentSymbolService.getSymbols(resource, cancelIndicator), Either::getRight);

List<DocumentSymbol> rootSymbols = hierarchicalDocumentSymbolService.getSymbols(resource, cancelIndicator);
for (DocumentSymbol rootSymbol : rootSymbols) {
Iterable<DocumentSymbol> symbols = Traverser.forTree(DocumentSymbol::getChildren)
.depthFirstPreOrder(rootSymbol);

infos.addAll(Lists.newArrayList(symbols));
}
return Lists.transform(infos, Either::forRight);
return infos;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
import java.util.List;

import org.eclipse.emf.common.util.URI;
import org.eclipse.lsp4j.SymbolInformation;
import org.eclipse.lsp4j.WorkspaceSymbol;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
import org.eclipse.n4js.utils.ResourceType;
import org.eclipse.xtext.findReferences.IReferenceFinder.IResourceAccess;
import org.eclipse.xtext.ide.server.symbol.DocumentSymbolService;
Expand All @@ -35,7 +33,7 @@
* language-specific {@link DocumentSymbolService} returned by the {@link IResourceServiceProvider}.
*/
@Singleton
@SuppressWarnings({ "restriction", "deprecation" })
@SuppressWarnings({ "restriction" })
public class N4JSWorkspaceSymbolService extends WorkspaceSymbolService {

@Inject // note: we deliberately inject >>N4JS<<DocumentSymbolService, not DocumentSymbolService!
Expand All @@ -45,7 +43,7 @@ public class N4JSWorkspaceSymbolService extends WorkspaceSymbolService {
private OperationCanceledManager operationCanceledManager;

@Override
public Either<List<? extends SymbolInformation>, List<? extends WorkspaceSymbol>> getSymbols(String query,
public List<? extends WorkspaceSymbol> getSymbols(String query,
IResourceAccess resourceAccess, IResourceDescriptions indexData, CancelIndicator cancelIndicator) {

List<WorkspaceSymbol> result = new LinkedList<>();
Expand All @@ -63,6 +61,6 @@ public Either<List<? extends SymbolInformation>, List<? extends WorkspaceSymbol>
// of workspace symbols)
}
}
return Either.forRight(result);
return result;
}
}
2 changes: 1 addition & 1 deletion plugins/org.eclipse.n4js.jsdoc/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
Expand Down
Loading
Loading