Lines 76-81
Link Here
|
76 |
import org.openide.DialogDisplayer; |
76 |
import org.openide.DialogDisplayer; |
77 |
import org.openide.awt.StatusDisplayer; |
77 |
import org.openide.awt.StatusDisplayer; |
78 |
import org.openide.execution.ExecutorTask; |
78 |
import org.openide.execution.ExecutorTask; |
|
|
79 |
import org.openide.filesystems.FileObject; |
79 |
import org.openide.util.Cancellable; |
80 |
import org.openide.util.Cancellable; |
80 |
import org.openide.util.Exceptions; |
81 |
import org.openide.util.Exceptions; |
81 |
import org.openide.util.ImageUtilities; |
82 |
import org.openide.util.ImageUtilities; |
Lines 429-435
Link Here
|
429 |
|
430 |
|
430 |
} |
431 |
} |
431 |
|
432 |
|
432 |
protected class MavenItem implements BuildExecutionSupport.Item { |
433 |
protected class MavenItem implements BuildExecutionSupport.ActionItem { |
433 |
|
434 |
|
434 |
@Override public String getDisplayName() { |
435 |
@Override public String getDisplayName() { |
435 |
return config.getTaskDisplayName(); |
436 |
return config.getTaskDisplayName(); |
Lines 447-452
Link Here
|
447 |
AbstractMavenExecutor.this.cancel(); |
448 |
AbstractMavenExecutor.this.cancel(); |
448 |
} |
449 |
} |
449 |
|
450 |
|
|
|
451 |
@Override |
452 |
public String getAction() { |
453 |
return config.getActionName() != null ? config.getActionName() : "xxx-custom"; |
450 |
} |
454 |
} |
451 |
|
455 |
|
|
|
456 |
@Override |
457 |
public FileObject getProjectDirectory() { |
458 |
return config.getProject() != null ? config.getProject().getProjectDirectory() : null; |
452 |
} |
459 |
} |
|
|
460 |
|
461 |
@Override |
462 |
public int hashCode() { |
463 |
int hash = 5; |
464 |
hash = 41 * hash + getAction().hashCode(); |
465 |
hash = 41 * hash + getProjectDirectory().hashCode(); |
466 |
return hash; |
467 |
} |
468 |
|
469 |
@Override |
470 |
public boolean equals(Object obj) { |
471 |
if (obj == null) { |
472 |
return false; |
473 |
} |
474 |
if (getClass() != obj.getClass()) { |
475 |
return false; |
476 |
} |
477 |
final MavenItem other = (MavenItem) obj; |
478 |
if (!this.getAction().equals(other.getAction())) { |
479 |
return false; |
480 |
} |
481 |
if (this.getProjectDirectory() != other.getProjectDirectory() && (this.getProjectDirectory() == null || !this.getProjectDirectory().equals(other.getProjectDirectory()))) { |
482 |
return false; |
483 |
} |
484 |
return true; |
485 |
} |
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
} |
493 |
|
494 |
} |