Package org.eclipse.wst.xml.core.internal.contentmodel.modelquery

Examples of org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery


    JSPDummyContentAssistProcessor extraProcessor = (JSPDummyContentAssistProcessor) fNameToProcessorMap.get(node.getNodeName());
    if (extraProcessor != null && contentAssistRequest != null) {
      extraProcessor.addAttributeValueProposals(contentAssistRequest);
    }

    ModelQuery mq = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
    if (mq != null) {
      CMDocument doc = mq.getCorrespondingCMDocument(node);
      // this shouldn't have to have the prefix coded in
      if (doc instanceof JSPCMDocument || doc instanceof CMNodeWrapper || node.getNodeName().startsWith("jsp:")) //$NON-NLS-1$
        return;
    }
View Full Code Here


  }

  protected List getRequiredAttrs(Node node) {
    List result = new ArrayList();

    ModelQuery modelQuery = getModelQuery(node);
    if (modelQuery != null) {
      CMElementDeclaration elementDecl = modelQuery.getCMElementDeclaration((Element) node);
      if (elementDecl != null) {
        CMNamedNodeMap attrMap = elementDecl.getAttributes();
        Iterator it = attrMap.iterator();
        CMAttributeDeclaration attr = null;
        while (it.hasNext()) {
View Full Code Here

    Document document = element.getOwnerDocument();
    if (document == null)
      // undefined tag, return default
      return false;

    ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
    if (modelQuery == null)
      // undefined tag, return default
      return false;

    CMElementDeclaration decl = modelQuery.getCMElementDeclaration(element);
    if (decl == null)
      // undefined tag, return default
      return false;

    return (decl.getContentType() == CMElementDeclaration.EMPTY);
View Full Code Here

    Document document = element.getOwnerDocument();
    if (document == null)
      // undefined tag, return default
      return false;

    ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
    if (modelQuery == null)
      // undefined tag, return default
      return false;

    CMElementDeclaration decl = modelQuery.getCMElementDeclaration(element);
    if (decl == null)
      // undefined tag, return default
      return false;

    return (decl.getContentType() == CMElementDeclaration.EMPTY);
View Full Code Here

    return newNode;
  }


  protected ModelQuery getModelQuery(Node node) {
    ModelQuery result = null;
    if (node.getNodeType() == Node.DOCUMENT_NODE) {
      result = ModelQueryUtil.getModelQuery((Document) node);
    }
    else {
      result = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
View Full Code Here

  }

  protected List getRequiredAttrs(Node node) {
    List result = new ArrayList();

    ModelQuery modelQuery = getModelQuery(node);
    if (modelQuery != null) {
      CMElementDeclaration elementDecl = modelQuery.getCMElementDeclaration((Element) node);
      if (elementDecl != null) {
        CMNamedNodeMap attrMap = elementDecl.getAttributes();
        Iterator it = attrMap.iterator();
        CMAttributeDeclaration attr = null;
        while (it.hasNext()) {
View Full Code Here

   */
  protected CMElementDeclaration getDeclaration() {
    Document document = getOwnerDocument();
    if (document == null)
      return null;
    ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
    if (modelQuery == null)
      return null;
    return modelQuery.getCMElementDeclaration(this);
  }
View Full Code Here

      CompletionProposalInvocationContext context) {

    if(!this.isXHTML) {
      IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
 
      ModelQuery mq = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
      if (mq != null) {
        CMDocument doc = mq.getCorrespondingCMDocument(node);
        // this shouldn't have to have the prefix coded in
        if (doc instanceof JSPCMDocument || doc instanceof CMNodeWrapper ||
            node.getNodeName().startsWith("jsp:")) { //$NON-NLS-1$
          return;
        }
View Full Code Here

  private static boolean isCustomTagRegion(IndexedRegion node) {

    if (node instanceof Element) {
      Element xmlElement = (Element) node;
      ModelQuery mq = ModelQueryUtil.getModelQuery(xmlElement.getOwnerDocument());
      CMElementDeclaration decl = mq.getCMElementDeclaration(xmlElement);
      if (decl instanceof CMNodeWrapper) {
        CMNode cmNode = ((CMNodeWrapper) decl).getOriginNode();
        return cmNode instanceof TLDElementDeclaration;
      }
    }
View Full Code Here

    boolean isIterationTag = false;
    String tagClass = null;
    String teiClass = null;
    if (problems == null)
      problems = new ArrayList();
    ModelQuery mq = getModelQuery(structuredDoc);
    if (mq != null) {
      TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(structuredDoc);

      if (mgr != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.