1 11 package org.eclipse.platform.doc.isv.activeHelp; 12 13 import org.eclipse.help.ILiveHelpAction; 14 import org.eclipse.jface.dialogs.MessageDialog; 15 import org.eclipse.swt.widgets.Display; 16 import org.eclipse.swt.widgets.Shell; 17 import org.eclipse.ui.IWorkbenchWindow; 18 import org.eclipse.ui.PlatformUI; 19 20 27 public class ActiveHelpOpenDialogAction implements ILiveHelpAction { 28 29 public void setInitializationString(String data) { 30 } 32 33 public void run() { 34 Display.getDefault().syncExec(new Runnable () { 36 public void run() { 37 IWorkbenchWindow window = 38 PlatformUI.getWorkbench().getActiveWorkbenchWindow(); 39 if (window != null) { 40 Shell shell = window.getShell(); 44 shell.setMinimized(false); 45 shell.forceActive(); 46 MessageDialog.openInformation( 48 window.getShell(), 49 "Hello World.", "Hello World."); } 52 } 53 }); 54 } 55 } 56 | Popular Tags |