X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java index 0ccf4c7..98f40cb 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java @@ -11,7 +11,6 @@ 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; @@ -39,14 +38,12 @@ import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblemFactory; 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; @@ -54,8 +51,6 @@ import net.sourceforge.phpeclipse.builder.IdentifierIndexManager; 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; @@ -71,7 +66,6 @@ import org.eclipse.jface.text.contentassist.IContextInformation; 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; @@ -345,14 +339,15 @@ public class PHPCompletionProcessor implements IContentAssistProcessor { 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 -- @@ -890,7 +885,7 @@ public class PHPCompletionProcessor implements IContentAssistProcessor { 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) {