1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / corext / template / php / HTMLContextType.java
index a5ee3d4..b187c3d 100644 (file)
@@ -4,10 +4,9 @@
  */
 package net.sourceforge.phpdt.internal.corext.template.php;
 
-//import net.sourceforge.phpdt.core.ICompilationUnit;
+// import net.sourceforge.phpdt.core.ICompilationUnit;
 
 import net.sourceforge.phpdt.core.ICompilationUnit;
-import net.sourceforge.phpdt.internal.corext.template.php.CompilationUnitContextType.File;
 
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.templates.GlobalTemplateVariables;
@@ -16,7 +15,7 @@ import org.eclipse.jface.text.templates.TemplateVariable;
 
 /**
  * A context type for javadoc.
- */ 
+ */
 public class HTMLContextType extends CompilationUnitContextType {
 
        /**
@@ -24,7 +23,7 @@ public class HTMLContextType extends CompilationUnitContextType {
         */
        public HTMLContextType() {
                super("html"); //$NON-NLS-1$
-               
+
                // global
                addResolver(new GlobalTemplateVariables.Cursor());
                addResolver(new GlobalTemplateVariables.WordSelection());
@@ -34,32 +33,45 @@ public class HTMLContextType extends CompilationUnitContextType {
                addResolver(new GlobalTemplateVariables.Year());
                addResolver(new GlobalTemplateVariables.Time());
                addResolver(new GlobalTemplateVariables.User());
-               
+
                addResolver(new File());
        }
-       
+
        /*
         * @see ContextType#createContext()
-        */     
-       public CompilationUnitContext createContext(IDocument document, int offset, int length, ICompilationUnit compilationUnit) {
-                       return new HTMLUnitContext(this, document, offset, length, compilationUnit); 
+        */
+       public CompilationUnitContext createContext(IDocument document, int offset,
+                       int length, ICompilationUnit compilationUnit) {
+               return new HTMLUnitContext(this, document, offset, length,
+                               compilationUnit);
        }
-       /* (non-Javadoc)
-        * @see net.sourceforge.phpdt.internal.corext.template.java.CompilationUnitContextType#createContext(org.eclipse.jface.text.IDocument, int, int, net.sourceforge.phpdt.core.ICompilationUnit)
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see net.sourceforge.phpdt.internal.corext.template.java.CompilationUnitContextType#createContext(org.eclipse.jface.text.IDocument,
+        *      int, int, net.sourceforge.phpdt.core.ICompilationUnit)
         */
-//     public CompilationUnitContext createContext(IDocument document, int offset, int length, ICompilationUnit compilationUnit) {
-//             return new JavaDocContext(this, document, offset, length, compilationUnit);
-//     }
-       /* (non-Javadoc)
+       // public CompilationUnitContext createContext(IDocument document, int
+       // offset, int length, ICompilationUnit compilationUnit) {
+       // return new JavaDocContext(this, document, offset, length,
+       // compilationUnit);
+       // }
+       /*
+        * (non-Javadoc)
+        * 
         * @see net.sourceforge.phpdt.internal.corext.template.ContextType#validateVariables(net.sourceforge.phpdt.internal.corext.template.TemplateVariable[])
         */
-       protected void validateVariables(TemplateVariable[] variables) throws TemplateException {
-               // check for multiple cursor variables          
-               for (int i= 0; i < variables.length; i++) {
-                       TemplateVariable var= variables[i];
+       protected void validateVariables(TemplateVariable[] variables)
+                       throws TemplateException {
+               // check for multiple cursor variables
+               for (int i = 0; i < variables.length; i++) {
+                       TemplateVariable var = variables[i];
                        if (var.getType().equals(GlobalTemplateVariables.Cursor.NAME)) {
                                if (var.getOffsets().length > 1) {
-                                       throw new TemplateException(JavaTemplateMessages.getString("ContextType.error.multiple.cursor.variables")); //$NON-NLS-1$
+                                       throw new TemplateException(
+                                                       JavaTemplateMessages
+                                                                       .getString("ContextType.error.multiple.cursor.variables")); //$NON-NLS-1$
                                }
                        }
                }