preserve file attributes so things don't appear modified; fix some indents lost in tab conversion

This commit is contained in:
Ben Fry
2019-04-21 08:12:20 -04:00
parent e6606b896e
commit 80eac720c7
3 changed files with 72 additions and 75 deletions

View File

@@ -1,15 +1,15 @@
<?xml version="1.0"?>
<project name="Java Mode" default="build">
<property name="generated"
value="${basedir}/generated/processing/mode/java/preproc" />
<property name="generated"
value="${basedir}/generated/processing/mode/java/preproc" />
<mkdir dir="${generated}" />
<property name="grammars"
value="${basedir}/src/processing/mode/java/preproc" />
<property name="grammars"
value="${basedir}/src/processing/mode/java/preproc" />
<property name="antlr_jar"
value="${basedir}/mode/antlr.jar" />
<property name="antlr_jar"
value="${basedir}/mode/antlr.jar" />
<property name="mode_jar"
value="${basedir}/mode/JavaMode.jar" />
@@ -23,12 +23,12 @@
<delete file="${mode_jar}" />
<delete>
<fileset dir="${generated}">
<include name="*.java" />
<include name="*.tokens" />
<include name="*.txt" />
<include name="*.g" />
<include name="*.smap" />
<include name="*.properties" />
<include name="*.java" />
<include name="*.tokens" />
<include name="*.txt" />
<include name="*.g" />
<include name="*.smap" />
<include name="*.properties" />
</fileset>
</delete>
</target>
@@ -37,9 +37,9 @@
<antlr target="${grammars}/java15.g" outputdirectory="${generated}">
<classpath path="${antlr_jar}" />
</antlr>
<antlr target="${grammars}/pde.g"
outputdirectory="${generated}"
glib="${grammars}/java15.g">
<antlr target="${grammars}/pde.g"
outputdirectory="${generated}"
glib="${grammars}/java15.g">
<classpath path="${antlr_jar}" />
</antlr>
@@ -49,28 +49,24 @@
<property name="uc" value="@SuppressWarnings({ &quot;unused&quot;, &quot;cast&quot; })${line.separator}" />
<!-- need to match against the previous line so that we don't re-add -->
<replaceregexp
file="generated/processing/mode/java/preproc/JavaLexer.java"
match="(\n\n)(public class JavaLexer .*)"
replace="\1${uucr}\2">
<replaceregexp file="generated/processing/mode/java/preproc/JavaLexer.java"
match="(\n\n)(public class JavaLexer .*)"
replace="\1${uucr}\2">
</replaceregexp>
<replaceregexp
file="generated/processing/mode/java/preproc/JavaRecognizer.java"
match="(\*/\n)(public class JavaRecognizer .*)"
replace="\1${uc}\2">
<replaceregexp file="generated/processing/mode/java/preproc/JavaRecognizer.java"
match="(\*/\n)(public class JavaRecognizer .*)"
replace="\1${uc}\2">
</replaceregexp>
<replaceregexp
file="generated/processing/mode/java/preproc/PdeLexer.java"
match="(\n\n)(public class PdeLexer .*)"
replace="\1${uucr}\2">
<replaceregexp file="generated/processing/mode/java/preproc/PdeLexer.java"
match="(\n\n)(public class PdeLexer .*)"
replace="\1${uucr}\2">
</replaceregexp>
<replaceregexp
file="generated/processing/mode/java/preproc/PdeRecognizer.java"
match="(\n\n)(public class PdeRecognizer .*)"
replace="\1${uc}\2">
<replaceregexp file="generated/processing/mode/java/preproc/PdeRecognizer.java"
match="(\n\n)(public class PdeRecognizer .*)"
replace="\1${uc}\2">
</replaceregexp>
<!-- end of workaround for old antlr -->
</target>
@@ -86,38 +82,37 @@
</condition>
<fail unless="app-built" message="Please build app first and make sure it is located at ../app/pde.jar" />
<mkdir dir="bin" />
<!-- in some cases, pde.jar was not getting built
https://github.com/processing/processing/issues/1792 -->
https://github.com/processing/processing/issues/1792 -->
<delete file="${mode_jar}" />
<!-- env used to set classpath below -->
<property environment="env" />
<javac source="1.8"
target="1.8"
destdir="bin"
excludes="**/tools/format/**"
encoding="UTF-8"
includeAntRuntime="false"
classpath="../core/library/core.jar;
target="1.8"
destdir="bin"
excludes="**/tools/format/**"
encoding="UTF-8"
includeAntRuntime="false"
classpath="../core/library/core.jar;
../app/pde.jar;
../app/lib/ant.jar;
../app/lib/ant-launcher.jar;
../app/lib/apple.jar;
../app/lib/jna.jar;
../app/lib/jna-platform.jar;
../app/lib/ant.jar;
../app/lib/ant-launcher.jar;
../app/lib/apple.jar;
../app/lib/jna.jar;
../app/lib/jna-platform.jar;
mode/antlr.jar;
mode/classpath-explorer-1.0.jar;
mode/antlr.jar;
mode/classpath-explorer-1.0.jar;
mode/jsoup-1.7.1.jar;
mode/org.netbeans.swing.outline.jar;
mode/org.netbeans.swing.outline.jar;
mode/jdi.jar;
mode/jdimodel.jar;
mode/jdi.jar;
mode/jdimodel.jar;
mode/com.ibm.icu.jar;
@@ -130,12 +125,12 @@
mode/org.eclipse.jdt.core.jar;
mode/org.eclipse.osgi.jar;
mode/org.eclipse.text.jar"
debug="on"
nowarn="true"
compiler="org.eclipse.jdt.core.JDTCompilerAdapter">
debug="on"
nowarn="true"
compiler="org.eclipse.jdt.core.JDTCompilerAdapter">
<src path="src" />
<src path="generated" />
<compilerclasspath path="mode/org.eclipse.jdt.core.jar;
<compilerclasspath path="mode/org.eclipse.jdt.core.jar;
mode/jdtCompilerAdapter.jar" />
</javac>
</target>