diff --git a/silecs-eclipse-plugin/.classpath b/silecs-eclipse-plugin/.classpath index 8cd7889e282c6a7d040ddb26e4b7e2c607237ae1..824394f23e68ffcc4a9d5b744404aca09c4f9ffc 100644 --- a/silecs-eclipse-plugin/.classpath +++ b/silecs-eclipse-plugin/.classpath @@ -3,7 +3,7 @@ <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="target/lib/xalan-2.7.2.jar"/> - <classpathentry exported="true" kind="lib" path="target/lib/jaxen-1.1.6.jar"/> + <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/.project b/silecs-eclipse-plugin/.project index 24f2a5dc0c11f188739c4cc20e83f5425f2472a6..5a975ee6bac89ea407edd3d2741ff7402b84d3c1 100644 --- a/silecs-eclipse-plugin/.project +++ b/silecs-eclipse-plugin/.project @@ -5,11 +5,6 @@ <projects> </projects> <buildSpec> - <buildCommand> - <name>org.python.pydev.PyDevBuilder</name> - <arguments> - </arguments> - </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> diff --git a/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs b/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs index 672496e107ed4e070613aad776b4df5146306bd4..13b3428acd87c3f94042e61eed221c15ce682bfa 100644 --- a/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs +++ b/silecs-eclipse-plugin/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,6 @@ 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 diff --git a/silecs-eclipse-plugin/META-INF/MANIFEST.MF b/silecs-eclipse-plugin/META-INF/MANIFEST.MF index cd8d7fa9228b21f09d8b47587b0864adf229776a..413ca60b5bc1255da4f1942a0491dee282116d55 100644 --- a/silecs-eclipse-plugin/META-INF/MANIFEST.MF +++ b/silecs-eclipse-plugin/META-INF/MANIFEST.MF @@ -4,6 +4,7 @@ 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, @@ -38,11 +39,10 @@ Require-Bundle: org.eclipse.ui, 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-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Bundle-ClassPath: ., - target/lib/xalan-2.7.2.jar, - target/lib/jaxen-1.1.6.jar + ext-jars/xalan-2.7.2.jar, + ext-jars/jaxen-1.1.6.jar Permissions: all-permissions Codebase: http://abwww.cern.ch/ap/dist/silecs/1.m.p/configuration/ Application-Name: Silecs-Eclipse-Plugin diff --git a/silecs-eclipse-plugin/build.properties b/silecs-eclipse-plugin/build.properties index a172b18b4337c36e019b021540bceaebd5445712..5591dfb1d0f82d20de679a70694024a26ed04515 100644 --- a/silecs-eclipse-plugin/build.properties +++ b/silecs-eclipse-plugin/build.properties @@ -5,11 +5,8 @@ bin.includes = plugin.xml,\ META-INF/,\ .,\ icons/,\ - src/scripts/,\ JNLP-INF/,\ src/java/,\ - target/lib/jaxen-1.1.6.jar,\ - target/lib/xalan-2.7.2.jar,\ OSGI-INF/ src.includes = src/ jars.compile.order = . diff --git a/silecs-eclipse-plugin/pom.xml b/silecs-eclipse-plugin/pom.xml index dc5594a571eb7e9c20f7ca1ef1ab36e079625354..e5072770c65e97672772afea2756c64221d84824 100644 --- a/silecs-eclipse-plugin/pom.xml +++ b/silecs-eclipse-plugin/pom.xml @@ -2,84 +2,135 @@ <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>silecs-eclipse-plugin</groupId> - <artifactId>silecs-eclipse-plugin</artifactId> - <version>0.10.0</version> + <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>jar</packaging> - <description>adfsfasfa.</description> - <url>sdasdasdasdasd</url> - - <developers> - <developer> - <id></id> - <name></name> - <email></email> - <url></url> - </developer> - </developers> + <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> + <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> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>1.1.6</version> </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy</id> - <phase>package</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </artifactItem> - <artifactItem> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </artifactItem> - <artifactItem> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </artifactItem> - <artifactItem> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - </artifactItem> - <artifactItem> - <groupId>jaxen</groupId> - <artifactId>jaxen</artifactId> - </artifactItem> - </artifactItems> - <outputDirectory>${project.build.directory}/lib</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + <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/view/ApplicationWorkbenchAdvisor.java b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchAdvisor.java index ed4ba23ada3e7af71c08daa080374668f9553d1a..6d6f682299a1a5173f2c37a7785a680ebc0ff39c 100644 --- a/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchAdvisor.java +++ b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchAdvisor.java @@ -64,8 +64,6 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false); IDE.registerAdapters(); - - addGenerateClassEnumListener(); } @Override @@ -73,48 +71,4 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { return ResourcesPlugin.getWorkspace().getRoot(); } - public void printClassPath() { - ClassLoader cl = ClassLoader.getSystemClassLoader(); - - URL[] urls = ((URLClassLoader)cl).getURLs(); - - for(URL url: urls){ - System.out.println(url.getFile()); - } - } - - /** - * This methods adds a listener that should regenerate class enum whenever design project is deleted - */ - private void addGenerateClassEnumListener() { - - ResourcesPlugin.getWorkspace().addResourceChangeListener(new IResourceChangeListener() { - @Override - public void resourceChanged(IResourceChangeEvent event) { - IResourceDelta rootDelta = event.getDelta(); - try { - rootDelta.accept(delta -> { - IResource resource = delta.getResource(); - - // make sure that the project has been removed and it was a design project - if (resource instanceof IProject - && (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.ADDED) - && resource.getName().matches(SilecsConstants.FULL_DESIGN_PATTERN)) { - try { - XmlUtils.reloadDependencies(); - } catch (Exception e) { - e.printStackTrace(); - } - - return false; - - } - return true; - }); - } catch (CoreException e) { - e.printStackTrace(); - } - } - }, IResourceChangeEvent.POST_CHANGE); - } } diff --git a/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java index c41468e2f6cb8f102a4d3a4132b4ac2ed232ff3e..c8de392a0c5cc35b0c0b6466a33ffa02642a41e6 100644 --- a/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java +++ b/silecs-eclipse-plugin/src/java/cern/silecs/view/ApplicationWorkbenchWindowAdvisor.java @@ -160,18 +160,18 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { } 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() ); - } +// 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 index 8ce171202ce36136885b8bff5edc209d180e7395..927d6507b69dc6ea0716c35f7dbc140b0b0b45b3 100644 --- a/silecs-eclipse-plugin/src/java/cern/silecs/view/explorer/SilecsProjectExplorer.java +++ b/silecs-eclipse-plugin/src/java/cern/silecs/view/explorer/SilecsProjectExplorer.java @@ -167,7 +167,8 @@ public class SilecsProjectExplorer extends CommonNavigator { toExpand.add(0, parent); } while ((parent = parent.getParent()) != root); boolean expand = !getCommonViewer().getExpandedState(project); - toExpand.forEach(o -> expand(o, expand)); + for(Object o: toExpand ) + expand(o, expand); } catch (Exception e) { e.printStackTrace(); }