Skip to content

Commit

Permalink
Merge pull request #363 from scottkurz/1Q2023-enable
Browse files Browse the repository at this point in the history
Enable runtime for 1Q23
  • Loading branch information
awisniew90 authored May 4, 2023
2 parents ab7abd9 + ff75169 commit 42151f9
Show file tree
Hide file tree
Showing 17 changed files with 200 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
runtime: [ linux, mac, windows ]
targetPlatform: [ 3Q2022, 4Q2022 ]
targetPlatform: [ 1Q2023 ]
include:
- runtime: linux
os: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion bundles/io.openliberty.tools.eclipse.lsp4e/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="server/liberty-langserver/liberty-langserver.jar"/>
<classpathentry kind="lib" path="server/mp-langserver/org.eclipse.lsp4mp.ls-0.5.0-uber.jar"/>
<classpathentry kind="lib" path="server/mp-langserver/org.eclipse.lsp4mp.ls.jar"/>
<classpathentry kind="lib" path="server/jakarta-langserver/org.eclipse.lsp4jakarta.ls.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: Liberty Tools Support for Language Servers
Bundle-Vendor: Open Liberty
Bundle-SymbolicName: io.openliberty.tools.eclipse.lsp4e;singleton:=true
Bundle-Version: 0.8.0.qualifier
Bundle-Version: 0.9.0.qualifier
Bundle-Activator: io.openliberty.tools.eclipse.ls.plugin.LibertyToolsLSPlugin
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: io.openliberty.tools.eclipse.lsp4e
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.lsp4mp.jdt.core,
Require-Bundle: com.google.gson,
org.eclipse.lsp4mp.jdt.core,
org.eclipse.lsp4jakarta.jdt.core,
org.eclipse.lsp4e,
org.eclipse.lsp4e.jdt,
Expand All @@ -25,6 +26,6 @@ Require-Bundle: org.eclipse.lsp4mp.jdt.core,
org.eclipse.jdt.ls.core,
org.eclipse.ui.workbench
Bundle-ClassPath: .,
server/mp-langserver/org.eclipse.lsp4mp.ls-0.5.0-uber.jar,
server/mp-langserver/org.eclipse.lsp4mp.ls.jar,
server/liberty-langserver/liberty-langserver.jar,
server/jakarta-langserver/org.eclipse.lsp4jakarta.ls.jar
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bin.includes = META-INF/,\
epl-v20.html,\
plugin.xml,\
.,\
server/mp-langserver/org.eclipse.lsp4mp.ls-0.5.0-uber.jar,\
server/mp-langserver/org.eclipse.lsp4mp.ls.jar,\
server/liberty-lemminx-extn/liberty-langserver-lemminx.jar,\
server/liberty-langserver/liberty-langserver.jar, \
server/jakarta-langserver/org.eclipse.lsp4jakarta.ls.jar
8 changes: 5 additions & 3 deletions bundles/io.openliberty.tools.eclipse.lsp4e/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
<parent>
<groupId>io.openliberty.tools.eclipse</groupId>
<artifactId>parent</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.9.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<properties>
<liberty.ls.version>1.0-M2-SNAPSHOT</liberty.ls.version>
<jakarta.ls.version>0.1.0</jakarta.ls.version>
<mp.ls.version>0.7.0</mp.ls.version>
</properties>
<artifactId>io.openliberty.tools.eclipse.lsp4e</artifactId>

