Package org.eclipse.jst.jsf.common.metadata

Examples of org.eclipse.jst.jsf.common.metadata.Entity


        // final Element node = elementAdapter.

        final ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper
                .createMetaDataModelContext(jsfValidationContext.getFile()
                        .getProject(), uri);
        final Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(
                modelContext, tagName);
        if (entity != null)
        {
            final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(
                    entity, "containment-constraint"); //$NON-NLS-1$
View Full Code Here


    return pds;
  }

  private IPropertyPageDescriptor getPD(Entity tagEntity, String attrName) {   
    IPropertyPageDescriptor pd = null;
    Entity attrEntity = TaglibDomainMetaDataQueryHelper.getEntity(tagEntity, attrName);
    if (attrEntity != null){
      List pds = MetaDataEnabledProcessingFactory.getInstance().getAttributeValueRuntimeTypeFeatureProcessors(
              IPropertyPageDescriptor.class, getStructuredDocumentContext(), attrEntity);         
      if (pds != null && !pds.isEmpty())
        pd = (IPropertyPageDescriptor)pds.get(0);
View Full Code Here

          createTagEntry(category, tag, doc);
        }
      } else {
        for (final Iterator it = model.getChildEntities().iterator(); it
            .hasNext();) {
          final Entity tagAsEntity = (Entity) it.next();
          createTagEntry(category, tagAsEntity, doc);
        }
      }
    } else {// fail safe loading from cmDoc... should no longer go in here
      loadFromCMDocument(category, doc);
View Full Code Here

          createTagEntry(category, tag, ns);
        }
      } else {
        for (final Iterator it = model.getChildEntities().iterator(); it
            .hasNext();) {
          final Entity tagAsEntity = (Entity) it.next();
          createTagEntry(category, tagAsEntity, ns);
        }
      }
    } else {// fail safe loading from cmDoc... should no longer go in here
      loadFromNamespace(category, ns);
View Full Code Here

//    String uri = CMUtil.getElementNamespaceURI(_element);
//    return registry.getElementDescriptor(uri, _element.getLocalName());
//  }

  private IPropertyDescriptor getAttrPropertyDescriptor(String attrName){
    Entity attrEntity = TaglibDomainMetaDataQueryHelper.getEntity(_tagEntity, attrName);
    List ppds = MetaDataEnabledProcessingFactory.getInstance().getAttributeValueRuntimeTypeFeatureProcessors(IPropertyPageDescriptor.class, _context, attrEntity);
    if (ppds.size() > 0)
      return (IPropertyDescriptor)((IPropertyPageDescriptor)ppds.get(0)).getAdapter(IPropertyDescriptor.class);
   
    return null;
View Full Code Here

                {
                    return pi.getTagCreation();
                }
            }
            // tag-creation trait on entity directly?
            final Entity tag = getTagEntity(metaDataContext, tagName);
            if (tag != null)
            {// metadata exists
                trait = TaglibDomainMetaDataQueryHelper.getTrait(tag,
                        "tag-create"); //$NON-NLS-1$
                if (trait != null && trait.getValue() != null)
View Full Code Here

        }
      } 
    }
    if (icon == null) {
      for (Iterator it=model.getChildEntities().iterator();it.hasNext();){
        Entity tagAsEntity = (Entity)it.next();
        if (tagAsEntity.getId().equalsIgnoreCase(tagName)){                   
          if (small)
            icon = getImageDescriptorFromTagTraitValueAsString(tagAsEntity, TRAIT_ICON_SMALL, DEFAULT_SMALL_ICON);
          else
            icon = getImageDescriptorFromTagTraitValueAsString(tagAsEntity, TRAIT_ICON_LARGE, DEFAULT_LARGE_ICON)
         
View Full Code Here

    }
    String _elem = elementName + "/" + attributeName; //$NON-NLS-1$
    String _uri = uri;
    ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper
        .createMetaDataModelContext(_project, _uri);
    Entity attrEntity = TaglibDomainMetaDataQueryHelper.getEntity(modelContext,
        _elem);

    if (attrEntity != null)
      return getAttributeValueRuntimeTypeFeatureProcessors(featureType, sdContext, attrEntity);
   
View Full Code Here

    return false;

  }
  private Trait getTraitForEntityUsingContext(final String traitName) {
    //look for trait on given entity
    final Entity entity = getMetaDataContext().getEntity();
    return TaglibDomainMetaDataQueryHelper.getTrait(entity, traitName);
  }
View Full Code Here

    final IMetaDataDomainContext mdcontext = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(jsfValidationContext.getFile());
    final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(mdcontext);
//        final ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper
//                .createMetaDataModelContext(jsfValidationContext.getFile()
//                        .getProject(), uri);
        final Entity entity = query.getQueryHelper().getEntity(
                uri, tagName);
        if (entity != null)
        {
            final Trait trait = query.findTrait(
                    entity, "containment-constraint"); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.common.metadata.Entity

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.