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


Java ProvisioningUI.getDefaultUI方法代码示例

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


在下文中一共展示了ProvisioningUI.getDefaultUI方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addP2Repositories

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
/**
 * @param resourceDir
 * @param sourceLoc
 * @throws IOException
 */
private void addP2Repositories(URI... p2Repos) throws IOException {
  ProvisioningUI pui = ProvisioningUI.getDefaultUI();
  for (URI repo : p2Repos) {
    pui.getRepositoryTracker().addRepository(repo, null, pui.getSession());
  }
}
 
开发者ID:fbricon,项目名称:pde.source.lookup,代码行数:12,代码来源:IntegrationTest.java

示例2: getBundleInfo

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
/**
 * Gathers a list of all the IInstallableUnits currently running in the application during runtime.
 */
public void getBundleInfo(){
	ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI();
	String profileId = provisioningUI.getProfileId();
	ProvisioningSession provisioningSession = provisioningUI.getSession();
	IProfileRegistry profileReg = (IProfileRegistry)provisioningSession.getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
	IQueryable<IInstallableUnit> queryable = profileReg.getProfile(profileId);
	IQuery<IInstallableUnit> query = QueryUtil.createIUAnyQuery();
	IQueryResult<IInstallableUnit> result = queryable.query(query, new NullProgressMonitor());
	for (final IInstallableUnit iu : result)
	  {
		installedBundles.add(iu);
	  }
	Collections.sort(installedBundles);
}
 
开发者ID:Pro-Nouns,项目名称:LinGUIne,代码行数:18,代码来源:AboutWizardPage.java

示例3: findSources

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
@Override
public IPath findSources(File jar, IProgressMonitor monitor) {
  if (!BundleUtil.isBundle(jar)) {
    return null;
  }
  IArtifactKey artifactKey = BundleUtil.getArtifactKey(jar);
  if (artifactKey == null || blackList.contains(artifactKey.getId())) {
    return null;
  }
  IArtifactKey sourceKey = BundleUtil.toSourceKey(artifactKey);

  ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI();

  List<URI> uris = Arrays
      .asList(provisioningUI.getRepositoryTracker().getKnownRepositories(provisioningUI.getSession()));
  Collections.sort(uris);// stupid trick to make eclipse.org repos being
  // searched almost first

  Path cacheFolder = SourceLookupPreferences.getInstance().getDownloadedSourcesDirectory();
  for (URI repo : uris) {
    if (monitor.isCanceled()) {
      return null;
    }
    IArtifactRepository artifactRepo = null;
    try {
      artifactRepo = provisioningUI.loadArtifactRepository(repo, false, monitor);
    } catch (ProvisionException ignored) {
      ignored.printStackTrace();
      // local urls seem to fail
    }
    if (artifactRepo == null || !artifactRepo.contains(sourceKey)) {
      continue;
    }

    IArtifactDescriptor[] results = artifactRepo.getArtifactDescriptors(sourceKey);
    if (results.length > 0) {
      try {
        return saveArtifact(artifactRepo, results[0], cacheFolder, monitor);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
  return null;
}
 
开发者ID:fbricon,项目名称:pde.source.lookup,代码行数:46,代码来源:P2SourceLocator.java

示例4: getProvisioningUI

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
protected ProvisioningUI getProvisioningUI() {
    return ProvisioningUI.getDefaultUI();
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:4,代码来源:PreloadingRepositoryHandler.java

示例5: getProvisioningUI

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
protected ProvisioningUI getProvisioningUI() {
	return ProvisioningUI.getDefaultUI();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:4,代码来源:PreloadingRepositoryHandler.java

示例6: getProvisioningUI

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
public ProvisioningUI getProvisioningUI() {
	return ProvisioningUI.getDefaultUI();
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:4,代码来源:P2_Activator.java

示例7: getProvisioningUI

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
protected ProvisioningUI getProvisioningUI(){
	return ProvisioningUI.getDefaultUI();
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:4,代码来源:PreloadingRepositoryHandler.java

示例8: saveState

import org.eclipse.equinox.p2.ui.ProvisioningUI; //导入方法依赖的package包/类
/**
 * Save update sites in a memento because when a new app is installed then the configuration is
 * cleaned up.
 */
public static void saveState(final IMemento memento) {

	try {

		final ProvisioningUI ui = ProvisioningUI.getDefaultUI();

		ui.signalRepositoryOperationStart();

		final IMetadataRepositoryManager metaManager = ProvUI.getMetadataRepositoryManager(ui.getSession());

		try {

			final int visibilityFlags = ui.getRepositoryTracker().getMetadataRepositoryFlags();

			final URI[] currentlyEnabledURIs = metaManager.getKnownRepositories(//
					IRepositoryManager.REPOSITORIES_ALL);

			final URI[] currentlyDisabledURIs = metaManager.getKnownRepositories(//
					IRepositoryManager.REPOSITORIES_DISABLED | visibilityFlags);

			final IMemento xmlRepositories = memento.createChild(TAG_REPOSITORIES);

			saveState_URI(currentlyEnabledURIs, metaManager, xmlRepositories, true);
			saveState_URI(currentlyDisabledURIs, metaManager, xmlRepositories, false);

		} finally {
			ui.signalRepositoryOperationComplete(null, true);
		}

	} catch (final Exception e) {

		// this can occure when running in the IDE
		StatusUtil.handleStatus(e, 0);
	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:40,代码来源:P2_Activator.java


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