	public void run() {
		Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
		try {
			if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true)) {
				Constructor<RubyRefactoring> constructor = refactoringClass.getConstructors()[0];
				Object[] args;
				if(constructor.getParameterTypes().length == 1) {
					args = new Object[] {selectionProvider};
				} else {
					args = new Object[0];
				}
				RubyRefactoring refactoring = constructor.newInstance(args);
				RubyRefactoringWizard wizard = new RubyRefactoringWizard(refactoring);
				wizard.setWindowTitle(refactoring.getName());
				RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
				op.run(shell, refactoring.getName());
			}
		} catch (Exception e) {
			RubyPlugin.log(e);
		}
	}

	public void run() {
		Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
		try {
			if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true)) {
				Constructor<? extends RubyRefactoring> constructor = (Constructor<? extends RubyRefactoring>) refactoringClass.getConstructors()[0];
				Object[] args;
				if(constructor.getParameterTypes().length == 1) {
					args = new Object[] {selectionProvider};
				} else {
					args = new Object[0];
				}
				RubyRefactoring refactoring = constructor.newInstance(args);
				RubyRefactoringWizard wizard = new RubyRefactoringWizard(refactoring);
				wizard.setWindowTitle(refactoring.getName());
				RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
				op.run(shell, refactoring.getName());
			}
		} catch (Exception e) {
			RubyPlugin.log(e);
		}
	}
