Skip to content

Commit

Permalink
Merge pull request #495 from mezarin/fullParityPOC
Browse files Browse the repository at this point in the history
LSP4Jakarta alignment with the LSP4MP code base
  • Loading branch information
turkeylurkey committed Oct 17, 2023
2 parents 32886c9 + 66cf1ac commit 6673de4
Show file tree
Hide file tree
Showing 347 changed files with 23,121 additions and 12,733 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Eclipse LSP4Jakarta Plugin (Incubation)
Bundle-Vendor: Eclipse LSP4Jakarta
Bundle-SymbolicName: org.eclipse.lsp4jakarta.lsp4e.core;singleton:=true
Bundle-Version: 0.1.2.qualifier
Bundle-Version: 0.2.0.qualifier
Bundle-Activator: org.eclipse.lsp4jakarta.lsp4e.Activator
Require-Bundle:
org.eclipse.lsp4e,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source.. = src/
source.. = src/main/java
output.. = target/classes
bin.includes = META-INF/,\
.,\
/server/org.eclipse.lsp4jakarta.ls-jar-with-dependencies.jar
server/org.eclipse.lsp4jakarta.ls-jar-with-dependencies.jar
2 changes: 2 additions & 0 deletions jakarta.eclipse/org.eclipse.lsp4jakarta.lsp4e.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
id="org.jakartaee.lsp4e.jakartaserver">
</contentTypeMapping>
</extension>

<extension
id="jakarta-completion-computer"
name="Jakarta Proposals (based on Jakarta LS)"
Expand All @@ -50,4 +51,5 @@
needsSortingAfterFiltering="false">
</javaCompletionProposalComputer>
</extension>

</plugin>
202 changes: 99 additions & 103 deletions jakarta.eclipse/org.eclipse.lsp4jakarta.lsp4e.core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,105 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.lsp4jakarta.lsp4e</artifactId>
<groupId>org.eclipse.lsp4jakarta</groupId>
<version>0.1.2-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.lsp4jakarta.lsp4e.core</artifactId>
<packaging>eclipse-plugin</packaging>

<name>Eclipse LSP4Jakarta LSP4E Plugin</name>
<description>Eclipse LSP4Jakarta LSP4E Plugin</description>

<organization>
<name>Eclipse LSP4Jakarta</name>
<url>https://github.com/eclipse/lsp4jakarta</url>
</organization>

<licenses>
<license>
<name>EPL-2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
<comments>Eclipse Public License 2.0</comments>
</license>
</licenses>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>get-server</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${basedir}/server/</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.lsp4jakarta</groupId>
<artifactId>org.eclipse.lsp4jakarta.ls</artifactId>
<version>0.1.2-SNAPSHOT</version>
<classifier>jar-with-dependencies</classifier>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
<configuration>
<skip>false</skip>
<stripVersion>true</stripVersion>
</configuration>
</plugin>
<plugin>
<!-- make sure server dir is removed after clean to avoid "dirty" build -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/server</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.7,)</versionRange>
<goals>
<goal>copy</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute runOnConfiguration="true"></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.lsp4jakarta.lsp4e</artifactId>
<groupId>org.eclipse.lsp4jakarta</groupId>
<version>0.2.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.lsp4jakarta.lsp4e.core</artifactId>
<packaging>eclipse-plugin</packaging>
<name>Eclipse LSP4Jakarta LSP4E Plugin</name>
<description>Eclipse LSP4Jakarta LSP4E Plugin</description>
<organization>
<name>Eclipse LSP4Jakarta</name>
<url>https://github.com/eclipse/lsp4jakarta</url>
</organization>
<licenses>
<license>
<name>EPL-2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
<comments>Eclipse Public License 2.0</comments>
</license>
</licenses>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>get-server</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${basedir}/server/</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.lsp4jakarta</groupId>
<artifactId>org.eclipse.lsp4jakarta.ls</artifactId>
<version>0.2.0-SNAPSHOT</version>
<classifier>jar-with-dependencies</classifier>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
<configuration>
<skip>false</skip>
<stripVersion>true</stripVersion>
</configuration>
</plugin>
<plugin>
<!-- make sure server dir is removed after clean to avoid "dirty" build -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/server</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.7,)</versionRange>
<goals>
<goal>copy</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute runOnConfiguration="true"></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,73 +1,72 @@
/*******************************************************************************
* Copyright (c) 2020, 2022 IBM Corporation and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

package org.eclipse.lsp4jakarta.lsp4e;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.lsp4jakarta.lsp4e.core"; //$NON-NLS-1$

// The shared instance
private static Activator plugin;

public boolean started;

/**
* The constructor
*/
public Activator() {
}

@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, "Starting activator class for lsp4e.core"));
started = true;
}

@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
started = false;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

public static void log(IStatus status) {
getDefault().getLog().log(status);
}

public static void logException(String errMsg, Throwable ex) {
getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, errMsg, ex));
}

}
/*******************************************************************************
* Copyright (c) 2020, 2022 IBM Corporation and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

package org.eclipse.lsp4jakarta.lsp4e;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.lsp4jakarta.lsp4e.core"; //$NON-NLS-1$

// The shared instance
private static Activator plugin;

public boolean started;

/**
* The constructor
*/
public Activator() {}

@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, "Starting activator class for lsp4e.core"));
started = true;
}

@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
started = false;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

public static void log(IStatus status) {
getDefault().getLog().log(status);
}

public static void logException(String errMsg, Throwable ex) {
getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, errMsg, ex));
}

}
Loading

0 comments on commit 6673de4

Please sign in to comment.