KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > codeassist > select > SelectionOnNameOfMemberValuePair


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 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 package org.eclipse.jdt.internal.codeassist.select;
12
13 import org.eclipse.jdt.internal.compiler.ast.Expression;
14 import org.eclipse.jdt.internal.compiler.ast.MemberValuePair;
15 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
16 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
17
18
19 public class SelectionOnNameOfMemberValuePair extends MemberValuePair {
20     
21     public SelectionOnNameOfMemberValuePair(char[] token, int sourceStart, int sourceEnd, Expression value) {
22         super(token, sourceStart, sourceEnd, value);
23     }
24     
25     public StringBuffer JavaDoc print(int indent, StringBuffer JavaDoc output) {
26         output.append("<SelectOnName:"); //$NON-NLS-1$
27
output.append(name);
28         output.append(">"); //$NON-NLS-1$
29
return output;
30     }
31     
32     public void resolveTypeExpecting(BlockScope scope, TypeBinding requiredType) {
33         super.resolveTypeExpecting(scope, requiredType);
34         
35         if(this.binding != null) {
36             throw new SelectionNodeFound(this.binding);
37         }
38         throw new SelectionNodeFound();
39     }
40 }
41
Popular Tags