package net.sourceforge.phpeclipse.phpeditor.php;
import java.io.IOException;
-import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
import net.sourceforge.phpdt.internal.corext.template.php.JavaContext;
import net.sourceforge.phpdt.internal.corext.template.php.JavaContextType;
-import net.sourceforge.phpdt.internal.ui.PHPUiImages;
import net.sourceforge.phpdt.internal.ui.text.PHPCodeReader;
import net.sourceforge.phpdt.internal.ui.text.java.IPHPCompletionProposal;
import net.sourceforge.phpdt.internal.ui.text.java.PHPCompletionProposalComparator;
import net.sourceforge.phpdt.internal.ui.text.template.BuiltInEngine;
import net.sourceforge.phpdt.internal.ui.text.template.DeclarationEngine;
import net.sourceforge.phpdt.internal.ui.text.template.LocalVariableProposal;
-import net.sourceforge.phpdt.internal.ui.text.template.SQLProposal;
import net.sourceforge.phpdt.internal.ui.text.template.contentassist.TemplateEngine;
import net.sourceforge.phpdt.ui.IWorkingCopyManager;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.internal.compiler.ast.CompilationUnitDeclaration;
import net.sourceforge.phpeclipse.phpeditor.PHPEditor;
import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr;
-import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
-import net.sourceforge.phpeclipse.ui.overlaypages.ProjectPrefUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.text.contentassist.IContextInformationExtension;
import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
import org.eclipse.jface.text.templates.TemplateContextType;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
try {
while (true) {
ch = startText.charAt(--currentSQLPosition);
- if (ch >= 'A' && ch <= 'Z') {
- if (identEnd < 0) {
- identEnd = currentSQLPosition + 1;
- }
- } else if (ch >= 'a' && ch <= 'z') {
+ if (Scanner.isSQLIdentifierPart(ch)) {
+// if (ch >= 'A' && ch <= 'Z') {
if (identEnd < 0) {
identEnd = currentSQLPosition + 1;
}
+// } else if (ch >= 'a' && ch <= 'z') {
+// if (identEnd < 0) {
+// identEnd = currentSQLPosition + 1;
+// }
} else if (identEnd >= 0) {
ident = startText.substring(currentSQLPosition + 1, identEnd);
// select -- from -- where --
if (curr == PHPCodeReader.EOF)
return false;
- return Scanner.isPHPIdentifierPart((char) curr) || Scanner.isPHPIdentifierStart((char) curr);
+ return Scanner.isPHPIdentifierPart((char) curr);
}
private int guessContextInformationPosition(ITextViewer viewer, int offset) {