01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core;
11:
12: import org.eclipse.core.runtime.IPath;
13:
14: public class SourceLocation {
15: private IPath path;
16: private boolean userDefined = true;
17:
18: public SourceLocation(IPath path) {
19: this .path = path;
20: }
21:
22: public IPath getPath() {
23: return path;
24: }
25:
26: public void setPath(IPath path) {
27: this .path = path;
28: }
29:
30: public boolean isUserDefined() {
31: return userDefined;
32: }
33:
34: public void setUserDefined(boolean userDefined) {
35: this .userDefined = userDefined;
36: }
37:
38: public String toString() {
39: return path.toOSString();
40: }
41:
42: public boolean equals(Object obj) {
43: if (obj instanceof SourceLocation) {
44: SourceLocation object = (SourceLocation) obj;
45: return object.getPath().equals(path);
46: }
47: return false;
48: }
49:
50: }
|