diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java deleted file mode 100644 index e24977b91d..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * - *******************************************************************************/ -package org.eclipse.wst.xsd.ui.internal.refactor.wizard; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ltk.core.refactoring.Refactoring; -import org.eclipse.ltk.core.refactoring.RefactoringStatus; -import org.eclipse.ltk.ui.refactoring.RefactoringWizard; -import org.eclipse.wst.xsd.ui.internal.refactor.INameUpdating; - -public class RenameRefactoringWizard extends RefactoringWizard { - - private final String fInputPageDescription; - - private final ImageDescriptor fInputPageImageDescriptor; - - public RenameRefactoringWizard(Refactoring refactoring, String defaultPageTitle, String inputPageDescription, - ImageDescriptor inputPageImageDescriptor) { - super(refactoring, DIALOG_BASED_USER_INTERFACE); - setDefaultPageTitle(defaultPageTitle); - fInputPageDescription= inputPageDescription; - fInputPageImageDescriptor= inputPageImageDescriptor; - - } - - /* non java-doc - * @see RefactoringWizard#addUserInputPages - */ - protected void addUserInputPages() { - String initialSetting= getProcessor().getCurrentElementName(); - RenameInputWizardPage inputPage= createInputPage(fInputPageDescription, initialSetting); - inputPage.setImageDescriptor(fInputPageImageDescriptor); - addPage(inputPage); - } - - protected INameUpdating getProcessor() { - - return (INameUpdating)getRefactoring().getAdapter(INameUpdating.class); - } - - - protected RenameInputWizardPage createInputPage(String message, String initialSetting) { - return new RenameInputWizardPage(message, true, initialSetting) { - protected RefactoringStatus validateTextField(String text) { - return validateNewName(text); - } - }; - } - - protected RefactoringStatus validateNewName(String newName) { - INameUpdating ref= getProcessor(); - ref.setNewElementName(newName); -// try{ - return ref.checkNewElementName(newName); -// } catch (CoreException e){ -// //XXX: should log the exception -// String msg= e.getMessage() == null ? "": e.getMessage(); //$NON-NLS-1$ -// return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.getFormattedString("RenameRefactoringWizard.internal_error", msg));//$NON-NLS-1$ -// } - } - - -} |