@Override public void run() { RefactoringProcessor processor = getRefactoringProcessor(fInfo); PDERefactor refactor = new PDERefactor(processor); RefactoringWizard wizard = getRefactoringWizard(refactor, fInfo); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); try { op.run(getShell(), ""); //$NON-NLS-1$ } catch (final InterruptedException irex) { } }
public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) { RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode); if (! canActivate(saveHelper, parent)) return false; try { RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); int result= op.run(parent, dialogTitle); fStatus= op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerIncrementalBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }
@Override public void run() { try { ReplaceRefactoring refactoring= new ReplaceRefactoring(fResult, fSelection); ReplaceWizard refactoringWizard= new ReplaceWizard(refactoring); if (fSelection == null) { refactoringWizard.setDefaultPageTitle(SearchMessages.ReplaceAction_title_all); } else { refactoringWizard.setDefaultPageTitle(SearchMessages.ReplaceAction_title_selected); } RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(refactoringWizard); op.run(fShell, SearchMessages.ReplaceAction_description_operation); } catch (InterruptedException e) { // refactoring got cancelled } }
public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) { RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode); if (! canActivate(saveHelper, parent)) return false; try { RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); int result= op.run(parent, dialogTitle); fStatus= op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerIncrementalBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }
public void run(IAction action) { //TODO create changes ApiToolingSetupWizard wizard = new ApiToolingSetupWizard(new ApiToolingSetupRefactoring()); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); try { op.run(ApiUIPlugin.getShell(), ActionMessages.ApiToolingSetupObjectContribution_0); } catch(InterruptedException ie) { ApiUIPlugin.log(ie); } }
/** * @param refactoring * @param wizard * @param parent * @param dialogTitle * @param saveMode a save mode from {@link RefactoringSaveHelper} * @return <code>true</code> if the refactoring was executed, <code>false</code> otherwise * @throws JavaModelException */ public boolean activate(Refactoring refactoring, RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) throws JavaModelException { RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode); if (! canActivate(saveHelper, parent)) return false; try { RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); int result= op.run(parent, dialogTitle); fStatus= op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { JavadocConversionWizard wizard = new JavadocConversionWizard(new JavadocConversionRefactoring()); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); try { op.run(ApiUIPlugin.getShell(), Messages.ConvertJavadocTagsHandler_0); } catch (InterruptedException ie) { ApiUIPlugin.log(ie); } return null; } }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { ApiToolingSetupWizard wizard = new ApiToolingSetupWizard(new ApiToolingSetupRefactoring()); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); try { op.run(ApiUIPlugin.getShell(), ActionMessages.ApiToolingSetupObjectContribution_0); } catch (InterruptedException ie) { ApiUIPlugin.log(ie); } return null; } }
public void run(IStructuredSelection selection) { IResource resource = getResource(selection); RenameResourceProcessor processor= new RenameResourceProcessor(resource); if(!processor.isApplicable()) return; RenameRefactoring refactoring= new RenameRefactoring(processor); try { RefactoringWizard wizard = new RenameRefactoringWizard( refactoring, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, //TODO: provide correct strings RefactoringWizardMessages.RenameComponentWizard_inputPage_description, null); RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle()); } catch (InterruptedException e) { // do nothing. User action got cancelled } }
private void run(Shell shell) { if (shell == null) { // We won't have an active shell if the user right-clicked on an item without // selecting it first shell = PlatformUI.getWorkbench().getDisplay().getActiveShell(); } if (shell == null) { System.out.println("Can't get a shell, is the Eclipse window active?"); return; } // RefactoringProcessor processor = new RenamePropertyProcessor( info ); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); ConvertFromJUnitRefactoring ref = new ConvertFromJUnitRefactoring(page, null /* status */); ConvertFromJUnitWizard wizard = new ConvertFromJUnitWizard(ref, 0); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); try { String titleForFailedChecks = ""; //$NON-NLS-1$ op.run(shell, titleForFailedChecks); } catch( InterruptedException irex ) { // operation was cancelled } } }
public void run(ISelection selection) { RenameTargetNamespaceProcessor processor = new RenameTargetNamespaceProcessor(getSchema(), getSchema().getTargetNamespace()); RenameRefactoring refactoring = new RenameRefactoring(processor); try { RefactoringWizard wizard = new RenameRefactoringWizard( refactoring, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle,//TODO: provide correct strings 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 } }
PDERefactor refactor = new PDERefactor(processor); OrganizeManifestsWizard wizard = new OrganizeManifestsWizard(refactor); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); op.run(PDEPlugin.getActiveWorkbenchShell(), ""); //$NON-NLS-1$ } catch (final InterruptedException irex) {
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, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, // TODO: provide correct strings 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 } }
.RenameComponentWizard_inputPage_description, null); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation( wizard); op.run(XSDEditorPlugin.getShell(), wizard .getDefaultPageTitle());
PDERefactor refactor = new PDERefactor(processor); ExternalizeStringsWizard wizard = new ExternalizeStringsWizard(changeTable, refactor); RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); op.run(PDEPlugin.getActiveWorkbenchShell(), ""); //$NON-NLS-1$ } catch (final InterruptedException irex) {