Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java30
1 files changed, 22 insertions, 8 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java
index 5a87e9889..44e0bcc69 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java
@@ -169,20 +169,33 @@ public class LaunchConfigurationHistoryElement {
* @see Object#equals(java.lang.Object)
*/
public boolean equals(Object o) {
- if (isConfigurationBased()) {
- return super.equals(o);
- }
- else if (o instanceof LaunchConfigurationHistoryElement) {
+ if (o instanceof LaunchConfigurationHistoryElement) {
LaunchConfigurationHistoryElement e= (LaunchConfigurationHistoryElement)o;
- return
- getLauncherIdentifier().equals(e.getLauncherIdentifier()) &&
- getElementMemento().equals(e.getElementMemento()) &&
- getMode().equals(getMode());
+ if (isConfigurationBased()) {
+ return getLaunchConfiguration().equals(e.getLaunchConfiguration());
+ }
+ else {
+ return
+ getLauncherIdentifier().equals(e.getLauncherIdentifier()) &&
+ getElementMemento().equals(e.getElementMemento()) &&
+ getMode().equals(getMode());
+ }
}
return false;
}
/**
+ * @see Object#hashCode()
+ */
+ public int hashCode() {
+ if (isConfigurationBased()) {
+ return getLaunchConfiguration().hashCode();
+ } else {
+ return getElementMemento().hashCode();
+ }
+ }
+
+ /**
* Returns the launcher that this history element represents.
* Returns null if no launcher is currently registered with the launch
* manager that matches the launch identifier of this history element.
@@ -217,4 +230,5 @@ public class LaunchConfigurationHistoryElement {
return fConfigurationBased;
}
// End of TXN
+
}

Back to the top