KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > search > OccurrencesGroupKey


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.internal.ui.search;
13
14 import org.eclipse.jdt.core.IJavaElement;
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 line the line number
25      * @param lineContents the line contents
26      * @param isWriteAccess <code>true</code> if it groups writable occurrences
27      * @param isVariable <code>true</code> if it groups variable occurrences
28      */

29     public OccurrencesGroupKey(IJavaElement element, int line, String JavaDoc lineContents, boolean isWriteAccess, boolean isVariable) {
30         super(element, line, lineContents);
31         fIsWriteAccess= isWriteAccess;
32         fIsVariable= isVariable;
33     }
34
35     public boolean isVariable() {
36         return fIsVariable;
37     }
38
39     public boolean isWriteAccess() {
40         return fIsWriteAccess;
41     }
42
43     public void setWriteAccess(boolean isWriteAccess) {
44         fIsWriteAccess= isWriteAccess;
45     }
46 }
47
Popular Tags