X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java index 663735a..1acab1d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java @@ -23,7 +23,7 @@ import test.PHPParserSuperclass; public class MethodDeclaration extends Statement implements OutlineableWithChildren { /** The name of the method. */ - public char[] name; + public String name; public Hashtable arguments; @@ -44,16 +44,20 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild private Position position; public MethodDeclaration(final Object parent, - final char[] name, + final String name, final Hashtable arguments, final boolean reference, final int sourceStart, - final int sourceEnd) { + final int sourceEnd, + final int bodyStart, + final int bodyEnd) { super(sourceStart, sourceEnd); this.name = name; this.arguments = arguments; this.parent = parent; this.reference = reference; + this.bodyStart = bodyStart; + this.bodyEnd = bodyEnd; position = new Position(sourceStart, sourceEnd); } @@ -252,9 +256,9 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild private void findUnknownUsedVars(final List usedVars, final List declaredVars) { for (int i = 0; i < usedVars.size(); i++) { VariableUsage variableUsage = (VariableUsage) usedVars.get(i); + if (variableUsage.getName().equals("this")) continue; // this is a special variable if (!isVariableDeclaredBefore(declaredVars, variableUsage)) { try { - PHPeclipsePlugin.log(1,variableUsage.getName()+" "+variableUsage.getStartOffset()); PHPParserSuperclass.setMarker("warning, usage of an unknown variable : " + variableUsage.getName(), variableUsage.getStartOffset(), variableUsage.getStartOffset() + variableUsage.getName().length(),