Skip to content

Commit

Permalink
[NETBEANS-54] Module Review applemenu
Browse files Browse the repository at this point in the history
-using an external library instead of inline com/apple/eawt classes
-saner handling of "external" java.awt classes (not unpacking them into the source directory)
  • Loading branch information
jlahoda committed Oct 13, 2017
1 parent b47ff82 commit 56c9528
Show file tree
Hide file tree
Showing 19 changed files with 876 additions and 510 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
.DS_Store

#the following should only be transient, until resolved more appropriately:
/applemenu/src/java/
/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/parser/JavaCharStream.java
/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/parser/ParseException.java
/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/parser/SQLParser.java
Expand Down
35 changes: 5 additions & 30 deletions applemenu/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,11 @@
<project name="applemenu" basedir="." default="netbeans">
<import file="../nbbuild/templates/projectized.xml"/>

<property name="jdk-version" value="${ant.java.version}"/>
<property name="jdk-9-version" value="1.9"/>
<property name="applemenu.src.dir" value="./src/"/>

<target name="compile" depends="projectized-common.compile">
<delete dir="${build.classes.dir}/com"/> <!-- just stubs -->
<delete dir="${build.classes.dir}/java"/> <!-- just stubs -->
</target>


<target name="ext-desktop-classes-unzip-cond">
<script language="javascript"><![CDATA[
var jdkCurrentVersion = parseFloat(project.getProperty('jdk-version'));
var jdk9Version = parseFloat(project.getProperty('jdk-9-version'));
project.setProperty('isJdkVersionLessth9', jdkCurrentVersion < jdk9Version );
]]></script>

<condition property="isJdkVersionLessth9">
<equals arg1="${isJdkVersionLessth9}" arg2="true"/>
</condition>
</target>

<target name="unzip-ext-binaries" depends="ext-desktop-classes-unzip-cond" if="${isJdkVersionLessth9}">
<echo>Get file based on condition being false</echo>
</target>

<target name="build-init" depends="ext-desktop-classes-unzip-cond,projectized.build-init" if="${isJdkVersionLessth9}">
<unzip src="external/applemenu-external-desktop-classes.zip" dest="${applemenu.src.dir}"/>
<target name="build-init" depends="projectized.build-init">
<mkdir dir="${build.dir}/desktop-classes-src" />
<unzip src="external/applemenu-external-desktop-classes.zip" dest="${build.dir}/desktop-classes-src"/>
<mkdir dir="${build.dir}/desktop-classes-classes" />
<javac srcdir="${build.dir}/desktop-classes-src" destdir="${build.dir}/desktop-classes-classes" />
</target>

</project>
Loading

0 comments on commit 56c9528

Please sign in to comment.