diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameRefactoringWizard.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameRefactoringWizard.java | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameRefactoringWizard.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameRefactoringWizard.java deleted file mode 100644 index 57c6960b4f..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameRefactoringWizard.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.xsd.ui.internal.refactor.rename; - -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; - -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$ -// } - } - - -} |