Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Sample project for bug 506781
configure compiler to treat unused imports
as error, but then use

-nowarn:[${project.basedir}/src]

to ignore optional compile errors from this
source folder
  • Loading branch information
jsievers committed Nov 4, 2016
1 parent 75d953d commit 20d9feb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
Expand Up @@ -5,3 +5,4 @@ org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.problem.unusedImport=error
15 changes: 15 additions & 0 deletions itp01/tycho.demo.itp01/pom.xml
Expand Up @@ -11,4 +11,19 @@
<artifactId>tycho.demo.itp01</artifactId>
<packaging>eclipse-plugin</packaging>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useProjectSettings>true</useProjectSettings>
<compilerArgs>
<arg>-nowarn:[${project.basedir}/src]</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
5 changes: 3 additions & 2 deletions itp01/tycho.demo.itp01/src/tycho/demo/itp/Application.java
Expand Up @@ -10,6 +10,7 @@
*******************************************************************************/
package tycho.demo.itp;

import java.util.Map;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.swt.widgets.Display;
Expand All @@ -23,7 +24,7 @@ public class Application implements IApplication {

/*
* (non-Javadoc)
*
*
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {
Expand All @@ -42,7 +43,7 @@ public Object start(IApplicationContext context) throws Exception {

/*
* (non-Javadoc)
*
*
* @see org.eclipse.equinox.app.IApplication#stop()
*/
public void stop() {
Expand Down

0 comments on commit 20d9feb

Please sign in to comment.