01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 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.jdt.internal.ui.search;
11:
12: import org.eclipse.core.runtime.CoreException;
13:
14: import org.eclipse.jdt.core.ITypeRoot;
15:
16: public class OccurrencesGroupKey extends JavaElementLine {
17: private boolean fIsWriteAccess;
18: private boolean fIsVariable;
19:
20: /**
21: * Create a new occurrences group key.
22: *
23: * @param element either an ICompilationUnit or an IClassFile
24: * @param lineNumber the line number
25: * @param lineStartOffset the start offset of the line
26: * @param isWriteAccess <code>true</code> if it groups writable occurrences
27: * @param isVariable <code>true</code> if it groups variable occurrences
28: * @throws CoreException thrown when accessing of the buffer failed
29: */
30: public OccurrencesGroupKey(ITypeRoot element, int lineNumber,
31: int lineStartOffset, boolean isWriteAccess,
32: boolean isVariable) throws CoreException {
33: super (element, lineNumber, lineStartOffset);
34: fIsWriteAccess = isWriteAccess;
35: fIsVariable = isVariable;
36: }
37:
38: public boolean isVariable() {
39: return fIsVariable;
40: }
41:
42: public boolean isWriteAccess() {
43: return fIsWriteAccess;
44: }
45:
46: public void setWriteAccess(boolean isWriteAccess) {
47: fIsWriteAccess = isWriteAccess;
48: }
49: }
|