public void run(Shell parent) throws InterruptedException, InvocationTargetException { IRunnableContext context= new ProgressMonitorDialog(parent); new RefactoringExecutionHelper(fPasteRefactoring, RefactoringCore.getConditionCheckingFailedSeverity(), RefactoringSaveHelper.SAVE_NOTHING, parent, context).perform(false, false); } }
public void run(Shell parent) throws InterruptedException, InvocationTargetException { IRunnableContext context= new ProgressMonitorDialog(parent); new RefactoringExecutionHelper(fPasteRefactoring, RefactoringCore.getConditionCheckingFailedSeverity(), RefactoringSaveHelper.SAVE_NOTHING, parent, context).perform(false, false); } }
public void run(Shell parent) throws InterruptedException, InvocationTargetException { IRunnableContext context= new ProgressMonitorDialog(parent); new RefactoringExecutionHelper(fPasteRefactoring, RefactoringCore.getConditionCheckingFailedSeverity(), RefactoringSaveHelper.SAVE_NOTHING, parent, context).perform(false, false); } }
public void run(Shell parent) throws InterruptedException, InvocationTargetException { IRunnableContext context= new ProgressMonitorDialog(parent); fCopyProcessor.setNewNameQueries(new NewNameQueries(parent)); fCopyProcessor.setReorgQueries(new ReorgQueries(parent)); new RefactoringExecutionHelper(new JavaCopyRefactoring(fCopyProcessor), RefactoringCore.getConditionCheckingFailedSeverity(), RefactoringSaveHelper.SAVE_NOTHING, parent, context).perform(false, false); } }
public static void startCutRefactoring(final Object[] elements, final Shell shell) throws InterruptedException, InvocationTargetException { JavaDeleteProcessor processor= new JavaDeleteProcessor(elements); processor.setSuggestGetterSetterDeletion(false); processor.setQueries(new ReorgQueries(shell)); Refactoring refactoring= new DeleteRefactoring(processor); int stopSeverity= RefactoringCore.getConditionCheckingFailedSeverity(); new RefactoringExecutionHelper(refactoring, stopSeverity, RefactoringSaveHelper.SAVE_NOTHING, shell, new ProgressMonitorDialog(shell)).perform(false, false); }
public static void startCutRefactoring(final Object[] elements, final Shell shell) throws InterruptedException, InvocationTargetException { JavaDeleteProcessor processor= new JavaDeleteProcessor(elements); processor.setSuggestGetterSetterDeletion(false); processor.setQueries(new ReorgQueries(shell)); Refactoring refactoring= new DeleteRefactoring(processor); int stopSeverity= RefactoringCore.getConditionCheckingFailedSeverity(); new RefactoringExecutionHelper(refactoring, stopSeverity, RefactoringSaveHelper.SAVE_NOTHING, shell, new ProgressMonitorDialog(shell)).perform(false, false); }
public void run(Shell parent) throws InterruptedException, InvocationTargetException { IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); fCopyProcessor.setNewNameQueries(new NewNameQueries(parent)); fCopyProcessor.setReorgQueries(new ReorgQueries(parent)); CopyRefactoring refactoring= new CopyRefactoring(fCopyProcessor); new RefactoringExecutionHelper(refactoring, RefactoringCore.getConditionCheckingFailedSeverity(), fCopyProcessor.getSaveMode(), parent, context).perform(false, false); } }
public static void startCutRefactoring(final Object[] elements, final Shell shell) throws CoreException, InterruptedException, InvocationTargetException { final JavaDeleteProcessor processor= new JavaDeleteProcessor(elements); processor.setSuggestGetterSetterDeletion(false); processor.setQueries(new ReorgQueries(shell)); new RefactoringExecutionHelper(new JavaDeleteRefactoring(processor), RefactoringCore.getConditionCheckingFailedSeverity(), RefactoringSaveHelper.SAVE_NOTHING, shell, new ProgressMonitorDialog(shell)).perform(false, false); }
public void run(Shell parent) throws InterruptedException, InvocationTargetException { IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); fCopyProcessor.setNewNameQueries(new NewNameQueries(parent)); fCopyProcessor.setReorgQueries(new ReorgQueries(parent)); CopyRefactoring refactoring= new CopyRefactoring(fCopyProcessor); new RefactoringExecutionHelper(refactoring, RefactoringCore.getConditionCheckingFailedSeverity(), fCopyProcessor.getSaveMode(), parent, context).perform(false, false); } }
RefactoringCore.getConditionCheckingFailedSeverity(), getJavaRenameProcessor().getSaveMode(), parent,
RefactoringCore.getConditionCheckingFailedSeverity(), getJavaRenameProcessor().getSaveMode(), parent,
RefactoringCore.getConditionCheckingFailedSeverity(), getJavaRenameProcessor().getSaveMode(), parent,
public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) { if (stateMask == SWT.CONTROL && fCleanUp != null){ CleanUpRefactoring refactoring= new CleanUpRefactoring(); refactoring.addCompilationUnit(getCompilationUnit()); refactoring.addCleanUp(fCleanUp); refactoring.setLeaveFilesDirty(true); int stopSeverity= RefactoringCore.getConditionCheckingFailedSeverity(); Shell shell= JavaPlugin.getActiveWorkbenchShell(); ProgressMonitorDialog context= new ProgressMonitorDialog(shell); RefactoringExecutionHelper executer= new RefactoringExecutionHelper(refactoring, stopSeverity, RefactoringSaveHelper.SAVE_NOTHING, shell, context); try { executer.perform(true, true); } catch (InterruptedException e) { } catch (InvocationTargetException e) { JavaPlugin.log(e); } return; } apply(viewer.getDocument()); }
@Override public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) { if ((stateMask & SWT.MODIFIER_MASK) == SWT.CONTROL && fCleanUp != null) { CleanUpRefactoring refactoring= new CleanUpRefactoring(); refactoring.addCompilationUnit(getCompilationUnit()); refactoring.addCleanUp(fCleanUp); refactoring.setLeaveFilesDirty(true); int stopSeverity= RefactoringCore.getConditionCheckingFailedSeverity(); Shell shell= JavaPlugin.getActiveWorkbenchShell(); IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); RefactoringExecutionHelper executer= new RefactoringExecutionHelper(refactoring, stopSeverity, RefactoringSaveHelper.SAVE_NOTHING, shell, context); try { executer.perform(true, true); } catch (InterruptedException e) { } catch (InvocationTargetException e) { JavaPlugin.log(e); } return; } apply(viewer.getDocument()); }
@Override public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) { if ((stateMask & SWT.MODIFIER_MASK) == SWT.CONTROL && fCleanUp != null) { CleanUpRefactoring refactoring= new CleanUpRefactoring(); refactoring.addCompilationUnit(getCompilationUnit()); refactoring.addCleanUp(fCleanUp); refactoring.setLeaveFilesDirty(true); int stopSeverity= RefactoringCore.getConditionCheckingFailedSeverity(); Shell shell= JavaPlugin.getActiveWorkbenchShell(); IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); RefactoringExecutionHelper executer= new RefactoringExecutionHelper(refactoring, stopSeverity, RefactoringSaveHelper.SAVE_NOTHING, shell, context); try { executer.perform(true, true); } catch (InterruptedException e) { } catch (InvocationTargetException e) { JavaPlugin.log(e); } return; } apply(viewer.getDocument()); }
public void run(Shell parent) throws InterruptedException, InvocationTargetException { try { JavaMoveRefactoring ref= new JavaMoveRefactoring(fMoveProcessor); if (fMoveProcessor.hasAllInputSet()) { IRunnableContext context= new ProgressMonitorDialog(parent); fMoveProcessor.setCreateTargetQueries(new CreateTargetQueries(parent)); fMoveProcessor.setReorgQueries(new ReorgQueries(parent)); new RefactoringExecutionHelper(ref, RefactoringCore.getConditionCheckingFailedSeverity(), RefactoringSaveHelper.SAVE_ALL, parent, context).perform(false, false); } else { RefactoringWizard wizard= new ReorgMoveWizard(ref); /* * We want to get the shell from the refactoring dialog but it's not known at this point, * so we pass the wizard and then, once the dialog is open, we will have access to its shell. */ fMoveProcessor.setCreateTargetQueries(new CreateTargetQueries(wizard)); fMoveProcessor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(ref, wizard, parent, RefactoringMessages.OpenRefactoringWizardAction_refactoring, RefactoringSaveHelper.SAVE_ALL); } } catch (JavaModelException e) { ExceptionHandler.handle(e, RefactoringMessages.OpenRefactoringWizardAction_refactoring, RefactoringMessages.OpenRefactoringWizardAction_exception); } } }
public boolean run(Shell parent) throws InterruptedException, InvocationTargetException { Refactoring ref= new MoveRefactoring(fMoveProcessor); if (fMoveProcessor.hasAllInputSet()) { IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); fMoveProcessor.setCreateTargetQueries(new CreateTargetQueries(parent)); fMoveProcessor.setReorgQueries(new ReorgQueries(parent)); new RefactoringExecutionHelper(ref, RefactoringCore.getConditionCheckingFailedSeverity(), fMoveProcessor.getSaveMode(), parent, context).perform(false, false); return true; } else { RefactoringWizard wizard= new ReorgMoveWizard(fMoveProcessor, ref); /* * We want to get the shell from the refactoring dialog but it's not known at this point, * so we pass the wizard and then, once the dialog is open, we will have access to its shell. */ fMoveProcessor.setCreateTargetQueries(new CreateTargetQueries(wizard)); fMoveProcessor.setReorgQueries(new ReorgQueries(wizard)); return new RefactoringStarter().activate(wizard, parent, RefactoringMessages.OpenRefactoringWizardAction_refactoring, fMoveProcessor.getSaveMode()); } } }
public boolean run(Shell parent) throws InterruptedException, InvocationTargetException { Refactoring ref= new MoveRefactoring(fMoveProcessor); if (fMoveProcessor.hasAllInputSet()) { IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); fMoveProcessor.setCreateTargetQueries(new CreateTargetQueries(parent)); fMoveProcessor.setReorgQueries(new ReorgQueries(parent)); new RefactoringExecutionHelper(ref, RefactoringCore.getConditionCheckingFailedSeverity(), fMoveProcessor.getSaveMode(), parent, context).perform(false, false); return true; } else { RefactoringWizard wizard= new ReorgMoveWizard(fMoveProcessor, ref); /* * We want to get the shell from the refactoring dialog but it's not known at this point, * so we pass the wizard and then, once the dialog is open, we will have access to its shell. */ fMoveProcessor.setCreateTargetQueries(new CreateTargetQueries(wizard)); fMoveProcessor.setReorgQueries(new ReorgQueries(wizard)); return new RefactoringStarter().activate(wizard, parent, RefactoringMessages.OpenRefactoringWizardAction_refactoring, fMoveProcessor.getSaveMode()); } } }
int threshold= RefactoringCore.getConditionCheckingFailedSeverity(); RefactoringStatus activationStatus= wizard.getInitialConditionCheckingStatus(); RefactoringStatus inputStatus= null;