diff --git a/OpenAMASE/build.xml b/OpenAMASE/build.xml index 5ce1555..a91f698 100644 --- a/OpenAMASE/build.xml +++ b/OpenAMASE/build.xml @@ -1,73 +1,73 @@ - - - - - - - - - - - Builds, tests, and runs the project OpenAMASE. - - - + + + + + + + + + + + Builds, tests, and runs the project OpenAMASE. + + + diff --git a/OpenAMASE/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/OpenAMASE/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar index 14c3bbb..70ce7f6 100644 Binary files a/OpenAMASE/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar and b/OpenAMASE/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ diff --git a/OpenAMASE/lib/nblibraries.properties b/OpenAMASE/lib/nblibraries.properties index 2b10aaa..364daac 100644 --- a/OpenAMASE/lib/nblibraries.properties +++ b/OpenAMASE/lib/nblibraries.properties @@ -1,39 +1,39 @@ -libs.CopyLibs.classpath=\ - ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -libs.CopyLibs.displayName=CopyLibs Task -libs.CopyLibs.prop-version=2.0 -libs.Flexdock.classpath=\ - ${base}/Flexdock/flexdock-1.2.3.jar -libs.Flexdock.displayName=Flexdock -libs.Flexdock.src=\ - ${base}/Flexdock/flexdock-1.2/src/java/core/;\ - ${base}/Flexdock/flexdock-1.2/src/java/demo/;\ - ${base}/Flexdock/flexdock-1.2/src/java/dockbar/;\ - ${base}/Flexdock/flexdock-1.2/src/java/drag/;\ - ${base}/Flexdock/flexdock-1.2/src/java/perspective/;\ - ${base}/Flexdock/flexdock-1.2/src/java/plaf/;\ - ${base}/Flexdock/flexdock-1.2/src/java/test/;\ - ${base}/Flexdock/flexdock-1.2/src/java/view/ -libs.GRAL.classpath=\ - ${base}/GRAL/gral-core-0.10.jar -libs.GRAL.displayName=GRAL -libs.GRAL.src=\ - ${base}/GRAL/java/ -libs.JScience.classpath=\ - ${base}/JScience/jscience.jar -libs.JScience.displayName=JScience -libs.JScience.src=\ - ${base}/JScience/src/ -libs.SwingX.classpath=\ - ${base}/SwingX/swingx-all-1.6.4.jar -libs.SwingX.displayName=SwingX -libs.SwingX.javadoc=\ - ${base}/SwingX/swingx-all-1.6.4-javadoc.jar!// -libs.SwingX.src=\ - ${base}/SwingX/swingx-all-1.6.4-sources.jar!// -libs.Worldwind.classpath=\ - ${base}/Worldwind/worldwindx.jar;\ - ${base}/worldwind.jar -libs.Worldwind.displayName=Worldwind -libs.Worldwind.src=\ - ${base}/Worldwind/src.zip!/src/ +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +libs.CopyLibs.displayName=CopyLibs Task +libs.CopyLibs.prop-version=3.0 +libs.Flexdock.classpath=\ + ${base}/Flexdock/flexdock-1.2.3.jar +libs.Flexdock.displayName=Flexdock +libs.Flexdock.src=\ + ${base}/Flexdock/flexdock-1.2/src/java/core/;\ + ${base}/Flexdock/flexdock-1.2/src/java/demo/;\ + ${base}/Flexdock/flexdock-1.2/src/java/dockbar/;\ + ${base}/Flexdock/flexdock-1.2/src/java/drag/;\ + ${base}/Flexdock/flexdock-1.2/src/java/perspective/;\ + ${base}/Flexdock/flexdock-1.2/src/java/plaf/;\ + ${base}/Flexdock/flexdock-1.2/src/java/test/;\ + ${base}/Flexdock/flexdock-1.2/src/java/view/ +libs.GRAL.classpath=\ + ${base}/GRAL/gral-core-0.10.jar +libs.GRAL.displayName=GRAL +libs.GRAL.src=\ + ${base}/GRAL/java/ +libs.JScience.classpath=\ + ${base}/JScience/jscience.jar +libs.JScience.displayName=JScience +libs.JScience.src=\ + ${base}/JScience/src/ +libs.SwingX.classpath=\ + ${base}/SwingX/swingx-all-1.6.4.jar +libs.SwingX.displayName=SwingX +libs.SwingX.javadoc=\ + ${base}/SwingX/swingx-all-1.6.4-javadoc.jar!// +libs.SwingX.src=\ + ${base}/SwingX/swingx-all-1.6.4-sources.jar!// +libs.Worldwind.classpath=\ + ${base}/Worldwind/worldwindx.jar;\ + ${base}/worldwind.jar +libs.Worldwind.displayName=Worldwind +libs.Worldwind.src=\ + ${base}/Worldwind/src.zip!/src/ diff --git a/OpenAMASE/nbproject/build-impl.xml b/OpenAMASE/nbproject/build-impl.xml index 2f8dc4f..9f21aec 100644 --- a/OpenAMASE/nbproject/build-impl.xml +++ b/OpenAMASE/nbproject/build-impl.xml @@ -1,1455 +1,1810 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set Core.dir - Must set Amase.dir - Must set SetupTool.dir - Must set src.example.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set Core.dir + Must set Amase.dir + Must set SetupTool.dir + Must set src.example.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OpenAMASE/nbproject/build-native.xml b/OpenAMASE/nbproject/build-native.xml index 1aa10a0..899e945 100644 --- a/OpenAMASE/nbproject/build-native.xml +++ b/OpenAMASE/nbproject/build-native.xml @@ -6,45 +6,24 @@ --> @@ -664,6 +643,25 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. // manifest var man = jar.createManifest(); + var userManifestPath = project.getProperty("manifest.file"); + if (userManifestPath) { + var userManifestFile = project.resolveFile(userManifestPath); + if (userManifestFile.isFile()) { + var manifestEncoding = project.getProperty("manifest.encoding"); + var userManifestReader = manifestEncoding ? + new java.io.InputStreamReader( + new java.io.FileInputStream(userManifestFile), + manifestEncoding) : + new java.io.InputStreamReader( + new java.io.FileInputStream(userManifestFile)); + try { + var userManifest = new org.apache.tools.ant.taskdefs.Manifest(userManifestReader); + man.merge(userManifest); + } finally { + userManifestReader.close(); + } + } + } var a1val = new String(project.getProperty("application.vendor")); var a1 = new org.apache.tools.ant.taskdefs.Manifest.Attribute(); a1.setName("Implementation-Vendor"); diff --git a/OpenAMASE/nbproject/genfiles.properties b/OpenAMASE/nbproject/genfiles.properties index dca6934..32eae85 100644 --- a/OpenAMASE/nbproject/genfiles.properties +++ b/OpenAMASE/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=bf9fc4ef -build.xml.script.CRC32=f19a1b87 -build.xml.stylesheet.CRC32=8064a381@1.79.1.48 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=bf9fc4ef -nbproject/build-impl.xml.script.CRC32=90f070c0 -nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48 +build.xml.data.CRC32=bf9fc4ef +build.xml.script.CRC32=f19a1b87 +build.xml.stylesheet.CRC32=f85dc8f2@1.108.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=bf9fc4ef +nbproject/build-impl.xml.script.CRC32=c61f68a4 +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.108.0.48 diff --git a/OpenAMASE/nbproject/project.properties b/OpenAMASE/nbproject/project.properties index 5241859..0a795de 100644 --- a/OpenAMASE/nbproject/project.properties +++ b/OpenAMASE/nbproject/project.properties @@ -1,90 +1,105 @@ -Amase.dir=${file.reference.src-Amase} -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=OpenAMASE -application.vendor=AFRL.RQ -auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -Core.dir=${file.reference.src-Core} -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/OpenAMASE.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.lmcplib.jar=lib/lmcplib.jar -file.reference.src-Amase=src/Amase -file.reference.src-Core=src/Core -file.reference.src-SetupTool=src/SetupTool -file.reference.worldwind.jar=lib/worldwind.jar -includes=** -jar.compress=false -javac.classpath=\ - ${file.reference.lmcplib.jar}:\ - ${libs.Flexdock.classpath}:\ - ${libs.SwingX.classpath}:\ - ${libs.GRAL.classpath}:\ - ${file.reference.worldwind.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.external.vm=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=avtas.app.Application -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -native.bundling.enabled=true -platform.active=default_platform -project.license=rqqd_license -project.licensePath=./nbproject/rqqd_license.txt -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project. -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. -# To set system properties for unit tests define test-sys-prop.name=value: -run.jvmargs=-splash:./data/amase_splash.png -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -SetupTool.dir=${file.reference.src-SetupTool} -source.encoding=UTF-8 -src.example.dir=src\\example +Amase.dir=${file.reference.src-Amase} +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=OpenAMASE +application.vendor=AFRL.RQ +auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +Core.dir=${file.reference.src-Core} +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/OpenAMASE.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.lmcplib.jar=lib/lmcplib.jar +file.reference.src-Amase=src/Amase +file.reference.src-Core=src/Core +file.reference.src-SetupTool=src/SetupTool +file.reference.worldwind.jar=lib/worldwind.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.lmcplib.jar}:\ + ${libs.Flexdock.classpath}:\ + ${libs.SwingX.classpath}:\ + ${libs.GRAL.classpath}:\ + ${file.reference.worldwind.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=true +javac.external.vm=false +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=11 +javac.target=11 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jlink.launcher=false +jlink.launcher.name=OpenAMASE +main.class=avtas.app.Application +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +native.bundling.enabled=true +platform.active=default_platform +project.license=rqqd_license +project.licensePath=./nbproject/rqqd_license.txt +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs=-splash:./data/amase_splash.png +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +SetupTool.dir=${file.reference.src-SetupTool} +source.encoding=UTF-8 +src.example.dir=src\\example diff --git a/OpenAMASE/src/Amase/avtas/amase/entity/EntityModel.java b/OpenAMASE/src/Amase/avtas/amase/entity/EntityModel.java index 028918b..e310281 100644 --- a/OpenAMASE/src/Amase/avtas/amase/entity/EntityModel.java +++ b/OpenAMASE/src/Amase/avtas/amase/entity/EntityModel.java @@ -275,26 +275,36 @@ public void fireModelEvent(Object event) { * the source. */ public void fireModelEvent(Object event, Object source) { + synchronized(eventQueue) { + eventQueue.add(new EventWrapper(event, source)); + } - eventQueue.add(new EventWrapper(event, source)); - - if (isDispatching) { - return; + synchronized(this) { + if (isDispatching) { + return; + } + isDispatching = true; } - isDispatching = true; - - while (!eventQueue.isEmpty()) { - EventWrapper eventWrapper = eventQueue.pollFirst(); - if (eventWrapper != null) { - for (EntityModule m : moduleList) { - if (eventWrapper.source != m) { - m.modelEventOccurred(event); + + while (true) { + synchronized(eventQueue) { + if (eventQueue.isEmpty()) { + break; + } + EventWrapper eventWrapper = eventQueue.pollFirst(); + if (eventWrapper != null) { + for (EntityModule m : moduleList) { + if (eventWrapper.source != m) { + m.modelEventOccurred(eventWrapper.event); + } } } } } - isDispatching = false; + synchronized(this) { + isDispatching = false; + } } public long getID() { diff --git a/OpenAMASE/src/Amase/avtas/amase/map/MapPlugin.java b/OpenAMASE/src/Amase/avtas/amase/map/MapPlugin.java index fd405c0..83deac6 100644 --- a/OpenAMASE/src/Amase/avtas/amase/map/MapPlugin.java +++ b/OpenAMASE/src/Amase/avtas/amase/map/MapPlugin.java @@ -293,7 +293,7 @@ public void actionPerformed(ActionEvent e) { try { Class c = Class.forName(ans); if (MapLayer.class.isAssignableFrom(c)) { - MapLayer layer = (MapLayer) c.newInstance(); + MapLayer layer = (MapLayer) c.getDeclaredConstructor().newInstance(); map.add(layer); if (context != null) { context.addObject(layer); diff --git a/OpenAMASE/src/Amase/avtas/amase/network/EntityTcpServer.java b/OpenAMASE/src/Amase/avtas/amase/network/EntityTcpServer.java index 1f50323..4124829 100644 --- a/OpenAMASE/src/Amase/avtas/amase/network/EntityTcpServer.java +++ b/OpenAMASE/src/Amase/avtas/amase/network/EntityTcpServer.java @@ -127,6 +127,8 @@ public void run() { while (isRunning) { try { + //TODO: The Java Socket types is NOT thread safe and there's no protection here for concurrent read/write + // to the socket! byte[] bytes = LMCPFactory.getMessageBytes(socket.getInputStream()); if (bytes.length > 0) { avtas.lmcp.LMCPObject lmcpObject = LMCPFactory.getObject(bytes); diff --git a/OpenAMASE/src/Amase/avtas/amase/objtree/LmcpObjectActions.java b/OpenAMASE/src/Amase/avtas/amase/objtree/LmcpObjectActions.java index 896ac1f..96bd428 100644 --- a/OpenAMASE/src/Amase/avtas/amase/objtree/LmcpObjectActions.java +++ b/OpenAMASE/src/Amase/avtas/amase/objtree/LmcpObjectActions.java @@ -379,7 +379,7 @@ public static ArrayList getCompatibleTypes(Class origClass) { try { Class tClass = Class.forName(packName.getName() + "." + t); if (origClass.isAssignableFrom(tClass)) { - retList.add(tClass.newInstance()); + retList.add(tClass.getDeclaredConstructor().newInstance()); } } catch (Exception ex) { Logger.getLogger(LmcpObjectActions.class.getName()).log(Level.SEVERE, null, ex); diff --git a/OpenAMASE/src/Core/avtas/app/AppEventManager.java b/OpenAMASE/src/Core/avtas/app/AppEventManager.java index c252d60..43a4167 100644 --- a/OpenAMASE/src/Core/avtas/app/AppEventManager.java +++ b/OpenAMASE/src/Core/avtas/app/AppEventManager.java @@ -139,7 +139,9 @@ public static AppEventManager removeEventManager(String tag) { */ public void fireEvent(Object evt, Object eventSource) { EventWrapper wrapper = new EventWrapper(evt, eventSource); - waitList.addLast(wrapper); + synchronized(waitList) { + waitList.addLast(wrapper); + } dispatchObjects(); } @@ -151,7 +153,9 @@ public void fireEvent(Object evt, Object eventSource) { */ public void fireEvent(Object evt) { EventWrapper wrapper = new EventWrapper(evt, null); - waitList.addLast(wrapper); + synchronized(waitList) { + waitList.addLast(wrapper); + } dispatchObjects(); } @@ -166,9 +170,11 @@ public void fireEvent(Object evt) { * the source object. */ public void fireEventNow(Object evt, Object eventSource) { - for (AppEventListener l : listeners) { - if (l != eventSource) { - l.eventOccurred(evt); + synchronized(listeners) { + for (AppEventListener l : listeners) { + if (l != eventSource) { + l.eventOccurred(evt); + } } } } @@ -207,10 +213,12 @@ public boolean isLocked() { * * @param l The AppEventListener to be added. */ - public synchronized boolean addListener(AppEventListener l) { - if (!listeners.contains(l)) { - listeners.add(l); - return true; + public boolean addListener(AppEventListener l) { + synchronized(listeners) { + if (!listeners.contains(l)) { + listeners.add(l); + return true; + } } return false; } @@ -224,8 +232,10 @@ public synchronized boolean addListener(AppEventListener l) { * @param l The listener to remove. * @return true if the listener was removed, false otherwise. */ - public synchronized boolean removeListener(AppEventListener l) { - return listeners.remove(l); + public boolean removeListener(AppEventListener l) { + synchronized(listeners) { + return listeners.remove(l); + } } /** @@ -234,7 +244,9 @@ public synchronized boolean removeListener(AppEventListener l) { * @return The list of registered event listeners */ public List getListeners() { - return listeners; + //cpw: For now return a shallow copy of the list, user shouldn't modify elements of the container! + //TODO: Return a deep copy of the list here. + return new ArrayList(listeners); } /** @@ -244,31 +256,38 @@ public List getListeners() { * lock is true. */ private void dispatchObjects() { - - if (eventOccuring) { - return; + // Separate synchronization on "this" to allow early return from this function and proper protection of + // "eventOccuring" primitive type (cannot synchronize on these). + synchronized(this) { + if (eventOccuring) { + return; + } + eventOccuring = true; } - eventOccuring = true; while (!lock) { - EventWrapper e = waitList.poll(); - if (e == null) { - break; - } - synchronized (listeners) { - for (int i = 0; i < listeners.size(); i++) { - if (consume == e.event) { - consume = null; - break; - } - AppEventListener l = listeners.get(i); - if (l != e.source) { - l.eventOccurred(e.event); + synchronized(waitList) { + EventWrapper e = waitList.poll(); + if (e == null) { + break; + } + synchronized(listeners) { + for (int i = 0; i < listeners.size(); i++) { + if (consume == e.event) { + consume = null; + break; + } + AppEventListener l = listeners.get(i); + if (l != e.source) { + l.eventOccurred(e.event); + } } } } } consume = null; - eventOccuring = false; + synchronized(this) { + eventOccuring = false; + } } /** @@ -285,19 +304,15 @@ public void consume(Object event) { @Override public void applicationPeerAdded(Object peer) { if (peer instanceof AppEventListener) { - synchronized (listeners) { - AppEventListener l = (AppEventListener) peer; - addListener(l); - } + AppEventListener l = (AppEventListener) peer; + addListener(l); } } @Override public void applicationPeerRemoved(Object peer) { - synchronized (listeners) { - AppEventListener l = (AppEventListener) peer; - removeListener(l); - } + AppEventListener l = (AppEventListener) peer; + removeListener(l); } diff --git a/OpenAMASE/src/Core/avtas/data/PersistentList.java b/OpenAMASE/src/Core/avtas/data/PersistentList.java index 1cb8a60..63ee275 100644 --- a/OpenAMASE/src/Core/avtas/data/PersistentList.java +++ b/OpenAMASE/src/Core/avtas/data/PersistentList.java @@ -256,12 +256,13 @@ public void close() { } } + /** @Override protected void finalize() throws Throwable { close(); - super.finalize(); } - + * Deprecated, uncalled + */ /** * * @return size of the persistent storage file underlying this list. diff --git a/OpenAMASE/src/Core/avtas/map/MapPanel.java b/OpenAMASE/src/Core/avtas/map/MapPanel.java index 0af2462..fe616d4 100644 --- a/OpenAMASE/src/Core/avtas/map/MapPanel.java +++ b/OpenAMASE/src/Core/avtas/map/MapPanel.java @@ -174,7 +174,7 @@ public static MapLayer makeLayer(Element node) { String className = XMLUtil.getAttr(node, "Class", ""); if (!className.isEmpty()) { Class cl = Class.forName(className); - Object o = cl.newInstance(); + Object o = cl.getDeclaredConstructor().newInstance(); if (o instanceof MapLayer) { return (MapLayer) o; @@ -597,12 +597,12 @@ public void mouseDragged(MouseEvent e) { int dx = e.getX() - lastEvent.getX(); int dy = e.getY() - lastEvent.getY(); - int bothDown = (MouseEvent.BUTTON1_MASK | MouseEvent.BUTTON3_MASK); + int bothDown = (MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON3_DOWN_MASK); - if ((e.getModifiers() & bothDown) == bothDown) { + if ((e.getModifiersEx() & bothDown) == bothDown) { zoom(Math.pow(1.05, -dy), e); } - else if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) == MouseEvent.BUTTON3_MASK) { + else if ((e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) == MouseEvent.BUTTON3_DOWN_MASK) { pan(dx, dy); } else if (proj != null) { @@ -633,7 +633,7 @@ public void mouseReleased(MouseEvent e) { double lat = proj.getLat(e.getX(), e.getY()); popupMenu.showMenu(e, lat, lon); } - else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == MouseEvent.BUTTON1_MASK) { + else if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) { double lon = proj.getLon(e.getX(), e.getY()); double lat = proj.getLat(e.getX(), e.getY()); for (MapMouseListener l : mouseListeners) { @@ -658,7 +658,7 @@ public void mousePressed(MouseEvent e) { double lat = proj.getLat(e.getX(), e.getY()); popupMenu.showMenu(e, lat, lon); } - else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == MouseEvent.BUTTON1_MASK) { + else if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) { double lon = proj.getLon(e.getX(), e.getY()); double lat = proj.getLat(e.getX(), e.getY()); for (MapMouseListener l : mouseListeners) { @@ -698,7 +698,7 @@ public void mouseClicked(MouseEvent e) { double lat = proj.getLat(e.getX(), e.getY()); popupMenu.showMenu(e, lat, lon); } - else if ((e.getModifiers() & MouseEvent.BUTTON2_MASK) == MouseEvent.BUTTON2_MASK && proj != null) { + else if ((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) == MouseEvent.BUTTON2_DOWN_MASK && proj != null) { pan(-e.getX() + getWidth() / 2, -e.getY() + getHeight() / 2); } diff --git a/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java b/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java index 587c2ec..269c53d 100644 --- a/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java +++ b/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java @@ -109,14 +109,6 @@ public void setPainter(Painter painter) { super.setPainter(painter); } - /** - * @deprecated Use {@link #size() } instead. - * @return length of the internalList - */ - public int getLength() { - return internalList.size(); - } - /** * Returns all of the graphics that intersect the given screen location in the * current projection. diff --git a/OpenAMASE/src/Core/avtas/map/layers/BufferSupport.java b/OpenAMASE/src/Core/avtas/map/layers/BufferSupport.java index 52381e0..f7d69c4 100644 --- a/OpenAMASE/src/Core/avtas/map/layers/BufferSupport.java +++ b/OpenAMASE/src/Core/avtas/map/layers/BufferSupport.java @@ -45,8 +45,7 @@ * * @author AFRL/RQQD */ -public class BufferSupport { - +public class BufferSupport implements AutoCloseable{ private RenderThread renderThread = null; private MapScaledImage frontGraphic = null; private MapScaledImage backGraphic = null; @@ -62,9 +61,9 @@ public class BufferSupport { public BufferSupport(MapLayer layer) { this.layer = layer; } - - @Override - protected void finalize() throws Throwable { + + @ Override + public void close() { if (backRaster != null) { backRaster.flush(); } diff --git a/OpenAMASE/src/Core/avtas/properties/XmlSerializer.java b/OpenAMASE/src/Core/avtas/properties/XmlSerializer.java index d7dd5e6..16df0a2 100644 --- a/OpenAMASE/src/Core/avtas/properties/XmlSerializer.java +++ b/OpenAMASE/src/Core/avtas/properties/XmlSerializer.java @@ -21,6 +21,7 @@ import java.awt.Font; import java.io.File; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; @@ -115,7 +116,7 @@ public static Object deserialize(Element el) { String className = el.getName(); try { Class c = Class.forName(className); - Object o = c.newInstance(); + Object o = c.getDeclaredConstructor().newInstance(); for (Element child : el.getChildElements()) { Field f = ReflectionUtils.getField(c, child.getName()); @@ -143,7 +144,9 @@ else if (f != null) { } } return o; - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) { + } catch (ClassNotFoundException | InstantiationException | + IllegalAccessException | NoSuchMethodException | + InvocationTargetException ex ) { Logger.getLogger(XmlSerializer.class.getName()).log(Level.SEVERE, null, ex); return null; } diff --git a/OpenAMASE/src/Core/avtas/swing/FindTool.java b/OpenAMASE/src/Core/avtas/swing/FindTool.java index e59c992..eae125e 100644 --- a/OpenAMASE/src/Core/avtas/swing/FindTool.java +++ b/OpenAMASE/src/Core/avtas/swing/FindTool.java @@ -178,7 +178,7 @@ public boolean replace(String replaceTerm) { findNext(); try { - textComp.scrollRectToVisible(textComp.modelToView(textComp.getCaretPosition())); + textComp.scrollRectToVisible(textComp.modelToView2D(textComp.getCaretPosition()).getBounds()); } catch (BadLocationException ex) { Logger.getLogger(FindTool.class.getName()).log(Level.SEVERE, null, ex); } diff --git a/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java b/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java index 69e5248..010d3ea 100644 --- a/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java +++ b/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java @@ -37,19 +37,19 @@ public IntegerWrapModel(int val, int min, int max, int interval) { this.max = max; this.interval = interval; - setValue( new Integer(val)); + setValue(val); } public Object getPreviousValue() { if (val - interval >= min) - return new Integer(val-interval); - else return new Integer(max-interval); + return (val - interval); + else return (max - interval); } public Object getNextValue() { if (val + interval < max) - return new Integer(val + interval); - else return new Integer(min); + return (val + interval); + else return min; } public void setValue(Object o) { @@ -60,7 +60,7 @@ public void setValue(Object o) { } public Object getValue() { - return new Integer(val); + return val; } } diff --git a/OpenAMASE/src/Core/avtas/util/ReflectionUtils.java b/OpenAMASE/src/Core/avtas/util/ReflectionUtils.java index 0c57ad4..96c2261 100644 --- a/OpenAMASE/src/Core/avtas/util/ReflectionUtils.java +++ b/OpenAMASE/src/Core/avtas/util/ReflectionUtils.java @@ -45,7 +45,7 @@ public static Object createInstance(String classname) throws Exception { //probably should do more checks here, but anything falls to the "could not create" exception anyway return Class.forName(classname).getDeclaredMethod("getInstance").invoke(null); } - Object o = Class.forName(classname).newInstance(); + Object o = Class.forName(classname).getDeclaredConstructor().newInstance(); return o; } diff --git a/OpenAMASE/src/Core/avtas/xml/ui/XMLComposer.java b/OpenAMASE/src/Core/avtas/xml/ui/XMLComposer.java index 7534a01..4a93361 100644 --- a/OpenAMASE/src/Core/avtas/xml/ui/XMLComposer.java +++ b/OpenAMASE/src/Core/avtas/xml/ui/XMLComposer.java @@ -239,7 +239,7 @@ public void setMenuContents(JPopupMenu menu, final java.awt.Point p) { menu.add(new AbstractAction("Edit Element") { public void actionPerformed(ActionEvent ae) { - XmlNode c = textEditor.getXML(textEditor.viewToModel(p)); + XmlNode c = textEditor.getXML(textEditor.viewToModel2D(p)); if (c != null) { TreePath p = xmlTree.getPath(c); if (p != null) { diff --git a/OpenAMASE/src/Core/avtas/xml/ui/XMLEditPane.java b/OpenAMASE/src/Core/avtas/xml/ui/XMLEditPane.java index bc4bdfc..082c787 100644 --- a/OpenAMASE/src/Core/avtas/xml/ui/XMLEditPane.java +++ b/OpenAMASE/src/Core/avtas/xml/ui/XMLEditPane.java @@ -165,7 +165,7 @@ public void select(XmlNode xml) { try { setSelectionStart(b.start); setSelectionEnd(b.end); - scrollRectToVisible(modelToView(b.start)); + scrollRectToVisible(modelToView2D(b.start).getBounds()); return; } catch (BadLocationException ex) { Logger.getLogger(XMLEditPane.class.getName()).log(Level.SEVERE, null, ex); @@ -186,7 +186,7 @@ public void goTo(XmlNode xml) { try { setCaretPosition(getText().length()); setCaretPosition(b.start); - Rectangle r = modelToView(b.start); + Rectangle r = modelToView2D(b.start).getBounds(); scrollRectToVisible(r); return; } catch (BadLocationException ex) { @@ -240,7 +240,7 @@ public void actionPerformed(ActionEvent e) { setSelectionStart(charLoc); setSelectionEnd(charLoc+1); try { - scrollRectToVisible(modelToView(charLoc)); + scrollRectToVisible(modelToView2D(charLoc).getBounds()); getHighlighter().addHighlight(charLoc, charLoc+1, HIGHLIGHT_PAINTER); } catch (BadLocationException ex1) { Logger.getLogger(XMLEditPane.class.getName()).log(Level.SEVERE, null, ex1); @@ -346,7 +346,7 @@ public void menuCanceled(MenuEvent e) { menu.add(gotoXMLMenu); // selects the entire XML content that is under the cursor. - XmlNode content = getXML(viewToModel(p)); + XmlNode content = getXML(viewToModel2D(p)); if (content != null) { JMenu contentSelMenu = new JMenu("Select XML Content"); menu.add(contentSelMenu); diff --git a/OpenAMASE/src/Core/avtas/xml/ui/XmlView.java b/OpenAMASE/src/Core/avtas/xml/ui/XmlView.java index ec8e394..60944c1 100644 --- a/OpenAMASE/src/Core/avtas/xml/ui/XmlView.java +++ b/OpenAMASE/src/Core/avtas/xml/ui/XmlView.java @@ -26,6 +26,7 @@ import java.awt.Color; import java.awt.Graphics; +import java.awt.Graphics2D; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; @@ -88,7 +89,7 @@ public XmlView(Element element) { } @Override - protected int drawUnselectedText(Graphics graphics, int x, int y, int p0, + protected float drawUnselectedText(Graphics2D graphics, float x, float y, int p0, int p1) throws BadLocationException { Document doc = getDocument(); diff --git a/OpenAMASE/src/SetupTool/avtas/amase/validator/ValidatorPlugin.java b/OpenAMASE/src/SetupTool/avtas/amase/validator/ValidatorPlugin.java index 0882b5a..00cfd82 100644 --- a/OpenAMASE/src/SetupTool/avtas/amase/validator/ValidatorPlugin.java +++ b/OpenAMASE/src/SetupTool/avtas/amase/validator/ValidatorPlugin.java @@ -80,7 +80,7 @@ public void addedToApplication(Context context, Element xml, String[] cmdParams) for (Element testEl : testsEl) { try { Class c = Class.forName(testEl.getText()); - Object test = c.newInstance(); + Object test = c.getDeclaredConstructor().newInstance(); if (test instanceof Test && !tests.contains(test)) { tests.add((Test) test); } diff --git a/README.md b/README.md index e5108a7..a95a29a 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,9 @@ The AMASE simulation models 5-DOF (coordinated turning) flight dynamics with sel ## Requirements -*OpenAMASE* is a Java program that will run on any system with [Java][java download] installed. +*OpenAMASE* is a Java program that will run on any system with an appropriate version of Java installed. -[java download]: https://java.com/en/download/ - -To modify *OpenAMASE*, the Java JDK 1.8 or higher is required. All external libraries that *OpenAMASE* +To build or modify *OpenAMASE*, the Java JDK 1.11 or higher is required. All external libraries that *OpenAMASE* requires are included in the `lib` folder. For convenience, Netbeans project files are included to allow developers a quick way to change and re-build *OpenAMASE*.