Expand All @@ -36,7 +37,7 @@
<dependency>
<groupId>org.eclipse.lsp4mp</groupId>
<artifactId>org.eclipse.lsp4mp.ls</artifactId>
<version>0.5.0</version>
<version>${mp.ls.version}</version>
</dependency>
<dependency>
<groupId>io.openliberty.tools</groupId>
Expand Down Expand Up @@ -73,10 +74,11 @@
<artifactItem>
<groupId>org.eclipse.lsp4mp</groupId>
<artifactId>org.eclipse.lsp4mp.ls</artifactId>
<version>0.5.0</version>
<version>${mp.ls.version}</version>
<classifier>uber</classifier>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>org.eclipse.lsp4mp.ls.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.basedir}/server/mp-langserver</outputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@
import org.eclipse.lsp4j.PublishDiagnosticsParams;
import org.eclipse.lsp4j.jsonrpc.CancelChecker;
import org.eclipse.lsp4j.jsonrpc.CompletableFutures;
import org.eclipse.lsp4mp.commons.codeaction.CodeActionResolveData;
import org.eclipse.lsp4mp.commons.JavaCursorContextResult;
import org.eclipse.lsp4mp.commons.JavaFileInfo;
import org.eclipse.lsp4mp.commons.MicroProfileDefinition;
import org.eclipse.lsp4mp.commons.MicroProfileJavaCodeActionParams;
import org.eclipse.lsp4mp.commons.MicroProfileJavaCodeLensParams;
import org.eclipse.lsp4mp.commons.MicroProfileJavaCompletionParams;
import org.eclipse.lsp4mp.commons.MicroProfileJavaCompletionResult;
import org.eclipse.lsp4mp.commons.MicroProfileJavaDefinitionParams;
import org.eclipse.lsp4mp.commons.MicroProfileJavaDiagnosticsParams;
import org.eclipse.lsp4mp.commons.MicroProfileJavaFileInfoParams;
Expand All @@ -48,6 +51,7 @@
import org.eclipse.lsp4mp.commons.MicroProfileProjectInfoParams;
import org.eclipse.lsp4mp.commons.MicroProfilePropertyDefinitionParams;
import org.eclipse.lsp4mp.commons.ProjectLabelInfoEntry;
import org.eclipse.lsp4mp.commons.utils.JSONUtility;
import org.eclipse.lsp4mp.jdt.core.IMicroProfilePropertiesChangedListener;
import org.eclipse.lsp4mp.jdt.core.MicroProfileCorePlugin;
import org.eclipse.lsp4mp.jdt.core.ProjectLabelManager;
Expand Down Expand Up @@ -155,7 +159,15 @@ public CompletableFuture<List<CodeAction>> getJavaCodeAction(MicroProfileJavaCod
}

