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

Examples of org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider


    if (trait != null){
      PaletteInfos tags = (PaletteInfos)trait.getValue();
      for (Iterator it=tags.getInfos().iterator();it.hasNext();){
        PaletteInfo tag = (PaletteInfo)it.next();
        if (tag.getId().equalsIgnoreCase(tagName)){         
          IMetaDataSourceModelProvider sourceProvider = ((Trait)tag.eContainer().eContainer()).getSourceModelProvider();
          if (small)
            icon = getImageDescriptorFromString(sourceProvider, tag.getSmallIcon(), DEFAULT_SMALL_ICON);
          else
            icon = getImageDescriptorFromString(sourceProvider, tag.getLargeIcon(), DEFAULT_LARGE_ICON);
         
View Full Code Here


            int tokenStart = input.indexOf(MD_PLUGIN_LOCATION);
            int tokenEnd = tokenStart + MD_PLUGIN_LOCATION.length();
            String prefix = input.substring(0, tokenStart);
            String suffix = input.substring(tokenEnd);
            Trait trait = dtInfo.getTrait();
            IMetaDataSourceModelProvider mdSourceModelProvider = trait
                    .getSourceModelProvider();
            IResourceURLProvider resourceURLProvider = (IResourceURLProvider) mdSourceModelProvider
                    .getAdapter(IResourceURLProvider.class);
            URL url = resourceURLProvider.getResourceURL("/META-INF/"); //$NON-NLS-1$
            String resolvedToken = url.toExternalForm();
            resolvedToken = resolvedToken.substring(0,
                    resolvedToken.length() - 10);
View Full Code Here

    final Boolean hidden = info.getHidden();
    if ((hidden != null) && (hidden.booleanValue()))// do not create a
                            // palette entry
      return;

    final IMetaDataSourceModelProvider sourceProvider = ((Trait) info
        .eContainer().eContainer()).getSourceModelProvider();
    final String tagName = info.getTag();
    final String id = info.getId();
    final String label = info.getDisplayLabel();
    final String desc = formatDescription(info.getDescription());
View Full Code Here

    final Boolean hidden = info.getHidden();
    if ((hidden != null) && (hidden.booleanValue()))// do not create a
                            // palette entry
      return;

    final IMetaDataSourceModelProvider sourceProvider = ((Trait) info
        .eContainer().eContainer()).getSourceModelProvider();
    final String tagName = info.getTag();
    final String id = info.getId();
    final String label = info.getDisplayLabel();
    final String desc = formatDescription(info.getDescription());
View Full Code Here

    if (smallIcon == null)
      return null;
   
    try {
      Trait t = getMetaDataContext().getTrait();
      IMetaDataSourceModelProvider provider = t.getSourceModelProvider();
      IImageDescriptorProvider ip = (IImageDescriptorProvider)provider.getAdapter(IImageDescriptorProvider.class);
      if (ip != null){
        return ip.getImageDescriptor(smallIcon);
      }
    } catch (RuntimeException e) {   
      //TODO: log error?
View Full Code Here

    if (smallIcon == null)
      return null;
   
    try {
      Trait t = getMetaDataContext().getTrait();
      IMetaDataSourceModelProvider provider = t.getSourceModelProvider();
      IImageDescriptorProvider ip = (IImageDescriptorProvider)provider.getAdapter(IImageDescriptorProvider.class);
      if (ip != null){
        return ip.getImageDescriptor(smallIcon);
      }
    } catch (RuntimeException e) {   
      //TODO: log error?
View Full Code Here

    if (trait != null){
      PaletteInfos tags = (PaletteInfos)trait.getValue();
      for (Iterator it=tags.getInfos().iterator();it.hasNext();){
        PaletteInfo tag = (PaletteInfo)it.next();
        if (tag.getId().equalsIgnoreCase(tagName)){         
          IMetaDataSourceModelProvider sourceProvider = ((Trait)tag.eContainer().eContainer()).getSourceModelProvider();
          if (small)
            icon = getImageDescriptorFromString(sourceProvider, tag.getSmallIcon(), DEFAULT_SMALL_ICON);
          else
            icon = getImageDescriptorFromString(sourceProvider, tag.getLargeIcon(), DEFAULT_LARGE_ICON);
         
View Full Code Here

            int tokenStart = input.indexOf(MD_PLUGIN_LOCATION);
            int tokenEnd = tokenStart + MD_PLUGIN_LOCATION.length();
            String prefix = input.substring(0, tokenStart);
            String suffix = input.substring(tokenEnd);
            Trait trait = dtInfo.getTrait();
            IMetaDataSourceModelProvider mdSourceModelProvider = trait
                    .getSourceModelProvider();
            IResourceURLProvider resourceURLProvider = (IResourceURLProvider) mdSourceModelProvider
                    .getAdapter(IResourceURLProvider.class);
            URL url = resourceURLProvider.getResourceURL("/META-INF/"); //$NON-NLS-1$
            String resolvedToken = url.toExternalForm();
            resolvedToken = resolvedToken.substring(0,
                    resolvedToken.length() - 10);
View Full Code Here

    final Boolean hidden = info.getHidden();
    if ((hidden != null) && (hidden.booleanValue()))// do not create a
                            // palette entry
      return;

    final IMetaDataSourceModelProvider sourceProvider = ((Trait) info
        .eContainer().eContainer()).getSourceModelProvider();
    final String tagName = info.getTag();
    final String id = info.getId();
    final String label = info.getDisplayLabel();
    final String desc = formatDescription(info.getDescription());
View Full Code Here

    final Boolean hidden = info.getHidden();
    if ((hidden != null) && (hidden.booleanValue()))// do not create a
                            // palette entry
      return;

    final IMetaDataSourceModelProvider sourceProvider = ((Trait) info
        .eContainer().eContainer()).getSourceModelProvider();
    final String tagName = info.getTag();
    final String id = info.getId();
    final String label = info.getDisplayLabel();
    final String desc = formatDescription(info.getDescription());
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider

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.