|
Lines 22-31
Link Here
|
| 22 |
import org.eclipse.ui.IViewPart; |
22 |
import org.eclipse.ui.IViewPart; |
| 23 |
import org.eclipse.ui.IWorkbench; |
23 |
import org.eclipse.ui.IWorkbench; |
| 24 |
import org.eclipse.ui.IWorkbenchWindow; |
24 |
import org.eclipse.ui.IWorkbenchWindow; |
|
|
25 |
import org.eclipse.ui.PlatformUI; |
| 25 |
|
26 |
|
| 26 |
/** |
27 |
/** |
| 27 |
* @author jnevicos |
28 |
* New generic recording action. |
| 28 |
* |
29 |
* |
|
|
30 |
* @author Jeff Nevicosi |
| 31 |
* @author Paul E. Slauenwhite |
| 32 |
* @version August 24, 2007 |
| 33 |
* @since October 28, 2005 |
| 29 |
*/ |
34 |
*/ |
| 30 |
public class NewGenericRecordingAction |
35 |
public class NewGenericRecordingAction |
| 31 |
extends Action |
36 |
extends Action |
|
Lines 53-63
Link Here
|
| 53 |
*/ |
58 |
*/ |
| 54 |
public void run() |
59 |
public void run() |
| 55 |
{ |
60 |
{ |
| 56 |
NewTestFromRecordingWizard wiz = new NewTestFromRecordingWizard(); |
61 |
|
| 57 |
wiz.init(getWorkbench(),getSelection()); |
62 |
NewTestFromRecordingWizard wizard = new NewTestFromRecordingWizard(); |
| 58 |
WizardDialog wizDlg = new WizardDialog(getWorkbench().getActiveWorkbenchWindow().getShell(), |
63 |
wizard.init(getWorkbench(),getSelection()); |
| 59 |
wiz); |
64 |
|
| 60 |
wizDlg.open(); |
65 |
//Remove the 'Help' button for consistency (for example, use the circled '?' button): |
|
|
66 |
wizard.setHelpAvailable(false); |
| 67 |
|
| 68 |
WizardDialog wizardDialog = new WizardDialog(getWorkbench().getActiveWorkbenchWindow().getShell(),wizard); |
| 69 |
|
| 70 |
//Ensure the context help is available for this wizard dialog: |
| 71 |
wizardDialog.create(); |
| 72 |
|
| 73 |
//Set the size of the wizard dialog (500 x 500) for consistency with the 'File > New' wizard: |
| 74 |
wizardDialog.getShell().setSize(Math.max(500, wizardDialog.getShell().getSize().x),500); |
| 75 |
|
| 76 |
//Set the context help of the wizard dialog for consistency with the 'File > New' wizard: |
| 77 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(wizardDialog.getShell(), (PlatformUI.PLUGIN_ID + ".new_wizard_context")); |
| 78 |
|
| 79 |
wizardDialog.open(); |
| 61 |
} |
80 |
} |
| 62 |
|
81 |
|
| 63 |
/* (non-Javadoc) |
82 |
/* (non-Javadoc) |