1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.codeassist.complete;
14 * Completion node build by the parser in any case it was intending to
15 * reduce an type reference located as a potential return type for a class
16 * member, containing the cursor location.
17 * This node is only a fake-field wrapper of the actual completion node
18 * which is accessible as the fake-field type.
26 * <CompleteOnType:Obj>;
29 * The source range is always of length 0.
30 * The arguments of the allocation expression are all the arguments defined
34 import net.sourceforge.phpdt.internal.compiler.ast.*;
35 import net.sourceforge.phpdt.internal.compiler.lookup.*;
37 public class CompletionOnFieldType extends FieldDeclaration {
38 public boolean isLocalVariable;
40 public CompletionOnFieldType(TypeReference type, boolean isLocalVariable){
42 this.sourceStart = type.sourceStart;
43 this.sourceEnd = type.sourceEnd;
46 this.isLocalVariable = isLocalVariable;
48 public TypeBinding getTypeBinding(Scope scope) {
49 if(type instanceof CompletionOnSingleTypeReference)
50 throw new CompletionNodeFound(this, scope);
51 else // handle the qualified type ref directly
52 return type.getTypeBinding(scope);
54 public String toString(int tab) {
56 return type.toString(tab);