Home | History | Annotate | Download | only in extractstring
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Eclipse Public License, Version 1.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.eclipse.org/org/documents/epl-v10.php
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.ide.eclipse.adt.internal.refactorings.extractstring;
     18 
     19 import org.eclipse.core.resources.IProject;
     20 import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
     21 
     22 /**
     23  * A wizard for ExtractString based on a simple dialog with one page.
     24  *
     25  * @see ExtractStringInputPage
     26  * @see ExtractStringRefactoring
     27  */
     28 public class ExtractStringWizard extends RefactoringWizard {
     29 
     30     private final IProject mProject;
     31 
     32     /**
     33      * Create a wizard for ExtractString based on a simple dialog with one page.
     34      *
     35      * @param ref The instance of {@link ExtractStringRefactoring} to associate to the wizard.
     36      * @param project The project where the wizard was invoked from (e.g. where the user selection
     37      *                happened, so that we can retrieve project resources.)
     38      */
     39     public ExtractStringWizard(ExtractStringRefactoring ref, IProject project) {
     40         super(ref, DIALOG_BASED_USER_INTERFACE | PREVIEW_EXPAND_FIRST_NODE);
     41         mProject = project;
     42         setDefaultPageTitle(ref.getName());
     43     }
     44 
     45     @Override
     46     protected void addUserInputPages() {
     47         addPage(new ExtractStringInputPage(mProject));
     48     }
     49 
     50 }
     51