Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2011-02-18 12:37:33 +0000
committerMilos Kleint2011-02-18 17:24:54 +0000
commitb56a49e084d28d9f6d7d6d3453a2de683d202c6d (patch)
treed09096c226cef759722d2fd8c6051d04c8b7ee98 /org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude
parent3cfb4d846211595f8e553b3aa53ee4c2871f173f (diff)
downloadm2e-core-b56a49e084d28d9f6d7d6d3453a2de683d202c6d.tar.gz
m2e-core-b56a49e084d28d9f6d7d6d3453a2de683d202c6d.tar.xz
m2e-core-b56a49e084d28d9f6d7d6d3453a2de683d202c6d.zip
null check and comments
Diffstat (limited to 'org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude')
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
index b0713aa7..d23eb9e3 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
@@ -114,7 +114,7 @@ public class DependencyExcludeAction implements IActionDelegate {
}
this.keys = keys.toArray(new ArtifactKey[keys.size()]);
}
- if(keys.length > 0 && file != null) {
+ if(keys != null && keys.length > 0 && file != null) {
action.setEnabled(true);
} else {
action.setEnabled(false);
@@ -125,6 +125,7 @@ public class DependencyExcludeAction implements IActionDelegate {
return javaProject.getProject().getFile("pom.xml"); //$NON-NLS-1$
}
+ //mkleint: scary
private IFile getFileFromEditor() {
IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (part != null && part.getEditorInput() instanceof IFileEditorInput) {
@@ -134,6 +135,7 @@ public class DependencyExcludeAction implements IActionDelegate {
return null;
}
+ //mkleint: scary
private Model getModelFromEditor() {
IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if(part != null && part instanceof MavenPomEditor) {

Back to the top