From e88cd70785d4e6c07425f13ab271768e0e7ef9bb Mon Sep 17 00:00:00 2001 From: choochter Date: Tue, 4 Feb 2003 01:10:26 +0000 Subject: [PATCH 1/1] *** empty log message *** --- net.sourceforge.phpeclipse/.classpath | 39 ++++---- .../sourceforge/phpeclipse/PHPParserTestCase.java | 6 +- .../net/sourceforge/phpdt/core/IJavaProject.java | 3 +- .../sourceforge/phpdt/core/JavaModelException.java | 4 +- .../internal/codeassist/CompletionEngine.java | 103 ++++++++++++++---- .../phpdt/internal/codeassist/SelectionEngine.java | 52 +++++++--- .../complete/CompletionOnClassLiteralAccess.java | 6 +- .../CompletionOnExplicitConstructorCall.java | 5 +- .../codeassist/complete/CompletionOnFieldType.java | 6 +- .../complete/CompletionOnImportReference.java | 2 +- .../complete/CompletionOnMemberAccess.java | 5 +- .../complete/CompletionOnMessageSend.java | 6 +- .../complete/CompletionOnPackageReference.java | 2 +- .../CompletionOnQualifiedAllocationExpression.java | 7 +- .../CompletionOnQualifiedNameReference.java | 8 +- .../CompletionOnQualifiedTypeReference.java | 7 +- .../complete/CompletionOnSingleNameReference.java | 5 +- .../complete/CompletionOnSingleTypeReference.java | 8 +- .../codeassist/complete/CompletionParser.java | 44 +++++++-- .../phpdt/internal/codeassist/impl/Engine.java | 23 +++-- .../codeassist/select/SelectionNodeFound.java | 2 +- .../select/SelectionOnExplicitConstructorCall.java | 5 +- .../codeassist/select/SelectionParser.java | 31 +++++-- .../compiler/AbstractSyntaxTreeVisitorAdapter.java | 79 ++++++++++++++- .../phpdt/internal/compiler/ClassFile.java | 47 +++++++-- .../phpdt/internal/compiler/CompilationResult.java | 11 ++- .../phpdt/internal/compiler/Compiler.java | 29 ++++-- .../internal/compiler/ConfigurableOption.java | 6 +- .../internal/compiler/DocumentElementParser.java | 32 +++++-- .../compiler/IAbstractSyntaxTreeVisitor.java | 79 ++++++++++++++- .../phpdt/internal/compiler/IProblemFactory.java | 2 +- .../internal/compiler/SourceElementParser.java | 52 ++++++++-- .../internal/compiler/ast/AND_AND_Expression.java | 10 +- .../compiler/ast/AbstractMethodDeclaration.java | 29 ++++-- .../compiler/ast/AllocationExpression.java | 13 ++- .../ast/AnonymousLocalTypeDeclaration.java | 7 +- .../phpdt/internal/compiler/ast/Argument.java | 5 +- .../compiler/ast/ArrayAllocationExpression.java | 11 ++- .../internal/compiler/ast/ArrayInitializer.java | 12 ++- .../compiler/ast/ArrayQualifiedTypeReference.java | 5 +- .../internal/compiler/ast/ArrayReference.java | 11 ++- .../internal/compiler/ast/ArrayTypeReference.java | 4 +- .../internal/compiler/ast/AssertStatement.java | 14 ++- .../phpdt/internal/compiler/ast/Assignment.java | 11 ++- .../phpdt/internal/compiler/ast/AstNode.java | 14 ++- .../internal/compiler/ast/BinaryExpression.java | 12 ++- .../phpdt/internal/compiler/ast/Block.java | 8 +- .../internal/compiler/ast/BranchStatement.java | 5 +- .../phpdt/internal/compiler/ast/Break.java | 5 +- .../phpdt/internal/compiler/ast/Case.java | 13 ++- .../internal/compiler/ast/CastExpression.java | 25 +++-- .../phpdt/internal/compiler/ast/CharLiteral.java | 7 +- .../internal/compiler/ast/ClassLiteralAccess.java | 11 ++- .../phpdt/internal/compiler/ast/Clinit.java | 20 +++- .../compiler/ast/CompilationUnitDeclaration.java | 19 +++- .../internal/compiler/ast/CompoundAssignment.java | 8 +- .../compiler/ast/ConditionalExpression.java | 16 ++- .../compiler/ast/ConstructorDeclaration.java | 27 ++++-- .../phpdt/internal/compiler/ast/Continue.java | 5 +- .../phpdt/internal/compiler/ast/DefaultCase.java | 11 ++- .../phpdt/internal/compiler/ast/DoStatement.java | 12 ++- .../phpdt/internal/compiler/ast/DoubleLiteral.java | 7 +- .../internal/compiler/ast/EmptyStatement.java | 4 +- .../internal/compiler/ast/EqualExpression.java | 24 +++-- .../compiler/ast/ExplicitConstructorCall.java | 15 ++- .../phpdt/internal/compiler/ast/Expression.java | 16 ++- .../phpdt/internal/compiler/ast/FalseLiteral.java | 8 +- .../internal/compiler/ast/FieldDeclaration.java | 18 +++- .../internal/compiler/ast/FieldReference.java | 19 +++- .../phpdt/internal/compiler/ast/FloatLiteral.java | 7 +- .../phpdt/internal/compiler/ast/ForStatement.java | 10 ++- .../phpdt/internal/compiler/ast/IfStatement.java | 11 ++- .../internal/compiler/ast/ImportReference.java | 2 +- .../phpdt/internal/compiler/ast/Initializer.java | 11 ++- .../compiler/ast/InstanceOfExpression.java | 20 +++-- .../internal/compiler/ast/IntLiteralMinValue.java | 2 +- .../internal/compiler/ast/LabeledStatement.java | 9 +- .../phpdt/internal/compiler/ast/Literal.java | 5 +- .../internal/compiler/ast/LocalDeclaration.java | 15 ++- .../compiler/ast/LocalTypeDeclaration.java | 4 +- .../internal/compiler/ast/LongLiteralMinValue.java | 2 +- .../phpdt/internal/compiler/ast/MessageSend.java | 17 +++- .../internal/compiler/ast/MethodDeclaration.java | 6 +- .../phpdt/internal/compiler/ast/NameReference.java | 7 +- .../phpdt/internal/compiler/ast/NullLiteral.java | 7 +- .../internal/compiler/ast/OR_OR_Expression.java | 10 +- .../internal/compiler/ast/PostfixExpression.java | 4 +- .../internal/compiler/ast/PrefixExpression.java | 2 +- .../ast/QualifiedAllocationExpression.java | 15 ++- .../compiler/ast/QualifiedNameReference.java | 25 ++++- .../compiler/ast/QualifiedSuperReference.java | 3 +- .../compiler/ast/QualifiedThisReference.java | 11 ++- .../compiler/ast/QualifiedTypeReference.java | 5 +- .../phpdt/internal/compiler/ast/Reference.java | 11 ++- .../internal/compiler/ast/ReturnStatement.java | 14 ++- .../internal/compiler/ast/SingleNameReference.java | 22 +++- .../internal/compiler/ast/SingleTypeReference.java | 6 +- .../phpdt/internal/compiler/ast/Statement.java | 13 ++- .../internal/compiler/ast/SwitchStatement.java | 15 ++- .../compiler/ast/SynchronizedStatement.java | 12 ++- .../phpdt/internal/compiler/ast/ThisReference.java | 6 +- .../phpdt/internal/compiler/ast/TryStatement.java | 20 +++- .../internal/compiler/ast/TypeDeclaration.java | 33 +++++-- .../phpdt/internal/compiler/ast/TypeReference.java | 5 +- .../internal/compiler/ast/UnaryExpression.java | 11 ++- .../internal/compiler/ast/WhileStatement.java | 12 ++- .../phpdt/internal/compiler/batch/Main.java | 2 +- .../compiler/classfmt/ClassFileConstants.java | 2 +- .../compiler/classfmt/ClassFileReader.java | 17 ++- .../internal/compiler/codegen/CodeStream.java | 33 +++++-- .../internal/compiler/codegen/ConstantPool.java | 8 +- .../phpdt/internal/compiler/flow/FlowContext.java | 8 +- .../internal/compiler/lookup/PackageBinding.java | 16 ++-- .../phpdt/internal/compiler/parser/NLSLine.java | 1 + .../phpdt/internal/compiler/parser/Parser.java | 110 ++++++++++++++++++-- .../phpdt/internal/core/JavaModelStatus.java | 10 +- .../phpdt/internal/core/TypeConverter.java | 3 - .../internal/corext/template/ContextType.java | 1 + .../corext/template/ContextTypeRegistry.java | 2 +- .../corext/template/DocumentTemplateContext.java | 1 + .../internal/corext/template/TemplateSet.java | 5 +- .../corext/template/TemplateTranslator.java | 2 - .../phpdt/internal/corext/template/Templates.java | 1 + .../template/php/CompilationUnitContextType.java | 12 +-- .../corext/template/php/GlobalVariables.java | 3 - .../corext/template/php/HTMLContextType.java | 2 - .../corext/template/php/HTMLUnitContext.java | 1 + .../corext/template/php/PHPContextType.java | 10 -- .../corext/template/php/PHPUnitContext.java | 1 + .../corext/textmanipulation/TextBuffer.java | 5 +- .../corext/textmanipulation/TextBufferEditor.java | 1 + .../corext/textmanipulation/TextBufferFactory.java | 5 +- .../corext/textmanipulation/UndoMemento.java | 2 - .../sourceforge/phpdt/internal/ui/PHPUIStatus.java | 1 + .../sourceforge/phpdt/internal/ui/PHPUiImages.java | 1 + .../phpdt/internal/ui/actions/AddTaskAction.java | 18 +--- .../internal/ui/actions/CompositeActionGroup.java | 1 - .../dialog/AbstractElementListSelectionDialog.java | 3 +- .../ui/dialog/CheckedTreeSelectionDialog.java | 3 +- .../ui/dialog/ElementListSelectionDialog.java | 8 +- .../phpdt/internal/ui/dialog/MessageLine.java | 1 + .../phpdt/internal/ui/dialog/StatusInfo.java | 1 + .../ui/preferences/EditTemplateDialog.java | 17 ++-- .../ui/preferences/TemplatePreferencePage.java | 5 +- .../ui/text/link/LinkedPositionListener.java | 1 - .../ui/text/link/LinkedPositionManager.java | 1 + .../internal/ui/text/link/LinkedPositionUI.java | 1 + .../internal/ui/text/template/BuiltInEngine.java | 3 +- .../internal/ui/text/template/BuiltInProposal.java | 9 +- .../ui/text/template/IdentifierEngine.java | 3 +- .../ui/text/template/IdentifierProposal.java | 9 +- .../ui/text/template/TemplateContentProvider.java | 4 +- .../internal/ui/text/template/TemplateEngine.java | 1 + .../ui/text/template/TemplateLabelProvider.java | 5 +- .../ui/text/template/TemplateProposal.java | 7 +- .../text/template/TemplateVariableProcessor.java | 6 +- .../ui/text/template/TemplateVariableProposal.java | 1 + .../phpdt/internal/ui/util/ExceptionHandler.java | 1 + .../phpdt/internal/ui/util/PHPElementVisitor.java | 1 - .../phpdt/internal/ui/util/PHPFileSelector.java | 5 +- .../phpdt/internal/ui/util/PHPProjectSelector.java | 5 +- .../phpdt/internal/ui/util/PixelConverter.java | 3 +- .../phpdt/internal/ui/util/SWTUtil.java | 5 +- .../phpdt/internal/ui/util/StringMatcher.java | 2 +- .../internal/ui/util/TwoArrayQuickSorter.java | 1 + .../ui/viewsupport/ImageDescriptorRegistry.java | 6 +- .../net/sourceforge/phpdt/tidy/AttributeTable.java | 1 - .../net/sourceforge/phpdt/tidy/Configuration.java | 4 +- .../phpdt/tidy/DOMCDATASectionImpl.java | 1 - .../net/sourceforge/phpdt/tidy/DOMCommentImpl.java | 1 - .../phpdt/tidy/DOMDocumentTypeImpl.java | 1 - .../sourceforge/phpdt/tidy/DOMExceptionImpl.java | 1 - .../net/sourceforge/phpdt/tidy/EntityTable.java | 2 +- .../src/net/sourceforge/phpdt/tidy/Lexer.java | 1 - .../src/net/sourceforge/phpdt/tidy/PPrint.java | 4 +- .../net/sourceforge/phpdt/tidy/StreamInImpl.java | 2 +- .../src/net/sourceforge/phpdt/tidy/TagTable.java | 1 - .../net/sourceforge/phpdt/tidy/TidyBeanInfo.java | 2 +- .../phpdt/ui/actions/GenerateActionGroup.java | 1 + .../phpdt/ui/actions/SelectionDispatchAction.java | 10 +-- .../phpeclipse/IPreferenceConstants.java | 2 +- .../src/net/sourceforge/phpeclipse/PHPCore.java | 5 +- .../phpeclipse/PHPEclipseBasePreferencePage.java | 4 +- .../phpeclipse/PHPOutlinePreferencePage.java | 3 - .../phpeclipse/PHPSyntaxEditorPreferencePage.java | 1 + .../sourceforge/phpeclipse/PHPeclipsePlugin.java | 5 +- .../phpeclipse/actions/HTMLParserAction.java | 6 +- .../phpeclipse/actions/PHPEclipseShowAction.java | 1 + .../phpeclipse/actions/PHPRestartApacheAction.java | 9 +-- .../phpeclipse/actions/PHPStartApacheAction.java | 8 +-- .../phpeclipse/actions/PHPStartMySQLAction.java | 9 +-- .../phpeclipse/actions/PHPStopApacheAction.java | 9 +-- .../phpeclipse/phpeditor/PHPActionContributor.java | 3 +- .../phpeditor/PHPContentOutlinePage.java | 6 +- .../phpeclipse/phpeditor/PHPDocumentProvider.java | 4 +- .../phpeclipse/phpeditor/PHPEditor.java | 2 +- .../phpeclipse/phpeditor/PHPEditorEnvironment.java | 2 - .../phpeditor/PHPSourceViewerConfiguration.java | 7 +- .../phpeclipse/phpeditor/PHPSyntaxRdr.java | 1 + .../phpeclipse/phpeditor/PHPTextHover.java | 1 + .../phpeclipse/phpeditor/PresentationAction.java | 2 +- .../phpeclipse/phpeditor/php/HTMLCodeScanner.java | 4 +- .../phpeditor/php/HTMLCompletionProcessor.java | 7 +- .../phpeditor/php/HTMLWordExtractor.java | 2 +- .../phpeclipse/phpeditor/php/PHPCodeScanner.java | 9 +- .../phpeditor/php/PHPCompletionProcessor.java | 1 + .../phpeditor/php/PHPPartitionScanner.java | 3 - .../phpeclipse/phpeditor/php/PHPWordExtractor.java | 2 +- .../phpeditor/phpparser/PHPClassDeclaration.java | 1 + .../phpparser/PHPFunctionDeclaration.java | 1 + .../phpeditor/phpparser/PHPOutlineInfo.java | 1 - .../phpeclipse/phpeditor/phpparser/PHPParser.java | 1 + .../phpeditor/phpparser/PHPReqIncDeclaration.java | 1 + .../phpparser/PHPSegmentWithChildren.java | 2 +- .../phpeditor/phpparser/PHPVarDeclaration.java | 1 + .../phpeditor/util/HTMLColorProvider.java | 1 + .../phpeclipse/preferences/ColorEditor.java | 3 +- .../preferences/PHPPreferencesMessages.java | 4 +- .../preferences/PHPProjectLibraryPage.java | 5 +- .../phpeclipse/resourcesview/MainActionGroup.java | 2 +- .../phpeclipse/resourcesview/PHPProject.java | 8 +- .../phpeclipse/resourcesview/PHPResourcesView.java | 1 + .../resourcesview/ResourceAdapterFactory.java | 7 +- .../sourceforge/phpeclipse/views/PHPConsole.java | 1 + .../wizards/NewProjectCreationWizard.java | 3 +- .../phpeclipse/wizards/PHPFileWizard.java | 30 ++++-- 226 files changed, 1485 insertions(+), 708 deletions(-) diff --git a/net.sourceforge.phpeclipse/.classpath b/net.sourceforge.phpeclipse/.classpath index cef91f1..b4a5d1f 100644 --- a/net.sourceforge.phpeclipse/.classpath +++ b/net.sourceforge.phpeclipse/.classpath @@ -1,25 +1,24 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/net.sourceforge.phpeclipse/src/junit/sourceforge/phpeclipse/PHPParserTestCase.java b/net.sourceforge.phpeclipse/src/junit/sourceforge/phpeclipse/PHPParserTestCase.java index bd8ad1a..18adb89 100644 --- a/net.sourceforge.phpeclipse/src/junit/sourceforge/phpeclipse/PHPParserTestCase.java +++ b/net.sourceforge.phpeclipse/src/junit/sourceforge/phpeclipse/PHPParserTestCase.java @@ -7,12 +7,10 @@ which accompanies this distribution, and is available at http://www.eclipse.org/legal/cpl-v10.html **********************************************************************/ -import org.eclipse.core.runtime.CoreException; - -import junit.framework.TestCase; - import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPParser; +import org.eclipse.core.runtime.CoreException; + /** * Tests the php parser */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaProject.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaProject.java index c9e71e7..75ffe04 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaProject.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaProject.java @@ -11,9 +11,8 @@ package net.sourceforge.phpdt.core; import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; //import net.sourceforge.phpdt.core.eval.IEvaluationContext; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaModelException.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaModelException.java index 7417c88..f99b98b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaModelException.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaModelException.java @@ -10,11 +10,11 @@ ******************************************************************************/ package net.sourceforge.phpdt.core; +import net.sourceforge.phpdt.internal.core.JavaModelStatus; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; -import net.sourceforge.phpdt.internal.core.JavaModelStatus; - /** * A checked exception representing a failure in the Java model. * Java model exceptions contain a Java-specific status object describing the diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/CompletionEngine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/CompletionEngine.java index 8d4ed79..5715c97 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/CompletionEngine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/CompletionEngine.java @@ -10,29 +10,88 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.codeassist; -import java.util.*; +import java.util.Locale; +import java.util.Map; -import net.sourceforge.phpdt.core.compiler.InvalidInputException; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; - -import net.sourceforge.phpdt.internal.codeassist.impl.*; import net.sourceforge.phpdt.core.ICompletionRequestor; -import net.sourceforge.phpdt.core.IType; -//import net.sourceforge.phpdt.core.JavaCore; -//import net.sourceforge.phpdt.core.JavaModelException; -import net.sourceforge.phpdt.core.compiler.*; import net.sourceforge.phpdt.core.compiler.IProblem; -import net.sourceforge.phpdt.internal.codeassist.complete.*; - -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; -import net.sourceforge.phpdt.internal.core.BasicCompilationUnit; -import net.sourceforge.phpdt.internal.core.TypeConverter; -import net.sourceforge.phpdt.internal.compiler.impl.*; +import net.sourceforge.phpdt.core.compiler.ITerminalSymbols; +import net.sourceforge.phpdt.core.compiler.InvalidInputException; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionNodeFound; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnArgumentName; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnClassLiteralAccess; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnClassReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnExceptionReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnExplicitConstructorCall; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnFieldName; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnFieldType; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnImportReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnInterfaceReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnLocalName; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMemberAccess; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMessageSend; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMethodName; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnMethodReturnType; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnPackageReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedClassReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedExceptionReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedInterfaceReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedNameReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnQualifiedTypeReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnSingleNameReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionOnSingleTypeReference; +import net.sourceforge.phpdt.internal.codeassist.complete.CompletionParser; +import net.sourceforge.phpdt.internal.codeassist.complete.InvalidCursorLocation; +import net.sourceforge.phpdt.internal.codeassist.impl.AssistParser; +import net.sourceforge.phpdt.internal.codeassist.impl.Engine; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.DefaultErrorHandlingPolicies; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.Assignment; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Expression; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.env.IConstants; +import net.sourceforge.phpdt.internal.compiler.env.ISourceMethod; +import net.sourceforge.phpdt.internal.compiler.env.ISourceType; +import net.sourceforge.phpdt.internal.compiler.env.NameEnvironmentAnswer; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypes; +import net.sourceforge.phpdt.internal.compiler.lookup.Binding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LookupEnvironment; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.PackageBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TagBits; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeConstants; +import net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Scanner; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblemFactory; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; +import net.sourceforge.phpdt.internal.compiler.util.HashtableOfObject; +import net.sourceforge.phpdt.internal.compiler.util.ObjectVector; /** * This class is the entry point for source completions. @@ -946,7 +1005,7 @@ public final class CompletionEngine continue next; for (int a = minArgLength; --a >= 0;) if (argTypes[a] != null) // can be null if it could not be resolved properly - if (!scope.areTypesCompatible(argTypes[a], constructor.parameters[a])) + if (!Scope.areTypesCompatible(argTypes[a], constructor.parameters[a])) continue next; char[][] parameterPackageNames = new char[paramLength][]; @@ -1667,7 +1726,7 @@ public final class CompletionEngine for (int a = minArgLength; --a >= 0;){ if (argTypes[a] != null){ // can be null if it could not be resolved properly - if (!scope.areTypesCompatible(argTypes[a], method.parameters[a])) { + if (!Scope.areTypesCompatible(argTypes[a], method.parameters[a])) { continue next; } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/SelectionEngine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/SelectionEngine.java index 6f5e306..fce0754 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/SelectionEngine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/SelectionEngine.java @@ -10,21 +10,47 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.codeassist; -import java.util.*; +import java.util.Locale; +import java.util.Map; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.core.compiler.InvalidInputException; import net.sourceforge.phpdt.core.compiler.IProblem; -import net.sourceforge.phpdt.internal.codeassist.impl.*; -import net.sourceforge.phpdt.internal.codeassist.select.*; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; +import net.sourceforge.phpdt.core.compiler.ITerminalSymbols; +import net.sourceforge.phpdt.core.compiler.InvalidInputException; +import net.sourceforge.phpdt.internal.codeassist.impl.AssistParser; +import net.sourceforge.phpdt.internal.codeassist.impl.Engine; +import net.sourceforge.phpdt.internal.codeassist.select.SelectionNodeFound; +import net.sourceforge.phpdt.internal.codeassist.select.SelectionOnImportReference; +import net.sourceforge.phpdt.internal.codeassist.select.SelectionOnPackageReference; +import net.sourceforge.phpdt.internal.codeassist.select.SelectionOnQualifiedTypeReference; +import net.sourceforge.phpdt.internal.codeassist.select.SelectionOnSingleTypeReference; +import net.sourceforge.phpdt.internal.codeassist.select.SelectionParser; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.DefaultErrorHandlingPolicies; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.env.ISourceType; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Binding; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LookupEnvironment; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.PackageBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Scanner; +import net.sourceforge.phpdt.internal.compiler.parser.SourceTypeConverter; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblemFactory; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; /** * The selection engine is intended to infer the nature of a selected name in some diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java index 947c57f..954385a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java @@ -31,8 +31,10 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * which should be replaced by the completion. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.ClassLiteralAccess; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnClassLiteralAccess extends ClassLiteralAccess { public char[] completionIdentifier; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java index 50d998e..3edfcc6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java @@ -32,8 +32,9 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * before the cursor. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; public class CompletionOnExplicitConstructorCall extends ExplicitConstructorCall { public CompletionOnExplicitConstructorCall(int accessMode) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnFieldType.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnFieldType.java index 01bfd9b..48cddcb 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnFieldType.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnFieldType.java @@ -31,8 +31,10 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * before the cursor. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnFieldType extends FieldDeclaration { public boolean isLocalVariable; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnImportReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnImportReference.java index 8aff63e..2194b60 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnImportReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnImportReference.java @@ -32,7 +32,7 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * before the cursor. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; public class CompletionOnImportReference extends ImportReference { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMemberAccess.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMemberAccess.java index 8933d7c..4ec1afa 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMemberAccess.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMemberAccess.java @@ -32,8 +32,9 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * which should be replaced by the completion. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnMemberAccess extends FieldReference { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMessageSend.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMessageSend.java index 0882c74..c89d0a0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMessageSend.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnMessageSend.java @@ -32,8 +32,10 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * before the cursor. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.MessageSend; +import net.sourceforge.phpdt.internal.compiler.ast.ThisReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnMessageSend extends MessageSend { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnPackageReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnPackageReference.java index 0bb48b2..557ae76 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnPackageReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnPackageReference.java @@ -32,7 +32,7 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * before the cursor. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; public class CompletionOnPackageReference extends ImportReference { public CompletionOnPackageReference(char[][] tokens , long[] positions) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java index 6aec572..39cedee 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java @@ -34,8 +34,11 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * before the cursor. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnQualifiedAllocationExpression extends QualifiedAllocationExpression { public TypeBinding resolveType(BlockScope scope) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java index ad0cda8..50b6178 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java @@ -33,8 +33,12 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * which should be replaced by the completion. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemFieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnQualifiedNameReference extends QualifiedNameReference { public char[] completionIdentifier; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java index a62d389..135d5d7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java @@ -24,8 +24,11 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * which should be replaced by the completion. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.lookup.Binding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnQualifiedTypeReference extends QualifiedTypeReference { public char[] completionIdentifier; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleNameReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleNameReference.java index ed517e9..87c05ce 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleNameReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleNameReference.java @@ -31,8 +31,9 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * which should be replaced by the completion. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnSingleNameReference extends SingleNameReference { public CompletionOnSingleNameReference(char[] source, long pos) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java index a72d1f5..df3385d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java @@ -24,8 +24,12 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * which should be replaced by the completion. */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnSingleTypeReference extends SingleTypeReference { public boolean isCompletionNode; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionParser.java index 228c98c..cee0c25 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/complete/CompletionParser.java @@ -19,13 +19,43 @@ package net.sourceforge.phpdt.internal.codeassist.complete; * 0 means completion behind the first character * n means completion behind the n-th character */ -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; - -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.codeassist.impl.*; +import net.sourceforge.phpdt.internal.codeassist.impl.AssistParser; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.Assignment; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.BinaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.CastExpression; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ConditionalExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.ast.Expression; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.InstanceOfExpression; +import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement; +import net.sourceforge.phpdt.internal.compiler.ast.Literal; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.NameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.Reference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.Statement; +import net.sourceforge.phpdt.internal.compiler.ast.SuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.ThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.UnaryExpression; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.parser.RecoveredMethod; +import net.sourceforge.phpdt.internal.compiler.parser.RecoveredType; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; public class CompletionParser extends AssistParser { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/impl/Engine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/impl/Engine.java index 35a3dc9..5f0406d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/impl/Engine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/impl/Engine.java @@ -13,14 +13,23 @@ package net.sourceforge.phpdt.internal.codeassist.impl; import java.util.Map; import net.sourceforge.phpdt.internal.codeassist.ISearchableNameEnvironment; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; - -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.env.IBinaryType; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.env.ISourceType; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.ITypeRequestor; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ImportBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LookupEnvironment; +import net.sourceforge.phpdt.internal.compiler.lookup.PackageBinding; +import net.sourceforge.phpdt.internal.compiler.parser.SourceTypeConverter; import net.sourceforge.phpdt.internal.compiler.util.CharOperation; -import net.sourceforge.phpdt.internal.compiler.impl.*; public abstract class Engine implements ITypeRequestor { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionNodeFound.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionNodeFound.java index 6d8a66f..71cccb9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionNodeFound.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionNodeFound.java @@ -10,7 +10,7 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.codeassist.select; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.Binding; public class SelectionNodeFound extends RuntimeException { public Binding binding; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java index 6dc4365..a231960 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java @@ -29,8 +29,9 @@ package net.sourceforge.phpdt.internal.codeassist.select; * */ -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReasons; public class SelectionOnExplicitConstructorCall extends ExplicitConstructorCall { public SelectionOnExplicitConstructorCall(int accessMode) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionParser.java index 99f38b0..1904132 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/codeassist/select/SelectionParser.java @@ -20,15 +20,32 @@ package net.sourceforge.phpdt.internal.codeassist.select; * n means completion behind the n-th character */ -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; - -import net.sourceforge.phpdt.internal.codeassist.impl.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; +import net.sourceforge.phpdt.internal.codeassist.impl.AssistParser; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AnonymousLocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.ast.Expression; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MessageSend; +import net.sourceforge.phpdt.internal.compiler.ast.NameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.Reference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.Statement; +import net.sourceforge.phpdt.internal.compiler.ast.SuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.parser.RecoveredType; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class SelectionParser extends AssistParser { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/AbstractSyntaxTreeVisitorAdapter.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/AbstractSyntaxTreeVisitorAdapter.java index 2803c97..5dae4e0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/AbstractSyntaxTreeVisitorAdapter.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/AbstractSyntaxTreeVisitorAdapter.java @@ -10,9 +10,82 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ast.AND_AND_Expression; +import net.sourceforge.phpdt.internal.compiler.ast.AllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.AnonymousLocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayInitializer; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.AssertStatement; +import net.sourceforge.phpdt.internal.compiler.ast.Assignment; +import net.sourceforge.phpdt.internal.compiler.ast.BinaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.Block; +import net.sourceforge.phpdt.internal.compiler.ast.Break; +import net.sourceforge.phpdt.internal.compiler.ast.Case; +import net.sourceforge.phpdt.internal.compiler.ast.CastExpression; +import net.sourceforge.phpdt.internal.compiler.ast.CharLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.ClassLiteralAccess; +import net.sourceforge.phpdt.internal.compiler.ast.Clinit; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.CompoundAssignment; +import net.sourceforge.phpdt.internal.compiler.ast.ConditionalExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Continue; +import net.sourceforge.phpdt.internal.compiler.ast.DefaultCase; +import net.sourceforge.phpdt.internal.compiler.ast.DoStatement; +import net.sourceforge.phpdt.internal.compiler.ast.DoubleLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.EmptyStatement; +import net.sourceforge.phpdt.internal.compiler.ast.EqualExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.ast.ExtendedStringLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.FalseLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.ast.FloatLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.ForStatement; +import net.sourceforge.phpdt.internal.compiler.ast.IfStatement; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.InstanceOfExpression; +import net.sourceforge.phpdt.internal.compiler.ast.IntLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LongLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MessageSend; +import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.NullLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.OR_OR_Expression; +import net.sourceforge.phpdt.internal.compiler.ast.PostfixExpression; +import net.sourceforge.phpdt.internal.compiler.ast.PrefixExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedSuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.StringLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.SuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SynchronizedStatement; +import net.sourceforge.phpdt.internal.compiler.ast.ThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.ThrowStatement; +import net.sourceforge.phpdt.internal.compiler.ast.TrueLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.TryStatement; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.UnaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; /** * An adapter class for interating through the parse tree. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ClassFile.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ClassFile.java index db85327..bb92025 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ClassFile.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ClassFile.java @@ -10,16 +10,45 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler; -import java.io.*; -import java.util.*; - -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.StringTokenizer; + +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.codegen.AttributeNamesConstants; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.ConstantPool; +import net.sourceforge.phpdt.internal.compiler.codegen.ExceptionLabel; +import net.sourceforge.phpdt.internal.compiler.codegen.QualifiedNamesConstants; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.impl.StringConstant; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.NestedTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticAccessMethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticArgumentBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeConstants; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeIds; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; +import net.sourceforge.phpdt.internal.compiler.util.HashtableOfType; +import net.sourceforge.phpdt.internal.compiler.util.Util; /** * Represents a class file wrapper on bytes, it is aware of its actual diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/CompilationResult.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/CompilationResult.java index 6974459..174ef2f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/CompilationResult.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/CompilationResult.java @@ -31,13 +31,16 @@ package net.sourceforge.phpdt.internal.compiler; * declaring types and any other types used to locate such fields or methods. */ -import net.sourceforge.phpdt.core.compiler.*; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Map; + +import net.sourceforge.phpdt.core.compiler.IProblem; import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; -import net.sourceforge.phpdt.internal.compiler.env.*; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; -import java.util.*; - public class CompilationResult { public IProblem problems[]; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/Compiler.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/Compiler.java index e0377d7..482afab 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/Compiler.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/Compiler.java @@ -10,17 +10,26 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; - -import java.io.*; -import java.util.*; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.Map; + +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.env.IBinaryType; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.env.INameEnvironment; +import net.sourceforge.phpdt.internal.compiler.env.ISourceType; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.ITypeRequestor; +import net.sourceforge.phpdt.internal.compiler.lookup.LookupEnvironment; +import net.sourceforge.phpdt.internal.compiler.lookup.PackageBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilationUnit; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemSeverities; +import net.sourceforge.phpdt.internal.compiler.util.Util; public class Compiler implements ITypeRequestor, ProblemSeverities { public Parser parser; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ConfigurableOption.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ConfigurableOption.java index e1a64ce..307cdcf 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ConfigurableOption.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ConfigurableOption.java @@ -17,7 +17,11 @@ package net.sourceforge.phpdt.internal.compiler; * @deprecated backport 1.0 internal functionality */ -import java.util.*; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.NoSuchElementException; +import java.util.ResourceBundle; +import java.util.StringTokenizer; public class ConfigurableOption { private String componentName; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/DocumentElementParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/DocumentElementParser.java index a94618b..284fcc7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/DocumentElementParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/DocumentElementParser.java @@ -25,14 +25,30 @@ package net.sourceforge.phpdt.internal.compiler; * * Any (parsing) problem encountered is also provided. */ -import net.sourceforge.phpdt.internal.compiler.env.*; - -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class DocumentElementParser extends Parser { IDocumentElementRequestor requestor; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IAbstractSyntaxTreeVisitor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IAbstractSyntaxTreeVisitor.java index db4efb4..c544d39 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IAbstractSyntaxTreeVisitor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IAbstractSyntaxTreeVisitor.java @@ -10,9 +10,82 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ast.AND_AND_Expression; +import net.sourceforge.phpdt.internal.compiler.ast.AllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.AnonymousLocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayInitializer; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.AssertStatement; +import net.sourceforge.phpdt.internal.compiler.ast.Assignment; +import net.sourceforge.phpdt.internal.compiler.ast.BinaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.Block; +import net.sourceforge.phpdt.internal.compiler.ast.Break; +import net.sourceforge.phpdt.internal.compiler.ast.Case; +import net.sourceforge.phpdt.internal.compiler.ast.CastExpression; +import net.sourceforge.phpdt.internal.compiler.ast.CharLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.ClassLiteralAccess; +import net.sourceforge.phpdt.internal.compiler.ast.Clinit; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.CompoundAssignment; +import net.sourceforge.phpdt.internal.compiler.ast.ConditionalExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Continue; +import net.sourceforge.phpdt.internal.compiler.ast.DefaultCase; +import net.sourceforge.phpdt.internal.compiler.ast.DoStatement; +import net.sourceforge.phpdt.internal.compiler.ast.DoubleLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.EmptyStatement; +import net.sourceforge.phpdt.internal.compiler.ast.EqualExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.ast.ExtendedStringLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.FalseLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.ast.FloatLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.ForStatement; +import net.sourceforge.phpdt.internal.compiler.ast.IfStatement; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.InstanceOfExpression; +import net.sourceforge.phpdt.internal.compiler.ast.IntLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LongLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MessageSend; +import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.NullLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.OR_OR_Expression; +import net.sourceforge.phpdt.internal.compiler.ast.PostfixExpression; +import net.sourceforge.phpdt.internal.compiler.ast.PrefixExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedSuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.StringLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.SuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SynchronizedStatement; +import net.sourceforge.phpdt.internal.compiler.ast.ThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.ThrowStatement; +import net.sourceforge.phpdt.internal.compiler.ast.TrueLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.TryStatement; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.UnaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; /** * A visitor interface for interating through the parse tree. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IProblemFactory.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IProblemFactory.java index 7d91113..2b21e4a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IProblemFactory.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/IProblemFactory.java @@ -12,7 +12,7 @@ package net.sourceforge.phpdt.internal.compiler; import java.util.Locale; -import net.sourceforge.phpdt.core.compiler.*; +import net.sourceforge.phpdt.core.compiler.IProblem; /* * Factory used from inside the compiler to build the actual problems diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/SourceElementParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/SourceElementParser.java index 9c346d5..7902369 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/SourceElementParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/SourceElementParser.java @@ -29,14 +29,50 @@ package net.sourceforge.phpdt.internal.compiler; * Any (parsing) problem encountered is also provided. */ -import net.sourceforge.phpdt.internal.compiler.env.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.AnonymousLocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.ast.Expression; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.LocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MessageSend; +import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.NameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.env.ISourceType; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BindingIds; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.parser.RecoveredType; +import net.sourceforge.phpdt.internal.compiler.parser.SourceConstructorDeclaration; +import net.sourceforge.phpdt.internal.compiler.parser.SourceFieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.parser.SourceMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.parser.SourceTypeConverter; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class SourceElementParser extends Parser { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AND_AND_Expression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AND_AND_Expression.java index 02f59de..4a4b3c9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AND_AND_Expression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AND_AND_Expression.java @@ -11,10 +11,12 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; //dedicated treatment for the && public class AND_AND_Expression extends BinaryExpression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AbstractMethodDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AbstractMethodDeclaration.java index 214dc4c..e2112f2 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AbstractMethodDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AbstractMethodDeclaration.java @@ -10,14 +10,27 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ClassFile; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.ResetStateForCodeGenerationVisitor; +import net.sourceforge.phpdt.internal.compiler.flow.ExceptionHandlingFlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilationUnit; +import net.sourceforge.phpdt.internal.compiler.problem.AbortMethod; +import net.sourceforge.phpdt.internal.compiler.problem.AbortType; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemSeverities; public abstract class AbstractMethodDeclaration extends AstNode diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AllocationExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AllocationExpression.java index 3c999d0..ca948ca 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AllocationExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AllocationExpression.java @@ -11,9 +11,16 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class AllocationExpression extends Expression diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AnonymousLocalTypeDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AnonymousLocalTypeDeclaration.java index bd66b66..2c4fb60 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AnonymousLocalTypeDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AnonymousLocalTypeDeclaration.java @@ -12,8 +12,11 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.problem.AbortType; public class AnonymousLocalTypeDeclaration extends LocalTypeDeclaration { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java index b1658bd..e0a0ce1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java @@ -11,7 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class Argument extends LocalDeclaration { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayAllocationExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayAllocationExpression.java index e313d57..28b5d97 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayAllocationExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayAllocationExpression.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ArrayAllocationExpression extends Expression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java index d9fe989..e9054fa 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java @@ -11,10 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.NullConstant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ArrayInitializer extends Expression { public Expression[] expressions; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayQualifiedTypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayQualifiedTypeReference.java index 48f5515..146c229 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayQualifiedTypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayQualifiedTypeReference.java @@ -11,7 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ArrayQualifiedTypeReference extends QualifiedTypeReference { int dimensions; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayReference.java index 9ccea6b..eb6c4d8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayReference.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ArrayReference extends Reference { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayTypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayTypeReference.java index 6c812cc..93edcdc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayTypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayTypeReference.java @@ -11,7 +11,9 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ArrayTypeReference extends SingleTypeReference { public int dimensions; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AssertStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AssertStatement.java index 66a16eb..f67d14f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AssertStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AssertStatement.java @@ -10,11 +10,17 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class AssertStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Assignment.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Assignment.java index 5f7c560..ba59094 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Assignment.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Assignment.java @@ -11,9 +11,12 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class Assignment extends Expression { @@ -74,7 +77,7 @@ public class Assignment extends Expression { // may require to widen the rhs expression at runtime if ((expression.isConstantValueOfTypeAssignableToType(expressionTb, this.lhsType) || (this.lhsType.isBaseType() && BaseTypeBinding.isWidening(this.lhsType.id, expressionTb.id))) - || (scope.areTypesCompatible(expressionTb, this.lhsType))) { + || (BlockScope.areTypesCompatible(expressionTb, this.lhsType))) { expression.implicitWidening(this.lhsType, expressionTb); return this.lhsType; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java index 902277e..847586d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java @@ -10,9 +10,19 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypes; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +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 net.sourceforge.phpdt.internal.compiler.lookup.TypeConstants; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeIds; public abstract class AstNode implements BaseTypes, CompilerModifiers, TypeConstants, TypeIds { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BinaryExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BinaryExpression.java index f094885..c7fc871 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BinaryExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BinaryExpression.java @@ -11,10 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class BinaryExpression extends OperatorExpression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java index 2e00658..d52f2c7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java @@ -11,9 +11,11 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class Block extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BranchStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BranchStatement.java index b28486a..3da3f6b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BranchStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/BranchStatement.java @@ -10,8 +10,9 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public abstract class BranchStatement extends Statement { public char[] label; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java index 8b3043e..14f739c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Break.java @@ -11,8 +11,9 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class Break extends BranchStatement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java index 71d445f..6e885e0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Case.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CaseLabel; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class Case extends Statement { @@ -70,7 +73,7 @@ public class Case extends Statement { return null; if (constantExpression.isConstantValueOfTypeAssignableToType(caseTb, testTb)) return constantExpression.constant; - if (scope.areTypesCompatible(caseTb, testTb)) + if (BlockScope.areTypesCompatible(caseTb, testTb)) return constantExpression.constant; scope.problemReporter().typeMismatchErrorActualTypeExpectedType( constantExpression, diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CastExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CastExpression.java index f295b80..e103ccc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CastExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CastExpression.java @@ -11,10 +11,17 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CastExpression extends Expression { @@ -75,7 +82,7 @@ public class CastExpression extends Expression { constant = expression.constant; //use the same constant return; } - if (scope.areTypesCompatible(expressionTb, castTb) + if (BlockScope.areTypesCompatible(expressionTb, castTb) || BaseTypeBinding.isNarrowing(castTb.id, expressionTb.id)) { expression.implicitConversion = (castTb.id << 4) + expressionTb.id; if (expression.constant != Constant.NotAConstant) @@ -138,9 +145,9 @@ public class CastExpression extends Expression { } } else if ( castTb.isClass()) { // ----- (castTb.isClass) expressionTb.isClass ------ - if (scope.areTypesCompatible(expressionTb, castTb)) // no runtime error + if (BlockScope.areTypesCompatible(expressionTb, castTb)) // no runtime error return; - if (scope.areTypesCompatible(castTb, expressionTb)) { + if (BlockScope.areTypesCompatible(castTb, expressionTb)) { // potential runtime error needRuntimeCheckcast = true; return; @@ -148,7 +155,7 @@ public class CastExpression extends Expression { } else { // ----- (castTb.isInterface) expressionTb.isClass ------- if (((ReferenceBinding) expressionTb).isFinal()) { // no subclass for expressionTb, thus compile-time check is valid - if (scope.areTypesCompatible(expressionTb, castTb)) + if (BlockScope.areTypesCompatible(expressionTb, castTb)) return; } else { // a subclass may implement the interface ==> no check at compile time needRuntimeCheckcast = true; @@ -174,7 +181,7 @@ public class CastExpression extends Expression { return; if (((ReferenceBinding) castTb).isFinal()) { // no subclass for castTb, thus compile-time check is valid - if (!scope.areTypesCompatible(castTb, expressionTb)) { + if (!BlockScope.areTypesCompatible(castTb, expressionTb)) { // potential runtime error scope.problemReporter().typeCastError(this, castTb, expressionTb); return; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CharLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CharLiteral.java index 40ef4fd..cecdcce 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CharLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CharLiteral.java @@ -11,9 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CharLiteral extends NumberLiteral { char value; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassLiteralAccess.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassLiteralAccess.java index 90e0e2a..4c5b042 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassLiteralAccess.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassLiteralAccess.java @@ -11,9 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ClassLiteralAccess extends Expression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Clinit.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Clinit.java index 3c4fe7b..263df93 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Clinit.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Clinit.java @@ -10,13 +10,21 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; +import net.sourceforge.phpdt.internal.compiler.ClassFile; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.ConstantPool; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.ExceptionHandlingFlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.InitializationFlowContext; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.problem.AbortMethod; public class Clinit extends AbstractMethodDeclaration { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompilationUnitDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompilationUnitDeclaration.java index f05ef3e..6741532 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompilationUnitDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompilationUnitDeclaration.java @@ -10,11 +10,20 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.internal.compiler.ClassFile; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ImportBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilationUnit; +import net.sourceforge.phpdt.internal.compiler.problem.AbortMethod; +import net.sourceforge.phpdt.internal.compiler.problem.AbortType; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemSeverities; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class CompilationUnitDeclaration extends AstNode diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompoundAssignment.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompoundAssignment.java index 4dd83aa..aca7b32 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompoundAssignment.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/CompoundAssignment.java @@ -11,9 +11,11 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompoundAssignment extends Assignment implements OperatorIds { public int operator; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConditionalExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConditionalExpression.java index d234618..42da00f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConditionalExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConditionalExpression.java @@ -11,10 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ConditionalExpression extends OperatorExpression { @@ -377,13 +381,13 @@ public class ConditionalExpression extends OperatorExpression { valueIfFalseType); return null; } - if (scope.areTypesCompatible(valueIfFalseType, valueIfTrueType)) { + if (BlockScope.areTypesCompatible(valueIfFalseType, valueIfTrueType)) { valueIfTrue.implicitWidening(valueIfTrueType, valueIfTrueType); valueIfFalse.implicitWidening(valueIfTrueType, valueIfFalseType); this.typeBinding = valueIfTrueType; return valueIfTrueType; } - if (scope.areTypesCompatible(valueIfTrueType, valueIfFalseType)) { + if (BlockScope.areTypesCompatible(valueIfTrueType, valueIfFalseType)) { valueIfTrue.implicitWidening(valueIfFalseType, valueIfTrueType); valueIfFalse.implicitWidening(valueIfFalseType, valueIfFalseType); this.typeBinding = valueIfFalseType; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConstructorDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConstructorDeclaration.java index d6a9244..a47678b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConstructorDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ConstructorDeclaration.java @@ -12,14 +12,25 @@ package net.sourceforge.phpdt.internal.compiler.ast; import java.util.ArrayList; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.internal.compiler.ClassFile; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.ExceptionHandlingFlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.InitializationFlowContext; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.NestedTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticArgumentBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.problem.AbortMethod; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class ConstructorDeclaration extends AbstractMethodDeclaration { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Continue.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Continue.java index ceeaa7b..de89d0a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Continue.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Continue.java @@ -11,8 +11,9 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class Continue extends BranchStatement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DefaultCase.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DefaultCase.java index a27876d..2a58b73 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DefaultCase.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DefaultCase.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CaseLabel; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class DefaultCase extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoStatement.java index 201e99c..6fa021a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoStatement.java @@ -11,10 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.LoopingFlowContext; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class DoStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoubleLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoubleLiteral.java index 3e7fba0..b797ddc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoubleLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/DoubleLiteral.java @@ -11,9 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class DoubleLiteral extends NumberLiteral { double value; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EmptyStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EmptyStatement.java index a4dd8e4..b827775 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EmptyStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EmptyStatement.java @@ -10,9 +10,9 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; -import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class EmptyStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EqualExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EqualExpression.java index e2385de..2a6fe06 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EqualExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EqualExpression.java @@ -11,10 +11,18 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.impl.NullConstant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class EqualExpression extends BinaryExpression { @@ -124,10 +132,10 @@ public final boolean areTypesCastCompatible(BlockScope scope, TypeBinding castTb return false; } if (castTb.isClass()) { // ----- (castTb.isClass) expressionTb.isClass ------ - if (scope.areTypesCompatible(expressionTb, castTb)) + if (BlockScope.areTypesCompatible(expressionTb, castTb)) return true; else { - if (scope.areTypesCompatible(castTb, expressionTb)) { + if (BlockScope.areTypesCompatible(castTb, expressionTb)) { return true; } return false; @@ -135,7 +143,7 @@ public final boolean areTypesCastCompatible(BlockScope scope, TypeBinding castTb } if (castTb.isInterface()) { // ----- (castTb.isInterface) expressionTb.isClass ------- if (((ReferenceBinding) expressionTb).isFinal()) { //no subclass for expressionTb, thus compile-time check is valid - if (scope.areTypesCompatible(expressionTb, castTb)) + if (BlockScope.areTypesCompatible(expressionTb, castTb)) return true; return false; } else { @@ -161,7 +169,7 @@ public final boolean areTypesCastCompatible(BlockScope scope, TypeBinding castTb if (scope.isJavaLangObject(castTb)) return true; if (((ReferenceBinding) castTb).isFinal()) { //no subclass for castTb, thus compile-time check is valid - if (scope.areTypesCompatible(castTb, expressionTb)) { + if (BlockScope.areTypesCompatible(castTb, expressionTb)) { return true; } return false; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ExplicitConstructorCall.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ExplicitConstructorCall.java index deeceb9..ff0da65 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ExplicitConstructorCall.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ExplicitConstructorCall.java @@ -11,9 +11,18 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding; public class ExplicitConstructorCall extends Statement diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Expression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Expression.java index 15ba5e3..a369c39 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Expression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Expression.java @@ -10,11 +10,15 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.problem.ShouldNotImplement; import net.sourceforge.phpdt.internal.compiler.util.Util; public abstract class Expression extends Statement { @@ -438,7 +442,7 @@ public abstract class Expression extends Statement { TypeBinding thisTb = this.resolveType(scope); if (thisTb == null) return null; - if (!scope.areTypesCompatible(thisTb, expectedTb)) { + if (!BlockScope.areTypesCompatible(thisTb, expectedTb)) { scope.problemReporter().typeMismatchError(thisTb, expectedTb, this); return null; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FalseLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FalseLiteral.java index ba6f7ad..571f074 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FalseLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FalseLiteral.java @@ -11,9 +11,11 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class FalseLiteral extends MagicLiteral { static final char[] source = {'f', 'a', 'l', 's', 'e'}; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java index b1fa8d0..c654dfc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java @@ -11,10 +11,18 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class FieldDeclaration extends AbstractVariableDeclaration { public FieldBinding binding; @@ -179,7 +187,7 @@ public class FieldDeclaration extends AbstractVariableDeclaration { this.initialization.implicitWidening(typeBinding, initializationTypeBinding); - } else if (initializationScope.areTypesCompatible(initializationTypeBinding, typeBinding)) { + } else if (MethodScope.areTypesCompatible(initializationTypeBinding, typeBinding)) { this.initialization.implicitWidening(typeBinding, initializationTypeBinding); } else { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldReference.java index 5cb69fd..97b2dd0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldReference.java @@ -11,10 +11,21 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BindingIds; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class FieldReference extends Reference implements InvocationSite { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FloatLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FloatLiteral.java index 66e2098..4d407c1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FloatLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FloatLiteral.java @@ -11,9 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class FloatLiteral extends NumberLiteral { float value; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ForStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ForStatement.java index e6a5901..f705140 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ForStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ForStatement.java @@ -11,9 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.LoopingFlowContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ForStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IfStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IfStatement.java index 2c11637..182f72a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IfStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IfStatement.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class IfStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ImportReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ImportReference.java index 9f85770..96674a9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ImportReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ImportReference.java @@ -11,7 +11,7 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope; public class ImportReference extends AstNode { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java index 858198c..6a8d049 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Initializer.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; public class Initializer extends FieldDeclaration { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InstanceOfExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InstanceOfExpression.java index db4cd45..27c5e24 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InstanceOfExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InstanceOfExpression.java @@ -11,9 +11,15 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class InstanceOfExpression extends OperatorExpression { @@ -118,10 +124,10 @@ public class InstanceOfExpression extends OperatorExpression { } } if (castTb.isClass()) { // ----- (castTb.isClass) expressionTb.isClass ------ - if (scope.areTypesCompatible(expressionTb, castTb)) + if (BlockScope.areTypesCompatible(expressionTb, castTb)) return true; else { - if (scope.areTypesCompatible(castTb, expressionTb)) { + if (BlockScope.areTypesCompatible(castTb, expressionTb)) { return true; } return false; @@ -131,7 +137,7 @@ public class InstanceOfExpression extends OperatorExpression { // ----- (castTb.isInterface) expressionTb.isClass ------- if (((ReferenceBinding) expressionTb).isFinal()) { //no subclass for expressionTb, thus compile-time check is valid - if (scope.areTypesCompatible(expressionTb, castTb)) + if (BlockScope.areTypesCompatible(expressionTb, castTb)) return true; return false; } else { @@ -158,7 +164,7 @@ public class InstanceOfExpression extends OperatorExpression { return true; if (((ReferenceBinding) castTb).isFinal()) { //no subclass for castTb, thus compile-time check is valid - if (scope.areTypesCompatible(castTb, expressionTb)) { + if (BlockScope.areTypesCompatible(castTb, expressionTb)) { return true; } return false; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IntLiteralMinValue.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IntLiteralMinValue.java index f21d8af..460d8bb 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IntLiteralMinValue.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/IntLiteralMinValue.java @@ -10,7 +10,7 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; public class IntLiteralMinValue extends IntLiteral { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LabeledStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LabeledStatement.java index 8998f6b..1cfa5a5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LabeledStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LabeledStatement.java @@ -11,9 +11,12 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.LabelFlowContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class LabeledStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Literal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Literal.java index 2e1e638..0248291 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Literal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Literal.java @@ -10,8 +10,9 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public abstract class Literal extends Expression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalDeclaration.java index 853e580..51dcdab 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalDeclaration.java @@ -11,10 +11,15 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class LocalDeclaration extends AbstractVariableDeclaration { @@ -177,7 +182,7 @@ public class LocalDeclaration extends AbstractVariableDeclaration { if (initTb != null) { if (initialization.isConstantValueOfTypeAssignableToType(initTb, tb) || (tb.isBaseType() && BaseTypeBinding.isWidening(tb.id, initTb.id)) - || scope.areTypesCompatible(initTb, tb)) + || BlockScope.areTypesCompatible(initTb, tb)) initialization.implicitWidening(tb, initTb); else scope.problemReporter().typeMismatchError(initTb, tb, this); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalTypeDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalTypeDeclaration.java index 6f286c9..5b6223a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalTypeDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LocalTypeDeclaration.java @@ -12,8 +12,8 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.problem.AbortType; public class LocalTypeDeclaration extends InnerTypeDeclaration { public AbstractMethodDeclaration enclosingMethod; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LongLiteralMinValue.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LongLiteralMinValue.java index eea131b..c349ad4 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LongLiteralMinValue.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/LongLiteralMinValue.java @@ -10,7 +10,7 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; public class LongLiteralMinValue extends LongLiteral { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MessageSend.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MessageSend.java index fd761cc..431825f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MessageSend.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MessageSend.java @@ -11,10 +11,19 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.lookup.BindingIds; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemMethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReasons; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class MessageSend extends Expression implements InvocationSite { public Expression receiver ; 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 45def4b..a7653b0 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 @@ -12,9 +12,9 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class MethodDeclaration extends AbstractMethodDeclaration { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NameReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NameReference.java index 2b5b79e..3b41c81 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NameReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NameReference.java @@ -10,7 +10,12 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.Binding; +import net.sourceforge.phpdt.internal.compiler.lookup.BindingIds; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.InvocationSite; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public abstract class NameReference extends Reference implements InvocationSite, BindingIds { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NullLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NullLiteral.java index 3010590..c72d86f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NullLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NullLiteral.java @@ -11,9 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class NullLiteral extends MagicLiteral { static final char[] source = {'n' , 'u' , 'l' , 'l'}; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OR_OR_Expression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OR_OR_Expression.java index f572772..91c7bec 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OR_OR_Expression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OR_OR_Expression.java @@ -11,10 +11,12 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; //dedicated treatment for the || public class OR_OR_Expression extends BinaryExpression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PostfixExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PostfixExpression.java index 97f691c..7a62fba 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PostfixExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PostfixExpression.java @@ -11,8 +11,8 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class PostfixExpression extends CompoundAssignment { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PrefixExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PrefixExpression.java index 35dcd6c..0768e36 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PrefixExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PrefixExpression.java @@ -11,7 +11,7 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class PrefixExpression extends CompoundAssignment { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedAllocationExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedAllocationExpression.java index da1555d..05e4c75 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedAllocationExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedAllocationExpression.java @@ -11,9 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class QualifiedAllocationExpression extends AllocationExpression { @@ -230,7 +235,7 @@ public class QualifiedAllocationExpression extends AllocationExpression { // The enclosing instance must be compatible with the innermost enclosing type ReferenceBinding expectedType = binding.declaringClass.enclosingType(); - if (scope.areTypesCompatible(enclosingInstTb, expectedType)) + if (BlockScope.areTypesCompatible(enclosingInstTb, expectedType)) return recType; scope.problemReporter().typeMismatchErrorActualTypeExpectedType( enclosingInstance, @@ -284,7 +289,7 @@ public class QualifiedAllocationExpression extends AllocationExpression { return null; } if (enclosingInstance != null) { - if (!scope + if (!BlockScope .areTypesCompatible( enclosingInstTb, inheritedBinding.declaringClass.enclosingType())) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedNameReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedNameReference.java index 321949f..eff7863 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedNameReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedNameReference.java @@ -11,10 +11,23 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemFieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticAccessMethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding; public class QualifiedNameReference extends NameReference { @@ -246,7 +259,7 @@ public class QualifiedNameReference extends NameReference { FieldBinding fieldBinding = (FieldBinding) binding; MethodScope methodScope = scope.methodScope(); if (methodScope.enclosingSourceType() == fieldBinding.declaringClass - && methodScope.fieldDeclarationIndex != methodScope.NotInFieldDecl + && methodScope.fieldDeclarationIndex != MethodScope.NotInFieldDecl && fieldBinding.id >= methodScope.fieldDeclarationIndex) { if ((!fieldBinding.isStatic() || methodScope.isStatic) && this.indexOfFirstFieldBinding == 1) @@ -755,7 +768,7 @@ public class QualifiedNameReference extends NameReference { FieldBinding fieldBinding = (FieldBinding) binding; MethodScope methodScope = scope.methodScope(); if (methodScope.enclosingSourceType() == fieldBinding.declaringClass - && methodScope.fieldDeclarationIndex != methodScope.NotInFieldDecl + && methodScope.fieldDeclarationIndex != MethodScope.NotInFieldDecl && fieldBinding.id >= methodScope.fieldDeclarationIndex) { if ((!fieldBinding.isStatic() || methodScope.isStatic) && this.indexOfFirstFieldBinding == 1) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedSuperReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedSuperReference.java index 91cf364..6d26f12 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedSuperReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedSuperReference.java @@ -11,7 +11,8 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class QualifiedSuperReference extends QualifiedThisReference { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedThisReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedThisReference.java index e19c352..a253b40 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedThisReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedThisReference.java @@ -11,9 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class QualifiedThisReference extends ThisReference { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedTypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedTypeReference.java index 3987a6c..4e2d532 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedTypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/QualifiedTypeReference.java @@ -11,7 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class QualifiedTypeReference extends TypeReference { public char[][] tokens; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Reference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Reference.java index dc7c3a5..cb8a551 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Reference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Reference.java @@ -10,10 +10,13 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.problem.ShouldNotImplement; import net.sourceforge.phpdt.internal.compiler.util.Util; public abstract class Reference extends Expression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java index 8da806d..d5c3479 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java @@ -11,9 +11,15 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.InitializationFlowContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ReturnStatement extends Statement { public Expression expression; @@ -223,7 +229,7 @@ public void resolve(BlockScope scope) { scope.problemReporter().attemptToReturnVoidValue(this); return; } - if (methodType != null && scope.areTypesCompatible(expressionType, methodType)) { + if (methodType != null && BlockScope.areTypesCompatible(expressionType, methodType)) { expression.implicitWidening(methodType, expressionType); return; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleNameReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleNameReference.java index fee9115..6ecbaa3 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleNameReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SingleNameReference.java @@ -11,10 +11,22 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemFieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding; public class SingleNameReference extends NameReference implements OperatorIds { public char[] token; @@ -172,7 +184,7 @@ public TypeBinding checkFieldAccess(BlockScope scope) { MethodScope ms = scope.methodScope(); if (ms.enclosingSourceType() == fieldBinding.declaringClass - && ms.fieldDeclarationIndex != ms.NotInFieldDecl + && ms.fieldDeclarationIndex != MethodScope.NotInFieldDecl && fieldBinding.id >= ms.fieldDeclarationIndex) { //if the field is static and ms is not .... then it is valid if (!fieldBinding.isStatic() || ms.isStatic) 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 e8ac5c7..4ffbdbc 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 @@ -11,7 +11,11 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class SingleTypeReference extends TypeReference { public char[] token; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Statement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Statement.java index 3363777..82e84fd 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Statement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Statement.java @@ -10,11 +10,14 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.problem.ShouldNotImplement; import net.sourceforge.phpdt.internal.compiler.util.Util; public abstract class Statement extends AstNode { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SwitchStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SwitchStatement.java index b63fb4f..18561a4 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SwitchStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SwitchStatement.java @@ -11,10 +11,15 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CaseLabel; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.SwitchFlowContext; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class SwitchStatement extends Statement { public Expression testExpression; @@ -200,7 +205,7 @@ public class SwitchStatement extends Statement { testExpression.implicitWidening(testType, testType); if (!(testExpression .isConstantValueOfTypeAssignableToType(testType, IntBinding))) { - if (!upperScope.areTypesCompatible(testType, IntBinding)) { + if (!BlockScope.areTypesCompatible(testType, IntBinding)) { upperScope.problemReporter().incorrectSwitchType(testExpression, testType); return; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SynchronizedStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SynchronizedStatement.java index ee464a9..4fc31bf 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SynchronizedStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/SynchronizedStatement.java @@ -11,9 +11,15 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.ExceptionLabel; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.InsideSubRoutineFlowContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class SynchronizedStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ThisReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ThisReference.java index 9ae61ea..caa4211 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ThisReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ThisReference.java @@ -11,8 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class ThisReference extends Reference { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TryStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TryStatement.java index 139dbbc..d64dc60 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TryStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TryStatement.java @@ -11,9 +11,21 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.ExceptionLabel; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.ExceptionHandlingFlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FinallyFlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.InsideSubRoutineFlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.UnconditionalFlowInfo; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class TryStatement extends Statement { @@ -460,7 +472,7 @@ public class TryStatement extends Statement { for (int i = 0; i < length; i++) { caughtExceptionTypes[i] = (ReferenceBinding) argumentTypes[i]; for (int j = 0; j < i; j++) { - if (scope.areTypesCompatible(caughtExceptionTypes[i], argumentTypes[j])) { + if (BlockScope.areTypesCompatible(caughtExceptionTypes[i], argumentTypes[j])) { scope.problemReporter().wrongSequenceOfExceptionTypesError(this, i, j); return; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeDeclaration.java index 578857a..7c80680 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeDeclaration.java @@ -10,15 +10,32 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; +import net.sourceforge.phpdt.internal.compiler.ClassFile; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.parser.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.InitializationFlowContext; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MemberTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.NestedTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.parser.Parser; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilationUnit; +import net.sourceforge.phpdt.internal.compiler.problem.AbortMethod; +import net.sourceforge.phpdt.internal.compiler.problem.AbortType; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemSeverities; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; public class TypeDeclaration extends Statement diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeReference.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeReference.java index d8c957f..360e24b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeReference.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/TypeReference.java @@ -11,7 +11,10 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public abstract class TypeReference extends Expression { public TypeBinding binding; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/UnaryExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/UnaryExpression.java index 8b0bbd2..bc09929 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/UnaryExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/UnaryExpression.java @@ -11,10 +11,13 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class UnaryExpression extends OperatorExpression { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/WhileStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/WhileStatement.java index 20377b0..57d94da 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/WhileStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/WhileStatement.java @@ -11,10 +11,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.codegen.CodeStream; +import net.sourceforge.phpdt.internal.compiler.codegen.Label; +import net.sourceforge.phpdt.internal.compiler.flow.FlowContext; +import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo; +import net.sourceforge.phpdt.internal.compiler.flow.LoopingFlowContext; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class WhileStatement extends Statement { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/batch/Main.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/batch/Main.java index f833f8b..5f42398 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/batch/Main.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/batch/Main.java @@ -25,8 +25,8 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; import java.util.StringTokenizer; -import net.sourceforge.phpdt.core.compiler.InvalidInputException; import net.sourceforge.phpdt.core.compiler.IProblem; +import net.sourceforge.phpdt.core.compiler.InvalidInputException; import net.sourceforge.phpdt.internal.compiler.ClassFile; import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.Compiler; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileConstants.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileConstants.java index 364856e..b1b965b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileConstants.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileConstants.java @@ -10,7 +10,7 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.classfmt; -import net.sourceforge.phpdt.internal.compiler.env.*; +import net.sourceforge.phpdt.internal.compiler.env.IConstants; public interface ClassFileConstants extends IConstants { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileReader.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileReader.java index ae23f4b..7ce6e27 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileReader.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/classfmt/ClassFileReader.java @@ -10,15 +10,20 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.classfmt; -import net.sourceforge.phpdt.internal.compiler.codegen.*; -import net.sourceforge.phpdt.internal.compiler.env.*; +import java.io.File; +import java.io.IOException; +import java.util.Arrays; + +import net.sourceforge.phpdt.internal.compiler.codegen.AttributeNamesConstants; +import net.sourceforge.phpdt.internal.compiler.env.IBinaryField; +import net.sourceforge.phpdt.internal.compiler.env.IBinaryMethod; +import net.sourceforge.phpdt.internal.compiler.env.IBinaryNestedType; +import net.sourceforge.phpdt.internal.compiler.env.IBinaryType; import net.sourceforge.phpdt.internal.compiler.impl.Constant; import net.sourceforge.phpdt.internal.compiler.impl.NullConstant; import net.sourceforge.phpdt.internal.compiler.lookup.TypeIds; -import net.sourceforge.phpdt.internal.compiler.util.*; - -import java.io.*; -import java.util.Arrays; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; +import net.sourceforge.phpdt.internal.compiler.util.Util; public class ClassFileReader extends ClassFileStruct implements AttributeNamesConstants, IBinaryType { private int constantPoolCount; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/CodeStream.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/CodeStream.java index 0519450..f008d99 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/CodeStream.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/CodeStream.java @@ -10,13 +10,32 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.codegen; -import net.sourceforge.phpdt.internal.compiler.*; - -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.classfmt.*; -import net.sourceforge.phpdt.internal.compiler.flow.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ClassFile; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.Expression; +import net.sourceforge.phpdt.internal.compiler.ast.OperatorIds; +import net.sourceforge.phpdt.internal.compiler.classfmt.ClassFileConstants; +import net.sourceforge.phpdt.internal.compiler.flow.UnconditionalFlowInfo; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.Constant; +import net.sourceforge.phpdt.internal.compiler.lookup.ArrayBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.BaseTypes; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.NestedTypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.Scope; +import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticAccessMethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticArgumentBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeConstants; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeIds; +import net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding; public class CodeStream implements OperatorIds, ClassFileConstants, Opcodes, BaseTypes, TypeConstants, TypeIds { // It will be responsible for the following items. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/ConstantPool.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/ConstantPool.java index 2d9ec90..1697377 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/ConstantPool.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/codegen/ConstantPool.java @@ -11,10 +11,12 @@ package net.sourceforge.phpdt.internal.compiler.codegen; import net.sourceforge.phpdt.internal.compiler.ClassFile; - import net.sourceforge.phpdt.internal.compiler.classfmt.ClassFileConstants; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.util.*; +import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeIds; +import net.sourceforge.phpdt.internal.compiler.util.CharOperation; /** * This type is used to store all the constant pool entries. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/FlowContext.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/FlowContext.java index e92b862..60196d0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/FlowContext.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/FlowContext.java @@ -129,9 +129,9 @@ public class FlowContext implements TypeConstants { for (int i = 0; i < raisedCount; i++) { TypeBinding raisedException; if ((raisedException = raisedExceptions[i]) != null) { - if (scope + if (BlockScope .areTypesCompatible(raisedException, scope.getJavaLangRuntimeException()) - || scope.areTypesCompatible(raisedException, scope.getJavaLangError())) { + || BlockScope.areTypesCompatible(raisedException, scope.getJavaLangError())) { remainingCount--; raisedExceptions[i] = null; } @@ -225,9 +225,9 @@ public class FlowContext implements TypeConstants { } // method treatment for unchecked exceptions if (exceptionContext.isMethodContext) { - if (scope + if (BlockScope .areTypesCompatible(raisedException, scope.getJavaLangRuntimeException()) - || scope.areTypesCompatible(raisedException, scope.getJavaLangError())) + || BlockScope.areTypesCompatible(raisedException, scope.getJavaLangError())) return; // anonymous constructors are allowed to throw any exceptions (their thrown exceptions diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/lookup/PackageBinding.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/lookup/PackageBinding.java index 4948914..dd70b2a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/lookup/PackageBinding.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/lookup/PackageBinding.java @@ -39,12 +39,12 @@ public PackageBinding(LookupEnvironment environment) { this(NoCharChar, null, environment); } private void addNotFoundPackage(char[] simpleName) { - knownPackages.put(simpleName, environment.theNotFoundPackage); + knownPackages.put(simpleName, LookupEnvironment.theNotFoundPackage); } private void addNotFoundType(char[] simpleName) { if (knownTypes == null) knownTypes = new HashtableOfType(25); - knownTypes.put(simpleName, environment.theNotFoundType); + knownTypes.put(simpleName, LookupEnvironment.theNotFoundType); } void addPackage(PackageBinding element) { knownPackages.put(element.compoundName[element.compoundName.length - 1], element); @@ -79,7 +79,7 @@ private PackageBinding findPackage(char[] name) { PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { - if (binding == environment.theNotFoundPackage) + if (binding == LookupEnvironment.theNotFoundPackage) return null; else return binding; @@ -120,7 +120,7 @@ ReferenceBinding getType(char[] name) { } } - if (binding == environment.theNotFoundType) + if (binding == LookupEnvironment.theNotFoundType) return null; if (binding instanceof UnresolvedReferenceBinding) binding = ((UnresolvedReferenceBinding) binding).resolve(environment); @@ -153,11 +153,11 @@ ReferenceBinding getType0(char[] name) { public Binding getTypeOrPackage(char[] name) { PackageBinding packageBinding = getPackage0(name); - if (packageBinding != null && packageBinding != environment.theNotFoundPackage) + if (packageBinding != null && packageBinding != LookupEnvironment.theNotFoundPackage) return packageBinding; ReferenceBinding typeBinding = getType0(name); - if (typeBinding != null && typeBinding != environment.theNotFoundType) { + if (typeBinding != null && typeBinding != LookupEnvironment.theNotFoundType) { if (typeBinding instanceof UnresolvedReferenceBinding) typeBinding = ((UnresolvedReferenceBinding) typeBinding).resolve(environment); if (typeBinding.isNestedType()) @@ -182,9 +182,9 @@ public Binding getTypeOrPackage(char[] name) { addNotFoundPackage(name); addNotFoundType(name); } else { - if (packageBinding == environment.theNotFoundPackage) + if (packageBinding == LookupEnvironment.theNotFoundPackage) packageBinding = null; - if (typeBinding == environment.theNotFoundType) + if (typeBinding == LookupEnvironment.theNotFoundType) typeBinding = null; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/NLSLine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/NLSLine.java index 8164e49..93d74d9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/NLSLine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/NLSLine.java @@ -13,6 +13,7 @@ package net.sourceforge.phpdt.internal.compiler.parser; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import net.sourceforge.phpdt.internal.compiler.ast.StringLiteral; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java index 299d267..977cc0f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java @@ -10,19 +10,107 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.parser; -import net.sourceforge.phpdt.core.compiler.*; -import net.sourceforge.phpdt.core.compiler.InvalidInputException; -import net.sourceforge.phpdt.internal.compiler.*; -import net.sourceforge.phpdt.internal.compiler.env.*; -import net.sourceforge.phpdt.internal.compiler.impl.*; -import net.sourceforge.phpdt.internal.compiler.ast.*; -import net.sourceforge.phpdt.internal.compiler.lookup.*; -import net.sourceforge.phpdt.internal.compiler.problem.*; -import net.sourceforge.phpdt.internal.compiler.util.*; - -import java.io.*; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; +import net.sourceforge.phpdt.core.compiler.ITerminalSymbols; +import net.sourceforge.phpdt.core.compiler.InvalidInputException; +import net.sourceforge.phpdt.internal.compiler.CompilationResult; +import net.sourceforge.phpdt.internal.compiler.ast.AND_AND_Expression; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.AllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.AnonymousLocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Argument; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayInitializer; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayReference; +import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.AssertStatement; +import net.sourceforge.phpdt.internal.compiler.ast.Assignment; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; +import net.sourceforge.phpdt.internal.compiler.ast.BinaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.Block; +import net.sourceforge.phpdt.internal.compiler.ast.Break; +import net.sourceforge.phpdt.internal.compiler.ast.Case; +import net.sourceforge.phpdt.internal.compiler.ast.CastExpression; +import net.sourceforge.phpdt.internal.compiler.ast.CharLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.ClassLiteralAccess; +import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.CompoundAssignment; +import net.sourceforge.phpdt.internal.compiler.ast.ConditionalExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.Continue; +import net.sourceforge.phpdt.internal.compiler.ast.DefaultCase; +import net.sourceforge.phpdt.internal.compiler.ast.DoStatement; +import net.sourceforge.phpdt.internal.compiler.ast.DoubleLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.EmptyStatement; +import net.sourceforge.phpdt.internal.compiler.ast.EqualExpression; +import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall; +import net.sourceforge.phpdt.internal.compiler.ast.Expression; +import net.sourceforge.phpdt.internal.compiler.ast.FalseLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.FieldReference; +import net.sourceforge.phpdt.internal.compiler.ast.FloatLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.ForStatement; +import net.sourceforge.phpdt.internal.compiler.ast.IfStatement; +import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; +import net.sourceforge.phpdt.internal.compiler.ast.Initializer; +import net.sourceforge.phpdt.internal.compiler.ast.InstanceOfExpression; +import net.sourceforge.phpdt.internal.compiler.ast.IntLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.IntLiteralMinValue; +import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement; +import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LocalTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.LongLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.LongLiteralMinValue; +import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.MessageSend; +import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.NameReference; +import net.sourceforge.phpdt.internal.compiler.ast.NullLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.OR_OR_Expression; +import net.sourceforge.phpdt.internal.compiler.ast.OperatorExpression; +import net.sourceforge.phpdt.internal.compiler.ast.OperatorIds; +import net.sourceforge.phpdt.internal.compiler.ast.PostfixExpression; +import net.sourceforge.phpdt.internal.compiler.ast.PrefixExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedSuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.Reference; +import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; +import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.Statement; +import net.sourceforge.phpdt.internal.compiler.ast.StringLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.SuperReference; +import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement; +import net.sourceforge.phpdt.internal.compiler.ast.SynchronizedStatement; +import net.sourceforge.phpdt.internal.compiler.ast.ThisReference; +import net.sourceforge.phpdt.internal.compiler.ast.ThrowStatement; +import net.sourceforge.phpdt.internal.compiler.ast.TrueLiteral; +import net.sourceforge.phpdt.internal.compiler.ast.TryStatement; +import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; +import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; +import net.sourceforge.phpdt.internal.compiler.ast.UnaryExpression; +import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement; +import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; +import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; +import net.sourceforge.phpdt.internal.compiler.lookup.BindingIds; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeIds; +import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; +import net.sourceforge.phpdt.internal.compiler.problem.ProblemSeverities; +import net.sourceforge.phpdt.internal.compiler.util.Util; + public class Parser implements BindingIds, ParserBasicInformation, ITerminalSymbols, CompilerModifiers, OperatorIds, TypeIds { protected ProblemReporter problemReporter; public int firstToken; // handle for multiple parsing goals diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelStatus.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelStatus.java index 3945211..b8007a1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelStatus.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelStatus.java @@ -10,16 +10,16 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.core; +import net.sourceforge.phpdt.core.IJavaElement; +import net.sourceforge.phpdt.core.IJavaModelStatus; +import net.sourceforge.phpdt.core.IJavaModelStatusConstants; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IResourceStatus; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; - -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpdt.core.IJavaElement; -import net.sourceforge.phpdt.core.IJavaModelStatus; -import net.sourceforge.phpdt.core.IJavaModelStatusConstants; //import net.sourceforge.phpdt.core.IPackageFragment; //import net.sourceforge.phpdt.core.JavaCore; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/TypeConverter.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/TypeConverter.java index dc7ef2a..88f52b7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/TypeConverter.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/TypeConverter.java @@ -20,10 +20,8 @@ import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration; import net.sourceforge.phpdt.internal.compiler.ast.Argument; import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference; import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference; -import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration; import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration; import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration; -import net.sourceforge.phpdt.internal.compiler.ast.ImportReference; import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration; import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration; import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference; @@ -31,7 +29,6 @@ import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference; import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration; import net.sourceforge.phpdt.internal.compiler.ast.TypeReference; import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers; -import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter; import net.sourceforge.phpdt.internal.compiler.util.CharOperation; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextType.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextType.java index 2b37af3..e0ae7de 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextType.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextType.java @@ -15,6 +15,7 @@ import net.sourceforge.phpdt.internal.corext.textmanipulation.SimpleTextEdit; import net.sourceforge.phpdt.internal.corext.textmanipulation.TextBuffer; import net.sourceforge.phpdt.internal.corext.textmanipulation.TextBufferEditor; import net.sourceforge.phpdt.internal.corext.textmanipulation.TextEdit; + import org.eclipse.core.runtime.CoreException; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextTypeRegistry.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextTypeRegistry.java index 95366f0..cca4fd6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextTypeRegistry.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextTypeRegistry.java @@ -8,8 +8,8 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import net.sourceforge.phpdt.internal.corext.template.php.PHPContextType; import net.sourceforge.phpdt.internal.corext.template.php.HTMLContextType; +import net.sourceforge.phpdt.internal.corext.template.php.PHPContextType; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/DocumentTemplateContext.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/DocumentTemplateContext.java index e89d632..a8293b0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/DocumentTemplateContext.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/DocumentTemplateContext.java @@ -4,6 +4,7 @@ */ package net.sourceforge.phpdt.internal.corext.template; +//import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateSet.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateSet.java index d7de172..8f88d1a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateSet.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateSet.java @@ -21,6 +21,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.Serializer; import org.apache.xml.serialize.SerializerFactory; @@ -33,10 +34,6 @@ import org.w3c.dom.NodeList; import org.w3c.dom.Text; import org.xml.sax.InputSource; import org.xml.sax.SAXException; -//import org.eclipse.jdt.internal.ui.JavaUIStatus; -//import org.eclipse.jdt.internal.ui.JavaUIException; - -import net.sourceforge.phpeclipse.PHPeclipsePlugin; /** * TemplateSet manages a collection of templates and makes them diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateTranslator.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateTranslator.java index f2190f0..750913b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateTranslator.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateTranslator.java @@ -4,8 +4,6 @@ */ package net.sourceforge.phpdt.internal.corext.template; -import java.io.Reader; -import java.io.StringReader; import java.util.HashMap; import java.util.Iterator; import java.util.Map; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/Templates.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/Templates.java index 71c4c9d..03d47d4 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/Templates.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/Templates.java @@ -8,6 +8,7 @@ import java.io.File; import java.io.InputStream; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.dialogs.ErrorDialog; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CompilationUnitContextType.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CompilationUnitContextType.java index 5c95992..d621639 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CompilationUnitContextType.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CompilationUnitContextType.java @@ -4,17 +4,9 @@ */ package net.sourceforge.phpdt.internal.corext.template.php; -import org.eclipse.jface.text.IDocument; -/* -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.Signature; -*/ import net.sourceforge.phpdt.internal.corext.template.ContextType; -import net.sourceforge.phpdt.internal.corext.template.TemplateContext; -import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; + +import org.eclipse.jface.text.IDocument; /** * Compilation unit context type. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/GlobalVariables.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/GlobalVariables.java index 6176ceb..6b786f5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/GlobalVariables.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/GlobalVariables.java @@ -5,13 +5,10 @@ package net.sourceforge.phpdt.internal.corext.template.php; import java.text.DateFormat; -import java.util.Date; import net.sourceforge.phpdt.internal.corext.template.SimpleTemplateVariable; import net.sourceforge.phpdt.internal.corext.template.TemplateContext; -import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; - /** * Global variables which are available in any context. */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLContextType.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLContextType.java index afedb3f..aea31e5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLContextType.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLContextType.java @@ -6,9 +6,7 @@ package net.sourceforge.phpdt.internal.corext.template.php; //import org.eclipse.jdt.core.ICompilationUnit; -import net.sourceforge.phpdt.internal.corext.template.ContextType; import net.sourceforge.phpdt.internal.corext.template.TemplateContext; -import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; /** * A context type for javadoc. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLUnitContext.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLUnitContext.java index c9abf99..c324f5d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLUnitContext.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/HTMLUnitContext.java @@ -9,6 +9,7 @@ import net.sourceforge.phpdt.internal.corext.template.DocumentTemplateContext; import net.sourceforge.phpdt.internal.corext.template.Template; import net.sourceforge.phpdt.internal.corext.template.TemplateBuffer; import net.sourceforge.phpdt.internal.corext.template.TemplateTranslator; + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPContextType.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPContextType.java index 3a50f41..c6cd4d2 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPContextType.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPContextType.java @@ -4,17 +4,7 @@ */ package net.sourceforge.phpdt.internal.corext.template.php; -import java.util.Collection; -/* -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.Signature; -*/ -import net.sourceforge.phpdt.internal.corext.template.ContextType; import net.sourceforge.phpdt.internal.corext.template.TemplateContext; -import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; /** * A context type for java code. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPUnitContext.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPUnitContext.java index 5d98915..6ccc7a1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPUnitContext.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPUnitContext.java @@ -9,6 +9,7 @@ import net.sourceforge.phpdt.internal.corext.template.DocumentTemplateContext; import net.sourceforge.phpdt.internal.corext.template.Template; import net.sourceforge.phpdt.internal.corext.template.TemplateBuffer; import net.sourceforge.phpdt.internal.corext.template.TemplateTranslator; + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBuffer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBuffer.java index 90884f9..6559085 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBuffer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBuffer.java @@ -7,14 +7,15 @@ package net.sourceforge.phpdt.internal.corext.textmanipulation; import java.util.ArrayList; import java.util.List; +import net.sourceforge.phpdt.internal.corext.util.Strings; +import net.sourceforge.phpdt.internal.ui.PHPStatusConstants; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import net.sourceforge.phpdt.internal.corext.util.Strings; -import net.sourceforge.phpdt.internal.ui.PHPStatusConstants; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.DefaultLineTracker; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferEditor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferEditor.java index 05333c3..192cb3f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferEditor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferEditor.java @@ -9,6 +9,7 @@ import java.util.Arrays; import java.util.List; import net.sourceforge.phpdt.internal.corext.textmanipulation.TextEditNode.RootNode; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferFactory.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferFactory.java index e596c7e..5ce09f9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferFactory.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/TextBufferFactory.java @@ -11,7 +11,10 @@ import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; +import net.sourceforge.phpdt.internal.corext.util.IOCloser; +import net.sourceforge.phpdt.internal.ui.PHPStatusConstants; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IWorkspaceRunnable; import org.eclipse.core.resources.ResourcesPlugin; @@ -19,8 +22,6 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import net.sourceforge.phpdt.internal.corext.util.IOCloser; -import net.sourceforge.phpdt.internal.ui.PHPStatusConstants; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.source.IAnnotationModel; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/UndoMemento.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/UndoMemento.java index 028b267..8817d5d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/UndoMemento.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/textmanipulation/UndoMemento.java @@ -7,8 +7,6 @@ package net.sourceforge.phpdt.internal.corext.textmanipulation; import java.util.ArrayList; import java.util.List; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; /** * This class encapsulates the reverse change of a number of TextEdits diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUIStatus.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUIStatus.java index 76621e4..41a9e2c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUIStatus.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUIStatus.java @@ -5,6 +5,7 @@ package net.sourceforge.phpdt.internal.ui; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUiImages.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUiImages.java index 636b54e..11fbe8e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUiImages.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/PHPUiImages.java @@ -4,6 +4,7 @@ import java.net.MalformedURLException; import java.net.URL; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.jface.action.IAction; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageRegistry; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/AddTaskAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/AddTaskAction.java index bb4749b..245e581 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/AddTaskAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/AddTaskAction.java @@ -10,28 +10,14 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.ui.actions; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.InputDialog; +import net.sourceforge.phpdt.ui.actions.SelectionDispatchAction; -import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; - +import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IWorkbenchSite; -import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.ui.texteditor.MarkerUtilities; import org.eclipse.ui.views.tasklist.TaskPropertiesDialog; -//import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; -import net.sourceforge.phpdt.internal.ui.util.ExceptionHandler; - -import net.sourceforge.phpdt.ui.actions.SelectionDispatchAction; - public class AddTaskAction extends SelectionDispatchAction { public AddTaskAction(IWorkbenchSite site) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/CompositeActionGroup.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/CompositeActionGroup.java index 2936a6d..baacca8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/CompositeActionGroup.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/actions/CompositeActionGroup.java @@ -12,7 +12,6 @@ package net.sourceforge.phpdt.internal.ui.actions; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.util.Assert; - import org.eclipse.ui.IActionBars; import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/AbstractElementListSelectionDialog.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/AbstractElementListSelectionDialog.java index 751a75d..a378264 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/AbstractElementListSelectionDialog.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/AbstractElementListSelectionDialog.java @@ -1,5 +1,7 @@ package net.sourceforge.phpdt.internal.ui.dialog; +import net.sourceforge.phpdt.internal.ui.util.FilteredList; + import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.util.Assert; @@ -17,7 +19,6 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; -import net.sourceforge.phpdt.internal.ui.util.FilteredList; /** * An abstract class to select elements out of a list of elements. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/CheckedTreeSelectionDialog.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/CheckedTreeSelectionDialog.java index eea9ec7..ca3a78c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/CheckedTreeSelectionDialog.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/CheckedTreeSelectionDialog.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import net.sourceforge.phpdt.internal.ui.viewsupport.ContainerCheckedTreeViewer; + import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.viewers.CheckStateChangedEvent; @@ -26,7 +28,6 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Tree; -import net.sourceforge.phpdt.internal.ui.viewsupport.ContainerCheckedTreeViewer; /** * A class to select elements out of a tree structure. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/ElementListSelectionDialog.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/ElementListSelectionDialog.java index b6e9808..7dbfab0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/ElementListSelectionDialog.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/ElementListSelectionDialog.java @@ -1,13 +1,13 @@ package net.sourceforge.phpdt.internal.ui.dialog; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; -import java.util.List; -import java.util.Arrays; -import org.eclipse.jface.viewers.ILabelProvider; - /** * A class to select elements out of a list of elements. */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/MessageLine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/MessageLine.java index 78a2907..ed1a187 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/MessageLine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/MessageLine.java @@ -1,6 +1,7 @@ package net.sourceforge.phpdt.internal.ui.dialog; import net.sourceforge.phpdt.internal.ui.PHPUiImages; + import org.eclipse.core.runtime.IStatus; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/StatusInfo.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/StatusInfo.java index 5c668b8..b229b7d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/StatusInfo.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/dialog/StatusInfo.java @@ -1,6 +1,7 @@ package net.sourceforge.phpdt.internal.ui.dialog; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.util.Assert; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/EditTemplateDialog.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/EditTemplateDialog.java index 5a28e77..0078f30 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/EditTemplateDialog.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/EditTemplateDialog.java @@ -22,6 +22,7 @@ import net.sourceforge.phpdt.internal.ui.util.SWTUtil; import net.sourceforge.phpeclipse.IPreferenceConstants; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.phpeditor.PHPSourceViewerConfiguration; + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.GroupMarker; @@ -107,8 +108,8 @@ public class EditTemplateDialog extends StatusDialog { // assistant.enableAutoInsert(store.getBoolean(ContentAssistPreference.AUTOINSERT)); // assistant.enableAutoActivation(store.getBoolean(ContentAssistPreference.AUTOACTIVATION)); // assistant.setAutoActivationDelay(store.getInt(ContentAssistPreference.AUTOACTIVATION_DELAY)); - assistant.setProposalPopupOrientation(assistant.PROPOSAL_OVERLAY); - assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE); + assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY); + assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE); // assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer)); Display display= sourceViewer.getTextWidget().getDisplay(); @@ -423,27 +424,27 @@ public class EditTemplateDialog extends StatusDialog { } private void initializeActions() { - TextViewerAction action= new TextViewerAction(fPatternEditor, fPatternEditor.UNDO); + TextViewerAction action= new TextViewerAction(fPatternEditor, SourceViewer.UNDO); action.setText(TemplateMessages.getString("EditTemplateDialog.undo")); //$NON-NLS-1$ fGlobalActions.put(ITextEditorActionConstants.UNDO, action); - action= new TextViewerAction(fPatternEditor, fPatternEditor.CUT); + action= new TextViewerAction(fPatternEditor, SourceViewer.CUT); action.setText(TemplateMessages.getString("EditTemplateDialog.cut")); //$NON-NLS-1$ fGlobalActions.put(ITextEditorActionConstants.CUT, action); - action= new TextViewerAction(fPatternEditor, fPatternEditor.COPY); + action= new TextViewerAction(fPatternEditor, SourceViewer.COPY); action.setText(TemplateMessages.getString("EditTemplateDialog.copy")); //$NON-NLS-1$ fGlobalActions.put(ITextEditorActionConstants.COPY, action); - action= new TextViewerAction(fPatternEditor, fPatternEditor.PASTE); + action= new TextViewerAction(fPatternEditor, SourceViewer.PASTE); action.setText(TemplateMessages.getString("EditTemplateDialog.paste")); //$NON-NLS-1$ fGlobalActions.put(ITextEditorActionConstants.PASTE, action); - action= new TextViewerAction(fPatternEditor, fPatternEditor.SELECT_ALL); + action= new TextViewerAction(fPatternEditor, SourceViewer.SELECT_ALL); action.setText(TemplateMessages.getString("EditTemplateDialog.select.all")); //$NON-NLS-1$ fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, action); - action= new TextViewerAction(fPatternEditor, fPatternEditor.CONTENTASSIST_PROPOSALS); + action= new TextViewerAction(fPatternEditor, SourceViewer.CONTENTASSIST_PROPOSALS); action.setText(TemplateMessages.getString("EditTemplateDialog.content.assist")); //$NON-NLS-1$ fGlobalActions.put("ContentAssistProposal", action); //$NON-NLS-1$ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/TemplatePreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/TemplatePreferencePage.java index b90c52c..005aa5f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/TemplatePreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/TemplatePreferencePage.java @@ -17,6 +17,7 @@ import net.sourceforge.phpdt.internal.ui.util.SWTUtil; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.phpeditor.PHPEditorEnvironment; import net.sourceforge.phpeclipse.phpeditor.PHPSourceViewerConfiguration; + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.MessageDialog; @@ -410,7 +411,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench template.setContext(contextTypeName); //$NON-NLS-1$ EditTemplateDialog dialog = new EditTemplateDialog(getShell(), template, false); - if (dialog.open() == dialog.OK) { + if (dialog.open() == EditTemplateDialog.OK) { fTemplates.add(template); fTableViewer.refresh(); fTableViewer.setChecked(template, template.isEnabled()); @@ -432,7 +433,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench private void edit(Template template) { Template newTemplate = new Template(template); EditTemplateDialog dialog = new EditTemplateDialog(getShell(), newTemplate, true); - if (dialog.open() == dialog.OK) { + if (dialog.open() == EditTemplateDialog.OK) { if (!newTemplate.getName().equals(template.getName()) && MessageDialog.openQuestion(getShell(), TemplateMessages.getString("TemplatePreferencePage.question.create.new.title"), //$NON-NLS-1$ TemplateMessages.getString("TemplatePreferencePage.question.create.new.message"))) //$NON-NLS-1$ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionListener.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionListener.java index 94028c9..3d19ac4 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionListener.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionListener.java @@ -4,7 +4,6 @@ */ package net.sourceforge.phpdt.internal.ui.text.link; -import org.eclipse.jface.text.IDocumentExtension; import org.eclipse.jface.text.Position; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java index 4ce53ee..425891b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java @@ -10,6 +10,7 @@ import java.util.HashMap; import java.util.Map; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.BadPositionCategoryException; import org.eclipse.jface.text.DocumentEvent; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionUI.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionUI.java index a9389ea..be32c18 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionUI.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionUI.java @@ -7,6 +7,7 @@ package net.sourceforge.phpdt.internal.ui.text.link; import java.lang.reflect.InvocationTargetException; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInEngine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInEngine.java index 2dcd584..7874c22 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInEngine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInEngine.java @@ -7,10 +7,11 @@ package net.sourceforge.phpdt.internal.ui.text.template; import java.util.ArrayList; import net.sourceforge.phpdt.internal.corext.template.ContextType; -import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; import net.sourceforge.phpdt.internal.corext.template.php.CompilationUnitContextType; +import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; import net.sourceforge.phpdt.internal.ui.PHPUiImages; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; + import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextViewer; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInProposal.java index 60f1e6d..c4867d7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/BuiltInProposal.java @@ -4,18 +4,15 @@ */ package net.sourceforge.phpdt.internal.ui.text.template; -import net.sourceforge.phpdt.internal.corext.template.Template; -import net.sourceforge.phpdt.internal.corext.template.TemplateBuffer; import net.sourceforge.phpdt.internal.corext.template.TemplateContext; import net.sourceforge.phpdt.internal.corext.template.TemplateMessages; -import net.sourceforge.phpdt.internal.corext.template.TemplatePosition; import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; -import net.sourceforge.phpdt.internal.corext.template.php.PHPTemplateMessages; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import org.eclipse.core.runtime.CoreException; import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionManager; import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionUI; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; + +import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierEngine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierEngine.java index 90d6c44..c32bd7f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierEngine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierEngine.java @@ -7,10 +7,11 @@ package net.sourceforge.phpdt.internal.ui.text.template; import java.util.ArrayList; import net.sourceforge.phpdt.internal.corext.template.ContextType; -import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; import net.sourceforge.phpdt.internal.corext.template.php.CompilationUnitContextType; +import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; import net.sourceforge.phpdt.internal.ui.PHPUiImages; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; + import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextViewer; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java index f104804..ddf59dc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java @@ -4,18 +4,15 @@ */ package net.sourceforge.phpdt.internal.ui.text.template; -import net.sourceforge.phpdt.internal.corext.template.Template; -import net.sourceforge.phpdt.internal.corext.template.TemplateBuffer; import net.sourceforge.phpdt.internal.corext.template.TemplateContext; import net.sourceforge.phpdt.internal.corext.template.TemplateMessages; -import net.sourceforge.phpdt.internal.corext.template.TemplatePosition; import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; -import net.sourceforge.phpdt.internal.corext.template.php.PHPTemplateMessages; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import org.eclipse.core.runtime.CoreException; import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionManager; import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionUI; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; + +import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateContentProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateContentProvider.java index a675702..b42b7aa 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateContentProvider.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateContentProvider.java @@ -4,11 +4,11 @@ */ package net.sourceforge.phpdt.internal.ui.text.template; +import net.sourceforge.phpdt.internal.corext.template.TemplateSet; + import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.Viewer; -import net.sourceforge.phpdt.internal.corext.template.TemplateSet; - public class TemplateContentProvider implements IStructuredContentProvider { private TemplateSet fTemplateSet; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateEngine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateEngine.java index b946e5f..e2e144e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateEngine.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateEngine.java @@ -13,6 +13,7 @@ import net.sourceforge.phpdt.internal.corext.template.Templates; import net.sourceforge.phpdt.internal.corext.template.php.CompilationUnitContextType; import net.sourceforge.phpdt.internal.ui.PHPUiImages; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; + import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextViewer; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateLabelProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateLabelProvider.java index 69765ad..c8eb433 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateLabelProvider.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateLabelProvider.java @@ -4,12 +4,11 @@ */ package net.sourceforge.phpdt.internal.ui.text.template; -import org.eclipse.swt.graphics.Image; +import net.sourceforge.phpdt.internal.corext.template.Template; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ITableLabelProvider; - -import net.sourceforge.phpdt.internal.corext.template.Template; +import org.eclipse.swt.graphics.Image; public class TemplateLabelProvider implements ITableLabelProvider { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateProposal.java index 8350ec3..d261dc7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateProposal.java @@ -9,13 +9,14 @@ import net.sourceforge.phpdt.internal.corext.template.TemplateBuffer; import net.sourceforge.phpdt.internal.corext.template.TemplateContext; import net.sourceforge.phpdt.internal.corext.template.TemplateMessages; import net.sourceforge.phpdt.internal.corext.template.TemplatePosition; -import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; import net.sourceforge.phpdt.internal.corext.template.php.PHPTemplateMessages; +import net.sourceforge.phpdt.internal.corext.template.php.PHPUnitContext; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import org.eclipse.core.runtime.CoreException; import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionManager; import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionUI; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; + +import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProcessor.java index ec60207..4f55f8a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProcessor.java @@ -6,15 +6,15 @@ import java.util.Comparator; import java.util.Iterator; import java.util.List; +import net.sourceforge.phpdt.internal.corext.template.ContextType; +import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; + import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.contentassist.IContextInformationValidator; -import net.sourceforge.phpdt.internal.corext.template.ContextType; -import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; - public class TemplateVariableProcessor implements IContentAssistProcessor { private static Comparator fgTemplateVariableProposalComparator= new Comparator() { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProposal.java index 794209d..5bb3379 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProposal.java @@ -7,6 +7,7 @@ package net.sourceforge.phpdt.internal.ui.text.template; import net.sourceforge.phpdt.internal.corext.template.TemplateMessages; import net.sourceforge.phpdt.internal.corext.template.TemplateVariable; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java index 2adc896..fcf0d66 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java @@ -5,6 +5,7 @@ import java.lang.reflect.InvocationTargetException; import net.sourceforge.phpdt.internal.ui.PHPUIMessages; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPElementVisitor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPElementVisitor.java index 54db23d..da79e24 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPElementVisitor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPElementVisitor.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceVisitor; import org.eclipse.core.runtime.CoreException; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileSelector.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileSelector.java index f83ffd3..6ab68d5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileSelector.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileSelector.java @@ -1,6 +1,8 @@ package net.sourceforge.phpdt.internal.ui.util; +import net.sourceforge.phpdt.internal.ui.dialog.ElementListSelectionDialog; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -10,7 +12,6 @@ import org.eclipse.core.runtime.Path; import org.eclipse.jface.util.Assert; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.model.WorkbenchLabelProvider; -import net.sourceforge.phpdt.internal.ui.dialog.ElementListSelectionDialog; public class PHPFileSelector extends ResourceSelector { protected PHPProjectSelector phpProjectSelector; @@ -55,7 +56,7 @@ public class PHPFileSelector extends ResourceSelector { dialog.setMessage(browseDialogMessage); dialog.setElements(getPHPFiles()); - if (dialog.open() == dialog.OK) { + if (dialog.open() == ElementListSelectionDialog.OK) { textField.setText(((IResource) dialog.getFirstResult()).getProjectRelativePath().toString()); } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPProjectSelector.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPProjectSelector.java index e7c21b2..6199901 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPProjectSelector.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPProjectSelector.java @@ -1,11 +1,12 @@ package net.sourceforge.phpdt.internal.ui.util; +import net.sourceforge.phpdt.internal.ui.dialog.ElementListSelectionDialog; import net.sourceforge.phpeclipse.PHPCore; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IProject; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.model.WorkbenchLabelProvider; -import net.sourceforge.phpdt.internal.ui.dialog.ElementListSelectionDialog; public class PHPProjectSelector extends ResourceSelector { @@ -29,7 +30,7 @@ public class PHPProjectSelector extends ResourceSelector { dialog.setMessage(browseDialogMessage); dialog.setElements(PHPCore.getPHPProjects()); - if (dialog.open() == dialog.OK) { + if (dialog.open() == ElementListSelectionDialog.OK) { textField.setText(((IProject) dialog.getFirstResult()).getName()); } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PixelConverter.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PixelConverter.java index 04deaba..2ae19e3 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PixelConverter.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PixelConverter.java @@ -1,11 +1,10 @@ package net.sourceforge.phpdt.internal.ui.util; +import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.graphics.FontMetrics; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.widgets.Control; -import org.eclipse.jface.dialogs.Dialog; - public class PixelConverter { private FontMetrics fFontMetrics; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/SWTUtil.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/SWTUtil.java index a5dc609..5344dc0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/SWTUtil.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/SWTUtil.java @@ -5,6 +5,8 @@ package net.sourceforge.phpdt.internal.ui.util; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.util.Assert; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.DragSource; import org.eclipse.swt.dnd.DropTarget; @@ -18,9 +20,6 @@ import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Widget; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.util.Assert; - /** * Utility class to simplify access to some SWT resources. */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java index 1649b11..f15c2f8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java @@ -1,6 +1,6 @@ package net.sourceforge.phpdt.internal.ui.util; -import java.util.*; +import java.util.Vector; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/TwoArrayQuickSorter.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/TwoArrayQuickSorter.java index 49e6e84..bf8bb1b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/TwoArrayQuickSorter.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/TwoArrayQuickSorter.java @@ -1,6 +1,7 @@ package net.sourceforge.phpdt.internal.ui.util; import java.util.Comparator; + import org.eclipse.jface.util.Assert; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/ImageDescriptorRegistry.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/ImageDescriptorRegistry.java index ae34a4c..7a79909 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/ImageDescriptorRegistry.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/ImageDescriptorRegistry.java @@ -7,12 +7,12 @@ package net.sourceforge.phpdt.internal.ui.viewsupport; import java.util.HashMap; import java.util.Iterator; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; - import net.sourceforge.phpdt.internal.ui.util.SWTUtil; + import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.util.Assert; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; /** * A registry that maps ImageDescriptors to Image. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/AttributeTable.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/AttributeTable.java index 4eb312b..6504e65 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/AttributeTable.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/AttributeTable.java @@ -6,7 +6,6 @@ package net.sourceforge.phpdt.tidy; import java.util.Hashtable; -import java.util.Enumeration; /** * diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Configuration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Configuration.java index f5468ab..be6363a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Configuration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Configuration.java @@ -36,11 +36,11 @@ package net.sourceforge.phpdt.tidy; The format is that of a Java .properties file. */ +import java.io.FileInputStream; +import java.io.IOException; import java.util.Enumeration; import java.util.Properties; import java.util.StringTokenizer; -import java.io.FileInputStream; -import java.io.IOException; public class Configuration implements java.io.Serializable { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCDATASectionImpl.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCDATASectionImpl.java index 235888b..da995d8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCDATASectionImpl.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCDATASectionImpl.java @@ -5,7 +5,6 @@ package net.sourceforge.phpdt.tidy; -import org.w3c.dom.DOMException; /** * diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCommentImpl.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCommentImpl.java index 8708c10..062562a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCommentImpl.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMCommentImpl.java @@ -5,7 +5,6 @@ package net.sourceforge.phpdt.tidy; -import org.w3c.dom.DOMException; /** * diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMDocumentTypeImpl.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMDocumentTypeImpl.java index 9efe332..1a62233 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMDocumentTypeImpl.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMDocumentTypeImpl.java @@ -5,7 +5,6 @@ package net.sourceforge.phpdt.tidy; -import org.w3c.dom.DOMException; /** * diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMExceptionImpl.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMExceptionImpl.java index 4ee5d5a..061c509 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMExceptionImpl.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/DOMExceptionImpl.java @@ -5,7 +5,6 @@ package net.sourceforge.phpdt.tidy; -import org.w3c.dom.DOMException; /** * diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/EntityTable.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/EntityTable.java index f7bcf55..50ef340 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/EntityTable.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/EntityTable.java @@ -31,8 +31,8 @@ package net.sourceforge.phpdt.tidy; * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000 */ -import java.util.Hashtable; import java.util.Enumeration; +import java.util.Hashtable; public class EntityTable { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Lexer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Lexer.java index f5f5548..ff1be0c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Lexer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/Lexer.java @@ -60,7 +60,6 @@ import java.util.Stack; import java.util.Vector; import org.eclipse.core.resources.IFile; -import sun.security.krb5.internal.av; public class Lexer { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/PPrint.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/PPrint.java index 435e606..a053fe4 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/PPrint.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/PPrint.java @@ -42,11 +42,9 @@ package net.sourceforge.phpdt.tidy; start tags and before end tags */ -import java.io.FileOutputStream; import java.io.File; - +import java.io.FileOutputStream; import java.io.IOException; -import java.io.FileNotFoundException; public class PPrint { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/StreamInImpl.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/StreamInImpl.java index 4e898fc..64b2395 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/StreamInImpl.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/StreamInImpl.java @@ -30,8 +30,8 @@ package net.sourceforge.phpdt.tidy; * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000 */ -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; public class StreamInImpl extends StreamIn { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TagTable.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TagTable.java index e13d103..aa27e68 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TagTable.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TagTable.java @@ -33,7 +33,6 @@ package net.sourceforge.phpdt.tidy; */ import java.util.Hashtable; -import java.util.Enumeration; public class TagTable { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TidyBeanInfo.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TidyBeanInfo.java index c3ccde7..2ee120b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TidyBeanInfo.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/tidy/TidyBeanInfo.java @@ -26,8 +26,8 @@ package net.sourceforge.phpdt.tidy; * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000 */ -import java.beans.SimpleBeanInfo; import java.awt.Image; +import java.beans.SimpleBeanInfo; public class TidyBeanInfo extends SimpleBeanInfo { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java index fa14ba5..8f68e78 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java @@ -17,6 +17,7 @@ import java.util.List; import net.sourceforge.phpdt.internal.ui.actions.AddTaskAction; import net.sourceforge.phpdt.ui.IContextMenuConstants; import net.sourceforge.phpeclipse.phpeditor.PHPEditor; + import org.eclipse.debug.internal.ui.actions.ActionMessages; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/SelectionDispatchAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/SelectionDispatchAction.java index 891c48e..321c425 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/SelectionDispatchAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/SelectionDispatchAction.java @@ -10,8 +10,6 @@ ******************************************************************************/ package net.sourceforge.phpdt.ui.actions; -import org.eclipse.swt.widgets.Shell; - import org.eclipse.jface.action.Action; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.util.Assert; @@ -20,14 +18,8 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; - -import org.eclipse.core.runtime.CoreException; - +import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchSite; -import org.eclipse.ui.texteditor.IUpdate; - -//import org.eclipse.jdt.internal.ui.actions.ActionMessages; -import net.sourceforge.phpdt.internal.ui.util.ExceptionHandler; /** * Action that dispatches the IAction#run() and the diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java index 362e380..d40577c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/IPreferenceConstants.java @@ -70,7 +70,7 @@ public interface IPreferenceConstants { public static final String PHP_USERDEF_XMLFILE = "_userdef_xmlfile"; /*Language stuff - under dev*/ - public static final String RESOURCE_BUNDLE = "_php_editor_res_bundle"; //$NON-NLS-1$ + public static final String RESOURCE_BUNDLE = "_php_editor_res_bundle"; //$NON-NLS-1$ public static final String LANGUAGE_DEFAULT = "net.sourceforge.phpeclipse.newPHPPreferencesMessages_en_GB"; public static final String RESOURCE_BUNDLE_DE = "net.sourceforge.phpeclipse.newPHPPreferencesMessages_DE"; public static final String RESOURCE_BUNDLE_FR = "net.sourceforge.phpeclipse.newPHPPreferencesMessages_FR"; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPCore.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPCore.java index 454c2e8..0f812e3 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPCore.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPCore.java @@ -5,6 +5,7 @@ import java.util.List; import net.sourceforge.phpeclipse.resourcesview.PHPFile; import net.sourceforge.phpeclipse.resourcesview.PHPProject; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; @@ -15,7 +16,7 @@ public class PHPCore { public static IProject[] getPHPProjects() { List phpProjectsList = new ArrayList(); - IProject[] workspaceProjects = PHPeclipsePlugin.getDefault().getWorkspace().getRoot().getProjects(); + IProject[] workspaceProjects = PHPeclipsePlugin.getWorkspace().getRoot().getProjects(); for (int i = 0; i < workspaceProjects.length; i++) { IProject iProject = workspaceProjects[i]; @@ -28,7 +29,7 @@ public class PHPCore { } public static PHPProject getPHPProject(String name) { - IProject aProject = PHPeclipsePlugin.getDefault().getWorkspace().getRoot().getProject(name); + IProject aProject = PHPeclipsePlugin.getWorkspace().getRoot().getProject(name); if (isPHPProject(aProject)) { PHPProject thePHPProject = new PHPProject(); thePHPProject.setProject(aProject); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseBasePreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseBasePreferencePage.java index 5b9af53..439b0b5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseBasePreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPEclipseBasePreferencePage.java @@ -2,6 +2,8 @@ package net.sourceforge.phpeclipse; import java.util.ArrayList; +import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages; + import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.DirectoryFieldEditor; import org.eclipse.jface.preference.IPreferenceStore; @@ -19,8 +21,6 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; -import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages; - public class PHPEclipseBasePreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private SelectionListener SelectionListener; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPOutlinePreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPOutlinePreferencePage.java index 0366a7c..750be81 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPOutlinePreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPOutlinePreferencePage.java @@ -12,11 +12,8 @@ Contributors: package net.sourceforge.phpeclipse; import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.DirectoryFieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.RadioGroupFieldEditor; -import org.eclipse.jface.preference.StringFieldEditor; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java index bc72d20..60d95e2 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java @@ -7,6 +7,7 @@ import java.util.Map; import net.sourceforge.phpeclipse.preferences.ColorEditor; import net.sourceforge.phpeclipse.preferences.OverlayPreferenceStore; import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages; + import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.preference.FileFieldEditor; import org.eclipse.jface.preference.IPreferenceStore; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java index b7c6173..0eb25a6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java @@ -14,6 +14,8 @@ package net.sourceforge.phpeclipse; import net.sourceforge.phpdt.internal.ui.preferences.TemplatePreferencePage; import net.sourceforge.phpdt.internal.ui.viewsupport.ImageDescriptorRegistry; import net.sourceforge.phpeclipse.phpeditor.PHPDocumentProvider; +import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr; +import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; import net.sourceforge.phpeclipse.resourcesview.PHPElement; import net.sourceforge.phpeclipse.resourcesview.PHPElementAdapterFactory; import net.sourceforge.phpeclipse.resourcesview.ResourceAdapterFactory; @@ -36,9 +38,6 @@ import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.plugin.AbstractUIPlugin; -import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr; -import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; - /** * The main plugin class to be used in the desktop. */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/HTMLParserAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/HTMLParserAction.java index 9406623..c7a4d6c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/HTMLParserAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/HTMLParserAction.java @@ -14,7 +14,9 @@ package net.sourceforge.phpeclipse.actions; import java.io.InputStream; import java.util.Iterator; -import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPParser; +import net.sourceforge.phpdt.tidy.Configuration; +import net.sourceforge.phpdt.tidy.Tidy; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; @@ -24,8 +26,6 @@ import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; -import net.sourceforge.phpdt.tidy.Configuration; -import net.sourceforge.phpdt.tidy.Tidy; public class HTMLParserAction implements IObjectActionDelegate { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPEclipseShowAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPEclipseShowAction.java index a349d15..a7c633c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPEclipseShowAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPEclipseShowAction.java @@ -19,6 +19,7 @@ import java.util.Iterator; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.views.PHPConsole; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java index f67a3ca..7168c93 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java @@ -11,17 +11,10 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.actions; -import java.io.IOException; -import java.text.MessageFormat; - import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class PHPRestartApacheAction extends PHPStartApacheAction { public void run(IAction action) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java index 3f1839a..997768b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java @@ -17,18 +17,12 @@ import java.text.MessageFormat; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.views.PHPConsole; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; + import org.eclipse.jface.action.IAction; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import sun.security.krb5.internal.crypto.e; public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate { protected IWorkbenchWindow activeWindow = null; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java index f6e64d3..b7810d7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java @@ -11,17 +11,10 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.actions; -import java.io.IOException; -import java.text.MessageFormat; - import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class PHPStartMySQLAction extends PHPStartApacheAction { public void run(IAction action) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java index 560069f..abb288d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java @@ -11,17 +11,10 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.actions; -import java.io.IOException; -import java.text.MessageFormat; - import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class PHPStopApacheAction extends PHPStartApacheAction { public void run(IAction action) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java index f90cf80..277bbf6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java @@ -12,7 +12,8 @@ Contributors: Klaus Hartlage - www.eclipseproject.de **********************************************************************/ -import net.sourceforge.phpdt.ui.actions.*; +import net.sourceforge.phpdt.ui.actions.PHPdtActionConstants; + import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.ui.IActionBars; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java index 72cbeae..fb7d8f9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java @@ -20,7 +20,11 @@ import java.util.TreeSet; import net.sourceforge.phpdt.internal.ui.viewsupport.ImageDescriptorRegistry; import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpeclipse.phpeditor.phpparser.*; +import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPOutlineInfo; +import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPParser; +import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPSegment; +import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPSegmentWithChildren; + import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.BadPositionCategoryException; import org.eclipse.jface.text.DefaultPositionUpdater; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java index 07af3cd..cfd23d7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java @@ -12,13 +12,13 @@ Contributors: Klaus Hartlage - www.eclipseproject.de **********************************************************************/ +import net.sourceforge.phpeclipse.phpeditor.php.PHPPartitionScanner; + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.text.rules.DefaultPartitioner; -import org.eclipse.jface.text.rules.RuleBasedPartitioner; import org.eclipse.ui.editors.text.FileDocumentProvider; -import net.sourceforge.phpeclipse.phpeditor.php.PHPPartitionScanner; /** * The PHPDocumentProvider provides the IDocuments used by java editors. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java index b3e4656..f5f9edf 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java @@ -12,13 +12,13 @@ Contributors: Klaus Hartlage - www.eclipseproject.de **********************************************************************/ import net.sourceforge.phpdt.internal.ui.actions.CompositeActionGroup; -import net.sourceforge.phpdt.ui.actions.*; import net.sourceforge.phpdt.ui.actions.GenerateActionGroup; import net.sourceforge.phpeclipse.IPreferenceConstants; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner; import net.sourceforge.phpeclipse.phpeditor.php.PHPWordExtractor; import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.Action; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditorEnvironment.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditorEnvironment.java index 8ebe447..1b698a0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditorEnvironment.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditorEnvironment.java @@ -14,9 +14,7 @@ Contributors: import net.sourceforge.phpeclipse.phpeditor.php.HTMLCodeScanner; import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner; -import net.sourceforge.phpeclipse.phpeditor.php.HTMLCodeScanner; import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; -import org.eclipse.jface.text.rules.RuleBasedScanner; /** The PHPEditorEnvironment maintains singletons used by the php editor */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java index 5c0e7b1..6f2c2f6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java @@ -20,6 +20,7 @@ import net.sourceforge.phpeclipse.phpeditor.php.PHPCompletionProcessor; import net.sourceforge.phpeclipse.phpeditor.php.PHPDoubleClickSelector; import net.sourceforge.phpeclipse.phpeditor.php.PHPPartitionScanner; import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; + import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.DefaultAutoIndentStrategy; import org.eclipse.jface.text.IAutoIndentStrategy; @@ -94,8 +95,8 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration { assistant.enableAutoActivation(true); assistant.setAutoActivationDelay(500); - assistant.setProposalPopupOrientation(assistant.PROPOSAL_OVERLAY); - assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE); + assistant.setProposalPopupOrientation(ContentAssistant.PROPOSAL_OVERLAY); + assistant.setContextInformationPopupOrientation(ContentAssistant.CONTEXT_INFO_ABOVE); assistant.setContextInformationPopupBackground(PHPEditorEnvironment.getPHPColorProvider().getColor(new RGB(150, 150, 0))); return assistant; @@ -193,7 +194,7 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration { // reconciler.setDamager(dr, PHPPartitionScanner.HTML); // reconciler.setRepairer(dr, PHPPartitionScanner.HTML); - dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(provider.getColor(provider.MULTI_LINE_COMMENT)))); + dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(provider.getColor(PHPColorProvider.MULTI_LINE_COMMENT)))); reconciler.setDamager(dr, PHPPartitionScanner.HTML_MULTILINE_COMMENT); reconciler.setRepairer(dr, PHPPartitionScanner.HTML_MULTILINE_COMMENT); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSyntaxRdr.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSyntaxRdr.java index ed67b53..6750da0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSyntaxRdr.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSyntaxRdr.java @@ -20,6 +20,7 @@ import net.sourceforge.phpeclipse.phpeditor.php.PHPElement; import net.sourceforge.phpeclipse.phpeditor.php.PHPFunction; import net.sourceforge.phpeclipse.phpeditor.php.PHPKeyword; import net.sourceforge.phpeclipse.phpeditor.php.PHPType; + import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.Serializer; import org.apache.xml.serialize.SerializerFactory; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPTextHover.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPTextHover.java index 878629c..cc93029 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPTextHover.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPTextHover.java @@ -16,6 +16,7 @@ import java.util.Vector; import net.sourceforge.phpeclipse.phpeditor.php.PHPElement; import net.sourceforge.phpeclipse.phpeditor.php.PHPWordExtractor; + import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextHover; import org.eclipse.jface.text.ITextViewer; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PresentationAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PresentationAction.java index 9cb7ae8..e3aef09 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PresentationAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PresentationAction.java @@ -11,10 +11,10 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.phpeditor; -import java.util.ResourceBundle; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.TextEditorAction; + /** * A toolbar action which toggles the presentation model of the * connected text editor. The editor shows either the highlight range diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCodeScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCodeScanner.java index a93a542..12b0c0f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCodeScanner.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCodeScanner.java @@ -17,7 +17,7 @@ import java.util.List; import net.sourceforge.phpeclipse.phpeditor.util.HTMLWordDetector; import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; import net.sourceforge.phpeclipse.phpeditor.util.PHPWhitespaceDetector; -import org.eclipse.jface.text.BadLocationException; + import org.eclipse.jface.text.TextAttribute; import org.eclipse.jface.text.rules.ICharacterScanner; import org.eclipse.jface.text.rules.IRule; @@ -74,7 +74,7 @@ public class HTMLCodeScanner extends RuleBasedScanner { if (c == '/' && (fBuffer.length() > 2) ) { break; } - } while (c != scanner.EOF && fDetector.isWordPart((char) c)); + } while (c != ICharacterScanner.EOF && fDetector.isWordPart((char) c)); scanner.unread(); if (tagBegin) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCompletionProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCompletionProcessor.java index 6857b46..493021f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCompletionProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLCompletionProcessor.java @@ -19,12 +19,8 @@ import net.sourceforge.phpdt.internal.corext.template.ContextType; import net.sourceforge.phpdt.internal.corext.template.ContextTypeRegistry; import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal; import net.sourceforge.phpdt.internal.ui.text.java.PHPCompletionProposalComparator; -import net.sourceforge.phpdt.internal.ui.text.template.BuiltInEngine; -import net.sourceforge.phpdt.internal.ui.text.template.IdentifierEngine; import net.sourceforge.phpdt.internal.ui.text.template.TemplateEngine; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpeclipse.phpeditor.PHPContentOutlinePage; -import net.sourceforge.phpeclipse.phpeditor.PHPEditor; + import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.TextPresentation; @@ -35,7 +31,6 @@ import org.eclipse.jface.text.contentassist.IContextInformationExtension; import org.eclipse.jface.text.contentassist.IContextInformationPresenter; import org.eclipse.jface.text.contentassist.IContextInformationValidator; import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.IEditorPart; /** * Example PHP completion processor. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLWordExtractor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLWordExtractor.java index a79d914..a3bfc0b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLWordExtractor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/HTMLWordExtractor.java @@ -11,9 +11,9 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.phpeditor.php; -import org.eclipse.swt.graphics.Point; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; +import org.eclipse.swt.graphics.Point; /** * Detects HTML words in documents. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCodeScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCodeScanner.java index 6a5040c..f8d3fa9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCodeScanner.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCodeScanner.java @@ -15,6 +15,10 @@ import java.util.ArrayList; import java.util.List; import java.util.Vector; +import net.sourceforge.phpeclipse.IPreferenceConstants; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; +import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr; +import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; import net.sourceforge.phpeclipse.phpeditor.util.PHPWhitespaceDetector; import net.sourceforge.phpeclipse.phpeditor.util.PHPWordDetector; @@ -35,11 +39,6 @@ import org.eclipse.jface.text.rules.WordRule; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; -import net.sourceforge.phpeclipse.IPreferenceConstants; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr; -import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; - /** * PHP Code Scanner */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java index aaee068..3bfd969 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java @@ -25,6 +25,7 @@ import net.sourceforge.phpdt.internal.ui.text.template.TemplateEngine; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.phpeditor.PHPContentOutlinePage; import net.sourceforge.phpeclipse.phpeditor.PHPEditor; + import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.TextPresentation; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java index a797115..c15249b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java @@ -11,18 +11,15 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.phpeditor.php; -import java.io.CharArrayWriter; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.text.rules.ICharacterScanner; import org.eclipse.jface.text.rules.IPredicateRule; import org.eclipse.jface.text.rules.IToken; -import org.eclipse.jface.text.rules.IWordDetector; import org.eclipse.jface.text.rules.MultiLineRule; import org.eclipse.jface.text.rules.RuleBasedPartitionScanner; import org.eclipse.jface.text.rules.Token; -import org.eclipse.jface.text.rules.WordRule; /** * This scanner recognizes the JavaDoc comments and Java multi line comments. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPWordExtractor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPWordExtractor.java index aeda784..92266eb 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPWordExtractor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPWordExtractor.java @@ -11,9 +11,9 @@ Contributors: **********************************************************************/ package net.sourceforge.phpeclipse.phpeditor.php; -import org.eclipse.swt.graphics.Point; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; +import org.eclipse.swt.graphics.Point; /** * Detects PHP words in documents. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPClassDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPClassDeclaration.java index eb7b3cc..325785c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPClassDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPClassDeclaration.java @@ -1,6 +1,7 @@ package net.sourceforge.phpeclipse.phpeditor.phpparser; import net.sourceforge.phpdt.internal.ui.PHPUiImages; + import org.eclipse.jface.resource.ImageDescriptor; /** * A class declaration. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPFunctionDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPFunctionDeclaration.java index fc558a8..0749151 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPFunctionDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPFunctionDeclaration.java @@ -1,6 +1,7 @@ package net.sourceforge.phpeclipse.phpeditor.phpparser; import net.sourceforge.phpdt.internal.ui.PHPUiImages; + import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPOutlineInfo.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPOutlineInfo.java index 8998d2b..cb883cc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPOutlineInfo.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPOutlineInfo.java @@ -1,6 +1,5 @@ package net.sourceforge.phpeclipse.phpeditor.phpparser; -import java.util.TreeMap; import java.util.TreeSet; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java index 624975a..010e977 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java @@ -19,6 +19,7 @@ import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.actions.PHPStartApacheAction; import net.sourceforge.phpeclipse.phpeditor.PHPString; import net.sourceforge.phpeclipse.phpeditor.php.PHPKeywords; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPReqIncDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPReqIncDeclaration.java index d7e03fa..e90130d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPReqIncDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPReqIncDeclaration.java @@ -1,6 +1,7 @@ package net.sourceforge.phpeclipse.phpeditor.phpparser; import net.sourceforge.phpdt.internal.ui.PHPUiImages; + import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPSegmentWithChildren.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPSegmentWithChildren.java index a7b4526..f68cba6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPSegmentWithChildren.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPSegmentWithChildren.java @@ -1,7 +1,7 @@ package net.sourceforge.phpeclipse.phpeditor.phpparser; -import java.util.List; import java.util.ArrayList; +import java.util.List; /** * An abstract PHPSegment that can have children. diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java index be8e479..5fec740 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPVarDeclaration.java @@ -1,6 +1,7 @@ package net.sourceforge.phpeclipse.phpeditor.phpparser; import net.sourceforge.phpdt.internal.ui.PHPUiImages; + import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/util/HTMLColorProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/util/HTMLColorProvider.java index 5bb0a3f..57bf9dd 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/util/HTMLColorProvider.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/util/HTMLColorProvider.java @@ -14,6 +14,7 @@ package net.sourceforge.phpeclipse.phpeditor.util; import java.util.HashMap; import java.util.Iterator; import java.util.Map; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Display; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/ColorEditor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/ColorEditor.java index af121ae..4cf783e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/ColorEditor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/ColorEditor.java @@ -4,6 +4,7 @@ */ package net.sourceforge.phpeclipse.preferences; +import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; @@ -21,8 +22,6 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; -import org.eclipse.jface.resource.JFaceResources; - /** * A "button" of a certain color determined by the color picker. */ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPPreferencesMessages.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPPreferencesMessages.java index 6088388..97f3c42 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPPreferencesMessages.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPPreferencesMessages.java @@ -4,11 +4,11 @@ import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; -import org.eclipse.jface.preference.IPreferenceStore; - import net.sourceforge.phpeclipse.IPreferenceConstants; import net.sourceforge.phpeclipse.PHPeclipsePlugin; +import org.eclipse.jface.preference.IPreferenceStore; + public class PHPPreferencesMessages { static IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPProjectLibraryPage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPProjectLibraryPage.java index 618e810..32749ce 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPProjectLibraryPage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPProjectLibraryPage.java @@ -5,6 +5,9 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; +import net.sourceforge.phpeclipse.resourcesview.PHPProject; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.runtime.CoreException; @@ -25,8 +28,6 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbench; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpeclipse.resourcesview.PHPProject; public class PHPProjectLibraryPage { protected PHPProject workingProject; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/MainActionGroup.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/MainActionGroup.java index 3ad7a7b..ebde2bf 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/MainActionGroup.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/MainActionGroup.java @@ -18,12 +18,12 @@ import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.actions.RefreshAction; import org.eclipse.ui.dialogs.PropertyDialogAction; +import org.eclipse.ui.internal.dialogs.ResourceSorter; import org.eclipse.ui.views.framelist.FrameList; import org.eclipse.ui.views.navigator.IResourceNavigator; import org.eclipse.ui.views.navigator.OpenActionGroup; import org.eclipse.ui.views.navigator.RefactorActionGroup; import org.eclipse.ui.views.navigator.ResourcePatternFilter; -import org.eclipse.ui.views.navigator.ResourceSorter; public class MainActionGroup extends ActionGroup { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPProject.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPProject.java index 859733a..7cff514 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPProject.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPProject.java @@ -8,18 +8,16 @@ import java.util.List; import javax.xml.parsers.SAXParserFactory; +import net.sourceforge.phpeclipse.LoadPathEntry; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectNature; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import net.sourceforge.phpeclipse.LoadPathEntry; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPResourcesView.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPResourcesView.java index 1e95b5a..d167dee 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPResourcesView.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/PHPResourcesView.java @@ -1,6 +1,7 @@ package net.sourceforge.phpeclipse.resourcesview; import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/ResourceAdapterFactory.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/ResourceAdapterFactory.java index 1cc64d2..0e403f7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/ResourceAdapterFactory.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/resourcesview/ResourceAdapterFactory.java @@ -1,14 +1,11 @@ package net.sourceforge.phpeclipse.resourcesview; +import net.sourceforge.phpeclipse.PHPCore; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdapterFactory; -import net.sourceforge.phpeclipse.PHPCore; -import net.sourceforge.phpeclipse.resourcesview.PHPElement; -import net.sourceforge.phpeclipse.resourcesview.PHPFile; -import net.sourceforge.phpeclipse.resourcesview.PHPProject; - public class ResourceAdapterFactory implements IAdapterFactory { protected static Class[] ADAPTERS_I_CREATE = new Class[] { PHPElement.class, PHPFile.class, PHPProject.class }; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java index cfceb5e..72416af 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/PHPConsole.java @@ -17,6 +17,7 @@ import java.io.InputStream; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.actions.PHPActionMessages; + import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.action.Action; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/NewProjectCreationWizard.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/NewProjectCreationWizard.java index d5ee680..4378e2f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/NewProjectCreationWizard.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/NewProjectCreationWizard.java @@ -2,8 +2,9 @@ package net.sourceforge.phpeclipse.wizards; import java.lang.reflect.InvocationTargetException; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.PHPCore; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IWorkspace; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java index a0e659d..c3311bd 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java @@ -12,19 +12,31 @@ Contributors: Klaus Hartlage - www.eclipseproject.de **********************************************************************/ +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.INewWizard; import org.eclipse.ui.IWorkbench; -import org.eclipse.core.runtime.*; -import org.eclipse.jface.operation.*; -import java.lang.reflect.InvocationTargetException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.CoreException; -import java.io.*; -import org.eclipse.ui.*; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; /** * This wizard creates one file with the extension -- 1.7.1