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

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


        final Entity entity = _query.getQueryHelper().getEntity(
                tagId.getUri(), tagId.getTagName()+"/"+name); //$NON-NLS-1$
        if (entity != null)
        {
            final Trait trait = _query.getQueryHelper().getTrait(
                    entity, ViewMetadataMapper.DEFAULT_ATTRIBUTE_TRAIT_ID);
            if (trait != null)
            {
                return (AttributeToPropertyMapping) trait.getValue();
            }
        }
        return null;
    }
View Full Code Here


//      if (resolver != null) {
      if (file != null) {
        final IMetaDataDomainContext mdcontext = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(file);
        final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(mdcontext);
        final Model m = query.findTagLibraryModel(uri);
        final Trait t = query.findTrait(m, "isTagDir"); //$NON-NLS-1$
        return TraitValueHelper.getValueAsBoolean(t);
      }
    }
    return false;
  }
View Full Code Here

                                              final String uri,
                                              final String elementName, final String attributeName)
        {
        final IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(file);
        final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
        final Trait trait = query.getQueryHelper().getTrait(uri, elementName+"/"+attributeName, SETS_LOCALE); //$NON-NLS-1$
//            final ITaglibDomainMetaDataModelContext mdContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
//            final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(mdContext, elementName+"/"+attributeName, SETS_LOCALE); //$NON-NLS-1$

            if (TraitValueHelper.getValueAsBoolean(trait))
            {
View Full Code Here

        {
            final String entityKey = elementName+"/"+attributeName; //$NON-NLS-1$
        final IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(file);
        final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
        final Entity entity = query.getQueryHelper().getEntity(uri, entityKey);
        Trait trait = query.getQueryHelper().getTrait(entity, CONTRIBUTES_VALUE_BINDING);
//            final ITaglibDomainMetaDataModelContext mdContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
//            Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(mdContext, entityKey, CONTRIBUTES_VALUE_BINDING);

            final boolean contribsValueBindings = TraitValueHelper.getValueAsBoolean(trait);
View Full Code Here

   
    /**
     * @return flag indicating that html form container ancestor is required
     */
    public boolean isHTMLFormRequired() {
      Trait t = null;
      if (_modelContext != null)
        t = getQuery().getQueryHelper().getTrait(getTagEntity(), "requires-html-form"); //$NON-NLS-1$
      else
        t = TaglibDomainMetaDataQueryHelper.getTrait(getTagEntity(), "requires-html-form"); //$NON-NLS-1$
     
View Full Code Here

    /**
     * @return flag indicating that jsf component
     */
    public boolean isJSFComponent() {     
      Model model = null;
      Trait t = null;
      if (_modelContext != null) {
        model = getQuery().findTagLibraryModel(_modelContext.getModelIdentifier());
          t = getQuery().findTrait(model, "is-jsf-component-library"); //$NON-NLS-1$
      } else {
            model = TaglibDomainMetaDataQueryHelper.getModel(_taglibMetaDataContext);
View Full Code Here

          context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(file);
        else
          context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
       
        final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
        Trait fileExt = query.findTrait(attr.getMetaDataContext().getEntity(), "file-extensions"); //$NON-NLS-1$
        Trait separator = query.findTrait(attr.getMetaDataContext().getEntity(), "separator"); //$NON-NLS-1$
        String[] fileExts = null;
        if (fileExt != null){
          List exts = TraitValueHelper.getValueAsListOfStrings(fileExt);
          fileExts = (String[])exts.toArray(new String[exts.size()]);
        }
View Full Code Here

        IAttributeRuntimeValueType.WEBPATH.equals(type)) {
     
      //FIXME - should not be passing null project
      final IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext((IProject)null);
      final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
      Trait fileExt = query.findTrait(attr.getMetaDataContext().getEntity(), "file-extensions"); //$NON-NLS-1$
      Trait seperator = query.findTrait(attr.getMetaDataContext().getEntity(), "separator"); //$NON-NLS-1$
     
      String[] fileExts = null;
      if (fileExt != null){
        List exts = TraitValueHelper.getValueAsListOfStrings(fileExt);
        fileExts = (String[])exts.toArray(new String[exts.size()]);
View Full Code Here

      if (uri != null) {
        final ITaglibDomainMetaDataQuery query = getQuery(part, node);
        if (query != null) {
          _tagEntity = query.getQueryHelper().getEntity(uri, node.getLocalName());
          if (_tagEntity != null) {
            Trait pds = query.findTrait(_tagEntity, QuickEditTabSections.TRAIT_ID);
            if (pds != null){
              _quickEditTabSections = (QuickEditTabSections)pds.getValue();
            }   
          }     
        }
      }
    }
View Full Code Here

        private static LocaleSetAggregator create(final IProject project,
                                              final String uri,
                                              final String elementName, final String attributeName)
        {
            final ITaglibDomainMetaDataModelContext mdContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
            final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(mdContext, elementName+"/"+attributeName, SETS_LOCALE); //$NON-NLS-1$

            if (TraitValueHelper.getValueAsBoolean(trait))
            {
                return new LocaleSetAggregator();
            }
View Full Code Here

TOP

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

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.