Author: akazakov
Date: 2009-05-22 15:09:05 -0400 (Fri, 22 May 2009)
New Revision: 15457
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -31,11 +31,6 @@
Var[] getVars();
/**
- * @return
- */
- ElVarSearcher getVarSearcher();
-
- /**
* Returns EL Resolvers which are declared for this resource
* @return
*/
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -26,7 +26,6 @@
protected IFile resource;
protected ELResolver[] elResolvers;
- protected ElVarSearcher varSearcher;
protected Map<Region, Set<Var>> vars = new HashMap<Region,
Set<Var>>();
protected Set<Var> allVars = new HashSet<Var>();
@@ -56,21 +55,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.common.el.core.resolver.ELContext#getVarSearcher()
- */
- public ElVarSearcher getVarSearcher() {
- return varSearcher;
- }
-
- /**
- * @param varSearcher the varSearcher to set
- */
- public void setVarSearcher(ElVarSearcher varSearcher) {
- this.varSearcher = varSearcher;
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.common.el.core.resolver.ELContext#getVars()
*/
public Var[] getVars() {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
import org.eclipse.core.filebuffers.FileBuffers;
@@ -34,7 +44,12 @@
private IDocument fDocument;
private int fDocumentPosition;
private ELContext fContext;
-
+
+ /*
+ * (non-Javadoc)
+ * @see
org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer,
int)
+ */
+ @Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
int offset) {
this.fDocument = (viewer == null ? null : viewer.getDocument());
@@ -49,6 +64,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ * @see
org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer,
int)
+ */
+ @Override
public IContextInformation[] computeContextInformation(ITextViewer viewer,
int offset) {
this.fDocument = (viewer == null ? null : viewer.getDocument());
@@ -58,18 +78,38 @@
return super.computeContextInformation(viewer, offset);
}
+ /*
+ * (non-Javadoc)
+ * @see
org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ @Override
public char[] getCompletionProposalAutoActivationCharacters() {
return PROPOSAL_AUTO_ACTIVATION_CHARS;
}
+ /*
+ * (non-Javadoc)
+ * @see
org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#getContextInformationAutoActivationCharacters()
+ */
+ @Override
public char[] getContextInformationAutoActivationCharacters() {
return super.getContextInformationAutoActivationCharacters();
}
+ /*
+ * (non-Javadoc)
+ * @see
org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#getContextInformationValidator()
+ */
+ @Override
public IContextInformationValidator getContextInformationValidator() {
return super.getContextInformationValidator();
}
+ /*
+ * (non-Javadoc)
+ * @see
org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#getErrorMessage()
+ */
+ @Override
public String getErrorMessage() {
return super.getErrorMessage();
}
@@ -230,4 +270,4 @@
ELResolverFactoryManager elrfm = ELResolverFactoryManager.getInstance();
return elrfm.getResolvers(resource);
}
-}
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
import java.util.Map;
@@ -21,6 +31,10 @@
public class FaceletPageContectAssistProcessor extends JspContentAssistProcessor {
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.jsp.contentassist.JspContentAssistProcessor#createContext()
+ */
@Override
protected IPageContext createContext() {
IPageContext superContext = super.createContext();
@@ -28,7 +42,6 @@
FaceletPageContextImpl context = new FaceletPageContextImpl();
context.setResource(superContext.getResource());
- context.setVarSearcher(superContext.getVarSearcher());
context.setElResolvers(superContext.getElResolvers());
setVars(context);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -1,7 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
import java.util.List;
-import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.IRegion;
@@ -13,9 +22,6 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.jboss.tools.common.el.core.resolver.ELContext;
-import org.jboss.tools.common.el.core.resolver.ELResolver;
-import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
-import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IResourceBundle;
import org.jboss.tools.jst.web.kb.internal.JspContextImpl;
@@ -25,6 +31,10 @@
public class JspContentAssistProcessor extends XmlContentAssistProcessor {
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.jsp.contentassist.XmlContentAssistProcessor#createContext()
+ */
@Override
protected IPageContext createContext() {
ELContext superContext = super.createContext();
@@ -33,7 +43,6 @@
JspContextImpl context = new JspContextImpl();
context.setResource(superContext.getResource());
- context.setVarSearcher(superContext.getVarSearcher());
context.setElResolvers(superContext.getElResolvers());
setVars(context);
context.setResourceBundles(getResourceBundles());
@@ -101,4 +110,4 @@
// TODO
return null;
}
-}
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
import org.eclipse.core.resources.IFile;
@@ -4,27 +14,27 @@
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELContextImpl;
import org.jboss.tools.common.el.core.resolver.ELResolver;
-import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
public class XmlContentAssistProcessor extends AbstractXMLContentAssistProcessor {
+ /*
+ * (non-Javadoc)
+ * @see
org.jboss.tools.jst.jsp.contentassist.AbstractXMLContentAssistProcessor#createContext()
+ */
@Override
protected ELContext createContext() {
IFile file = getResource();
- ElVarSearcher varSearcher = null; // TODO
ELResolver[] elResolvers = getELResolvers(file);
ELContextImpl context = new ELContextImpl();
context.setResource(getResource());
- context.setVarSearcher(varSearcher);
context.setElResolvers(elResolvers);
setVars(context);
-
+
return context;
}
-
+
protected void setVars(ELContext context) {
// TODO
}
-
-}
+}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2009-05-22
18:56:43 UTC (rev 15456)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2009-05-22
19:09:05 UTC (rev 15457)
@@ -141,7 +141,7 @@
}
ELOperandResolveStatus status = null;
try {
- status = resolveELOperand(context.getResource(), operand, returnEqualedVariablesOnly,
vars, context.getVarSearcher());
+ status = resolveELOperand(context.getResource(), operand, returnEqualedVariablesOnly,
vars, new ElVarSearcher(context.getResource(), this));
} catch (StringIndexOutOfBoundsException e) {
SeamCorePlugin.getPluginLog().logError(e);
} catch (BadLocationException e) {