Author: vyemialyanchyk
Date: 2009-04-10 11:00:23 -0400 (Fri, 10 Apr 2009)
New Revision: 14689
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java
Log:
JBIDE-4139 - code cleanup - add instanceof check to avoid potential type casting error
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java 2009-04-10
14:57:27 UTC (rev 14688)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java 2009-04-10
15:00:23 UTC (rev 14689)
@@ -66,13 +66,17 @@
public List computeCompletionProposals(ContentAssistInvocationContext context,
IProgressMonitor monitor) {
List proposals = new ArrayList();
errorMessage = null;
+
+ if (!(context instanceof JavaContentAssistInvocationContext)) {
+ return proposals;
+ }
JavaContentAssistInvocationContext ctx = (JavaContentAssistInvocationContext)context;
try {
ConsoleConfiguration consoleConfiguration = getConfiguration( ctx.getProject() );
if(consoleConfiguration!=null) {
- Configuration configuration =
consoleConfiguration!=null?consoleConfiguration.getConfiguration():null;
+ Configuration configuration = consoleConfiguration.getConfiguration();
IHQLCodeAssist hqlEval = new HQLCodeAssist(configuration);
Show replies by date