]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringStarter.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui refactoring / org / eclipse / jdt / internal / ui / refactoring / actions / RefactoringStarter.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2009 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.internal.ui.refactoring.actions;
12
13 import org.eclipse.swt.widgets.Shell;
14
15 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
16 import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
17
18 import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
19
20
21 /**
22  * A helper class to activate the UI of a refactoring
23  */
24 public class RefactoringStarter {
25
26         public RefactoringStatus fStatus;
27
28         public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) {
29                 RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode);
30                 return saveHelper.generated_6448363496418548998(wizard, parent, dialogTitle, this);
31         }
32
33         public RefactoringStatus getInitialConditionCheckingStatus() {
34                 return fStatus;
35         }
36
37         public boolean canActivate(RefactoringSaveHelper saveHelper, Shell shell) {
38                 return saveHelper.saveEditors(shell);
39         }
40 }