upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / internal / ui / refactoring / extractconstant / ExtractConstantRefactoringWizard.java
1 /*******************************************************************************
2  * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
3  * Rapperswil, University of applied sciences and others
4  * All rights reserved. This program and the accompanying materials 
5  * are made available under the terms of the Eclipse Public License v1.0 
6  * which accompanies this distribution, and is available at 
7  * http://www.eclipse.org/legal/epl-v10.html  
8  *  
9  * Contributors: 
10  * Institute for Software - initial API and implementation
11  *******************************************************************************/
12 package org.eclipse.cdt.internal.ui.refactoring.extractconstant;
13
14 import org.eclipse.ltk.core.refactoring.Refactoring;
15 import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
16
17 import org.eclipse.cdt.internal.ui.refactoring.MethodContext.ContextType;
18 import org.eclipse.cdt.internal.ui.refactoring.dialogs.ExtractInputPage;
19
20 /**
21  * The wizard page for Extract Constant Refactoring, creates the UI page.
22  */
23 public class ExtractConstantRefactoringWizard extends RefactoringWizard {
24
25         private ExtractInputPage page;
26         private final ExtractConstantInfo info;
27
28         public ExtractConstantRefactoringWizard(Refactoring refactoring, ExtractConstantInfo info) {
29                 super(refactoring, WIZARD_BASED_USER_INTERFACE);
30                 this.info = info;
31         }
32
33         @Override
34         protected void addUserInputPages() {
35                 page = new InputPage(Messages.ExtractConstantRefactoring_ExtractConst, info, info.getMContext().getType() == ContextType.METHOD); 
36                 addPage(page);
37
38         }
39 }