Author: vyemialyanchyk
Date: 2010-04-08 15:32:41 -0400 (Thu, 08 Apr 2010)
New Revision: 21383
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6070 - create/invoke by string name - for all
classes 2
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor.java 2010-04-08
19:26:50 UTC (rev 21382)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor.java 2010-04-08
19:32:41 UTC (rev 21383)
@@ -38,6 +38,7 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.QueryEditor;
+import org.hibernate.mediator.execution.ExecutionContext;
import org.hibernate.mediator.stubs.HQLCodeAssistStub;
/**
@@ -110,12 +111,18 @@
return result;
}
HQLCodeAssistStub hqlEval = null;
+ EclipseHQLCompletionRequestor eclipseHQLCompletionCollector = null;
if (consoleConfig != null) {
hqlEval = consoleConfig.getHQLCodeAssist();
+ eclipseHQLCompletionCollector =
(EclipseHQLCompletionRequestor)consoleConfig.execute(new ExecutionContext.Command() {
+ public Object execute() {
+ return new EclipseHQLCompletionRequestor();
+ }
+ });
} else {
hqlEval = HQLCodeAssistStub.createHQLCodeAssist();
+ eclipseHQLCompletionCollector = new EclipseHQLCompletionRequestor();
}
- EclipseHQLCompletionRequestor eclipseHQLCompletionCollector = new
EclipseHQLCompletionRequestor();
hqlEval.codeComplete(doc.get(), currentOffset, eclipseHQLCompletionCollector);
proposalList.addAll(eclipseHQLCompletionCollector.getCompletionProposals());
errorMessage = eclipseHQLCompletionCollector.getLastErrorMessage();