Skip to content

Instantly share code, notes, and snippets.

@transistor1
Created May 11, 2015 23:38
Show Gist options
  • Save transistor1/694ac03beeb3899933fa to your computer and use it in GitHub Desktop.
Save transistor1/694ac03beeb3899933fa to your computer and use it in GitHub Desktop.
Patch to AntlrWorks2 commit bfee49a9b029625ef3bffeaa1b026d2bbc95b61d
diff --git a/nbproject/antlrworks2.conf b/nbproject/antlrworks2.conf
index f3dd168..4f4d7f0 100644
--- a/nbproject/antlrworks2.conf
+++ b/nbproject/antlrworks2.conf
@@ -9,6 +9,7 @@ default_options="-J-server -J-XX:+TieredCompilation -J-Xms128m -J-Dnetbeans.logg
# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
#jdkhome="/path/to/jdk"
+jdkhome="/usr/lib/jvm/java-8-oracle/jre"
# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#extra_clusters=
diff --git a/nbproject/platform.properties b/nbproject/platform.properties
index 4865733..db98178 100644
--- a/nbproject/platform.properties
+++ b/nbproject/platform.properties
@@ -1,3 +1,4 @@
+branding.token=antlrworks2
cluster.path=\
${nbplatform.active.dir}/apisupport:\
${nbplatform.active.dir}/harness:\
@@ -9,4 +10,5 @@ cluster.path=\
${nbplatform.active.dir}/profiler:\
${nbplatform.active.dir}/websvccommon
nbjdk.active=JDK_1.7__x64_
+nbjdk.home=/usr/lib/jvm/java-8-oracle/jre
nbplatform.active=nb801
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 30218fc..8addf85 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,9 +1,11 @@
+app.name=${branding.token}
auxiliary.org-netbeans-modules-apisupport-installer.license-file=LICENSE.txt
-auxiliary.org-netbeans-modules-apisupport-installer.os-linux=false
+auxiliary.org-netbeans-modules-apisupport-installer.os-linux=true
auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false
auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
auxiliary.org-netbeans-modules-apisupport-installer.os-windows=true
auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled=true
+auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
modules=\
${project.org.antlr.works.editor}:\
${project.org.antlr.netbeans}:\
diff --git a/org-antlr-works-editor/build.xml b/org-antlr-works-editor/build.xml
index 78581e3..a0e74e9 100644
--- a/org-antlr-works-editor/build.xml
+++ b/org-antlr-works-editor/build.xml
@@ -98,7 +98,17 @@
<arg value="-package"/>
<arg value="${package}.generated"/>
<args/>
+
+ <arg value="${src.dir}/org/antlr/works/editor/grammar/experimental/GrammarParser.g4" />
+ <arg value="${src.dir}/org/antlr/works/editor/grammar/experimental/GrammarLexer.g4" />
+ <arg value="${src.dir}/org/antlr/works/editor/grammar/highlighter/GrammarHighlighterLexer.g4" />
+ <arg value="${src.dir}/org/antlr/works/editor/st4/experimental/TemplateLexer.g4" />
+ <arg value="${src.dir}/org/antlr/works/editor/st4/experimental/TemplateParser.g4" />
+ <arg value="${src.dir}/org/antlr/works/editor/st4/highlighter/GroupHighlighterLexer.g4" />
+
+ <!--
<arg value="*.g4"/>
+ -->
<classpath>
<path refid="cp.antlr4"/>
<pathelement location="${java.class.path}"/>
@transistor1
Copy link
Author

This is a patch to build AnltrWorks2 on linux, per AntlrWorks2 issue 31

Make sure you first download & install NetBeans IDE, and install Java 1.8.0_45. In Ubuntu, you can use these instructions to install Oracle's JDK (instead of OpenJDK which would be installed by default).

git clone https://github.com/tunnelvisionlabs/antlrworks2.git
git checkout bfee49a9b029625ef3bffeaa1b026d2bbc95b61d
wget https://gist.githubusercontent.com/transistor1/694ac03beeb3899933fa/raw/9da6b556a5edc0dedb3d78e9d5107c9690958623/patch.diff
git apply < patch.diff

Now open and build AntlrWorks2 in NetBeans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment