1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / html / FormElementWizardPage.java
index 8e9bdf1..d9ab7e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: FormElementWizardPage.java,v 1.2 2005-05-06 00:57:33 stefanbjarni Exp $
+ * $Id: FormElementWizardPage.java,v 1.3 2006-10-21 23:18:43 pombredanne Exp $
  * Copyright Narushima Hironori. All rights reserved.
  */
 package net.sourceforge.phpeclipse.wizards.html;
@@ -17,7 +17,9 @@ import org.eclipse.swt.widgets.Text;
 public class FormElementWizardPage extends EditElementWizardPage {
 
        Text actionText;
+
        Button postRadio, getRadio, multipartCheck;
+
        Combo charsetCombo;
 
        public FormElementWizardPage() {
@@ -26,38 +28,38 @@ public class FormElementWizardPage extends EditElementWizardPage {
 
        protected void createChildControl(Composite parent) throws CoreException {
                postRadio = new Button(parent, SWT.RADIO);
-               
+
        }
 
        public String getPreviewText() {
                boolean controlCreated = actionText != null;
-               
+
                StringBuffer buff = new StringBuffer("<form action=\"");
-               if(controlCreated){
+               if (controlCreated) {
                        buff.append(actionText.getText());
                }
                buff.append("\" method=\"");
-               if( controlCreated && postRadio.getSelection() ){
+               if (controlCreated && postRadio.getSelection()) {
                        buff.append("POST\"");
-                       if(multipartCheck.getSelection()){
+                       if (multipartCheck.getSelection()) {
                                buff.append(" enctype=\"multipart/form-data\"");
                        }
-                       
-               }else{
+
+               } else {
                        buff.append("GET\"");
                }
-               
-               if(controlCreated){
+
+               if (controlCreated) {
                        String charset = charsetCombo.getText();
-                       if(charset != null){
+                       if (charset != null) {
                                buff.append(" accept-charset=\"" + charset + "\"");
                        }
                }
-               
+
                buff.append(">\n");
-               buff.append( getSelectionText() );
+               buff.append(getSelectionText());
                buff.append("\n</form>\n");
-               
+
                return buff.toString();
        }