@Override
public CompletableFuture<ProjectLabelInfoEntry> getJavaProjectlabels(MicroProfileJavaProjectLabelsParams javaParams) {
public CompletableFuture<List<ProjectLabelInfoEntry>> getAllJavaProjectLabels() {
return CompletableFutures.computeAsync((cancelChecker) -> {
IProgressMonitor monitor = getProgressMonitor(cancelChecker);
return ProjectLabelManager.getInstance().getProjectLabelInfo();
});
}

@Override
public CompletableFuture<ProjectLabelInfoEntry> getJavaProjectLabels(MicroProfileJavaProjectLabelsParams javaParams) {
return CompletableFutures.computeAsync((cancelChecker) -> {
IProgressMonitor monitor = getProgressMonitor(cancelChecker);
return ProjectLabelManager.getInstance().getProjectLabelInfo(javaParams, JDTUtilsLSImpl.getInstance(), monitor);
Expand Down Expand Up @@ -184,11 +196,13 @@ public CompletableFuture<List<MicroProfileDefinition>> getJavaDefinition(MicroPr
}

@Override
public CompletableFuture<CompletionList> getJavaCompletion(MicroProfileJavaCompletionParams javaParams) {
public CompletableFuture<MicroProfileJavaCompletionResult> getJavaCompletion(MicroProfileJavaCompletionParams javaParams) {
return CompletableFutures.computeAsync(cancelChecker -> {
IProgressMonitor monitor = getProgressMonitor(cancelChecker);
try {
return PropertiesManagerForJava.getInstance().completion(javaParams, JDTUtilsLSImpl.getInstance(), monitor);
CompletionList completionList = PropertiesManagerForJava.getInstance().completion(javaParams, JDTUtilsLSImpl.getInstance(), monitor);
JavaCursorContextResult javaCursorContext = PropertiesManagerForJava.getInstance().javaCursorContext(javaParams, JDTUtilsLSImpl.getInstance(), monitor);
return new MicroProfileJavaCompletionResult(completionList, javaCursorContext);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
return null;
Expand All @@ -208,4 +222,20 @@ public CompletableFuture<Hover> getJavaHover(MicroProfileJavaHoverParams javaPar
}
});
}

@Override
public CompletableFuture<CodeAction> resolveCodeAction(CodeAction unresolved) {
return CompletableFutures.computeAsync((cancelChecker) -> {
try {
IProgressMonitor monitor = getProgressMonitor(cancelChecker);
// Deserialize CodeAction#data which is a JSonObject to CodeActionResolveData
CodeActionResolveData resolveData = JSONUtility.toModel(unresolved.getData(), CodeActionResolveData.class);
unresolved.setData(resolveData);
return PropertiesManagerForJava.getInstance().resolveCodeAction(unresolved, JDTUtilsLSImpl.getInstance(), monitor);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
return null;
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public LibertyMPLSConnection() {

private String computeClasspath() throws IOException {
StringBuilder builder = new StringBuilder();
URL url = FileLocator.toFileURL(getClass().getResource("/server/mp-langserver/org.eclipse.lsp4mp.ls-0.5.0-uber.jar"));
URL url = FileLocator.toFileURL(getClass().getResource("/server/mp-langserver/org.eclipse.lsp4mp.ls.jar"));
builder.append(new java.io.File(url.getPath()).getAbsolutePath());
return builder.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Liberty Tools
Bundle-Vendor: Open Liberty
Bundle-SymbolicName: io.openliberty.tools.eclipse.product;singleton:=true
Bundle-Version: 0.8.0.qualifier
Bundle-Version: 0.9.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: io.openliberty.tools.eclipse
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Liberty Tools UI
Bundle-Vendor: Open Liberty
Bundle-SymbolicName: io.openliberty.tools.eclipse.ui;singleton:=true
Bundle-Version: 0.8.0.qualifier
Bundle-Version: 0.9.0.qualifier
Bundle-Activator: io.openliberty.tools.eclipse.LibertyDevPlugin
Export-Package: io.openliberty.tools.eclipse;x-friends:="io.openliberty.tools.eclipse.tests",
io.openliberty.tools.eclipse.ui.dashboard;x-friends:="io.openliberty.tools.eclipse.tests",
Expand Down
8 changes: 4 additions & 4 deletions features/io.openliberty.tools.eclipse.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<feature
id="io.openliberty.tools.eclipse"
label="%featureName"
version="0.8.0.qualifier"
version="0.9.0.qualifier"
plugin="io.openliberty.tools.eclipse.product"
provider-name="%providerName">

Expand All @@ -28,21 +28,21 @@
id="io.openliberty.tools.eclipse.ui"
download-size="0"
install-size="0"
version="0.8.0.qualifier"
version="0.9.0.qualifier"
unpack="false"/>

<plugin
id="io.openliberty.tools.eclipse.lsp4e"
download-size="0"
install-size="0"
version="0.8.0.qualifier"
version="0.9.0.qualifier"
unpack="false"/>

<plugin
id="io.openliberty.tools.eclipse.product"
download-size="0"
install-size="0"
version="0.8.0.qualifier"
version="0.9.0.qualifier"
unpack="false"/>

</feature>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.openliberty.tools.eclipse</groupId>
<artifactId>parent</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.9.0-SNAPSHOT</version>
<packaging>pom</packaging>
<licenses>
<license>
Expand Down Expand Up @@ -196,7 +196,7 @@
<artifact>
<groupId>io.openliberty.tools.eclipse</groupId>
<artifactId>target-platform-${eclipse.target}</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.9.0-SNAPSHOT</version>
<file>target-platform-${eclipse.target}</file>
</artifact>
</target>
Expand Down
7 changes: 4 additions & 3 deletions releng/io.openliberty.tools.update/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
IBM Corporation - initial implementation
-->
<site>
<feature url="features/io.openliberty.tools.eclipse_0.8.0.qualifier.liberty.jar" id="io.openliberty.tools.eclipse" version="0.8.0.qualifier">
<feature url="features/io.openliberty.tools.eclipse_0.9.0.qualifier.liberty.jar" id="io.openliberty.tools.eclipse" version="0.9.0.qualifier">
<category name="io.openliberty.tools.eclipse" />
</feature>

<category-def name="io.openliberty.tools.eclipse" label="Liberty Tools" />

<repository-reference location="https://download.eclipse.org/jdtls/milestones/1.5.0/repository" enabled="true" />
<repository-reference location="https://download.eclipse.org/lsp4mp/releases/0.5.0/repository" enabled="true" />
<repository-reference location="https://download.eclipse.org/lsp4e/releases/0.22.0/" enabled="true" />
<repository-reference location="https://download.eclipse.org/jdtls/milestones/1.22.0/repository" enabled="true" />
<repository-reference location="https://download.eclipse.org/lsp4mp/releases/0.7.0/repository" enabled="true" />
<repository-reference location="https://download.eclipse.org/lsp4jakarta/releases/0.1.0/repository" enabled="true" />

<!-- Dependencies -->
Expand Down
Loading

0 comments on commit 42151f9

Please sign in to comment.