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;
13 import net.sourceforge.phpdt.internal.compiler.ast.Argument;
14 import net.sourceforge.phpdt.internal.compiler.ast.TypeReference;
15 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
16 import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope;
17 import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
18 import net.sourceforge.phpdt.internal.compiler.util.CharOperation;
21 public class CompletionOnArgumentName extends Argument {
22 private static final char[] FAKENAMESUFFIX = " ".toCharArray(); //$NON-NLS-1$
23 public char[] realName;
24 public CompletionOnArgumentName(char[] name , long posNom , TypeReference tr , int modifiers){
25 super(CharOperation.concat(name, FAKENAMESUFFIX), posNom, tr, modifiers);
29 public void resolve(BlockScope scope) {
31 throw new CompletionNodeFound(this, scope);
34 public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
35 super.bind(scope, typeBinding, used);
37 throw new CompletionNodeFound(this, scope);
40 public String toString(int tab) {
41 String s = tabString(tab);
42 s += "<CompleteOnArgumentName:"; //$NON-NLS-1$
43 if (type != null) s += type.toString() + " "; //$NON-NLS-1$
44 s += new String(realName);
45 if (initialization != null) s += " = " + initialization.toStringExpression(); //$NON-NLS-1$
46 s += ">"; //$NON-NLS-1$