Search in sources :

Example 1 with UpdateWizard

use of net.heartsome.cat.p2update.ui.UpdateWizard in project translationstudio8 by heartsome.

the class CheckUpdateHandler method doExecute.

@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
    // TODO Auto-generated method stub		
    if (hasNoRepos) {
        P2UpdateUtil.openConnectErrorInfoDialog(getShell(), P2UpdateUtil.INFO_TYPE_CHECK);
        return;
    }
    if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
        UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), operation, operation.getSelectedUpdates());
        TSWizardDialog dialog = new TSWizardDialog(getShell(), wizard);
        dialog.create();
        dialog.open();
    }
}
Also used : UpdateWizard(net.heartsome.cat.p2update.ui.UpdateWizard) TSWizardDialog(net.heartsome.cat.common.ui.wizard.TSWizardDialog)

Example 2 with UpdateWizard

use of net.heartsome.cat.p2update.ui.UpdateWizard in project translationstudio8 by heartsome.

the class AutomaticUpdate method doUpdate.

private void doUpdate() {
    if (operation == null) {
        return;
    }
    IStatus status = operation.getResolutionResult();
    // user cancelled
    if (status.getSeverity() == IStatus.CANCEL)
        return;
    // Special case those statuses where we would never want to open a wizard
    if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
        return;
    }
    if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
        UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), operation, operation.getSelectedUpdates());
        TSWizardDialog dialog = new TSWizardDialog(getShell(), wizard);
        dialog.create();
        dialog.open();
    }
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) UpdateWizard(net.heartsome.cat.p2update.ui.UpdateWizard) TSWizardDialog(net.heartsome.cat.common.ui.wizard.TSWizardDialog)

Aggregations

TSWizardDialog (net.heartsome.cat.common.ui.wizard.TSWizardDialog)2 UpdateWizard (net.heartsome.cat.p2update.ui.UpdateWizard)2 IStatus (org.eclipse.core.runtime.IStatus)1