1
/*******************************************************************************
2
* Copyright (c) 2006, 2008 QNX Software Systems and others.
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
* QNX - Initial API and implementation
10
* Markus Schorn (Wind River Systems)
11
*******************************************************************************/
12
package org.eclipse.cdt.internal.ui.search;
14
import org.eclipse.search.ui.text.Match;
16
import org.eclipse.cdt.core.index.IIndexFileLocation;
19
* Base class for search matches found by various index searches.
21
public class PDOMSearchMatch extends Match {
23
private boolean fIsPolymorphicCall;
25
public PDOMSearchMatch(PDOMSearchElement elem, int offset, int length) {
26
super(elem, offset, length);
29
IIndexFileLocation getLocation() {
30
return ((PDOMSearchElement)getElement()).getLocation();
34
public boolean equals(Object obj) {
37
if (!(obj instanceof PDOMSearchMatch))
39
PDOMSearchMatch other = (PDOMSearchMatch)obj;
40
return getElement().equals(other.getElement())
41
&& getOffset() == other.getOffset()
42
&& getLength() == other.getLength();
45
public void setIsPolymorphicCall() {
46
fIsPolymorphicCall= true;
49
public boolean isPolymorphicCall() {
50
return fIsPolymorphicCall;