Lines 10-27
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.update.internal.ui.views; |
11 |
package org.eclipse.update.internal.ui.views; |
12 |
|
12 |
|
13 |
import org.eclipse.core.runtime.*; |
13 |
import org.eclipse.core.runtime.IStatus; |
14 |
import org.eclipse.jface.action.*; |
14 |
import org.eclipse.core.runtime.jobs.Job; |
15 |
import org.eclipse.jface.dialogs.*; |
15 |
import org.eclipse.jface.action.Action; |
16 |
import org.eclipse.jface.wizard.*; |
16 |
import org.eclipse.jface.dialogs.ErrorDialog; |
17 |
import org.eclipse.swt.custom.*; |
17 |
import org.eclipse.jface.dialogs.MessageDialog; |
18 |
import org.eclipse.swt.widgets.*; |
18 |
import org.eclipse.swt.widgets.Shell; |
19 |
import org.eclipse.update.core.*; |
19 |
import org.eclipse.ui.IWorkbenchWindow; |
20 |
import org.eclipse.update.internal.operations.*; |
20 |
import org.eclipse.update.core.IFeature; |
21 |
import org.eclipse.update.internal.ui.*; |
21 |
import org.eclipse.update.internal.ui.UpdateUI; |
22 |
import org.eclipse.update.internal.ui.wizards.*; |
22 |
import org.eclipse.update.internal.ui.UpdateUIMessages; |
23 |
import org.eclipse.update.operations.*; |
23 |
import org.eclipse.update.internal.ui.wizards.InstallWizard; |
24 |
import org.eclipse.update.search.*; |
24 |
import org.eclipse.update.internal.ui.wizards.InstallWizardOperation; |
|
|
25 |
import org.eclipse.update.operations.OperationsManager; |
26 |
import org.eclipse.update.ui.UpdateJob; |
25 |
|
27 |
|
26 |
public class FindUpdatesAction extends Action { |
28 |
public class FindUpdatesAction extends Action { |
27 |
|
29 |
|
Lines 58-73
Link Here
|
58 |
IFeature [] features=null; |
60 |
IFeature [] features=null; |
59 |
if (feature!=null) |
61 |
if (feature!=null) |
60 |
features = new IFeature[] { feature }; |
62 |
features = new IFeature[] { feature }; |
61 |
final UpdateSearchRequest searchRequest = UpdateUtils.createNewUpdatesRequest(features); |
63 |
|
|
|
64 |
UpdateJob job = new UpdateJob(UpdateUIMessages.InstallWizard_jobName, false, false, features); |
65 |
|
66 |
job.setUser(true); |
67 |
job.setPriority(Job.INTERACTIVE); |
68 |
|
69 |
InstallWizardOperation operation = new InstallWizardOperation(); |
70 |
IWorkbenchWindow window = UpdateUI.getActiveWorkbenchWindow(); |
71 |
operation.run(shell, job); |
62 |
|
72 |
|
63 |
BusyIndicator.showWhile(shell.getDisplay(), new Runnable() { |
|
|
64 |
public void run() { |
65 |
InstallWizard wizard = new InstallWizard(searchRequest); |
66 |
WizardDialog dialog = new ResizableInstallWizardDialog(shell, wizard, UpdateUIMessages.FindUpdatesAction_updates); |
67 |
dialog.create(); |
68 |
dialog.open(); |
69 |
} |
70 |
}); |
71 |
} |
73 |
} |
72 |
|
74 |
|
73 |
private boolean confirm(String message) { |
75 |
private boolean confirm(String message) { |