本文整理汇总了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;
}
示例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;
}