当前位置: 首页>>代码示例>>Java>>正文


Java IBundleGroupProvider.getBundleGroups方法代码示例

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


在下文中一共展示了IBundleGroupProvider.getBundleGroups方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例4: 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

示例5: 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


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