Skip to content

Instantly share code, notes, and snippets.

Excellent question. Let me dig into the hard architectural problems that make multi-client support for
JDT-LS genuinely difficult:
Searched for 10 patterns, read 2 files (ctrl+o to expand)
● Based on my exploration of the JDT-LS codebase, here are the major architectural sticking points for
multi-client support:
1. Client Preferences - The Biggest Problem (476 references!)
javacOnlyBranch=javac_only
repoIncubator=incubator
repoMyRepository=mine
jdtOnlyBranch=jdt_only
mkdir filterrepos
cd filterrepos
package org.eclipse.jdt.core.dom;
import java.util.Comparator;
import java.util.List;
public class CompilationUnitComparator implements Comparator<CompilationUnit> {
private int version;
public CompilationUnitComparator(int version) {
this.version = version;
This will demonstrate that somehow, the off-by-half or 2x error is our fault, somewhere in our code.
This simulates an actual run from the wbtc-ust pair.
When using 18, 8, or 6 as the decimals, there's a very interesting relationship in the output.
I know this logic was copied from somewhere, and it's likely in use in several places.
const priceA = 3283.5;
const priceB = 1;
c:\apps\crc_test1\installation>crc delete
Machine does not exist. Use 'crc start' to create it
c:\apps\crc_test1\installation>crc cleanup
INFO Removing hosts file records added by CRC
INFO Removing pull secret from the keyring
INFO Removing older logs
INFO Removing CRC Machine Instance directory
INFO Removing the crc VM if exists
INFO Removing dns server from interface
mkdir tmp
cd tmp
mkdir jandex
mkdir jandex/2.1.3.Final
mkdir source
mkdir source/plugins
cd source/plugins
wget -O jandex-2.1.3.Final.jar https://search.maven.org/remotecontent?filepath=org/jboss/jandex/2.1.3.Final/jandex-2.1.3.Final.jar
cd ../../
@robstryker
robstryker / pom.xml
Created February 10, 2020 21:27
simple osgi pom
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<groupId>org.wso2.mbp</groupId>
<modelVersion>4.0.0</modelVersion>
<artifactId>sample01</artifactId>
<version>1.0.0</version>
<packaging>bundle</packaging>
<name>Sample01</name>
@robstryker
robstryker / Activator.java
Created February 10, 2020 21:26
simple osgi Activator
package org.wso2.mbp.sample01;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
/**
* Implements BundleActivator.start().
*
* @param context the framework context for the bundle.
#!/bin/bash -xe
# see also https://gist.github.com/nickboldt/6afc71826e82518c5e7b7d3c3fdcc4f3
# merge sse repos into a single repo
START_TIME=`date +%s`
# work in a tempdir. The tmp-dir name is something like /home/user/tmp/this_scripts_name/
tmpdir=~/tmp/${0/.sh/.tmp}
tmpdirCache=~/tmp/${0/.sh/.tmp}_cache
#!/bin/bash -xe
# see also https://gist.github.com/nickboldt/6afc71826e82518c5e7b7d3c3fdcc4f3
# merge sse repos into a single repo
START_TIME=`date +%s`
# work in a tempdir. The tmp-dir name is something like /home/user/tmp/this_scripts_name/
tmpdir=~/tmp/${0/.sh/.tmp}
tmpdirCache=~/tmp/${0/.sh/.tmp}_cache