KickJava   Java API By Example, From Geeks To Geeks.

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


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.LocalDeclaration;
14 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
15
16 public class SelectionOnLocalName extends LocalDeclaration{
17     
18     public SelectionOnLocalName(char[] name, int sourceStart, int sourceEnd) {
19
20         super(name, sourceStart, sourceEnd);
21     }
22     
23     public void resolve(BlockScope scope) {
24
25         super.resolve(scope);
26         throw new SelectionNodeFound(binding);
27     }
28
29     public StringBuffer JavaDoc printAsExpression(int indent, StringBuffer JavaDoc output) {
30         printIndent(indent, output);
31         output.append("<SelectionOnLocalName:"); //$NON-NLS-1$
32
printModifiers(this.modifiers, output);
33          type.print(0, output).append(' ').append(this.name);
34         if (initialization != null) {
35             output.append(" = "); //$NON-NLS-1$
36
initialization.printExpression(0, output);
37         }
38         return output.append('>');
39     }
40     
41     public StringBuffer JavaDoc printStatement(int indent, StringBuffer JavaDoc output) {
42         this.printAsExpression(indent, output);
43         return output.append(';');
44     }
45 }
46
Popular Tags