From 362a98e44d9ac370c543a41e2d7bf7370fbdfaa5 Mon Sep 17 00:00:00 2001 From: khartlage Date: Wed, 19 Mar 2003 20:40:41 +0000 Subject: [PATCH 1/1] Started with PHP/HTML Formatter menu => doesn't work right now --- net.sourceforge.phpeclipse/plugin.properties | 4 + net.sourceforge.phpeclipse/plugin.xml | 20 + .../ui/preferences/EditTemplateDialog.java | 2 +- .../ui/preferences/TemplatePreferencePage.java | 2 +- .../phpdt/ui/actions/PHPdtActionConstants.java | 52 +- .../sourceforge/phpeclipse/PHPeclipsePlugin.java | 4 + .../phpeclipse/phpeditor/PHPActionContributor.java | 3 +- .../phpeclipse/phpeditor/PHPEditor.java | 914 ++++++++++---------- .../phpeditor/PHPEditorActionDefinitionIds.java | 5 + .../phpeditor/PHPSourceViewerConfiguration.java | 43 +- .../phpeclipse/phpeditor/html/HTMLFormatter.java | 110 +++ .../phpeditor/html/HTMLFormattingStrategy.java | 127 +++ .../phpeclipse/phpeditor/html/IHTMLConstants.java | 163 ++++ 13 files changed, 962 insertions(+), 487 deletions(-) create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/html/HTMLFormatter.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/html/HTMLFormattingStrategy.java create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/html/IHTMLConstants.java diff --git a/net.sourceforge.phpeclipse/plugin.properties b/net.sourceforge.phpeclipse/plugin.properties index 50f37d3..4cddf37 100644 --- a/net.sourceforge.phpeclipse/plugin.properties +++ b/net.sourceforge.phpeclipse/plugin.properties @@ -54,6 +54,7 @@ CommentAction.label= Co&mment@Ctrl+/ UncommentAction.label= &Uncomment@Ctrl+\\ +FormatAction.label= F&ormat@Ctrl+Shift+F ########################################################################## # Action Definitions ########################################################################## @@ -67,3 +68,6 @@ ActionDefinition.comment.description= Turn the selected lines into PHP comments ActionDefinition.uncomment.name= Uncomment ActionDefinition.uncomment.description= Uncomment the selected PHP comment lines + +ActionDefinition.format.name= Format +ActionDefinition.format.description= Format the source code \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/plugin.xml b/net.sourceforge.phpeclipse/plugin.xml index 5d25fbb..ddafca2 100644 --- a/net.sourceforge.phpeclipse/plugin.xml +++ b/net.sourceforge.phpeclipse/plugin.xml @@ -243,6 +243,13 @@ Temporarily replaced until errors can be ironed out... name="editGroup"> + + + +