*/
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 org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.templates.GlobalTemplateVariables;
import org.eclipse.jface.text.templates.TemplateException;
/*
* @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 {
+ protected void validateVariables(TemplateVariable[] variables)
+ throws TemplateException {
// check for multiple cursor variables
- for (int i= 0; i < variables.length; i++) {
- TemplateVariable var= variables[i];
+ 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$
}
}
}