Commit 3a74deb6 authored by Flavio Abreu Araujo's avatar Flavio Abreu Araujo
Browse files

Initial commit as independent project (Created by Yannick Gillet).

parents
/nbproject/private/
/build/
/dist/
/standalone/
.vscode
manifest.mf
*.log
AbiVars - Created in 2014
Copyright (c) 2014-2021 Yannick GILLET
(yanikou19@gmail.com)
Flavio ABREU ARAUJO
(flavio.abreuaraujo@uclouvain.be)
Université catholique de Louvain, Louvain-la-Neuve, Belgium
All rights reserved.
This software uses the following external library:
- SnakeYAML (Apache 2) : <https://bitbucket.org/asomov/snakeyaml>
AbiVars - Created in 2014
Copyright (c) 2014-2021 Yannick GILLET
(yanikou19@gmail.com)
Flavio ABREU ARAUJO
(flavio.abreuaraujo@uclouvain.be)
Université catholique de Louvain, Louvain-la-Neuve, Belgium
All rights reserved.
AbiVars is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
AbiVars is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with AbiVars. If not, see <https://www.gnu.org/licenses/>.
For more information on the project, please see
<https://gitlab.flavio.be/flavio/abivars>.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="AbiVars" default="default" basedir=".">
<import file="nbproject/build-impl.xml"/>
<description>Builds, tests, and runs the project Abivars</description>
<property name="project.name" value="AbiVars" />
<property name="author" value="Yannick GILLET (yanikou19@gmail.com) and Flavio ABREU ARAUJO (flavio.abreuaraujo@uclouvain.be)" />
<property name="version.num" value="2021a" />
<property name="www" value="https://gitlab.flavio.be/flavio/abivars" />
<property name="myexcludes" value="" />
<exec outputproperty="version.git" executable="git">
<arg value="rev-list" />
<arg value="-count" />
<arg value="HEAD" />
</exec>
<property name="revision.num" value="${version.git}" />
<property name="base.jar.name" value="${project.name}-${version.num}-r${revision.num}"/>
<tstamp>
<format property="NOW" pattern="yyyy-MM-dd HH:mm:ss z" />
</tstamp>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="Graph2D-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<target name="-pre-init">
<property name="dist.jar" value="dist/${base.jar.name}.jar" />
<manifest file="manifest.mf">
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Bundle-Name" value="${project.name}" />
<attribute name="Bundle-Version" value="${version.num}" />
<attribute name="Bundle-Date" value="${NOW}" />
<attribute name="Bundle-Revision" value="${revision.num}" />
<attribute name="Implementation-Author" value="${author}"/>
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${version.num}" />
<attribute name="Implementation-URL" value="${www}" />
</manifest>
</target>
<target name="standalone" depends="jar">
<property name="standalone.dir" value="standalone"/>
<property name="standalone.jar" value="${standalone.dir}/${base.jar.name}.jar"/>
<echo message="Packaging ${application.title} into a single JAR at ${standalone.jar}"/>
<delete dir="${standalone.dir}"/>
<mkdir dir="${standalone.dir}"/>
<jar destfile="${standalone.dir}/temp_final.jar" filesetmanifest="skip">
<zipgroupfileset dir="dist" includes="*.jar"/>
<zipgroupfileset dir="dist/lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Bundle-Name" value="${project.name}" />
<attribute name="Bundle-Version" value="${version.num}" />
<attribute name="Bundle-Date" value="${NOW}" />
<attribute name="Bundle-Revision" value="${revision.num}" />
<attribute name="Implementation-Author" value="${author}"/>
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${version.num}" />
<attribute name="Implementation-URL" value="${www}" />
</manifest>
<metainf dir="." includes="COPYING"/>
<metainf dir="." includes="COPYING.LESSER"/>
<metainf dir="." includes="ACKNOWLEDGEMENTS"/>
</jar>
<zip destfile="${standalone.jar}">
<zipfileset src="${standalone.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${standalone.dir}/temp_final.jar"/>
</target>
<target name="javadoc-jar" depends="jar">
<property name="javadoc.jar.name" value="${base.jar.name}-javadoc"/>
<property name="javadoc.dir" value="javadoc-jar"/>
<property name="javadoc.jar" value="${javadoc.dir}/${javadoc.jar.name}.jar"/>
<echo message="Packaging ${application.title} into a single JAR at ${javadoc.jar}"/>
<delete dir="${javadoc.dir}"/>
<mkdir dir="${javadoc.dir}"/>
<jar destfile="${javadoc.dir}/temp_final.jar" filesetmanifest="skip">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Bundle-Name" value="${project.name}" />
<attribute name="Bundle-Version" value="${version.num}" />
<attribute name="Bundle-Date" value="${NOW}" />
<attribute name="Bundle-Revision" value="${revision.num}" />
<attribute name="Implementation-Author" value="${author}"/>
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${version.num}" />
<attribute name="Implementation-URL" value="${www}" />
</manifest>
<metainf dir="." includes="COPYING"/>
<metainf dir="." includes="COPYING.LESSER"/>
<metainf dir="." includes="ACKNOWLEDGEMENTS"/>
<zipfileset dir="dist/javadoc" prefix=""/>
</jar>
<zip destfile="${javadoc.jar}">
<zipfileset src="${javadoc.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${javadoc.dir}/temp_final.jar"/>
</target>
<target name="src-jar" depends="jar">
<property name="src-jar.jar.name" value="${base.jar.name}-src"/>
<property name="src-jar.dir" value="src-jar"/>
<property name="src-jar.jar" value="${src-jar.dir}/${src-jar.jar.name}.jar"/>
<echo message="Packaging ${application.title} into a single JAR at ${src-jar.jar}"/>
<delete dir="${src-jar.dir}"/>
<mkdir dir="${src-jar.dir}"/>
<jar destfile="${src-jar.dir}/temp_final.jar" filesetmanifest="skip">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Bundle-Name" value="${project.name}" />
<attribute name="Bundle-Version" value="${version.num}" />
<attribute name="Bundle-Date" value="${NOW}" />
<attribute name="Bundle-Revision" value="${revision.num}" />
<attribute name="Implementation-Author" value="${author}"/>
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${version.num}" />
<attribute name="Implementation-URL" value="${www}" />
</manifest>
<metainf dir="." includes="COPYING"/>
<metainf dir="." includes="COPYING.LESSER"/>
<metainf dir="." includes="ACKNOWLEDGEMENTS"/>
<zipfileset dir="src" prefix=""/>
</jar>
<zip destfile="${src-jar.jar}">
<zipfileset src="${src-jar.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${src-jar.dir}/temp_final.jar"/>
</target>
<target name="all">
<antcall target="clean"/>
<antcall target="jar"/>
<antcall target="javadoc"/>
<antcall target="javadoc-jar"/>
<antcall target="src-jar"/>
<antcall target="standalone"/>
</target>
</project>
#!/usr/bin/env python3
import os
import glob
if __name__ == "__main__":
license_file = './HEADERS'
with open(license_file, 'r', encoding='utf-8') as lf:
license = lf.readlines()
for file in glob.glob('src/*/*.java'):
# print(file)
tmp_file = file+'.tmp'
with open(file, 'r', encoding="utf-8") as f:
all_lines = f.readlines()
is_beginning = True
with open(tmp_file, "w", encoding='utf-8') as ft:
for iline, line in enumerate(all_lines):
if is_beginning and line.strip().startswith("*/"):
is_beginning = False
continue
if not is_beginning:
try:
ft.write(line)
except Exception as e:
print(f'Error in line {iline+1} of file : {file} ({e})')
if is_beginning:
os.remove(tmp_file)
print(f'ERROR could not update header for file: {file}')
continue
with open(tmp_file, 'r', encoding='utf-8') as ft:
all_lines = ft.readlines()
with open(file, "w", encoding='utf-8') as f:
f.write("/*\n")
f.writelines(license)
f.write(" */\n")
f.writelines(all_lines)
os.remove(tmp_file)
This diff is collapsed.
build.xml.data.CRC32=70a64bee
build.xml.script.CRC32=ed912634
build.xml.stylesheet.CRC32=958a1d3e
# 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=1818f098
nbproject/build-impl.xml.script.CRC32=a342b1e6
nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46
nbproject/profiler-build-impl.xml.data.CRC32=c7466f95
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
For the purpose of easier reading the script
is divided into following sections:
- initialization
- profiling
- applet profiling
-->
<project name="-profiler-impl" default="profile" basedir="..">
<target name="default" depends="profile" description="Build and profile the project."/>
<!--
======================
INITIALIZATION SECTION
======================
-->
<target name="profile-init" depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check"/>
<target name="-profile-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-profile-post-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-profile-init-macrodef-profile">
<macrodef name="resolve">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${env.@{value}}"/>
</sequential>
</macrodef>
<macrodef name="profile">
<attribute name="classname" default="${main.class}"/>
<element name="customize" optional="true"/>
<sequential>
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java fork="true" classname="@{classname}" dir="${profiler.info.dir}" jvm="${profiler.info.jvm}">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
<arg line="${application.args}"/>
<classpath>
<path path="${run.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper type="glob" from="run-sys-prop.*" to="*"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-profile-init-check" depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile">
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
</target>
<!--
=================
PROFILING SECTION
=================
-->
<target name="profile" if="netbeans.home" depends="profile-init,compile" description="Profile a project in the IDE.">
<nbprofiledirect>
<classpath>
<path path="${run.classpath}"/>
</classpath>
</nbprofiledirect>
<profile/>
</target>
<target name="profile-single" if="netbeans.home" depends="profile-init,compile-single" description="Profile a selected class in the IDE.">
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
<nbprofiledirect>
<classpath>
<path path="${run.classpath}"/>
</classpath>
</nbprofiledirect>
<profile classname="${profile.class}"/>
</target>
<!--
=========================
APPLET PROFILING SECTION
=========================
-->
<target name="profile-applet" if="netbeans.home" depends="profile-init,compile-single">
<nbprofiledirect>
<classpath>
<path path="${run.classpath}"/>
</classpath>
</nbprofiledirect>
<profile classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</profile>
</target>
<!--
=========================
TESTS PROFILING SECTION
=========================
-->
<target name="profile-test-single" if="netbeans.home" depends="profile-init,compile-test-single">
<nbprofiledirect>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
</nbprofiledirect>
<junit showoutput="true" fork="true" dir="${profiler.info.dir}" jvm="${profiler.info.jvm}" failureproperty="tests.failed" errorproperty="tests.failed">
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<test name="${profile.class}"/>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper type="glob" from="test-sys-prop.*" to="*"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
</junit>
</target>
</project>
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
application.title=AbiVars
application.vendor=Y. Gillet & F. Abreu Araujo
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
# 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}/AbiVars.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.-usr=../../../../usr
file.reference.snakeyaml-1.11.jar=jars_libs/snakeyaml-1.11.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.snakeyaml-1.11.jar}
# Space-separated list of extra javac options
javac.compilerargs=-nowarn
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}:\
${libs.junit.classpath}:\
${libs.junit_4.classpath}
javac.test.modulepath=\
${javac.modulepath}
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=AbiVars
main.class=abivars.Abivars
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
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
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
run.test.modulepath=\
${javac.test.modulepath}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>AbiVars</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<NonVisualComponents>
<Menu class="javax.swing.JMenuBar" name="jMenuBar2">
<SubComponents>
<Menu class="javax.swing.JMenu" name="jMenu3">
<Properties>
<Property name="text" type="java.lang.String" value="File"/>
</Properties>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem1">
<Properties>
<Property name="text" type="java.lang.String" value="Open ..."/>
</Properties>