01: package org.drools.eclipse.rulebuilder.wizards;
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 BRL guided rule file.
12: */
13: public class NewBrlFileWizard extends Wizard implements INewWizard {
14:
15: private IWorkbench workbench;
16: private IStructuredSelection selection;
17: private NewBrlFileWizardPage mainPage;
18:
19: public void init(IWorkbench workbench,
20: IStructuredSelection selection) {
21: this .workbench = workbench;
22: this .selection = selection;
23: setWindowTitle("New Guided Rule");
24: ImageDescriptor desc = DroolsEclipsePlugin
25: .getImageDescriptor("icons/drools-large.PNG");
26: setDefaultPageImageDescriptor(desc);
27: }
28:
29: public void addPages() {
30: mainPage = new NewBrlFileWizardPage(workbench, selection);
31: addPage(mainPage);
32: }
33:
34: public boolean performFinish() {
35: return mainPage.finish();
36: }
37: }
|