• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IBundleGroupProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.core.runtime.IBundleGroupProvider的典型用法代码示例。如果您正苦于以下问题:Java IBundleGroupProvider类的具体用法?Java IBundleGroupProvider怎么用?Java IBundleGroupProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IBundleGroupProvider类属于org.eclipse.core.runtime包,在下文中一共展示了IBundleGroupProvider类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getComponentIds

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
private String getComponentIds() {
    String featureId = "ru.taximaxim.codekeeper.feature";
    String pluginId = "ru.taximaxim.codekeeper.ui";
    String pluginName = "codekeeperUI";

    if (Platform.getBundle(pluginId) != null) {
        return pluginName;
    } else {
        for (IBundleGroupProvider bundleGroupProvider : Platform.getBundleGroupProviders()) {
            for (IBundleGroup group : bundleGroupProvider.getBundleGroups()) {
                if (group.getIdentifier().equals(featureId)) {
                    return pluginName;
                }
            }
        }
    }

    return "";
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:20,代码来源:EclipseEnvironment.java


示例2: computeBundleGroupMap

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
/**
 * Returns the map of versioned feature ids -> info object for all installed features. The format
 * of the versioned feature id (the key of the map) is featureId + ":" + versionId.
 * 
 * @return map of versioned feature ids -> info object (key type: <code>String</code>, value type:
 *         <code>AboutInfo</code>)
 * @since 3.0
 */
private Map<String, AboutInfo> computeBundleGroupMap()
{
  // use tree map to get predicable order
  Map<String, AboutInfo> ids = new TreeMap<String, AboutInfo>();

  IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
  for (int i = 0; i < providers.length; ++i)
  {
    IBundleGroup[] groups = providers[i].getBundleGroups();
    for (int j = 0; j < groups.length; ++j)
    {
      IBundleGroup group = groups[j];
      AboutInfo info = new AboutInfo(group);

      String version = info.getVersionId();
      version = version == null ? "0.0.0" //$NON-NLS-1$
          : new Version(version).toString();
      String versionedFeature = group.getIdentifier() + ":" + version; //$NON-NLS-1$

      ids.put(versionedFeature, info);
    }
  }

  return ids;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:34,代码来源:ApplicationWorkbenchAdvisor.java


示例3: LocalizeDialog

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
public LocalizeDialog(Shell shell, ITranslatableText tabTitle, ITranslatableSet targetLanguageSet, ITranslatableSet menuTextSet) {
	super(shell);
	this.tabTitle = tabTitle;
	this.targetLanguageSet = targetLanguageSet;
	this.menuTextSet = menuTextSet;

	// create a descriptive object for each BundleGroup
	IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
	LinkedList groups = new LinkedList();
	if (providers != null) {
		for (int i = 0; i < providers.length; ++i) {
			IBundleGroup[] bundleGroups = providers[i].getBundleGroups();
			for (int j = 0; j < bundleGroups.length; ++j) {
				groups.add(new AboutBundleGroupData(bundleGroups[j]));
			}
		}
	}
	bundleGroupInfos = (AboutBundleGroupData[]) groups
	.toArray(new AboutBundleGroupData[0]);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:LocalizeDialog.java


示例4: AboutDialog

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
/**
 * @param shell
 */
public AboutDialog(Shell shell) {
	super(shell);

	product = Platform.getProduct();
	if (product != null) {
		productName = product.getName();
	}
	if (productName == null) {
		productName = WorkbenchMessages.AboutDialog_defaultProductName;
	}

	// create a descriptive object for each BundleGroup
	final IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
	final LinkedList<AboutBundleGroupData> groups = new LinkedList<AboutBundleGroupData>();
	if (providers != null) {
		for (final IBundleGroupProvider provider : providers) {
			final IBundleGroup[] bundleGroups = provider.getBundleGroups();
			for (final IBundleGroup bundleGroup : bundleGroups) {
				groups.add(new AboutBundleGroupData(bundleGroup));
			}
		}
	}
	bundleGroupInfos = groups.toArray(new AboutBundleGroupData[0]);
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:28,代码来源:AboutDialog.java


示例5: getVersion

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
private String getVersion() {
    IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
    if (providers != null) {
        for (IBundleGroupProvider provider : providers) {
            IBundleGroup[] bundleGroups = provider.getBundleGroups();
            for (IBundleGroup group : bundleGroups) {
                if (group.getIdentifier().equals("ru.taximaxim.codekeeper.feature")) {
                    return group.getVersion();
                }
            }
        }
    }
    return "version_unavalable";
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:15,代码来源:UsageReportDispatcher.java


示例6: getProductInformation

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
/**
 * It returns two strings, the first is the eclipse provider and the second
 * is the eclipse version.
 */
private final String getProductInformation(final String shortName) {

    final String[] productInfo = new String[2];
    String productVendorVersion = ""; //$NON-NLS-1$

    // collect this information only in case of running as eclipse plugin
    if (shortName.equals(ProductName.PLUGIN)) {
        productInfo[0] = Platform.getProduct().getName().replace(' ', '_');

        final IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();

        if (providers != null) {
            for (final IBundleGroupProvider provider : providers) {
                final IBundleGroup[] groups = provider.getBundleGroups();
                for (final IBundleGroup group : groups) {
                    final String groupName = group.getName();
                    final String groupVersion = group.getVersion();

                    if (groupName.equalsIgnoreCase(ECLIPSE_GROUP_NAME)) {
                        final int index = groupVersion.indexOf(".v"); //$NON-NLS-1$
                        if (index > 0) {
                            productInfo[1] = groupVersion.substring(0, index);
                        } else {
                            productInfo[1] = groupVersion;
                        }
                        break;
                    }
                }
            }
        }
    }

    if (productInfo[0] != null && productInfo[1] != null) {
        productVendorVersion = MessageFormat.format("{0} {1} ", productInfo[0], productInfo[1]); //$NON-NLS-1$
    }
    return productVendorVersion;
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:42,代码来源:DefaultHTTPClientFactory.java


示例7: getToolsVersion

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
@VisibleForTesting
static String getToolsVersion(IBundleGroupProvider[] bundleGroupProviders) {
  for (IBundleGroupProvider provider : bundleGroupProviders) {
    for (IBundleGroup feature : provider.getBundleGroups()) {
      if (CLOUD_TOOLS_FOR_ECLIPSE_FEATURE_ID.equals(feature.getIdentifier())) {
        return feature.getVersion();
      }
    }
  }
  // May not have been installed with via a feature. Although we could report the bundle version,
  // that may result in a confusing versions.
  logger.fine("Feature not found: " + CLOUD_TOOLS_FOR_ECLIPSE_FEATURE_ID);
  return "0.0.0";
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:15,代码来源:CloudToolsInfo.java


示例8: testGetToolsVersion_hasFeature

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
@Test
public void testGetToolsVersion_hasFeature() {
  Mockito.when(bundleGroupProvider.getBundleGroups())
      .thenReturn(new IBundleGroup[] {bundleGroup});
  Mockito.when(bundleGroup.getIdentifier())
      .thenReturn(CloudToolsInfo.CLOUD_TOOLS_FOR_ECLIPSE_FEATURE_ID);
  Mockito.when(bundleGroup.getVersion()).thenReturn("123.456.789");
  Assert.assertEquals("123.456.789",
      CloudToolsInfo.getToolsVersion(new IBundleGroupProvider[] {bundleGroupProvider}));
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:11,代码来源:CloudToolsInfoTest.java


示例9: doImport

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
@Override
public void doImport(Version version) {

	version.getFeatures().clear();
	version.getBundles().clear();
	IBundleGroupProvider[] features = Platform.getBundleGroupProviders();
	for (IBundleGroupProvider bgProvider : features) {
		loadFeatures(version, bgProvider.getBundleGroups());
	}
}
 
开发者ID:wimjongman,项目名称:FDE,代码行数:11,代码来源:RunningEclipseImport.java


示例10: initializeBundleGroupInfos

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
private void initializeBundleGroupInfos() {
	if (bundleGroupInfos == null) {
		final IBundleGroupProvider[] providers = Platform
		        .getBundleGroupProviders();

		// create a descriptive object for each BundleGroup
		final LinkedList groups = new LinkedList();
		if (providers != null) {
			for (int i = 0; i < providers.length; ++i) {
				final IBundleGroup[] bundleGroups = providers[i]
				        .getBundleGroups();
				for (int j = 0; j < bundleGroups.length; ++j) {
					groups.add(new AboutBundleGroupData(bundleGroups[j]));
				}
			}
		}
		bundleGroupInfos = (AboutBundleGroupData[]) groups
		        .toArray(new AboutBundleGroupData[0]);
	} else {
		// the order of the array may be changed due to sorting, so create a
		// copy, since the client set this value.
		final AboutBundleGroupData[] clientArray = bundleGroupInfos;
		bundleGroupInfos = new AboutBundleGroupData[clientArray.length];
		System.arraycopy(clientArray, 0, bundleGroupInfos, 0,
		        clientArray.length);
	}
	AboutData.sortByProvider(reverseSort, bundleGroupInfos);
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:29,代码来源:AboutFeaturesPage.java


示例11: testGetToolsVersion_noFeature

import org.eclipse.core.runtime.IBundleGroupProvider; //导入依赖的package包/类
@Test
public void testGetToolsVersion_noFeature() {
  Assert.assertEquals("0.0.0", CloudToolsInfo.getToolsVersion(new IBundleGroupProvider[0]));
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:5,代码来源:CloudToolsInfoTest.java



注:本文中的org.eclipse.core.runtime.IBundleGroupProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CommonTermsQuery类代码示例发布时间:2022-05-22
下一篇:
Java SqlReturnTypeInference类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap