]> git.uio.no Git - ifi-stolz-refaktor.git/blame - 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
CommitLineData
1b2798f6
EK
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 *******************************************************************************/
11package org.eclipse.jdt.internal.ui.refactoring.actions;
12
13import org.eclipse.swt.widgets.Shell;
14
15import org.eclipse.ltk.core.refactoring.RefactoringStatus;
16import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
17
18import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
19
20
21/**
22 * A helper class to activate the UI of a refactoring
23 */
24public 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}