Skip to content

Commit 9eb8877

Browse files
committed
adding lsp4j jars and build updates
1 parent 8424cbf commit 9eb8877

5 files changed

Lines changed: 70 additions & 9 deletions

File tree

java/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ reference.zip
22
bin
33
bin-test
44
generated
5-
mode/JavaMode.jar

java/build.xml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,42 @@
4646
</java>
4747
</target>
4848

49+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
50+
51+
<property name="lsp4j.version" value="0.12.0" />
52+
53+
<fileset id="lsp4j.files" dir="lib">
54+
<include name="org.eclipse.lsp4j.jar" />
55+
<include name="org.eclipse.lsp4j.jsonrpc.jar" />
56+
</fileset>
57+
58+
<condition property="lsp4j.present">
59+
<resourcecount refid="lsp4j.files" when="eq" count="2" />
60+
</condition>
61+
62+
<!-- ok to ignore failed downloads if we at least have a version that's local -->
63+
<condition property="lsp4j.ignorable" value="false" else="true">
64+
<isset property="lsp4j.present" />
65+
</condition>
66+
67+
<target name="download-lsp4j" unless="lsp4j.present">
68+
<!-- TODO implement a fallback URL that points to a location
69+
on download.processing.org so it's available forever. -->
70+
<property name="lsp4j.prefix" value="https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j.jsonrpc/${lsp4j.version}" />
71+
72+
<get src="${lsp4j.prefix}/org.eclipse.lsp4j-${lsp4j.version}.jar"
73+
dest="mode/org.eclipse.lsp4j.jar"
74+
ignoreerrors="${lsp4j.ignorable}"
75+
usetimestamp="true" />
76+
77+
<get src="${lsp4j.prefix}/org.eclipse.lsp4j.jsonrpc-${lsp4j.version}.jar"
78+
dest="mode/org.eclipse.lsp4j.jsonrpc.jar"
79+
ignoreerrors="${lsp4j.ignorable}"
80+
usetimestamp="true" />
81+
</target>
82+
83+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
84+
4985
<path id="classpath.base">
5086
<pathelement location="../core/library/core.jar" />
5187
<pathelement location="../app/pde.jar" />
@@ -69,6 +105,8 @@
69105
<pathelement location="mode/org.eclipse.equinox.preferences.jar" />
70106
<pathelement location="mode/org.eclipse.jdt.compiler.apt.jar" />
71107
<pathelement location="mode/org.eclipse.jdt.core.jar" />
108+
<pathelement location="mode/org.eclipse.lsp4j.jar" />
109+
<pathelement location="mode/org.eclipse.lsp4j.jsonrpc.jar" />
72110
<pathelement location="mode/org.eclipse.osgi.jar" />
73111
<pathelement location="mode/org.eclipse.text.jar" />
74112
</path>
@@ -140,7 +178,7 @@
140178
</junit>
141179
</target>
142180

143-
<target name="compile" description="Compile sources" depends="preproc">
181+
<target name="compile" description="Compile sources" depends="preproc,download-lsp">
144182
<compilecommon srcdir="src" destdir="bin" classpath="classpath.base" />
145183
</target>
146184

java/mode/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
JavaMode.jar
2+
org.eclipse.lsp4j.jar
3+
org.eclipse.lsp4j.jsonrpc.jar
4+

java/processing4-java.iml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,25 @@
168168
<SOURCES />
169169
</library>
170170
</orderEntry>
171+
<orderEntry type="module-library">
172+
<library name="org.eclipse.lsp4j">
173+
<CLASSES>
174+
<root url="jar://$MODULE_DIR$/mode/org.eclipse.lsp4j.jar!/" />
175+
</CLASSES>
176+
<JAVADOC />
177+
<SOURCES>
178+
<root url="jar://$MODULE_DIR$/mode/org.eclipse.lsp4j.jar!/" />
179+
</SOURCES>
180+
</library>
181+
</orderEntry>
182+
<orderEntry type="module-library">
183+
<library name="org.eclipse.lsp4j.jsonrpc">
184+
<CLASSES>
185+
<root url="jar://$MODULE_DIR$/mode/org.eclipse.lsp4j.jsonrpc.jar!/" />
186+
</CLASSES>
187+
<JAVADOC />
188+
<SOURCES />
189+
</library>
190+
</orderEntry>
171191
</component>
172192
</module>

todo.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ X https://github.com/processing/processing4/issues/600
99
_ update wiki
1010
_ https://github.com/processing/processing4/wiki/Translations
1111
_ https://www.oracle.com/java/technologies/javase/jdk17-suported-locales.html
12-
X implement offline reference download
12+
X Offline reference has been removed for 4.x, build a new version
13+
X implement offline reference download
1314
X https://github.com/processing/processing-website/releases/download/2022-10-05-1459/reference.zip
1415
X add a note about the file size to the progress window
15-
_ document and grab other notes from elsewhere here
16-
X Offline reference has been removed for 4.x, build a new version
16+
_ document on wiki
1717
_ https://github.com/processing/processing4/issues/524
18+
X look into LSP code contribution
19+
X https://github.com/processing/processing4/pull/564
20+
_ https://github.com/processing/processing4/issues/117
21+
1822

1923
_ "Show Sketch Folder" for libraries needs to treat the sketch as Untitled
2024
_ and with that, switch to another directory
@@ -26,10 +30,6 @@ _ not indenting the rest of the code at all
2630
_ many blank lines at the beginning
2731
_ 'exported at' text at the top is awkward
2832

29-
_ look into LSP code contribution
30-
_ https://github.com/processing/processing4/issues/117
31-
_ https://github.com/processing/processing4/pull/564
32-
3333
_ export to IntelliJ? how tricky?
3434
_ just copy jars to /lib?
3535
_ point to binaries in /Applications/Processing.app? (no)

0 commit comments

Comments
 (0)