01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.tests.macro;
11:
12: import org.eclipse.jface.wizard.Wizard;
13:
14: public class IndexWizard extends Wizard {
15: private IndexPage page;
16: private MacroManager macroManager;
17:
18: public IndexWizard(MacroManager manager) {
19: this .macroManager = manager;
20: setWindowTitle("Macro Recorder");
21: }
22:
23: public void addPages() {
24: page = new IndexPage(macroManager.getExistingIndices());
25: addPage(page);
26: }
27:
28: public boolean performFinish() {
29: String indexId = page.getIndexId();
30: if (indexId != null) {
31: macroManager.addIndex(indexId);
32: }
33: return true;
34: }
35: }
|