KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > platform > internal > LaunchUpdateIntroAction


1 /*******************************************************************************
2  * Copyright (c) 200, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.platform.internal;
12
13 import java.util.Properties JavaDoc;
14
15 import org.eclipse.swt.widgets.Shell;
16 import org.eclipse.ui.PlatformUI;
17 import org.eclipse.ui.intro.IIntroSite;
18 import org.eclipse.ui.intro.config.IIntroAction;
19 import org.eclipse.update.ui.UpdateManagerUI;
20
21 public class LaunchUpdateIntroAction implements IIntroAction {
22
23     public LaunchUpdateIntroAction() {
24     }
25
26     public void run(IIntroSite site, Properties JavaDoc params) {
27
28         Runnable JavaDoc r = new Runnable JavaDoc() {
29             public void run() {
30                 Shell currentShell = PlatformUI.getWorkbench()
31                     .getActiveWorkbenchWindow().getShell();
32                 UpdateManagerUI.openInstaller(currentShell);
33             }
34         };
35
36         Shell currentShell = PlatformUI.getWorkbench()
37             .getActiveWorkbenchWindow().getShell();
38         currentShell.getDisplay().asyncExec(r);
39     }
40 }
41
Popular Tags