diff --git a/silecs-communication-cpp/Makefile b/silecs-communication-cpp/Makefile index 186f2ec67212190fc4d9982a485c3f27894f4d4a..5d431494eb9044c58300a011d9d7941c9fd033c0 100644 --- a/silecs-communication-cpp/Makefile +++ b/silecs-communication-cpp/Makefile @@ -18,8 +18,8 @@ PRODUCT = communication VERSION = 1.0.4 SKIP_MANIFEST = TRUE -COMMON_MAKE_PATH ?= /common/home/bel/schwinn/lnx/workspace-silecs-neon/generic-makefiles -#COMMON_MAKE_PATH ?= /opt/cern/buildsystem/generic/2.8.20 +#COMMON_MAKE_PATH ?= /common/home/bel/schwinn/lnx/workspace-silecs-neon/generic-makefiles +COMMON_MAKE_PATH ?= /opt/cern/buildsystem/generic/2.9.0 # product configuration LIB_NAME = comm diff --git a/silecs-communication-cpp/releaseSilecs.sh b/silecs-communication-cpp/releaseSilecs.sh index 22fcb5ee5146aa320eb88299cd2a303a32e8f899..a7afccc4eec328c995ad519466d570e4f9e0ad1a 100755 --- a/silecs-communication-cpp/releaseSilecs.sh +++ b/silecs-communication-cpp/releaseSilecs.sh @@ -22,7 +22,7 @@ checkFolderExists() if [ ! -d ${FOLDER} ]; then echo "Error: The folder '${FOLDER}' is needed in order to finish the installation." echo "Installation cancelled." - exit 1 + return 1 fi } @@ -77,6 +77,8 @@ patch() INSTALL_DIR=${RELEASE_DIR_BASE}/${PACKAGE}/${NEW_VERSION} BASE_DIR=${RELEASE_DIR_BASE}/${PACKAGE}/${BASE_VERSION} checkFolderExists ${BASE_DIR} + checkFolderExists ${BASE_DIR} + checkFolderExists ${INSTALL_DIR} if [ "$PACKAGE" == "$PACKAGE_TO_PATCH" ]; then if [ -d ${INSTALL_DIR} ]; then if [ -L ${INSTALL_DIR} ]; then diff --git a/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.cpp b/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.cpp index c38082c78b399aa08365f950ade05f667163a048..9994de5c33ffc7519d2bf7384986e15f78cb5a5e 100644 --- a/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.cpp +++ b/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.cpp @@ -191,23 +191,6 @@ namespace Silecs blockRegisterMap_.insert(std::make_pair(blockName, registerCol)); } - void Device::keepMasterRegisters(std::string blockName) - { - blockRegisterMapType::iterator iter; - iter = blockRegisterMap_.find(blockName); - if( iter == blockRegisterMap_.end() ) - { - std::ostringstream errorMessage; - errorMessage << "Block not found! The block '" << blockName << "' does not exist on the device '" << label_ << "'."; - throw SilecsException(__FILE__, __LINE__,errorMessage.str()); - } - - for (unsigned int i=0; i<iter->second.size(); i++) - { Register* pReg = iter->second[i]; - if (pReg->getSynchroType() == Master) pReg->copyValue(); - } - } - Block* Device::getBlock(const std::string blockName, AccessType accessType) { if( ! hasBlock(blockName) ) diff --git a/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.h b/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.h index 1e130c03146e9e253e5708777b6528cc8886462f..6c100e789a01b227cd0fc16ae01c4b1cd5c72474 100644 --- a/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.h +++ b/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsDevice.h @@ -133,14 +133,6 @@ namespace Silecs void instantiateRegisters(std::string blockName, AccessType accessType, std::vector< boost::shared_ptr<ElementXML> >& registerNodes); - /*! - * \fn keepMasterRegisters - * \brief This method is used for Retentive registers synchronization on each PLC (re)connection. - * Update local value of the RW Master registers to maintain the PLC values during - * the synchronization of Slave registers. - */ - void keepMasterRegisters(std::string blockName); - /*! * \fn getBlock * \brief returns one instance of the requested block checking its access-type diff --git a/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsPLC.cpp b/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsPLC.cpp index 7b8f12431356267aaebb4cf2fb388cd4932678fe..ed0fabb61281af5e88d87e63c95fc483f269bf8a 100644 --- a/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsPLC.cpp +++ b/silecs-communication-cpp/src/silecs-communication/interface/equipment/SilecsPLC.cpp @@ -241,7 +241,10 @@ namespace Silecs if( pDeviceIter->second->hasBlock((*blockIter)->getName())) { LOG(COMM) << "Updating block '" << (*blockIter)->getName() << "' for device '" << pDeviceIter->second->getLabel()<< "'"; +<<<<<<< HEAD //pDeviceIter->second->keepMasterRegisters(pBlock->getName()); +======= +>>>>>>> refs/heads/gsi-1.0.x_centOS7 pDeviceIter->second->recv((*blockIter)->getName()); } } diff --git a/silecs-diagnostic-cpp/Makefile b/silecs-diagnostic-cpp/Makefile index 14f2f7a21e436b3b4a9f5f33c5b59611478825d3..28108599b11726780b06b78f93563f41a34df831 100644 --- a/silecs-diagnostic-cpp/Makefile +++ b/silecs-diagnostic-cpp/Makefile @@ -19,7 +19,7 @@ VERSION = 1.0.2 SKIP_MANIFEST = TRUE #COMMON_MAKE_PATH ?= /common/home/bel/schwinn/lnx/workspace-silecs-neon/generic-makefiles -COMMON_MAKE_PATH ?= /opt/cern/buildsystem/generic/2.8.20 +COMMON_MAKE_PATH ?= /opt/cern/buildsystem/generic/2.9.0 # product configuration BIN_NAME = $(PROJECT)-$(PRODUCT) diff --git a/silecs-eclipse-plugin-update-site/.gitignore b/silecs-eclipse-plugin-update-site/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0d55b7c9e466968a8c393ab03368b92beffa603d --- /dev/null +++ b/silecs-eclipse-plugin-update-site/.gitignore @@ -0,0 +1,2 @@ +/features/* +/plugins/* \ No newline at end of file diff --git a/silecs-eclipse-plugin-update-site/artifacts.jar b/silecs-eclipse-plugin-update-site/artifacts.jar new file mode 100644 index 0000000000000000000000000000000000000000..a87d7ab050a527669b91f8d1c7c95b33f7f74ff4 Binary files /dev/null and b/silecs-eclipse-plugin-update-site/artifacts.jar differ diff --git a/silecs-eclipse-plugin-update-site/content.jar b/silecs-eclipse-plugin-update-site/content.jar new file mode 100644 index 0000000000000000000000000000000000000000..5d4662ba608c642e81076909afa6682abd697802 Binary files /dev/null and b/silecs-eclipse-plugin-update-site/content.jar differ diff --git a/silecs-eclipse-plugin-update-site/install.sh b/silecs-eclipse-plugin-update-site/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..c989b3929f85415071d268398d7650509b60c3fa --- /dev/null +++ b/silecs-eclipse-plugin-update-site/install.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +INSTALL_DIR=$1 + +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") # path where this script is located in + +mkdir -p ${INSTALL_DIR} +cp -ruv ${SCRIPTPATH}/* ${INSTALL_DIR} \ No newline at end of file diff --git a/silecs-eclipse-plugin-update-site/site.xml b/silecs-eclipse-plugin-update-site/site.xml new file mode 100644 index 0000000000000000000000000000000000000000..1989289c07c32d6510da46f3c5798247ecc6c1a7 --- /dev/null +++ b/silecs-eclipse-plugin-update-site/site.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<site> + <feature url="features/silecsEclipsePluginFeature_1.0.0.201602241715.jar" id="silecsEclipsePluginFeature" version="1.0.0.201602241715"> + <category name="0.9.0"/> + </feature> + <feature url="features/silecsEclipsePluginFeature_1.0.0.201604071714.jar" id="silecsEclipsePluginFeature" version="1.0.0.201604071714"> + <category name="0.10.0"/> + </feature> + <feature url="features/silecsEclipsePluginFeature_1.0.0.201607291027.jar" id="silecsEclipsePluginFeature" version="1.0.0.201607291027"> + <category name="1.0.0"/> + </feature> + <feature url="features/silecsEclipsePluginFeature_1.0.0.201608011414.jar" id="silecsEclipsePluginFeature" version="1.0.0.201608011414"> + <category name="1.0.0"/> + </feature> + <category-def name="0.9.0" label="0.9.0"/> + <category-def name="0.10.0" label="0.10.0"/> + <category-def name="1.0.0" label="1.0.0"/> +</site> diff --git a/silecs-eclipse-plugin/.classpath b/silecs-eclipse-plugin/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..2dfef36bfae0d28c95af368a5d33502fbc784470 --- /dev/null +++ b/silecs-eclipse-plugin/.classpath @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry exported="true" kind="lib" path="ext-jars/xml-apis-1.3.04.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src/java"/> + <classpathentry exported="true" kind="lib" path="jaxen-1.1.6.jar"/> + <classpathentry exported="true" kind="lib" path="xalan-2.7.2.jar"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/silecs-eclipse-plugin/.gitignore b/silecs-eclipse-plugin/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..60a467d9aaa342a744e145a01fc09ce311517422 --- /dev/null +++ b/silecs-eclipse-plugin/.gitignore @@ -0,0 +1,4 @@ +/target/ +/ext-jars/* +/jaxen-1.1.6.jar +/xalan-2.7.2.jar diff --git a/silecs-eclipse-plugin/.project b/silecs-eclipse-plugin/.project new file mode 100644 index 0000000000000000000000000000000000000000..5a975ee6bac89ea407edd3d2741ff7402b84d3c1 --- /dev/null +++ b/silecs-eclipse-plugin/.project @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>silecs-eclipse-plugin</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.springsource.ide.eclipse.gradle.core.nature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.python.pydev.pythonNature</nature> + </natures> +</projectDescription> diff --git a/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs b/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..13b3428acd87c3f94042e61eed221c15ce682bfa --- /dev/null +++ b/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/silecs-eclipse-plugin/META-INF/MANIFEST.MF b/silecs-eclipse-plugin/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..c4986246158bbdd2d7785098e1f91aed3a7b440d --- /dev/null +++ b/silecs-eclipse-plugin/META-INF/MANIFEST.MF @@ -0,0 +1,114 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: silecs.eclipse.plugin;singleton:=true +Bundle-Version: 1.1.1.qualifier +Bundle-Activator: cern.silecs.activator.Activator +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.ui.workbench, + org.eclipse.core.resources, + org.eclipse.ui.ide, + org.eclipse.ui.editors, + org.eclipse.wst.xml.core, + org.eclipse.wst.xml.ui, + org.eclipse.ui.navigator.resources, + org.eclipse.core.filesystem, + org.eclipse.ui.console, + org.eclipse.ui.views, + org.eclipse.wst.validation, + org.eclipse.wst.validation.infopop, + org.eclipse.wst.validation.ui, + org.eclipse.jface.text, + org.eclipse.wst.sse.ui, + org.eclipse.ui.workbench.texteditor, + org.eclipse.text, + org.eclipse.wst.sse.core, + org.eclipse.ui.navigator, + org.eclipse.xsd, + org.eclipse.wst.xsd.core, + org.eclipse.core.expressions, + org.eclipse.cdt, + org.eclipse.cdt.core, + org.eclipse.cdt.ui, + org.eclipse.cdt.managedbuilder.ui, + org.eclipse.ltk.core.refactoring, + org.eclipse.ltk.ui.refactoring, + org.eclipse.equinox.launcher, + org.eclipse.cdt.make.core;bundle-version="7.3.0", + org.eclipse.cdt.make.ui;bundle-version="7.2.0", + org.eclipse.cdt.managedbuilder.core;bundle-version="8.3.0" +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: ., + ext-jars/xalan-2.7.2.jar, + ext-jars/jaxen-1.1.6.jar, + ext-jars/xml-apis-1.3.04.jar +Permissions: all-permissions +Codebase: http://abwww.cern.ch/ap/dist/silecs/1.m.p/configuration/ +Application-Name: Silecs-Eclipse-Plugin +Export-Package: org.apache.bcel, + org.apache.bcel.classfile, + org.apache.bcel.generic, + org.apache.bcel.util, + org.apache.bcel.verifier, + org.apache.bcel.verifier.exc, + org.apache.bcel.verifier.statics, + org.apache.bcel.verifier.structurals, + org.apache.regexp, + org.apache.xalan, + org.apache.xalan.client, + org.apache.xalan.extensions, + org.apache.xalan.lib, + org.apache.xalan.lib.sql, + org.apache.xalan.processor, + org.apache.xalan.res, + org.apache.xalan.serialize, + org.apache.xalan.templates, + org.apache.xalan.trace, + org.apache.xalan.transformer, + org.apache.xalan.xslt, + org.apache.xalan.xsltc, + org.apache.xalan.xsltc.cmdline, + org.apache.xalan.xsltc.cmdline.getopt, + org.apache.xalan.xsltc.compiler, + org.apache.xalan.xsltc.compiler.util, + org.apache.xalan.xsltc.dom, + org.apache.xalan.xsltc.runtime, + org.apache.xalan.xsltc.runtime.output, + org.apache.xalan.xsltc.trax, + org.apache.xalan.xsltc.util, + org.apache.xml.dtm, + org.apache.xml.dtm.ref, + org.apache.xml.dtm.ref.dom2dtm, + org.apache.xml.dtm.ref.sax2dtm, + org.apache.xml.res, + org.apache.xml.utils, + org.apache.xml.utils.res, + org.apache.xpath, + org.apache.xpath.axes, + org.apache.xpath.compiler, + org.apache.xpath.domapi, + org.apache.xpath.functions, + org.apache.xpath.jaxp, + org.apache.xpath.objects, + org.apache.xpath.operations, + org.apache.xpath.patterns, + org.apache.xpath.res, + org.jaxen, + org.jaxen.dom, + org.jaxen.dom4j, + org.jaxen.expr, + org.jaxen.expr.iter, + org.jaxen.function, + org.jaxen.function.ext, + org.jaxen.function.xslt, + org.jaxen.javabean, + org.jaxen.jdom, + org.jaxen.pattern, + org.jaxen.saxpath, + org.jaxen.saxpath.base, + org.jaxen.saxpath.helpers, + org.jaxen.util, + org.jaxen.xom, + org.w3c.dom diff --git a/silecs-eclipse-plugin/build.properties b/silecs-eclipse-plugin/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..eafceb4381e27231d37cb2fdfd0e4f7d4c3c680b --- /dev/null +++ b/silecs-eclipse-plugin/build.properties @@ -0,0 +1,18 @@ +source.. = src/java/ +output.. = bin/java/,\ + bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + JNLP-INF/,\ + src/java/,\ + OSGI-INF/,\ + ext-jars/xml-apis-1.3.04.jar,\ + ext-jars/xalan-2.7.2.jar,\ + ext-jars/serializer-2.7.2.jar,\ + jaxen-1.1.6.jar,\ + xalan-2.7.2.jar +src.includes = src/ +jars.compile.order = . +qualifier = context diff --git a/silecs-eclipse-plugin/build.xml b/silecs-eclipse-plugin/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..223e13e363ca943932fdbc834ff2c9f9038a1c32 --- /dev/null +++ b/silecs-eclipse-plugin/build.xml @@ -0,0 +1,527 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="silecs.eclipse.plugin" default="build.jars" basedir="."> + + <property name="p2.build.repo" value="file:${buildDirectory}/buildRepo"/> + <property name="basews" value="${ws}"/> + <property name="baseos" value="${os}"/> + <property name="basearch" value="${arch}"/> + <property name="basenl" value="${nl}"/> + <property name="bundleId" value="silecs.eclipse.plugin"/> + <property name="bundleVersion" value="1.1.1.201608011414"/> + <property name="p2.publishonerror" value="false"/> + + <!-- Compiler settings. --> + <property name="javacFailOnError" value="false"/> + <property name="javacDebugInfo" value="on"/> + <property name="javacVerbose" value="false"/> + <property name="logExtension" value=".log"/> + <property name="compilerArg" value=""/> + <property name="compilation.prereq.log" value="${buildDirectory}/prereqErrors.log"/> + <property name="javacSource" value="1.3"/> + <property name="javacTarget" value="1.2"/> + <condition property="dir_bootclasspath" value="${java.home}/../Classes"> + <and> + <os family="mac"/> + <available file="${java.home}/../Classes" type="dir"/> + </and> + </condition> + <property name="dir_bootclasspath" value="${java.home}/lib"/> + <path id="path_bootclasspath"> + <fileset dir="${dir_bootclasspath}"> + <include name="*.jar"/> + </fileset> + </path> + <property name="bootclasspath" refid="path_bootclasspath"/> + <condition property="bundleBootClasspath" value="${JavaSE-1.8}" > + <isset property="JavaSE-1.8"/> + </condition> + <condition property="bundleJavacSource" value="1.8" > + <isset property="JavaSE-1.8"/> + </condition> + <condition property="bundleJavacTarget" value="1.8" > + <isset property="JavaSE-1.8"/> + </condition> + <property name="bundleJavacSource" value="${javacSource}"/> + <property name="bundleJavacTarget" value="${javacTarget}"/> + <property name="bundleBootClasspath" value="${bootclasspath}"/> + + <target name="init" depends="properties"> + <condition property="pluginTemp" value="${buildTempFolder}/plugins" > + <isset property="buildTempFolder"/> + </condition> + <property name="pluginTemp" value="${basedir}"/> + <condition property="build.result.folder" value="${pluginTemp}/silecs.eclipse.plugin_1.1.1.201608011414" > + <isset property="buildTempFolder"/> + </condition> + <property name="build.result.folder" value="${basedir}"/> + <property name="temp.folder" value="${basedir}/temp.folder"/> + <property name="plugin.destination" value="${basedir}"/> + <condition property="p2.publish.parts" value="true" > + <istrue value="${p2.gathering}"/> + </condition> + <property name="compilation.problem.marker" value="${build.result.folder}/compilation.problem"/> + <condition property="compilation.problem.marker.exists" value="true" > + <and> + <available file="${compilation.problem.marker}"/> + <isfalse value="${p2.publishonerror}"/> + </and> + </condition> + </target> + + <target name="properties" if="eclipse.running"> + <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> + + </target> + + <target name="build.update.jar" depends="init" description="Build the plug-in: silecs.eclipse.plugin for an update site."> + <delete dir="${temp.folder}"/> + <mkdir dir="${temp.folder}"/> + <antcall target="build.jars"/> + <antcall target="gather.bin.parts"> + <param name="destination.temp.folder" value="${temp.folder}/"/> + </antcall> + <jar destfile="${plugin.destination}/silecs.eclipse.plugin_1.1.1.201608011414.jar" basedir="${temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414" filesetmanifest="merge"/> + <delete dir="${temp.folder}"/> + </target> + + <target name="@dot.nestedJars"> + <mkdir dir="${buildDirectory}/nestedJars/org.eclipse.equinox.registry_3.6.0.v20150318-1503"/> + <unzip src="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.registry_3.6.0.v20150318-1503.jar" dest="${buildDirectory}/nestedJars/org.eclipse.equinox.registry_3.6.0.v20150318-1503" overwrite="false"> + <patternset includes="runtime_registry_compatibility.jar"/> + </unzip> + <mkdir dir="${buildDirectory}/nestedJars/com.ibm.icu_54.1.1.v201501272100"/> + <unzip src="../../../../../../../../opt/eclipse/mars/plugins/com.ibm.icu_54.1.1.v201501272100.jar" dest="${buildDirectory}/nestedJars/com.ibm.icu_54.1.1.v201501272100" overwrite="false"> + <patternset includes="icu-data.jar"/> + </unzip> + <mkdir dir="${buildDirectory}/nestedJars/org.eclipse.e4.core.services_2.0.0.v20150403-1912"/> + <unzip src="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.services_2.0.0.v20150403-1912.jar" dest="${buildDirectory}/nestedJars/org.eclipse.e4.core.services_2.0.0.v20150403-1912" overwrite="false"> + <patternset includes="injection_annotations.jar"/> + </unzip> + </target> + <target name="@dot" depends="init,@dot.nestedJars" unless="@dot" description="Create jar: silecs.eclipse.plugin @dot."> + <delete dir="${build.result.folder}/@dot"/> + <mkdir dir="${build.result.folder}/@dot"/> + <path id="@dot.classpath"> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui_3.107.0.v20150507-1945.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.runtime_3.11.1.v20150903-1804.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/javax.annotation_1.2.0.v201401042248.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/javax.inject_1.0.0.v20091030.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.osgi_3.10.102.v20160118-1700.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.common_3.7.0.v20150402-1709.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.jobs_3.7.0.v20150330-2103.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.runtime.compatibility.registry_3.6.0.v20150318-1505/runtime_registry_compatibility.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.runtime.compatibility.registry_3.6.0.v20150318-1505"/> + <pathelement path="${buildDirectory}/nestedJars/org.eclipse.equinox.registry_3.6.0.v20150318-1503/runtime_registry_compatibility.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.registry_3.6.0.v20150318-1503.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/javax.xml_1.3.4.v201005080400.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.preferences_3.5.300.v20150408-1437.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.contenttype_3.5.0.v20150421-2214.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.app_1.3.300.v20150423-1356.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.osgi.services_3.5.0.v20150519-2006.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/javax.servlet_3.1.0.v201410161800.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.swt_3.104.2.v20160212-1350.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.swt.gtk.linux.x86_64_3.104.2.v20160212-1350.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jface_3.11.1.v20160128-1644.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.commands_3.7.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.bidi_0.10.0.v20130327-1442.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.workbench_3.107.1.v20160120-2131.jar"/> + <pathelement path="${buildDirectory}/nestedJars/com.ibm.icu_54.1.1.v201501272100/icu-data.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/com.ibm.icu_54.1.1.v201501272100.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.commands_0.11.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.expressions_3.5.0.v20150421-2214.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.contexts_1.4.0.v20150828-0818.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.di_1.5.0.v20150421-2214.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.di.annotations_1.4.0.v20150528-1451.jar"/> + <pathelement path="${buildDirectory}/nestedJars/org.eclipse.e4.core.services_2.0.0.v20150403-1912/injection_annotations.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.services_2.0.0.v20150403-1912.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.workbench_1.3.1.v20160203-0951.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.model.workbench_1.1.100.v20150407-1430.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.emf.ecore_2.11.2.v20160208-0816.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.emf.common_2.11.1.v20160208-0816.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.resources_3.10.1.v20150725-1910.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ant.core_3.4.0.v20150428-1928.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.variables_3.2.800.v20130819-1716.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.filesystem_1.5.0.v20150725-1910.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.filesystem.java7_1.0.100.v20150423-0754.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.filesystem.linux.x86_64_1.2.200.v20140124-1940.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.emf.xpath_0.1.100.v20150513-0856.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.commons.jxpath_1.3.0.v200911051830.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.services_1.2.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.di_1.1.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.core.di.extensions_0.13.0.v20150421-2214.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.emf.ecore.change_2.11.0.v20160208-0816.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.emf.ecore.xmi_2.11.1.v20160208-0816.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.13.0.v20150901-1347.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.workbench.swt_0.13.0.v20150504-0621.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.databinding_1.5.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.databinding.observable_1.5.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.databinding.property_1.5.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jface.databinding_1.7.0.v20150406-2148.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.css.core_0.11.0.v20150511-1937.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.w3c.css.sac_1.3.1.v200903091627.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.batik.css_1.7.0.v201011041433.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.w3c.dom.svg_1.1.0.v201011041433.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.w3c.dom.smil_1.0.1.v200903091627.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.batik.util_1.7.0.v201011041433.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.batik.util.gui_1.7.0.v200903091627.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.css.swt_0.12.0.v20150511-1003.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.bindings_0.11.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.workbench3_0.13.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.css.swt.theme_0.10.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.swt.gtk_1.0.1.v20150708-1529.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.widgets_1.1.0.v20150427-1751.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.ds_1.4.300.v20150423-1356.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.event_1.3.100.v20140115-1647.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.help_3.6.0.v20130326-1254.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.e4.ui.workbench.addons.swt_1.2.0.v20150512-1414.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.ide_3.11.0.v20150825-2158.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.views_3.8.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jface.text_3.10.0.v20150603-1752.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.text_3.5.400.v20150505-1044.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.forms_3.6.200.v20150506-2029.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.p2.engine_2.4.0.v20150511-1532.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.p2.core_2.4.0.v20150527-1706.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.p2.metadata_2.3.0.v20150511-1532.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.p2.metadata.repository_1.2.200.v20150428-1613.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.p2.repository_2.3.100.v20150428-1613.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.security_1.2.100.v20150423-1356.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.tukaani.xz_1.3.0.v201308270617.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.editors_3.9.0.v20150213-1939.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.workbench.texteditor_3.9.100.v20141023-1946.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.compare.core_3.5.500.v20150505-1058.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.filebuffers_3.5.500.v20140723-1040.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.xml.core_1.1.902.v201501211904.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.xerces_2.9.0.v201101211617.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.xml.serializer_2.7.1.v201005080400.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.uriresolver_1.2.200.v201505132009.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.sse.core_1.1.900.v201401092025.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.validation_1.2.700.v201508251749.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.frameworks_1.2.200.v201304241450.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.environment_1.0.400.v200912181831.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.osgi.util_3.3.100.v20150423-1351.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.core_1.2.0.v200908251833.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.project.facet.core_1.4.300.v201111030423.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jem.util_2.1.200.v201404021757.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.emf_1.2.400.v201505132009.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.emfworkbench.integration_1.2.101.v201107081800.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.emf.edit_2.11.1.v20160208-0841.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.xml.ui_1.1.501.v201501212057.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.sse.ui_1.3.400.v201505141512.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.debug.ui_3.11.101.v20160203-1230.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.console_3.6.100.v20150822-1912.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.debug.core_3.10.0.v20150303-1130.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.search_3.10.0.v20150318-0856.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ltk.core.refactoring_3.6.201.v20150819-1034.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ltk.ui.refactoring_3.7.200.v20140625-1835.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.navigator_3.6.0.v20150422-0725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.compare_3.5.600.v20150420-1449.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.team.core_3.7.100.v20150203-1452.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.team.ui_3.7.200.v20150203-1452.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.ui_1.1.500.v200911182011.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.validation.ui_1.2.500.v201310231452.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.common.frameworks.ui_1.2.400.v201504292002.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.navigator.resources_3.5.1.v20160128-1644.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.views.properties.tabbed_3.6.100.v20150423-0822.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.validation.infopop_1.0.300.v201309101952.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.xsd_2.11.0.v20160208-0841.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.wst.xsd.core_1.1.900.v201401141857.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt_8.8.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.intro_3.4.300.v20141007-1449.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.help.base_4.0.301.v20160212-1500.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.http.jetty_3.1.2.v20160115-1350.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.http.servlet_1.2.2.v20160202-2102.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jetty.http_9.2.13.v20150730.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jetty.util_9.2.13.v20150730.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.slf4j.api_1.7.2.v20121108-1250.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/ch.qos.logback.slf4j_1.0.7.v201505121915.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.slf4j.impl.log4j12_1.7.2.v20131105-2200.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.log4j_1.2.15.v201012070815.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/ch.qos.logback.core_1.0.7.v20121108-1250.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/ch.qos.logback.classic_1.0.7.v20121108-1250.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.logback.appender_1.6.2.20150902-0002.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.core.ui_1.6.2.20150902-0002.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.core_1.6.2.20150902-0002.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/takari-local-repository-0.9.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/takari-filemanager-0.7.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-core-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-model-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-settings-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-settings-builder-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-builder-support-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-repository-metadata-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-artifact-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-plugin-api-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-model-builder-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-aether-provider-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-api-1.0.2.v20150114.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-util-1.0.2.v20150114.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-interpolation-1.21.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-utils-3.0.20.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-component-annotations-1.5.5.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-sec-dispatcher-1.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-embedder-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-cipher-1.7.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/commons-cli-1.2.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/maven-compat-3.3.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/wagon-provider-api-2.9.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/org.eclipse.sisu.plexus-0.3.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/cdi-api-1.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/jsr250-api-1.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/org.eclipse.sisu.inject-0.3.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/sisu-guice-3.2.5-no_aop.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/guava-18.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-build-api-0.0.7.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-impl-1.0.2.v20150114.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-spi-1.0.2.v20150114.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-connector-okhttp-0.15.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/okhttp-2.3.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/okio-1.3.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-connector-basic-1.0.2.v20150114.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/aether-transport-wagon-1.0.2.v20150114.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/wagon-file-2.9.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/commons-lang-2.6.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.6.2.20150902-0001"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.6.2.20150902-0001/jars/slf4j-simple-1.7.5.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/archetype-common-2.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/archetype-catalog-2.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/archetype-descriptor-2.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/archetype-registry-2.3.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/maven-invoker-2.1.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/commons-collections-3.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/commons-io-2.2.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/commons-lang-2.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/dom4j-1.6.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/jchardet-1.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/jdom-1.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/oro-2.0.8.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/plexus-velocity-1.1.8.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.archetype.common_1.6.2.20150902-0001/velocity-1.5.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.indexer_1.6.2.20150902-0001"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.indexer_1.6.2.20150902-0001/indexer-core-3.1.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.indexer_1.6.2.20150902-0001/indexer-artifact-3.1.0.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.indexer_1.6.2.20150902-0001/lucene-core-2.4.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.maven.indexer_1.6.2.20150902-0001/lucene-highlighter-2.4.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.workspace.cli_0.3.1.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/com.google.guava_15.0.0.v201403281430.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.m2e.model.edit_1.6.2.20150902-0002.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.emf.ecore.edit_2.9.0.v20160208-0841.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jetty.server_9.2.13.v20150730.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jetty.io_9.2.13.v20150730.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jetty.servlet_9.2.13.v20150730.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.jetty.security_9.2.13.v20150730.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.lucene.analysis_3.5.0.v20120725-1805.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.apache.lucene.core_3.5.0.v20120725-1805.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.net_1.2.300.v20141118-1725.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.core.net.linux.x86_64_1.1.100.v20140124-2013.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.ui.cheatsheets_3.4.200.v20131227-1524.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.help.ui_4.0.100.v20140401-0608.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.core_5.11.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.core.native_5.8.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.core.linux_5.3.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.core.linux.x86_64_5.3.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.ui_5.11.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.managedbuilder.ui_8.2.2.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.make.core_7.3.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.make.ui_7.2.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.cdt.managedbuilder.core_8.3.0.201509131935.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar"/> + <pathelement path="../../../../../../../../opt/eclipse/mars/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417"/> + <pathelement path="ext-jars/xalan-2.7.2.jar"/> + <pathelement path="${build.result.folder}/../silecs.eclipse.plugin_1.1.1.201608011414/ext-jars/xalan-2.7.2.jar"/> + <pathelement path="ext-jars/jaxen-1.1.6.jar"/> + <pathelement path="${build.result.folder}/../silecs.eclipse.plugin_1.1.1.201608011414/ext-jars/jaxen-1.1.6.jar"/> + <pathelement path="ext-jars/xml-apis-1.3.04.jar"/> + <pathelement path="${build.result.folder}/../silecs.eclipse.plugin_1.1.1.201608011414/ext-jars/xml-apis-1.3.04.jar"/> + </path> + <!-- compile the source code --> + <javac destdir="${build.result.folder}/@dot" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" > + <compilerarg line="${compilerArg}" compiler="${build.compiler}"/> + <classpath refid="@dot.classpath" /> + <src path="src/java/" /> + <compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" /> + <compilerarg line="-log '${build.result.folder}/@dot${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" /> + </javac> + <antcall target="checkCompilationResults"/> + <!-- Copy necessary resources --> + <copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false"> + <fileset dir="src/java/"> + <exclude name="**/*.java"/> + <exclude name="**/package.htm*"/> + </fileset> + </copy> + </target> + + <target name="src.zip" depends="init" unless="src.zip"> + <mkdir dir="${build.result.folder}"/> + <antcall target="zip.src.zip"/> + </target> + <target name="zip.src.zip"> + <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false"> + <fileset dir="src/java/"> + <include name="**/*.java"/> + </fileset> + </zip> + </target> + <target name="copy.src.zip"> + <copy todir="${source.destination.folder}/" failonerror="true" overwrite="true"> + <fileset dir="src/java/"> + <include name="**/*.java"/> + </fileset> + </copy> + </target> + + <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: silecs.eclipse.plugin."> + <delete file="${compilation.problem.marker}" quiet="true"/> + <available property="@dot" file="${build.result.folder}/@dot"/> + <antcall target="@dot"/> + </target> + + <target name="checkCompilationResults" if="compilation.error.occured"> + <echo file="${compilation.problem.marker}" message="silecs.eclipse.plugin_1.1.1.201608011414${line.separator}compilation.error.occured=${compilation.error.occured}"/> + <eclipse.logCompileError log="${compilation.prereq.log}" bundle="silecs.eclipse.plugin_1.1.1.201608011414"> + </eclipse.logCompileError> + </target> + + <target name="build.sources" depends="init"> + <available property="src.zip" file="${build.result.folder}/src.zip"/> + <antcall target="src.zip"/> + </target> + + <target name="publish.bin.parts" depends="init" if="p2.publish.parts" unless="compilation.problem.marker.exists"> + <mkdir dir="${build.result.folder}/silecs.eclipse.plugin_1.1.1.201608011414"/> + <copy todir="${build.result.folder}" failonerror="true" overwrite="true"> + <fileset dir="${basedir}"> + <include name="META-INF/MANIFEST.MF"/> + <include name="plugin.xml"/> + <include name="fragment.xml"/> + </fileset> + </copy> + <eclipse.versionReplacer path="${build.result.folder}" version="1.1.1.201608011414"/> + <antcall target="apitools.generation"> + <param name="projectLocation" value="${basedir}"/> + <param name="binary.folders" value="${build.result.folder}/@dot:/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin/ext-jars/xml-apis-1.3.04.jar:/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin/ext-jars/jaxen-1.1.6.jar:/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin/ext-jars/xalan-2.7.2.jar"/> + <param name="projectName" value="${bundleId}_${bundleVersion}"/> + <param name="target.folder" value="${build.result.folder}"/> + </antcall> + <eclipse.gatherBundle + metadataRepository="${p2.build.repo}" + artifactRepository="${p2.build.repo}" + buildResultFolder="${build.result.folder}" + unpack="false" + baseDirectory="${basedir}" + /> + </target> + + <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> + <mkdir dir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414"/> + <copy todir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414" failonerror="true" overwrite="false"> + <fileset dir="${build.result.folder}/@dot"> + <include name="**"/> + </fileset> + </copy> + <copy todir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414" failonerror="true" overwrite="true"> + <fileset dir="${basedir}"> + <include name="plugin.xml"/> + <include name="META-INF/"/> + <include name="icons/"/> + <include name="JNLP-INF/"/> + <include name="src/java/"/> + <include name="OSGI-INF/"/> + <include name="ext-jars/xml-apis-1.3.04.jar"/> + <include name="ext-jars/xalan-2.7.2.jar"/> + <include name="ext-jars/serializer-2.7.2.jar"/> + <include name="jaxen-1.1.6.jar"/> + <include name="xalan-2.7.2.jar"/> + </fileset> + </copy> + <eclipse.versionReplacer path="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414" version="1.1.1.201608011414"/> + <antcall target="apitools.generation"> + <param name="projectLocation" value="${basedir}"/> + <param name="binary.folders" value="${build.result.folder}/@dot:/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin/ext-jars/xml-apis-1.3.04.jar:/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin/ext-jars/jaxen-1.1.6.jar:/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin/ext-jars/xalan-2.7.2.jar"/> + <param name="projectName" value="${bundleId}_${bundleVersion}"/> + <param name="target.folder" value="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414"/> + </antcall> + </target> + + <target name="build.zips" depends="init"> + </target> + + <target name="gather.sources" depends="init" if="destination.temp.folder"> + <mkdir dir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414"/> + <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414" failonerror="false" overwrite="false"/> + <antcall target="copy.src.includes"> + <param name="source.destination.folder" value="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414"/> + </antcall> + </target> + + <target name="gather.individual.sources" depends="init"> + <antcall target="copy.src.zip"> + <param name="source.destination.folder" value="${destination.temp.folder}"/> + </antcall> + <antcall target="copy.src.includes"> + <param name="source.destination.folder" value="${destination.temp.folder}"/> + </antcall> + </target> + + <target name="copy.src.includes" depends="init"> + <copy todir="${source.destination.folder}" failonerror="false" overwrite="false"> + <fileset dir="${basedir}"> + <include name="src/"/> + </fileset> + </copy> + </target> + + <target name="gather.logs" depends="init" if="destination.temp.folder"> + <mkdir dir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414"/> + <copy todir="${destination.temp.folder}/silecs.eclipse.plugin_1.1.1.201608011414" failonerror="false" overwrite="false"> + <fileset dir="${build.result.folder}"> + <include name="@dot${logExtension}"/> + </fileset> + </copy> + </target> + + <target name="clean" depends="init" description="Clean the plug-in: silecs.eclipse.plugin of all the zips, jars and logs created."> + <delete dir="${build.result.folder}/@dot"/> + <delete file="${build.result.folder}/src.zip"/> + <delete file="${plugin.destination}/silecs.eclipse.plugin_1.1.1.201608011414.jar"/> + <delete file="${plugin.destination}/silecs.eclipse.plugin_1.1.1.201608011414.zip"/> + <delete dir="${temp.folder}"/> + <delete file="${compilation.problem.marker}" quiet="true"/> + </target> + + <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> + <eclipse.convertPath fileSystemPath="/common/home/bel/schwinn/lnx/git/git/silecs-eclipse-plugin" property="resourcePath"/> + <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> + </target> + + <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: silecs.eclipse.plugin."> + <delete dir="${temp.folder}"/> + <mkdir dir="${temp.folder}"/> + <antcall target="build.jars"/> + <antcall target="build.sources"/> + <antcall target="gather.bin.parts"> + <param name="destination.temp.folder" value="${temp.folder}/"/> + </antcall> + <antcall target="gather.sources"> + <param name="destination.temp.folder" value="${temp.folder}/"/> + </antcall> + <delete> + <fileset dir="${temp.folder}"> + <include name="**/*.bin${logExtension}"/> + </fileset> + </delete> + <zip destfile="${plugin.destination}/silecs.eclipse.plugin_1.1.1.201608011414.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> + <delete dir="${temp.folder}"/> + </target> + + <target name="apitools.generation" if="generateAPIDescription"> + <apitooling.apigeneration projectName="${projectName}" project="${projectLocation}" binary="${binary.folders}" target="${target.folder}" extramanifests="${extraManifests}" allownonapiproject="${allowNonApiProject}" /> + </target> + +</project> diff --git a/silecs-eclipse-plugin/pom.xml b/silecs-eclipse-plugin/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5072770c65e97672772afea2756c64221d84824 --- /dev/null +++ b/silecs-eclipse-plugin/pom.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>de.gsi.cs.co</groupId> + <artifactId>csco-parent</artifactId> + <version>1.0.7</version> + </parent> + <groupId>de.gsi.cs.co.fe</groupId> + <artifactId>silecs.eclipse.plugin</artifactId> + <name>silecs-eclipse-plugin</name> + <packaging>eclipse-plugin</packaging> + <version>1.1.1.qualifier</version> + <description>Management of Silecs projects</description> + <url>https://www-acc.gsi.de/wiki/Frontend/SILECS</url> + + <properties> + <tycho-version>0.21.0</tycho-version> + <platform-version-name>mars</platform-version-name> + <eclipse-site>http://download.eclipse.org/releases/${platform-version-name}</eclipse-site> + </properties> + <profiles> + <profile> + <id>platform-mars</id> + <activation> + <property> + <name>platform-version-name</name> + <value>mars</value> + </property> + </activation> + <properties> + <eclipse-site>http://download.eclipse.org/releases/mars</eclipse-site> + <platform-version>[4.4,4.6)</platform-version> + <swtbot-site>http://download.eclipse.org/technology/swtbot/mars/dev-build/update-site</swtbot-site> + </properties> + </profile> + </profiles> + <repositories> + <repository> + <id>default</id> + <url>https://artifacts.acc.gsi.de/nexus/content/repositories/default</url> + </repository> + <repository> + <id>mars</id> + <layout>p2</layout> + <url>${eclipse-site}</url> + </repository> + </repositories> + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>2.7.2</version> + </dependency> + <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>1.1.6</version> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.10</version> + <configuration> + <pde>true</pde> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.8</source> + <target>1.8</target> + <compilerVersion>1.8</compilerVersion> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>process-sources</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </artifactItem> + <artifactItem> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + </artifactItem> + </artifactItems> + <outputDirectory>${basedir}/ext-jars</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <version>2.3</version> + <configuration> + <filesets> + <fileset> + <directory>${basedir}/ext-jars</directory> + <includes> + <include>*.jar</include> + </includes> + <followSymlinks>false</followSymlinks> + </fileset> + </filesets> + </configuration> + </plugin> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-maven-plugin</artifactId> + <version>${tycho-version}</version> + <extensions>true</extensions> + <configuration> + <pomDependencies>consider</pomDependencies> + <executionEnvironment>JavaSE-1.8</executionEnvironment> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/silecs-eclipse-plugin/src/java/cern/silecs/utils/SilecsConstants.java b/silecs-eclipse-plugin/src/java/cern/silecs/utils/SilecsConstants.java new file mode 100644 index 0000000000000000000000000000000000000000..a9f157a0b3cfe4e0fbc42a5fd0a02a68cce30baa --- /dev/null +++ b/silecs-eclipse-plugin/src/java/cern/silecs/utils/SilecsConstants.java @@ -0,0 +1,97 @@ +// Copyright 2016 CERN and GSI +// +// This program 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. +// +// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +package cern.silecs.utils; + +import java.util.Arrays; +import java.util.List; + +public class SilecsConstants { + + public enum ProjectType { + DESIGN_PROJECT, + DEPLOY_PROJECT + } + + public static final String SILECS_NAME = "Silecs-Eclipse-Plugin"; + + //consistency check + public static final String DESIGN_CLASS_NODE = "SILECS-Class"; + + public static final String DEPLOY_UNIT_NODE = "Deploy-Unit"; + + public static final String NAME = "name"; + + public static final String HOST_NAME = "host-name"; + + // schema files + public static final String DESIGN_SCHEMA_XSD = "DesignSchema.xsd"; + + public static final String DEPLOY_SCHEMA_XSD = "DeploySchema.xsd"; + + //file extensions + public static final String IEDESIGN_FILE = "silecsdesign"; + + public static final String IEDEPLOY_FILE = "silecsdeploy"; + + //name patterns + public static final String DESIGN_PATTERN = "[A-Z][A-Za-z0-9_]*"; + + public static final String DEPLOY_PATTERN = "[A-Z][A-Za-z0-9_]*"; + + public static final int MAX_DESIGN_LENGTH = 20; + + public static final int MAX_DEPLOY_LENGTH = 20; + + // SILECS versions which are supported by this plugin + public static final String[] SUPPORTED_SILECS_MAJOR_VERSIONS = { "1","DEV"}; + public static final List<String> ADDITIONAL_SILECS_TARGET_MIGRATION_VERSIONS = Arrays.asList("0.10.0"); //e.g. in order to allow migration from 0.9.0 to 0.10.0 + public static final int DEFAULT_SILECS_VERSION_INDEX = 0; + + // SILECS Versions which are NOT supported by this plugin + // All other versions foudn in the silecs-search path are supported + public static final String[] SILECS_VERSION_BLACKLIST = { "0.9.0" }; + + //Wizards + //New Design Wizard + public static final String NEW_DESIGN_WIZARD_TITLE = "New Design Wizard"; + public static final String NEW_DESIGN_PAGE_TITLE = "New Design Project"; + + //New Deploy Wizard + public static final String NEW_DEPLOY_WIZARD_TITLE = "New Deploy Wizard"; + public static final String NEW_DEPLOY_PAGE_TITLE = "New Deploy Project"; + + //New Class Wizard Page + + public static final String INVAILD_PROJECT_NAME= "Invaild project name. Project name must follow pattern:"; + + public static final String INITIAL_PROJECT_VERSION = "1.0.0"; + + //Generate Fesa Class Wizard + public static final String GENERATE_FESA_CLASS_WIZARD_TITLE = "Generate Fesa Class Wizard"; + public static final String GENERATE_FESA_CLASS_PAGE_TITLE = "Generate Fesa Class"; + + //Generate Client Resources Wizard + public static final String GENERATE_CLIENT_RESOURCES_WIZARD_TITLE = "Generate Client Resources Wizard"; + public static final String GENERATE_CLIENT_RESOURCES_PAGE_TITLE = "Generate Client Resources"; + + //Deliver Client Resources Wizard + public static final String DELIVER_CLIENT_RESOURCES_WIZARD_TITLE = "Deliver Client Resources Wizard"; + public static final String DELIVER_CLIENT_RESOURCES_PAGE_TITLE = "Deliver Client Resources"; + + //GSI-Hack Use GSI SILECS Wiki + //public static final String SILECS_WIKIS_PATH = "https://wikis.cern.ch/display/SIL"; + public static final String SILECS_WIKIS_PATH = "https://www-acc.gsi.de/wiki/Frontend/SILECS"; +} diff --git a/silecs-eclipse-plugin/src/java/cern/silecs/utils/SilecsUtils.java b/silecs-eclipse-plugin/src/java/cern/silecs/utils/SilecsUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..517c96b2aada23468032ccb5db10a437472ba972 --- /dev/null +++ b/silecs-eclipse-plugin/src/java/cern/silecs/utils/SilecsUtils.java @@ -0,0 +1,311 @@ +// Copyright 2016 CERN and GSI +// +// This program 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. +// +// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +package cern.silecs.utils; + +import java.io.File; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ITreeSelection; +import org.eclipse.jface.viewers.TreePath; +import org.eclipse.jface.viewers.TreeSelection; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorDescriptor; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.part.FileEditorInput; +import org.w3c.dom.Document; +import org.w3c.dom.Node; + +import cern.silecs.activator.Activator; +import cern.silecs.control.core.DeployProjectNature; +import cern.silecs.control.core.DesignProjectNature; +import cern.silecs.model.exception.SilecsException; +import cern.silecs.view.console.ConsoleHandler; +import cern.silecs.view.preferences.MainPreferencePage; + +public class SilecsUtils { + + public static final String CLASS_VERSION_MATCHER = "version"; + + static public String userName; + static public boolean isWindows = false; + static { + String system = System.getProperty("os.name"); + isWindows = system.toLowerCase().contains("win"); + userName = System.getProperty("user.name"); + } + + public static String findInBundle(String resourceToLocate) { + try { + URL fileURL = FileLocator.find(Platform.getBundle(Activator.PLUGIN_ID), new Path(resourceToLocate), null); + fileURL = FileLocator.toFileURL(fileURL); + if(isWindows) + return fileURL.getPath().toString().substring(1); + + return fileURL.getPath().toString(); + } catch (Exception e1) { + e1.printStackTrace(); + } + return null; + } + + public static String getSilecsDesignFilePath(String workspacePath, String projectName) { + return workspacePath + "/" + projectName + "/" + getSilecsDesignFilePathRelative(projectName); + } + + public static String getSilecsDeployFilePath(String workspacePath, String projectName) { + return workspacePath + "/" + projectName + "/" + getSilecsDeployFilePathRelative(projectName); + } + + public static String getSilecsDesignFilePathRelative(String projectName) { + return "/src/" + projectName + "." + SilecsConstants.IEDESIGN_FILE; + } + + public static String getSilecsDeployFilePathRelative(String projectName){ + return "/src/" + projectName + "." + SilecsConstants.IEDEPLOY_FILE; + } + + public static Boolean isSilecsDesign(String filePath) + { + String extension = ""; + int i = filePath.lastIndexOf('.'); + if (i > 0) + extension = filePath.substring(i+1); + if(extension.equals(SilecsConstants.IEDESIGN_FILE) ) + return true; + return false; + } + + public static Boolean isSilecsDeploy(String filePath) + { + String extension = ""; + int i = filePath.lastIndexOf('.'); + if (i > 0) + extension = filePath.substring(i+1); + if(extension.equals(SilecsConstants.IEDEPLOY_FILE) ) + return true; + return false; + } + + public static IFile getSilecsDesignFile(IProject project) { + return project.getFile(getSilecsDesignFilePathRelative(project.getName())); + } + + public static IFile getSilecsDeployFile(IProject project) { + return project.getFile(getSilecsDeployFilePathRelative(project.getName())); + } + + public static IFile getSilecsDocument(IProject project) throws Exception + { + if ( project.hasNature(DesignProjectNature.NATURE_ID) ) + { + return SilecsUtils.getSilecsDesignFile(project); + } + else if( project.hasNature(DeployProjectNature.NATURE_ID) ) + { + return SilecsUtils.getSilecsDeployFile(project); + } + else + throw new Exception("The project: " + project.getName() + " is not a silecs-project"); + } + + public static String getSilecsVersion(IProject project) throws SilecsException { + String filePath = ""; + try + { + if( project.hasNature(DeployProjectNature.NATURE_ID) ) + { + filePath = getSilecsDeployFile(project).getRawLocation().makeAbsolute().toOSString(); + } + else if( project.hasNature(DesignProjectNature.NATURE_ID) ) + { + filePath = getSilecsDesignFile(project).getRawLocation().makeAbsolute().toOSString(); + } + else + { + throw new SilecsException("Faild to extract project nature from: " + project.getName()); + } + + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(filePath); + Node root; + if( project.hasNature(DesignProjectNature.NATURE_ID) ) + root = doc.getElementsByTagName("SILECS-Design").item(0); + else + root = doc.getElementsByTagName("SILECS-Deploy").item(0); + return root.getAttributes().getNamedItem("silecs-version").getTextContent(); + } + catch(Exception ex) + { + ConsoleHandler.printError("Faild to extract silecs-version from: " + filePath, true); + + throw new SilecsException("Faild to extract silecs-version from: " + filePath, ex); + } + } + + public static String getSilecsDesignVersion(String filePath) throws SilecsException { + try + { + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(filePath); + Node classNode = doc.getElementsByTagName("SILECS-Class").item(0); + return classNode.getAttributes().getNamedItem(CLASS_VERSION_MATCHER).getNodeValue(); + } + catch(Exception ex) + { + ConsoleHandler.printError("Faild to extract class-version from: " + filePath, true); + throw new SilecsException("Faild to extract class-version from: " + filePath, ex); + } + } + + public static String getDeployVersion(String filePath) throws SilecsException { + try + { + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(filePath); + Node deployNode = doc.getElementsByTagName("Deploy-Unit").item(0); + return deployNode.getAttributes().getNamedItem(CLASS_VERSION_MATCHER).getNodeValue(); + } + catch(Exception ex) + { + ConsoleHandler.printError("Faild to extract deploy-version from: " + filePath, true); + throw new SilecsException("Faild to extract deploy-version from: " + filePath, ex); + } + } + + public static void openInEditor(final IFile file) + { + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName()); + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + try { + page.openEditor(new FileEditorInput(file), desc.getId()); + } catch (Exception e) { + ConsoleHandler.printError("Failed to open file:" + file, true); + e.printStackTrace(); + } + } + }); + } + + + public static void checkSilecsVersion(IProject project) throws SilecsException + { + String version = getSilecsVersion(project); + if( isSilecsVersionSupported(version) == false ) + { + throw new SilecsException("The old silecs version: '" + version + "' is not supported by this silecs-plugin. Please update your SILECS project to a more recent version (right-click --> SILECS Update Project)"); + } + } + + + public static Boolean isSilecsVersionSupported(String version) + { + for(String supportedVersion: SilecsConstants.SUPPORTED_SILECS_MAJOR_VERSIONS) + { + if(version.startsWith(supportedVersion)) + return true; + } + return false; + } + + public static List<String> readOutAvailableSilecsVersions() + { + List<String> silecsVersions = new ArrayList<String>(); + if (MainPreferencePage.isLocalDirectoryUsed()) + { + silecsVersions.add("DEV"); + return silecsVersions; + } + + // We just pick any sub-project + File silecsBaseFolder = new File(MainPreferencePage.getGlobalSilecsDirectory() + "/silecs-model"); + for (final File fileEntry : silecsBaseFolder.listFiles()) + { + silecsVersions.add(fileEntry.getName()); + } + Collections.sort(silecsVersions); + Collections.reverse(silecsVersions); + return silecsVersions; + } + + public static IFile extractSilecsFileFromEvent(ExecutionEvent event) throws Exception + { + String parameter = event.getParameter("silecs-eclipse-plugin.commandParameter"); + if ( parameter.equals("menubar")) + { + IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); + IWorkbenchPage activePage = window.getActivePage(); + + // Get the Selection from the active WorkbenchPage page + ISelection selection = activePage.getSelection(); + if(selection instanceof ITreeSelection) // Event was triggered by right-click on project + { + TreeSelection treeSelection = (TreeSelection) selection; + TreePath[] treePaths = treeSelection.getPaths(); + TreePath treePath = treePaths[0]; + + // The first segment should be a IProject + Object firstSegmentObj = treePath.getFirstSegment(); + IProject theProject = (IProject) ((IAdaptable)firstSegmentObj).getAdapter(IProject.class); + if( theProject == null ) + { + ConsoleHandler.printError("Failed to find the right project", true); + throw new ExecutionException("Failed to find the right project"); + } + return getSilecsDocument(theProject); + } + } + if (parameter.equals("toolbar")) + { + // The default: the toolbar button was pressed + IEditorPart editor = HandlerUtil.getActiveEditor(event); + if (editor == null) + { + ConsoleHandler.printError("Failed to find active SILECS editor", true); + throw new Exception("Failed to find active SILECS editor"); + } + return ((IFileEditorInput) editor.getEditorInput()).getFile(); + } + String message = new String("Failed to find correct silecs-project/file - command: '" + event.getCommand().getName() + "' send with parameter: '" + parameter + "'."); + ConsoleHandler.printError(message, true); + throw new Exception(message); + } +} diff --git a/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchAdvisor.java b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchAdvisor.java new file mode 100644 index 0000000000000000000000000000000000000000..6d6f682299a1a5173f2c37a7785a680ebc0ff39c --- /dev/null +++ b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchAdvisor.java @@ -0,0 +1,74 @@ +// Copyright 2016 CERN and GSI +// +// This program 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. +// +// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +package cern.silecs.view; + +import java.net.URL; +import java.net.URLClassLoader; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.ui.IWorkbenchPreferenceConstants; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.application.IWorkbenchConfigurer; +import org.eclipse.ui.application.IWorkbenchWindowConfigurer; +import org.eclipse.ui.application.WorkbenchAdvisor; +import org.eclipse.ui.application.WorkbenchWindowAdvisor; +import org.eclipse.ui.ide.IDE; + +import cern.silecs.utils.OSExecute; +import cern.silecs.utils.SilecsConstants; +import cern.silecs.utils.XmlUtils; +import cern.silecs.view.console.ConsoleHandler; + +/** + * In this class a lot of initialization takes place because this is the point when workbench is already created. + */ +public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { + + private static final String PERSPECTIVE_ID = "silecs.eclipse.plugin.perspective"; //$NON-NLS-1$ + + @Override + public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { + return new ApplicationWorkbenchWindowAdvisor(configurer); + } + + @Override + public String getInitialWindowPerspectiveId() { + return PERSPECTIVE_ID; + } + + @Override + public void initialize(IWorkbenchConfigurer configurer) { + super.initialize(configurer); + + configurer.setSaveAndRestore(true); + PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false); + + IDE.registerAdapters(); + } + + @Override + public IAdaptable getDefaultPageInput() { + return ResourcesPlugin.getWorkspace().getRoot(); + } + +} diff --git a/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java new file mode 100644 index 0000000000000000000000000000000000000000..c8de392a0c5cc35b0c0b6466a33ffa02642a41e6 --- /dev/null +++ b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java @@ -0,0 +1,179 @@ +// Copyright 2016 CERN and GSI +// +// This program 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. +// +// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +package cern.silecs.view; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.swt.graphics.Point; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.application.ActionBarAdvisor; +import org.eclipse.ui.application.IActionBarConfigurer; +import org.eclipse.ui.application.IWorkbenchWindowConfigurer; +import org.eclipse.ui.application.WorkbenchWindowAdvisor; +import org.eclipse.ui.internal.dialogs.WorkbenchWizardElement; +import org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry; +import org.eclipse.ui.wizards.IWizardCategory; +import org.eclipse.ui.wizards.IWizardDescriptor; + +import cern.silecs.utils.SilecsConstants; + +@SuppressWarnings("restriction") +public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { + + public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { + super(configurer); + } + + @Override + public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { + return new ApplicationActionBarAdvisor(configurer); + } + + @Override + public void preWindowOpen() { + IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); + configurer.setInitialSize(new Point(700, 500)); + configurer.setShowCoolBar(true); + configurer.setShowStatusLine(true); + configurer.setTitle(SilecsConstants.SILECS_NAME); //$NON-NLS-1$ + configurer.setShowProgressIndicator(true); + } + + @Override + public void postWindowOpen() { + super.postWindowOpen(); + + addChangedEditorListener(); + + // removing unnecessary wizards from new and import menu. + AbstractExtensionWizardRegistry wizardRegistry = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench() + .getNewWizardRegistry(); + IWizardCategory[] categories = PlatformUI.getWorkbench().getNewWizardRegistry().getRootCategory() + .getCategories(); + + for (IWizardDescriptor wizard : getAllWizards(categories)) { + if (wizard.getCategory().getId().matches("org.eclipse.ui.Basic")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } else if (wizard.getCategory().getId().matches("org.eclipse.wst.xml.examples")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } else if (wizard.getCategory().getId().matches("org.eclipse.wst.XMLCategory")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } else if (wizard.getCategory().getId().matches("org.eclipse.cdt.ui.newCWizards")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } + + } + + wizardRegistry = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench().getImportWizardRegistry(); + + categories = PlatformUI.getWorkbench().getImportWizardRegistry().getRootCategory().getCategories(); + + for (IWizardDescriptor wizard : getAllWizards(categories)) { + if (wizard.getCategory().getId().matches("org.eclipse.cdt.ui.importWizardCategory")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } else if (wizard.getCategory().getId().matches("org.eclipse.debug.ui")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } else if (wizard.getCategory().getId().matches("org.eclipse.wst.XMLCategory")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } else if (wizard.getCategory().getId().matches("org.eclipse.team.ui.importWizards")) { + WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard; + wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), + new Object[] { wizardElement }); + } + } + } + + private IWizardDescriptor[] getAllWizards(IWizardCategory[] categories) { + List<IWizardDescriptor> results = new ArrayList<IWizardDescriptor>(); + for (IWizardCategory wizardCategory : categories) { + results.addAll(Arrays.asList(wizardCategory.getWizards())); + results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories()))); + } + return results.toArray(new IWizardDescriptor[0]); + } + + private void addChangedEditorListener() { + IWorkbench workbench = PlatformUI.getWorkbench(); + IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage(); + page.addPartListener(new IPartListener() { + + @Override + public void partOpened(IWorkbenchPart part) { + setApplicationTitle(); + } + + @Override + public void partDeactivated(IWorkbenchPart part) { + setApplicationTitle(); + } + + @Override + public void partClosed(IWorkbenchPart part) { + setApplicationTitle(); + } + + @Override + public void partBroughtToTop(IWorkbenchPart part) { + setApplicationTitle(); + } + + @Override + public void partActivated(IWorkbenchPart part) { + setApplicationTitle(); + } + + private void setApplicationTitle() { +// IEditorPart editorPart = page.getActiveEditor(); +// IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); +// +// if (editorPart != null) { +// IFileEditorInput editorInput = (IFileEditorInput) editorPart.getEditorInput(); +// IFile file = editorInput.getFile(); +// +// configurer.setTitle(file.getFullPath() + " - " + SilecsConstants.SILECS_NAME + " - " +// + ResourcesPlugin.getWorkspace()); +// } else { +// configurer.setTitle(SilecsConstants.SILECS_NAME + " - " + ResourcesPlugin.getWorkspace() ); +// } + } + }); + + } +} diff --git a/silecs-eclipse-plugin/src/java/cern/silecs/view/explorer/SilecsProjectExplorer.java b/silecs-eclipse-plugin/src/java/cern/silecs/view/explorer/SilecsProjectExplorer.java new file mode 100644 index 0000000000000000000000000000000000000000..927d6507b69dc6ea0716c35f7dbc140b0b0b45b3 --- /dev/null +++ b/silecs-eclipse-plugin/src/java/cern/silecs/view/explorer/SilecsProjectExplorer.java @@ -0,0 +1,199 @@ +// Copyright 2016 CERN and GSI +// +// This program 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. +// +// This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +package cern.silecs.view.explorer; + +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.navigator.CommonNavigator; +import org.eclipse.ui.navigator.CommonViewer; +import org.eclipse.ui.navigator.ICommonActionConstants; + +import cern.silecs.control.core.DeployProjectNature; +import cern.silecs.control.core.DesignProjectNature; +import cern.silecs.utils.SilecsUtils; + +/** + * This class is a subclass of CommonNavigator that provide changes concerning expanding tree. + * + * @see CommonNavigator + */ +public class SilecsProjectExplorer extends CommonNavigator { + + public static final String VIEW_ID = "cern.silecs.view.explorer"; + + @Override + public void createPartControl(Composite aParent) { + super.createPartControl(aParent); + CommonViewer viewer = getCommonViewer(); + + IActionBars bars = getViewSite().getActionBars(); + final IStatusLineManager lineManager = bars.getStatusLineManager(); + + final ILabelProvider labelProvider = (ILabelProvider) viewer.getLabelProvider(); + + viewer.addPostSelectionChangedListener(new ISelectionChangedListener() { + + @Override + public void selectionChanged(SelectionChangedEvent event) { + + ISelection aSelection = event.getSelection(); + if (aSelection != null && !aSelection.isEmpty() && aSelection instanceof IStructuredSelection) { + IStructuredSelection selection = (IStructuredSelection) aSelection; + IResource file = null; + + if (selection.size() == 1 && selection.getFirstElement() instanceof IProject) { + IProject project = (IProject) selection.getFirstElement(); + try { + if (project.hasNature(DesignProjectNature.NATURE_ID)) { + file = SilecsUtils.getSilecsDesignFile(project); + } else if (project.hasNature(DeployProjectNature.NATURE_ID)) { + file = SilecsUtils.getSilecsDeployFile(project); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } else if(selection.size() == 1 && selection.getFirstElement() instanceof IFile) { + file = (IFile) selection.getFirstElement(); + } + + if(file != null) { + Image img = null; + img = labelProvider.getImage(((IStructuredSelection) aSelection).getFirstElement()); + long modificationTime = file.getLocalTimeStamp() / 1000; + + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm:ss"); + LocalDateTime dateAndTime = LocalDateTime.ofEpochSecond(modificationTime, 0, ZoneOffset.ofHours(2)); + + lineManager.setMessage(img,"Last modfication: " + formatter.format(dateAndTime) + " : " + file.getFullPath()); + } + } + + } + }); + + } + + /** + * This method is responsible for expanding the project tree from the root to the silecs file(*.silecsdesign or + * *.silecsdeploy) + */ + @Override + protected void handleDoubleClick(DoubleClickEvent anEvent) { + + IStructuredSelection selection = (IStructuredSelection) anEvent.getSelection(); + Object element = selection.getFirstElement(); + if (element instanceof IProject && !((IProject) element).isOpen()) { + try { + ((IProject) element).open(new NullProgressMonitor()); + } catch (CoreException e) { + e.printStackTrace(); + } + return; + + } else if (element instanceof IProject && ((IProject) element).isOpen()) { + List<IProject> projectList = new ArrayList<IProject>(); + projectList.add((IProject) element); + + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + + expandHelper(root, projectList); + return; + } + super.handleDoubleClick(anEvent); + } + + /** + * This method expands elements in the tree. Since the tool does not have knowledge about project structure it must + * be done recursively. + * + * @param root {@link WorkspaceRoot} + * @param projects List of projects that need to be expanded + */ + public void expandHelper(IWorkspaceRoot root, List<IProject> projects) { + for (IProject project : projects) { + if (project.isOpen()) { + try { + IFile file = null; + if (project.hasNature(DeployProjectNature.NATURE_ID)) { + file = SilecsUtils.getSilecsDeployFile(project); + } else if (project.hasNature(DesignProjectNature.NATURE_ID)) { + file = SilecsUtils.getSilecsDesignFile(project); + } + if (file == null) + continue; + + IContainer parent = file.getParent(); + List<Object> toExpand = new ArrayList<>(); + + do { + toExpand.add(0, parent); + } while ((parent = parent.getParent()) != root); + boolean expand = !getCommonViewer().getExpandedState(project); + for(Object o: toExpand ) + expand(o, expand); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + } + + /** + * Expands single element in the viewer + * + * @param element + * @return true if expanded + */ + private boolean expand(Object element, boolean expand) { + IAction openHandler = getViewSite().getActionBars().getGlobalActionHandler(ICommonActionConstants.OPEN); + + if (openHandler == null) { + + TreeViewer viewer = getCommonViewer(); + if (viewer.isExpandable(element)) { + viewer.setExpandedState(element, expand); + return true; + } + } + return false; + } + +} diff --git a/snap7/.gitignore b/snap7/.gitignore index b0721ec6dd1f876784ec893f7e27d5bd32a89464..77dde58da0c40cb32d6c72ee919b4574ef5c2bdb 100644 --- a/snap7/.gitignore +++ b/snap7/.gitignore @@ -1 +1 @@ -/snap7-full* \ No newline at end of file +snap7-full/ \ No newline at end of file