From 88e4aee3b65506e23197e23a19947fdbb8768d98 Mon Sep 17 00:00:00 2001 From: axelcl Date: Tue, 7 Feb 2006 07:10:46 +0000 Subject: [PATCH 1/1] Committing missing change or PHPFileUtil --- .../internal/compiler/ast/SingleTypeReference.java | 22 ++++++++++++++----- 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleTypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleTypeReference.java index 3ebd595..5d3cedb 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleTypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleTypeReference.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials + * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -17,15 +17,25 @@ import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; import net.sourceforge.phpdt.internal.compiler.lookup.Scope; import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import org.eclipse.core.resources.IFile; + public class SingleTypeReference extends TypeReference { public char[] token; - + public IFile file; + + public SingleTypeReference(IFile f, char[] source, int start, int end) { + token = source; + file = f; + sourceStart = start; + sourceEnd = end; +} public SingleTypeReference(char[] source, long pos) { token = source; + file = null; sourceStart = (int) (pos>>>32) ; sourceEnd = (int) (pos & 0x00000000FFFFFFFFL) ; - + } public SingleTypeReference(char[] source ,TypeBinding type, long pos) { this(source, pos) ; @@ -34,7 +44,7 @@ public SingleTypeReference(char[] source ,TypeBinding type, long pos) { public TypeReference copyDims(int dim){ //return a type reference copy of me with some dimensions //warning : the new type ref has a null binding - + return new ArrayTypeReference(token,null,dim,(((long)sourceStart)<<32)+sourceEnd) ; } public TypeBinding getTypeBinding(Scope scope) { @@ -56,7 +66,7 @@ public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclo return this.resolvedType = memberTb; } public StringBuffer printExpression(int indent, StringBuffer output){ - + return output.append(token); } public String toStringExpression(int tab){ -- 1.7.1