1
/*******************************************************************************
2
* Copyright (c) 2009 STMicroelectronics.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.linuxtools.internal.gcov.view.annotatedsource;
13
import org.eclipse.core.resources.IProject;
14
import org.eclipse.core.runtime.IPath;
15
import org.eclipse.linuxtools.binutils.link2source.STCSourceNotFoundEditorInput;
16
import org.eclipse.linuxtools.internal.gcov.parser.SourceFile;
19
public class STAnnotatedSourceNotFoundEditorInput extends STCSourceNotFoundEditorInput {
21
private final SourceFile sourceFile;
23
public STAnnotatedSourceNotFoundEditorInput(IProject project,
24
SourceFile sourceFile,
25
IPath sourcePath, int lineNumber) {
26
super(project, sourcePath, lineNumber);
27
this.sourceFile = sourceFile;
31
* @return the sourceFile
33
public SourceFile getSourceFile() {
38
* @see java.lang.Object#hashCode()
41
public int hashCode() {
43
int result = super.hashCode();
44
result = prime * result
45
+ ((sourceFile == null) ? 0 : sourceFile.hashCode());
50
* @see java.lang.Object#equals(java.lang.Object)
53
public boolean equals(Object obj) {
56
if (!super.equals(obj))
58
if (getClass() != obj.getClass())
60
final STAnnotatedSourceNotFoundEditorInput other = (STAnnotatedSourceNotFoundEditorInput) obj;
61
if (sourceFile == null) {
62
if (other.sourceFile != null)
64
} else if (!sourceFile.equals(other.sourceFile))