Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2013-08-08 10:15:41 +0000
committerDani Megert2013-08-08 10:15:41 +0000
commitc1e443bce426e5a349001e4c43f76c744e38c6da (patch)
tree2d80ff08da3ef3adfcec8c64b7339413553c7926
parent95fe4276b2acacfb0b90766b5225ad86eedd44f2 (diff)
downloadeclipse.platform.debug-c1e443bce426e5a349001e4c43f76c744e38c6da.tar.gz
eclipse.platform.debug-c1e443bce426e5a349001e4c43f76c744e38c6da.tar.xz
eclipse.platform.debug-c1e443bce426e5a349001e4c43f76c744e38c6da.zip
Warn about resource leaks (Tycho build)
-rw-r--r--org.eclipse.debug.ui/pom.xml12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java8
2 files changed, 17 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/pom.xml b/org.eclipse.debug.ui/pom.xml
index b3468fbfb..ab2b4dd14 100644
--- a/org.eclipse.debug.ui/pom.xml
+++ b/org.eclipse.debug.ui/pom.xml
@@ -20,4 +20,16 @@
<artifactId>org.eclipse.debug.ui</artifactId>
<version>3.10.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho.version}</version>
+ <configuration>
+ <compilerArgument>-warn:+resource</compilerArgument>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java
index 46a64f53a..8c4a04383 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.debug.internal.ui.importexport.breakpoints.IImportExportConst
import org.eclipse.debug.internal.ui.importexport.breakpoints.ImportExportMessages;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.operation.IRunnableWithProgress;
+
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
@@ -80,11 +81,12 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress {
fBreakpoints = breakpoints;
fWriter = new StringWriter();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
+ @SuppressWarnings("resource")
public void run(IProgressMonitor monitor) throws InvocationTargetException {
SubMonitor localmonitor = SubMonitor.convert(monitor, ImportExportMessages.ExportOperation_0, fBreakpoints.length);
XMLMemento memento = XMLMemento.createWriteRoot(IImportExportConstants.IE_NODE_BREAKPOINTS);
@@ -160,7 +162,7 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress {
}
}
}
-
+
/**
* Collects all of the breakpoint working sets that contain the given {@link IBreakpoint}
* in the given list

Back to the top