From dbd99bab84f3ae3ef9cc54692113536ca0796e59 Mon Sep 17 00:00:00 2001 From: jsurfer Date: Sat, 11 Sep 2004 12:57:14 +0000 Subject: [PATCH] Syntax highlighting is changeable. Eclipse 3.0 template mechanism Code indentation after { --- .../templates/default-templates.xml | 498 ++++++------ net.sourceforge.phpeclipse/plugin.properties | 5 + net.sourceforge.phpeclipse/plugin.xml | 40 +- .../phpdt/core/formatter/CodeFormatter.java | 70 ++ .../phpdt/internal/compiler/ASTVisitor.java | 618 +++++++++++++++ .../internal/compiler/SourceElementParser.java | 34 +- .../flow/ExceptionHandlingFlowContext.java | 8 +- .../internal/compiler/flow/FinallyFlowContext.java | 4 +- .../phpdt/internal/compiler/flow/FlowContext.java | 16 +- .../compiler/flow/InitializationFlowContext.java | 10 +- .../compiler/flow/InsideSubRoutineFlowContext.java | 6 +- .../internal/compiler/flow/LabelFlowContext.java | 4 +- .../internal/compiler/flow/LoopingFlowContext.java | 4 +- .../internal/compiler/flow/SwitchFlowContext.java | 4 +- .../compiler/flow/UnconditionalFlowInfo.java | 4 +- .../phpdt/internal/compiler/lookup/BlockScope.java | 4 +- .../internal/compiler/lookup/MethodScope.java | 4 +- .../phpdt/internal/compiler/parser/Parser.java | 14 +- .../internal/compiler/parser/RecoveredElement.java | 4 +- .../phpdt/internal/compiler/parser/UnitParser.java | 10 +- .../internal/compiler/problem/ProblemReporter.java | 80 +- .../internal/corext/template/ContextType.java | 166 ---- .../corext/template/ContextTypeRegistry.java | 73 -- .../corext/template/DocumentTemplateContext.java | 88 --- .../internal/corext/template/ITemplateEditor.java | 23 - .../corext/template/SimpleTemplateVariable.java | 54 -- .../phpdt/internal/corext/template/Template.java | 162 ---- .../internal/corext/template/TemplateBuffer.java | 63 -- .../internal/corext/template/TemplateContext.java | 41 - .../internal/corext/template/TemplateMessages.java | 14 +- .../internal/corext/template/TemplatePosition.java | 96 --- .../internal/corext/template/TemplateSet.java | 327 -------- .../corext/template/TemplateTranslator.java | 214 ------ .../internal/corext/template/TemplateVariable.java | 64 -- .../phpdt/internal/corext/template/Templates.java | 95 --- .../internal/corext/template/default-templates.xml | 573 -------------- .../corext/template/php/CodeTemplateContext.java | 109 +++ .../template/php/CodeTemplateContextType.java | 310 ++++++++ .../corext/template/php/CodeTemplates.java | 107 +++ .../template/php/CompilationUnitCompletion.java | 111 +-- .../template/php/CompilationUnitContext.java | 102 +++ .../template/php/CompilationUnitContextType.java | 173 +++-- .../corext/template/php/GlobalVariables.java | 90 --- .../corext/template/php/HTMLContextType.java | 29 +- .../corext/template/php/HTMLUnitContext.java | 190 ++--- .../internal/corext/template/php/JavaContext.java | 415 +++++++---- .../corext/template/php/JavaContextType.java | 241 ++++++ .../corext/template/php/JavaDocContext.java | 173 +++++ .../corext/template/php/JavaDocContextType.java | 60 ++ .../corext/template/php/JavaTemplateMessages.java | 49 ++ .../template/php/JavaTemplateMessages.properties | 139 ++++ .../corext/template/php/PHPContextType.java | 110 --- .../corext/template/php/PHPDocContext.java | 166 ---- .../corext/template/php/PHPDocContextType.java | 45 -- .../corext/template/php/PHPTemplateMessages.java | 43 - .../template/php/PHPTemplateMessages.properties | 55 -- .../corext/template/php/PHPUnitContext.java | 177 ----- .../internal/corext/template/php/TemplateSet.java | 401 ++++++++++ .../internal/corext/template/php/Templates.java | 104 +++ .../phpdt/internal/formatter/AbortFormatting.java | 30 + .../internal/formatter/OptimizedReplaceEdit.java | 28 + .../formatter/align/AlignmentException.java | 54 ++ .../ui/preferences/EditTemplateDialog.java | 481 ++++++------ .../ui/preferences/JavaEditorPreferencePage.java | 78 +-- .../ui/preferences/JavaSourcePreviewerUpdater.java | 80 ++ .../ui/preferences/JavaTemplatePreferencePage.java | 148 ++++ .../ui/preferences/PreferencesMessages.properties | 46 +- .../TemplateEditorSourceViewerConfiguration.java | 150 ++++ .../ui/preferences/TemplatePreferencePage.java | 655 ---------------- .../internal/ui/text/JavaHeuristicScanner.java | 801 ++++++++++++++++++++ .../phpdt/internal/ui/text/Symbols.java | 50 ++ .../ui/text/phpdoc/PHPDocCompletionProcessor.java | 329 +++++---- .../internal/ui/text/template/BuiltInEngine.java | 19 +- .../internal/ui/text/template/BuiltInProposal.java | 9 +- .../ui/text/template/DeclarationEngine.java | 18 +- .../ui/text/template/DeclarationProposal.java | 8 +- .../ui/text/template/IdentifierEngine.java | 19 +- .../ui/text/template/IdentifierProposal.java | 9 +- .../internal/ui/text/template/SQLProposal.java | 2 +- .../ui/text/template/TemplateContentProvider.java | 38 - .../internal/ui/text/template/TemplateEngine.java | 103 --- .../ui/text/template/TemplateLabelProvider.java | 66 -- .../ui/text/template/TemplateProposal.java | 176 ----- .../text/template/TemplateVariableProcessor.java | 129 ---- .../ui/text/template/TemplateVariableProposal.java | 101 --- .../contentassist/InclusivePositionUpdater.java | 103 +++ .../text/template/contentassist/MultiVariable.java | 93 +++ .../template/contentassist/MultiVariableGuess.java | 256 +++++++ .../PositionBasedCompletionProposal.java | 198 +++++ .../TemplateContentAssistMessages.java | 49 ++ .../TemplateContentAssistMessages.properties | 16 + .../template/contentassist/TemplateEngine.java | 149 ++++ .../TemplateInformationControlCreator.java | 57 ++ .../template/contentassist/TemplateProposal.java | 435 +++++++++++ .../template/contentassist/VariablePosition.java | 72 ++ .../preferences/TemplatePreferencesMessages.java | 49 ++ .../TemplatePreferencesMessages.properties | 12 + .../preferences/TemplateVariableProcessor.java | 147 ++++ .../preferences/TemplateVariableProposal.java | 105 +++ .../phpdt/internal/ui/util/SWTUtil.java | 20 +- .../ui/wizards/dialogfields/ListDialogField.java | 2 +- .../dialogfields/SelectionButtonDialogField.java | 2 +- .../dialogfields/StringButtonDialogField.java | 2 +- .../wizards/dialogfields/TreeListDialogField.java | 2 +- .../sourceforge/phpdt/ui/text/JavaTextTools.java | 32 +- .../ui/text/PHPSourceViewerConfiguration.java | 606 +++++++++------- .../phpdt/ui/wizards/NewTypeWizardPage.java | 19 +- .../phpeclipse/IPreferenceConstants.java | 8 +- .../phpeclipse/PHPSyntaxEditorPreferencePage.java | 10 +- .../sourceforge/phpeclipse/PHPeclipsePlugin.java | 155 ++++- .../phpeclipse/internal/compiler/ast/ASTNode.java | 266 +++++++ .../compiler/ast/AbstractMethodDeclaration.java | 2 +- .../phpeclipse/internal/compiler/ast/AstNode.java | 266 ------- .../internal/compiler/ast/BranchStatement.java | 4 +- .../phpeclipse/internal/compiler/ast/Break.java | 10 +- .../compiler/ast/CompilationUnitDeclaration.java | 4 +- .../compiler/ast/ConstructorDeclaration.java | 2 +- .../phpeclipse/internal/compiler/ast/Continue.java | 10 +- .../compiler/ast/ExplicitConstructorCall.java | 4 +- .../internal/compiler/ast/ImportReference.java | 2 +- .../internal/compiler/ast/LabeledStatement.java | 2 +- .../internal/compiler/ast/ReturnStatement.java | 14 +- .../internal/compiler/ast/Statement.java | 2 +- .../phpeditor/EditorHighlightingSynchronizer.java | 65 ++ .../phpeclipse/phpeditor/PHPEditor.java | 94 ++-- .../phpeclipse/phpeditor/PHPUnitEditor.java | 254 +++--- .../phpeditor/php/HTMLCompletionProcessor.java | 22 +- .../phpeclipse/phpeditor/php/PHPCodeScanner.java | 70 -- .../phpeditor/php/PHPCompletionProcessor.java | 62 +- .../templates/default-codetemplates.xml | 72 ++ .../templates/default-templates.properties | 142 ++++ .../templates/default-templates.xml | 117 +++ 132 files changed, 8486 insertions(+), 6119 deletions(-) create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/formatter/CodeFormatter.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ASTVisitor.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextType.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ContextTypeRegistry.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/DocumentTemplateContext.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/ITemplateEditor.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/SimpleTemplateVariable.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/Template.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateBuffer.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateContext.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplatePosition.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateSet.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateTranslator.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/TemplateVariable.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/Templates.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/default-templates.xml create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CodeTemplateContext.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CodeTemplateContextType.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CodeTemplates.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/CompilationUnitContext.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/GlobalVariables.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/JavaContextType.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/JavaDocContext.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/JavaDocContextType.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/JavaTemplateMessages.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/JavaTemplateMessages.properties delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPContextType.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPDocContext.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPDocContextType.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPTemplateMessages.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPTemplateMessages.properties delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/PHPUnitContext.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/TemplateSet.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/php/Templates.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/AbortFormatting.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/OptimizedReplaceEdit.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/align/AlignmentException.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaSourcePreviewerUpdater.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaTemplatePreferencePage.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/TemplateEditorSourceViewerConfiguration.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/TemplatePreferencePage.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/JavaHeuristicScanner.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/Symbols.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateContentProvider.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateEngine.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateLabelProvider.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateProposal.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProcessor.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/TemplateVariableProposal.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/InclusivePositionUpdater.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/MultiVariable.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/MultiVariableGuess.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/PositionBasedCompletionProposal.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateContentAssistMessages.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateContentAssistMessages.properties create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateEngine.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateInformationControlCreator.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/TemplateProposal.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/contentassist/VariablePosition.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/preferences/TemplatePreferencesMessages.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/preferences/TemplatePreferencesMessages.properties create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/preferences/TemplateVariableProcessor.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/preferences/TemplateVariableProposal.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/internal/compiler/ast/ASTNode.java delete mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/internal/compiler/ast/AstNode.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/EditorHighlightingSynchronizer.java create mode 100644 net.sourceforge.phpeclipse/templates/default-codetemplates.xml create mode 100644 net.sourceforge.phpeclipse/templates/default-templates.properties create mode 100644 net.sourceforge.phpeclipse/templates/default-templates.xml diff --git a/net.sourceforge.phpeclipse.ui/templates/default-templates.xml b/net.sourceforge.phpeclipse.ui/templates/default-templates.xml index 43746d5..924ed00 100644 --- a/net.sourceforge.phpeclipse.ui/templates/default-templates.xml +++ b/net.sourceforge.phpeclipse.ui/templates/default-templates.xml @@ -1,14 +1,14 @@ -