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


Java IProvisioningPlan类代码示例

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


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

示例1: getProvisioningPlan

import org.eclipse.equinox.p2.engine.IProvisioningPlan; //导入依赖的package包/类
@Override
public IProvisioningPlan getProvisioningPlan(IProfileChangeRequest request,
		ProvisioningContext context, IProgressMonitor monitor) {
	IProvisioningPlan plan = super.getProvisioningPlan(request, context, monitor);
	if (plan.getStatus().isOK()) {
		return orderPlan(plan);
	}
	return plan;
}
 
开发者ID:MentorEmbedded,项目名称:p2-installer,代码行数:10,代码来源:OrderedPlanner.java

示例2: continueWorkingOperation

import org.eclipse.equinox.p2.engine.IProvisioningPlan; //导入依赖的package包/类
public boolean continueWorkingOperation(final ProfileChangeOperation operation, final Shell shell) {

		// don't continue if superclass has already identified problem scenarios
		final boolean ok = super.continueWorkingWithOperation(operation, shell);
		if (!ok) {
			return false;
		}

		final IProvisioningPlan plan = operation.getProvisioningPlan();
		if (plan == null) {
			return false;
		}

		// Check the preference to see whether to continue.
		final IPreferenceStore prefs = P2_Activator.getDefault().getPreferenceStore();
		final String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);

		if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) {
			return true;
		}

		if (MessageDialogWithToggle.NEVER.equals(openPlan)) {
			StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
			return false;
		}

		final MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(
				shell,
				ProvSDKMessages.ProvSDKUIActivator_Question,
				ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway,
				null,
				false,
				prefs,
				PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);

		// Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error.
		if (dialog.getReturnCode() == IDialogConstants.NO_ID) {
			StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
		}

		return dialog.getReturnCode() == IDialogConstants.YES_ID;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:43,代码来源:SDKPolicy.java


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