01: package org.drools.eclipse.wizard.decisiontable;
02:
03: import org.drools.eclipse.DroolsEclipsePlugin;
04: import org.eclipse.jface.resource.ImageDescriptor;
05: import org.eclipse.jface.viewers.IStructuredSelection;
06: import org.eclipse.jface.wizard.Wizard;
07: import org.eclipse.ui.INewWizard;
08: import org.eclipse.ui.IWorkbench;
09:
10: /**
11: * A wizard to create a Decision Table scaffold.
12: *
13: * @author Michael Neale
14: */
15: public class NewDTFileWizard extends Wizard implements INewWizard {
16:
17: private IWorkbench workbench;
18: private IStructuredSelection selection;
19: private NewDTFilePage mainPage;
20:
21: public void init(IWorkbench workbench,
22: IStructuredSelection selection) {
23: this .workbench = workbench;
24: this .selection = selection;
25: setWindowTitle("New Decision Table");
26: ImageDescriptor desc = DroolsEclipsePlugin
27: .getImageDescriptor("icons/dt-large.gif");
28: setDefaultPageImageDescriptor(desc);
29: }
30:
31: public void addPages() {
32: mainPage = new NewDTFilePage(workbench, selection);
33: addPage(mainPage);
34: }
35:
36: public boolean performFinish() {
37: return mainPage.finish();
38: }
39:
40: }
|