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.CompilationResult;
14 import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration;
15 import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope;
17 public class CompletionOnMethodName extends MethodDeclaration {
18 public int selectorEnd;
20 public CompletionOnMethodName(CompilationResult compilationResult){
21 super(compilationResult);
24 public void resolve(ClassScope upperScope) {
26 super.resolve(upperScope);
27 throw new CompletionNodeFound(this, upperScope);
30 public String toString(int tab) {
32 String s = tabString(tab);
33 s += "<CompletionOnMethodName:"; //$NON-NLS-1$
35 if (modifiers != AccDefault) {
36 s += modifiersString(modifiers);
39 s += returnTypeToString(0);
40 s += new String(selector) + "("; //$NON-NLS-1$
41 if (arguments != null) {
42 for (int i = 0; i < arguments.length; i++) {
43 s += arguments[i].toString(0);
44 if (i != (arguments.length - 1))
45 s = s + ", "; //$NON-NLS-1$
48 s += ")"; //$NON-NLS-1$
49 if (thrownExceptions != null) {
50 s += " throws "; //$NON-NLS-1$
51 for (int i = 0; i < thrownExceptions.length; i++) {
52 s += thrownExceptions[i].toString(0);
53 if (i != (thrownExceptions.length - 1))
54 s = s + ", "; //$NON-NLS-1$
58 s += ">"; //$NON-NLS-1$