use of org.eclipse.ltk.core.refactoring.participants.RenameRefactoring in project che by eclipse.
the class RenameTypeParameterRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
RenameTypeParameterProcessor processor = new RenameTypeParameterProcessor(arguments, status);
return new RenameRefactoring(processor);
}
use of org.eclipse.ltk.core.refactoring.participants.RenameRefactoring in project che by eclipse.
the class RenameTypeRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
RenameTypeProcessor processor = new RenameTypeProcessor(arguments, status);
return new RenameRefactoring(processor);
}
use of org.eclipse.ltk.core.refactoring.participants.RenameRefactoring in project webtools.sourceediting by eclipse.
the class RenameComponentAction method run.
public void run(ISelection selection) {
if (selectedComponent.getName() == null) {
selectedComponent.setName(new String());
}
if (selectedComponent.getSchema() == null) {
if (getSchema() != null) {
getSchema().updateElement(true);
}
}
boolean rc = SaveDirtyFilesDialog.saveDirtyFiles();
if (!rc) {
return;
}
RefactoringComponent component = new XMLRefactoringComponent(selectedComponent, (IDOMElement) selectedComponent.getElement(), selectedComponent.getName(), selectedComponent.getTargetNamespace());
RenameComponentProcessor processor = new RenameComponentProcessor(component, selectedComponent.getName());
RenameRefactoring refactoring = new RenameRefactoring(processor);
try {
RefactoringWizard wizard = new RenameRefactoringWizard(refactoring, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, RefactoringWizardMessages.RenameComponentWizard_inputPage_description, null);
RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle());
// TODO (cs) I'm not sure why we need to do this. See bug 145700
// triggerBuild();
} catch (InterruptedException e) {
// do nothing. User action got cancelled
}
}
use of org.eclipse.ltk.core.refactoring.participants.RenameRefactoring in project webtools.sourceediting by eclipse.
the class MakeAnonymousTypeGlobalAction method run1.
public void run1() {
if (fSelectedComponent == null) {
return;
}
if (fSelectedComponent.getSchema() == null) {
getSchema().updateElement(true);
}
MakeTypeGlobalProcessor processor = new MakeTypeGlobalProcessor(fSelectedComponent, getNewDefaultName());
RenameRefactoring refactoring = new RenameRefactoring(processor);
try {
RefactoringWizard wizard = new RenameRefactoringWizard(refactoring, // TODO: provide correct strings
RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, RefactoringWizardMessages.RenameComponentWizard_inputPage_description, null);
RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle());
// triggerBuild();
} catch (InterruptedException e) {
// do nothing. User action got cancelled
}
}
use of org.eclipse.ltk.core.refactoring.participants.RenameRefactoring in project webtools.sourceediting by eclipse.
the class RenameTargetNamespaceAction method run.
public void run(ISelection selection) {
RenameTargetNamespaceProcessor processor = new RenameTargetNamespaceProcessor(getSchema(), getSchema().getTargetNamespace());
RenameRefactoring refactoring = new RenameRefactoring(processor);
try {
RefactoringWizard wizard = new RenameRefactoringWizard(refactoring, // TODO: provide correct strings
RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, RefactoringWizardMessages.RenameComponentWizard_inputPage_description, null);
RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle());
triggerBuild();
} catch (InterruptedException e) {
// do nothing. User action got cancelled
}
}
Aggregations