I'm developing an editor plug-in in Eclipse Neon. The project is separated into a parent project, managing it's dependencies and a child project, which contains the actual source code. After migrating my plug-in from Eclipse Mars to Neon, I changed the method IEditorDescriptor editorDescriptor = IDE.getEditorDescriptor(storage.getName(), true);
to IEditorDescriptor editorDescriptor = IDE.getEditorDescriptor(storage.getName(), true, true);
, because the first one is deprecated now. If I try to rebuild the project with Maven, it gives me a compilation failure:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile) on project language-editor-core: Compilation failure: Compilation failure:
[ERROR] C:\Users\X\Documents\tfeditor\language-editor-core\src\main\java\de\se_rwth\langeditor\texteditor\hyperlinks\HyperlinkDetectorImpl.java:[228]
[ERROR] IEditorDescriptor editorDescriptor = IDE.getEditorDescriptor(storage.getName(), true, true);
[ERROR] ^^^^^^^^^^^^^^^^^^^
[ERROR] The method getEditorDescriptor(String, boolean) in the type IDE is not applicable for the arguments (String, boolean, boolean)
[ERROR] 1 problem (1 error)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :language-editor-core
The pom.xml of the parent project is this one:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.monticore</groupId>
<artifactId>language-editor</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Language Editor</name>
<organization>
<name>Department of Software Engineering, RWTH Aachen University</name>
<url>http://www.se-rwth.de/</url>
</organization>
<packaging>pom</packaging>
<modules>
<module>language-editor-core</module>
<module>cdtrans-editor</module>
<module>matrans-editor</module>
<module>language-editor-updatesite</module>
</modules>
<properties>
<monticore.version>4.5.0</monticore.version>
<monticoreRuntime.version>4.5.0</monticoreRuntime.version>
<cd4a.version>1.3.7-SNAPSHOT</cd4a.version>
<cd4a-trans.version>0.0.3-SNAPSHOT</cd4a-trans.version>
<typestrans.version>0.0.3-SNAPSHOT</typestrans.version>
<literalstrans.version>0.0.3-SNAPSHOT</literalstrans.version>
<tfruntime.version>4.4.0-SNAPSHOT</tfruntime.version>
<odrules.version>4.4.0-SNAPSHOT</odrules.version>
<secommons.version>1.7.7</secommons.version>
<antlr.version>4.5</antlr.version>
<guava.version>18.0</guava.version>
<matrans.version>0.0.2.E-SNAPSHOT</matrans.version>
<macommontrans.version>0.0.2-SNAPSHOT</macommontrans.version>
<tycho.version>0.22.0</tycho.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<wagon.version>1.0</wagon.version>
<compiler.plugin>3.3</compiler.plugin>
<java.version>1.8</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>de.se_rwth.commons</groupId>
<artifactId>se-commons-utilities</artifactId>
<version>${secommons.version}</version>
</dependency>
<dependency>
<groupId>de.monticore</groupId>
<artifactId>monticore-runtime</artifactId>
<version>${monticoreRuntime.version}</version>
</dependency>
<dependency>
<groupId>de.monticore</groupId>
<artifactId>monticore-grammar</artifactId>
<version>${monticore.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang</groupId>
<artifactId>cd4analysis</artifactId>
<version>${cd4a.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang</groupId>
<artifactId>cd4a-trans</artifactId>
<version>${cd4a-trans.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang</groupId>
<artifactId>literalstrans</artifactId>
<version>${literalstrans.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang</groupId>
<artifactId>typestrans</artifactId>
<version>${typestrans.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.tf</groupId>
<artifactId>de.monticore.tf.runtime</artifactId>
<version>${tfruntime.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.tf</groupId>
<artifactId>de.monticore.tf.odrules</artifactId>
<version>${tfruntime.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>${antlr.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.tf</groupId>
<artifactId>matrans</artifactId>
<version>${matrans.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.tf</groupId>
<artifactId>macommontrans</artifactId>
<version>${macommontrans.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<target>
<artifact>
<groupId>de.se_rwth.eclipse</groupId>
<artifactId>de.se_rwth.eclipse.targetplatform.luna</artifactId>
<version>1.0.2-SNAPSHOT</version>
</artifact>
</target>
<pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>${wagon.version}</version>
<executions>
<execution>
<id>deploy-repository</id>
<phase>deploy</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>${project.build.directory}/${project.build.finalName}.zip</fromFile>
<serverId>se-nexus</serverId>
<url>https://nexus.se.rwth-aachen.de/service/local/repositories/monticore-snapshots/content-compressed</url>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<distributionManagement>
<repository>
<id>se-nexus</id>
<url>http://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/</url>
</repository>
<snapshotRepository>
<id>se-nexus</id>
<url>http://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/</url>
</snapshotRepository>
<site>
<id>se-nexus</id>
<url>dav:http://nexus.se.rwth-aachen.de/content/sites/se-sites/monticore/${project.version}/</url>
</site>
</distributionManagement>
<repositories>
<repository>
<id>se-public</id>
<url>http://nexus.se.rwth-aachen.de/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>se-public</id>
<url>http://nexus.se.rwth-aachen.de/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</project>
The specific line in the code is not marked as wrong by Eclipse and the execution of the code also works well, so where is the problem?
Indeed, after adding the Eclipse Neon repository to the pom.xml with this:
<repositories>
<repository>
<id>eclipse-neon</id>
<url>http://download.eclipse.org/releases/neon</url>
<layout>p2</layout>
</repository>
</repositories>
, the Maven build works and does not mark the editorDescriptor = IDE.getEditorDescriptor(storage.getName(), true, true);
as an error -> Problem solved