KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.Argument;
14 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
15 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
16 import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
17 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
18
19 public class SelectionOnArgumentName extends Argument {
20     
21     public SelectionOnArgumentName(char[] name , long posNom , TypeReference tr , int modifiers){
22
23         super(name, posNom, tr, modifiers);
24     }
25     
26     public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
27
28         super.bind(scope, typeBinding, used);
29         throw new SelectionNodeFound(binding);
30     }
31     
32     public StringBuffer JavaDoc print(int indent, StringBuffer JavaDoc output) {
33         
34         printIndent(indent, output);
35         output.append("<SelectionOnArgumentName:"); //$NON-NLS-1$
36
if (type != null) type.print(0, output).append(' ');
37         output.append(name);
38         if (initialization != null) {
39             output.append(" = ");//$NON-NLS-1$
40
initialization.printExpression(0, output);
41         }
42         return output.append('>');
43     }
44
45     public void resolve(BlockScope scope) {
46         
47         super.resolve(scope);
48         throw new SelectionNodeFound(binding);
49     }
50 }
51
Popular Tags