Search in sources :

Example 1 with WizardState

use of org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState in project epp.mpc by eclipse.

the class MarketplaceViewer method updateCatalog.

@Override
public void updateCatalog() {
    if (getWizard().wantInitializeInitialSelection()) {
        try {
            getWizard().initializeInitialSelection();
            if (getControl().isDisposed()) {
                return;
            }
            WizardState initialState = getWizard().getInitialState();
            if (initialState != null) {
                getWizard().getCatalogPage().initialize(initialState);
            }
            catalogUpdated(false, false);
        } catch (CoreException e) {
            boolean wasCancelled = e.getStatus().getSeverity() == IStatus.CANCEL;
            if (!wasCancelled) {
                MarketplaceClientUi.handle(e.getStatus(), StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
            }
            catalogUpdated(wasCancelled, !wasCancelled);
        }
    } else {
        super.updateCatalog();
        if (getControl().isDisposed()) {
            return;
        }
    }
    refresh();
}
Also used : CoreException(org.eclipse.core.runtime.CoreException) WizardState(org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState)

Example 2 with WizardState

use of org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState in project epp.mpc by eclipse.

the class MarketplaceClientService method openProvisioning.

public void openProvisioning(IMarketplaceClientConfiguration configuration) {
    checkInitialState(configuration);
    MarketplaceWizardCommand command = new MarketplaceWizardCommand();
    command.setConfiguration(configuration);
    WizardState wizardState = new WizardState();
    wizardState.setProceedWithInstallation(true);
    command.setWizardDialogState(wizardState);
    execute(command);
}
Also used : AbstractMarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand) MarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand) WizardState(org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState)

Example 3 with WizardState

use of org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState in project epp.mpc by eclipse.

the class MarketplaceClientService method openInstalled.

public void openInstalled(IMarketplaceClientConfiguration configuration) {
    MarketplaceWizardCommand command = new MarketplaceWizardCommand();
    command.setConfiguration(configuration);
    WizardState wizardState = new WizardState();
    wizardState.setContentType(ContentType.INSTALLED);
    wizardState.setProceedWithInstallation(false);
    command.setWizardDialogState(wizardState);
    execute(command);
}
Also used : AbstractMarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand) MarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand) WizardState(org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState)

Example 4 with WizardState

use of org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState in project epp.mpc by eclipse.

the class AbstractMarketplaceWizardBotTest method launchMarketplaceWizard.

protected void launchMarketplaceWizard() {
    final MarketplaceWizardCommand marketplaceWizardCommand = new MarketplaceWizardCommand();
    WizardState wizardState = new WizardState();
    wizardState.setContent(new LinkedHashSet<INode>(Arrays.asList(TEST_NODES)));
    wizardState.setProceedWithInstallation(false);
    marketplaceWizardCommand.setWizardDialogState(wizardState);
    UIThreadRunnable.asyncExec(new VoidResult() {

        public void run() {
            try {
                marketplaceWizardCommand.execute(new ExecutionEvent());
            } catch (ExecutionException e) {
                fail("ExecutionException: " + e.getMessage());
            // otherwise ignore, we'll notice in the test thread when we don't get the wizard dialog in time
            }
        }
    });
}
Also used : INode(org.eclipse.epp.mpc.core.model.INode) VoidResult(org.eclipse.swtbot.swt.finder.results.VoidResult) ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) ExecutionException(org.eclipse.core.commands.ExecutionException) MarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand) WizardState(org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState)

Example 5 with WizardState

use of org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState in project epp.mpc by eclipse.

the class MarketplaceClientService method open.

public void open(IMarketplaceClientConfiguration configuration) {
    MarketplaceWizardCommand command = new MarketplaceWizardCommand();
    command.setConfiguration(configuration);
    WizardState wizardState = new WizardState();
    setInitialContentType(configuration, wizardState);
    wizardState.setProceedWithInstallation(false);
    command.setWizardDialogState(wizardState);
    execute(command);
}
Also used : AbstractMarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand) MarketplaceWizardCommand(org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand) WizardState(org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState)

Aggregations

WizardState (org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizard.WizardState)9 MarketplaceWizardCommand (org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand)8 AbstractMarketplaceWizardCommand (org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand)7 ExecutionEvent (org.eclipse.core.commands.ExecutionEvent)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1 CoreException (org.eclipse.core.runtime.CoreException)1 INode (org.eclipse.epp.mpc.core.model.INode)1 VoidResult (org.eclipse.swtbot.swt.finder.results.VoidResult)1