Skip to main content
summaryrefslogtreecommitdiffstats
blob: 4266c97a3fdbc82232310a8e117fd962af8371e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package org.eclipse.debug.internal.ui;

/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
 
import org.eclipse.core.resources.IResource; 

 /**
  * Stores information required to re-launch a
  * previous launch.
  */
public class LaunchHistoryElement {
	
	/**
	 * The identifier of the launcher used
	 */
	protected String fLauncherIdentifier= null;
	
	/**
	 * The memento of the launched element
	 */
	protected String fMemento= null;
	
	/**
	 * The launch mode
	 */
	protected String fMode=null;
	
	/**
	 * The label of the launch
	 */
	protected String fLabel=null;
	
	/**
	 * The resource associated with the launched element
	 */
	protected IResource fResource;
	
	public LaunchHistoryElement(String launcherId, String elementMemento, String mode, String label, IResource resource) {
		fLauncherIdentifier = launcherId;
		fMemento = elementMemento;
		fMode = mode;
		fLabel = label;
		fResource = resource;
	}
	
	/**
	 * Returns the identifier of the launcher that was
	 * invoked.
	 */
	public String getLauncherIdentifier() {
		return fLauncherIdentifier;
	}
	
	/**
	 * Returns the memento of the element that was
	 * launched.
	 */
	public String getElementMemento() {
		return fMemento;
	}
	
	/**
	 * Returns the mode of the lanuch.
	 */
	public String getMode() {
		return fMode;
	}

	/**
	 * Returns the label of the launch
	 */
	public String getLabel() {
		return fLabel;
	}
	
	/**
	 * Returns the resource associated with the launched element
	 */
	public IResource getResource() {
		return fResource;
	}
	
	public boolean equals(Object o) {
		if (o instanceof LaunchHistoryElement) {
			LaunchHistoryElement e= (LaunchHistoryElement)o;
			return
				getLauncherIdentifier().equals(e.getLauncherIdentifier()) &&
				getElementMemento().equals(e.getElementMemento()) &&
				getMode().equals(getMode());
		}
		return false;
	}
}

Back to the top