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

Add logback tracing to Java LS #2116

Merged
merged 1 commit into from
Jun 22, 2022
Merged
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
4 changes: 4 additions & 0 deletions launch/jdt.ls.remote.server.launch
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
<setEntry value="org.eclipse.m2e.jdt@default:default"/>
<setEntry value="org.eclipse.m2e.lifecyclemapping.defaults@default:default"/>
<setEntry value="org.apache.commons.codec@default:default"/>
<setEntry value="ch.qos.logback.classic@default:default"/>
<setEntry value="ch.qos.logback.core@default:default"/>
<setEntry value="ch.qos.logback.slf4j@default:default"/>
<setEntry value="org.eclipse.m2e.maven.indexer@default:default"/>
<setEntry value="org.eclipse.m2e.maven.runtime.slf4j.simple@default:default"/>
<setEntry value="org.eclipse.m2e.maven.runtime@default:default"/>
Expand All @@ -115,6 +118,7 @@
</setAttribute>
<setAttribute key="selected_workspace_bundles">
<setEntry value="org.eclipse.jdt.ls.core@default:default"/>
<setEntry value="org.eclipse.jdt.ls.logback.appender@default:false"/>
</setAttribute>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
Expand Down
4 changes: 4 additions & 0 deletions launch/jdt.ls.socket-stream.launch
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
<setEntry value="org.eclipse.m2e.jdt@default:default"/>
<setEntry value="org.eclipse.m2e.lifecyclemapping.defaults@default:default"/>
<setEntry value="org.apache.commons.codec@default:default"/>
<setEntry value="ch.qos.logback.classic@default:default"/>
<setEntry value="ch.qos.logback.core@default:default"/>
<setEntry value="ch.qos.logback.slf4j@default:default"/>
<setEntry value="org.eclipse.m2e.maven.indexer@default:default"/>
<setEntry value="org.eclipse.m2e.maven.runtime.slf4j.simple@default:default"/>
<setEntry value="org.eclipse.m2e.maven.runtime@default:default"/>
Expand All @@ -116,6 +119,7 @@
</setAttribute>
<setAttribute key="selected_workspace_bundles">
<setEntry value="org.eclipse.jdt.ls.core@default:default"/>
<setEntry value="org.eclipse.jdt.ls.logback.appender@default:false"/>
</setAttribute>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.eclipse.jdt.ls.core.internal.ProjectUtils;
import org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.preferences.MavenConfigurationImpl;
Expand All @@ -56,6 +57,7 @@
import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;

@SuppressWarnings("restriction")
public class MavenProjectImporter extends AbstractProjectImporter {
Expand Down Expand Up @@ -234,7 +236,7 @@ public void importToWorkspace(IProgressMonitor monitor) throws CoreException, Op
}

private long getLastWorkspaceStateModified() {
Bundle bundle = Platform.getBundle(IMavenConstants.PLUGIN_ID);
Bundle bundle = FrameworkUtil.getBundle(IMaven.class);
if (bundle != null) {
IPath result = Platform.getStateLocation(bundle);
File bundleStateLocation = result.toFile();
Expand Down
21 changes: 21 additions & 0 deletions org.eclipse.jdt.ls.logback.appender/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
34 changes: 34 additions & 0 deletions org.eclipse.jdt.ls.logback.appender/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.jdt.ls.logback.appender</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Loading