Author: akazakov
Date: 2009-11-24 10:54:45 -0500 (Tue, 24 Nov 2009)
New Revision: 18803
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EmptyProposalType.java
Removed:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ExtendedProposalType.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CSSClassProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalTypeFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EnumerationProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletsJsfCProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacetNameProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/IDProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ModelProposalType.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/NameSpace.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ResourcePathProposalType.java
Log:
JBIDE-5119
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -43,13 +43,6 @@
IDocument getDocument();
/**
- * Returns "var" attributes which are available in particular offset.
- * @param offset
- * @return
- */
-// Var[] getVars(int offset);
-
- /**
* Returns map of name spaces which are set in particular offset.
* Key is URI of name space.
* @return
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
/**
@@ -22,6 +21,5 @@
/**
* @return proposals
*/
- public TextProposal[] getProposals(KbQuery query, ELContext context);
-
+ public TextProposal[] getProposals(KbQuery query, IPageContext context);
}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -29,7 +29,7 @@
/**
* @author Alexey Kazakov
*/
-public class PageProcessor implements IProposalProcessor {
+public class PageProcessor {
private static final PageProcessor INSTANCE = new PageProcessor();
private ICustomTagLibrary[] customTagLibs;
@@ -47,9 +47,11 @@
componentExtensions = CustomTagLibManager.getInstance().getComponentExtensions();
}
- /*
- * (non-Javadoc)
- * @see
org.jboss.tools.jst.web.kb.ProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.PageContext)
+ /**
+ *
+ * @param query
+ * @param context
+ * @return
*/
public TextProposal[] getProposals(KbQuery query, ELContext context) {
ArrayList<TextProposal> proposals = new ArrayList<TextProposal>();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -13,12 +13,12 @@
import java.util.List;
import java.util.Properties;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.ext.IValueInfo;
import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
@@ -111,10 +111,11 @@
return (IComponent)parent;
}
- /* (non-Javadoc)
- * @see
org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.ELContext)
+ /*
+ * (non-Javadoc)
+ * @see
org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.IPageContext)
*/
- public TextProposal[] getProposals(KbQuery query, ELContext context) {
+ public TextProposal[] getProposals(KbQuery query, IPageContext context) {
return EMPTY_PROPOSAL_LIST;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -18,7 +18,6 @@
import java.util.Properties;
import java.util.Set;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.model.project.ext.IValueInfo;
import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
@@ -331,11 +330,8 @@
/* (non-Javadoc)
* @see
org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.IPageContext)
*/
- public TextProposal[] getProposals(KbQuery query, ELContext context) {
- if (!(context instanceof IPageContext))
- return EMPTY_PROPOSAL_LIST;
-
- IAttribute[] attributes = getAttributes(query, (IPageContext)context);
+ public TextProposal[] getProposals(KbQuery query, IPageContext context) {
+ IAttribute[] attributes = getAttributes(query, context);
if(attributes == null || attributes.length == 0) {
return EMPTY_PROPOSAL_LIST;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -22,7 +22,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.ext.IValueInfo;
import org.jboss.tools.common.model.project.ext.event.Change;
@@ -390,13 +389,10 @@
/* (non-Javadoc)
* @see
org.jboss.tools.jst.web.kb.ProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.PageContext)
*/
- public TextProposal[] getProposals(KbQuery query, ELContext context) {
- if (!(context instanceof IPageContext))
- return EMPTY_PROPOSAL_LIST;
-
- List<String> prefixes = getPrefixes(query, (IPageContext)context);
+ public TextProposal[] getProposals(KbQuery query, IPageContext context) {
+ List<String> prefixes = getPrefixes(query, context);
List<TextProposal> proposals = new ArrayList<TextProposal>();
- IComponent[] components = getComponentsByPrefixes(query, prefixes,
(IPageContext)context);
+ IComponent[] components = getComponentsByPrefixes(query, prefixes, context);
if(query.getType() == KbQuery.Type.TAG_NAME || query.getType() == KbQuery.Type.TEXT) {
for (int i = 0; i < components.length; i++) {
if(!(components[i] instanceof CustomComponentExtension)) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CSSClassProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CSSClassProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CSSClassProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -18,9 +18,9 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.jst.web.kb.ICSSContainerSupport;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.PageContextFactory.CSSStyleSheetDescriptor;
@@ -45,7 +45,7 @@
Set<String> idList = new TreeSet<String>();
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
idList.clear();
if (context instanceof ICSSContainerSupport) {
ICSSContainerSupport cssSource = (ICSSContainerSupport)context;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -10,8 +10,8 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IProposalProcessor;
import org.jboss.tools.jst.web.kb.KbQuery;
@@ -22,9 +22,9 @@
protected Param[] params;
protected String type;
- protected ELContext context;
+ protected IPageContext context;
- protected abstract void init(ELContext context);
+ protected abstract void init(IPageContext context);
/**
* @return the type
@@ -60,7 +60,7 @@
/* (non-Javadoc)
* @see
org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.IPageContext)
*/
- public TextProposal[] getProposals(KbQuery query, ELContext context) {
+ public TextProposal[] getProposals(KbQuery query, IPageContext context) {
this.context = context;
init(context);
return getProposals(query);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalTypeFactory.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalTypeFactory.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomProposalTypeFactory.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -79,7 +79,7 @@
//WebKbPlugin.getDefault().logError("Unknown proposal type: " + type);
//$NON-NLS-1$
//ExtendedProposalType will report if necessary
- ExtendedProposalType proposalType = new ExtendedProposalType();
+ EmptyProposalType proposalType = new EmptyProposalType();
return proposalType;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibAttribute.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibAttribute.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibAttribute.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -13,8 +13,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.taglib.IComponent;
@@ -65,7 +65,7 @@
* @see
org.jboss.tools.jst.web.kb.internal.taglib.AbstractAttribute#getProposals(org.jboss.tools.jst.web.kb.KbQuery,
org.jboss.tools.jst.web.kb.IPageContext)
*/
@Override
- public TextProposal[] getProposals(KbQuery query, ELContext context) {
+ public TextProposal[] getProposals(KbQuery query, IPageContext context) {
CustomProposalType[] types = getProposals();
if(types.length==0) {
return EMPTY_PROPOSAL_LIST;
Copied:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EmptyProposalType.java
(from rev 18801,
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ExtendedProposalType.java)
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EmptyProposalType.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EmptyProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.web.kb.internal.taglib;
+
+import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.web.kb.IPageContext;
+import org.jboss.tools.jst.web.kb.KbQuery;
+
+public class EmptyProposalType extends CustomProposalType {
+
+ public EmptyProposalType() {}
+
+ /*
+ * (non-Javadoc)
+ * @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#getProposals(org.jboss.tools.jst.web.kb.KbQuery)
+ */
+ @Override
+ public TextProposal[] getProposals(KbQuery query) {
+ return EMPTY_PROPOSAL_LIST;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#init(org.jboss.tools.jst.web.kb.IPageContext)
+ */
+ @Override
+ protected void init(IPageContext context) {
+ }
+}
\ No newline at end of file
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EmptyProposalType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EnumerationProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EnumerationProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/EnumerationProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -15,8 +15,8 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
@@ -59,6 +59,6 @@
* @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#init(org.jboss.tools.jst.web.kb.IPageContext)
*/
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
}
}
\ No newline at end of file
Deleted:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ExtendedProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ExtendedProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ExtendedProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -1,20 +0,0 @@
-package org.jboss.tools.jst.web.kb.internal.taglib;
-
-import org.jboss.tools.common.el.core.resolver.ELContext;
-import org.jboss.tools.common.text.TextProposal;
-import org.jboss.tools.jst.web.kb.KbQuery;
-
-public class ExtendedProposalType extends CustomProposalType {
-
- public ExtendedProposalType() {}
-
- @Override
- public TextProposal[] getProposals(KbQuery query) {
- return new TextProposal[0];
- }
-
- @Override
- protected void init(ELContext context) {
- }
-
-}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -17,12 +17,21 @@
*/
public class FaceletTag extends AbstractComponent {
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.KbObject#getXMLClass()
+ */
+ @Override
public String getXMLClass() {
return KbXMLStoreConstants.CLS_FACELET_LIBRARY;
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.taglib.AbstractComponent#clone()
+ */
+ @Override
public FaceletTag clone() throws CloneNotSupportedException {
return (FaceletTag)super.clone();
}
-
-}
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletsJsfCProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletsJsfCProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletsJsfCProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -18,7 +18,6 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
@@ -41,9 +40,6 @@
*/
@Override
public TextProposal[] getProposals(KbQuery query) {
- if (!(context instanceof IPageContext))
- return EMPTY_PROPOSAL_LIST;
-
// trim first spaces
String value = query.getValue();
while(true) {
@@ -61,7 +57,7 @@
IComponent[] components = null;
List<TextProposal> proposals = null;
- components = PageProcessor.getInstance().getComponents(kbQuery,
(IPageContext)context);
+ components = PageProcessor.getInstance().getComponents(kbQuery, context);
if(components.length==0) {
return EMPTY_PROPOSAL_LIST;
}
@@ -126,6 +122,6 @@
* @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#init(org.jboss.tools.jst.web.kb.IPageContext)
*/
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
}
}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacetNameProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacetNameProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacetNameProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -15,7 +15,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
@@ -32,16 +31,13 @@
private static final String IMAGE_NAME = "EnumerationProposal.gif";
//$NON-NLS-1$
private static Image ICON;
- private ELContext context;
+ private IPageContext context;
/* (non-Javadoc)
* @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#getProposals(org.jboss.tools.jst.web.kb.KbQuery)
*/
@Override
public TextProposal[] getProposals(KbQuery query) {
- if (!(context instanceof IPageContext))
- return EMPTY_PROPOSAL_LIST;
-
String[] parentTags = query.getParentTags();
if(parentTags.length>1) {
String parentTag = parentTags[parentTags.length-2];
@@ -50,8 +46,8 @@
newQuery.setMask(false);
newQuery.setType(KbQuery.Type.TAG_NAME);
newQuery.setValue(parentTag);
- PageProcessor.getInstance().getComponents(query, (IPageContext)context);
- ITagLibrary[] libs = ((IPageContext)context).getLibraries();
+ PageProcessor.getInstance().getComponents(query, context);
+ ITagLibrary[] libs = context.getLibraries();
for (ITagLibrary l : libs) {
if(l instanceof IFaceletTagLibrary) {
//TODO
@@ -80,7 +76,7 @@
* @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#init(org.jboss.tools.jst.web.kb.IPageContext)
*/
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
this.context = context;
}
}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/IDProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/IDProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/IDProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -21,7 +21,6 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
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.text.TextProposal;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
@@ -42,12 +41,10 @@
Set<String> idList = new TreeSet<String>();
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
idList.clear();
- if (!(context instanceof IPageContext))
- return;
- IDocument document = ((IPageContext)context).getDocument();
+ IDocument document = context.getDocument();
IStructuredModel sModel =
StructuredModelManager.getModelManager().getExistingModelForRead(document);
try {
if (sModel != null) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ModelProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ModelProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ModelProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -10,10 +10,10 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
/**
@@ -28,7 +28,7 @@
* @see
org.jboss.tools.jst.web.kb.internal.taglib.CustomProposalType#init(org.jboss.tools.jst.web.kb.IPageContext)
*/
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
provider = WebPromptingProvider.getInstance();
IModelNature nature =
EclipseResourceUtil.getModelNature(context.getResource().getProject());
if(nature!=null) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/NameSpace.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/NameSpace.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/NameSpace.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -92,4 +92,4 @@
}
return false;
}
-}
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ResourcePathProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ResourcePathProposalType.java 2009-11-24
15:47:34 UTC (rev 18802)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ResourcePathProposalType.java 2009-11-24
15:54:45 UTC (rev 18803)
@@ -24,11 +24,11 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
-import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
@@ -61,7 +61,7 @@
* @see
org.jboss.tools.jst.web.kb.internal.taglib.ModelProposalType#init(org.jboss.tools.jst.web.kb.IPageContext)
*/
@Override
- protected void init(ELContext context) {
+ protected void init(IPageContext context) {
super.init(context);
if(xModel != null) {
XModelObject webInf = FileSystemsHelper.getWebInf(xModel);