import net.sourceforge.phpdt.internal.corext.template.Template;
import net.sourceforge.phpdt.internal.corext.template.TemplateBuffer;
import net.sourceforge.phpdt.internal.corext.template.TemplateTranslator;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
/** The platform default line delimiter. */
private static final String PLATFORM_LINE_DELIMITER = System.getProperty("line.separator"); //$NON-NLS-1$
- private static final String specialChars = "$&<";
+ private static final String specialChars = "&<#";
/** The compilation unit, may be <code>null</code>. */
// private final ICompilationUnit fCompilationUnit;
protected HTMLUnitContext(ContextType type, IDocument document, int completionPosition)
//,ICompilationUnit compilationUnit)
{
- super(type, document, completionPosition);
+ super(type, document, completionPosition, 0);
// fCompilationUnit= compilationUnit;
}
public int getStart() {
IDocument document = getDocument();
try {
- int start = getCompletionPosition();
+ int start = getCompletionOffset();
while (((start != 0) && Character.isUnicodeIdentifierPart(document.getChar(start - 1)))
|| ((start != 0) && specialChars.indexOf(document.getChar(start - 1)) != (-1) )) {
return start;
} catch (BadLocationException e) {
- return getCompletionPosition();
+ return getCompletionOffset();
}
}