public DeleteWizard(Refactoring refactoring) { super(refactoring, DIALOG_BASED_USER_INTERFACE); setDefaultPageTitle(RefactoringMessages.DeleteWizard_1); fProcessor= refactoring.getAdapter(JavaDeleteProcessor.class); fProcessor.setQueries(new ReorgQueries(this)); }
public DeleteWizard(Refactoring refactoring) { super(refactoring, DIALOG_BASED_USER_INTERFACE); setDefaultPageTitle(RefactoringMessages.DeleteWizard_1); fProcessor= refactoring.getAdapter(JavaDeleteProcessor.class); fProcessor.setQueries(new ReorgQueries(this)); }
public DeleteWizard(Refactoring refactoring) { super(refactoring, DIALOG_BASED_USER_INTERFACE | YES_NO_BUTTON_STYLE | NO_PREVIEW_PAGE | NO_BACK_BUTTON_ON_STATUS_DIALOG); setDefaultPageTitle(RefactoringMessages.DeleteWizard_1); ((JavaDeleteProcessor)((DeleteRefactoring)getRefactoring()).getProcessor()).setQueries(new ReorgQueries(this)); }
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 static void startCopyRefactoring(IResource[] resources, IJavaElement[] javaElements, Shell shell) throws JavaModelException { ICopyPolicy copyPolicy= ReorgPolicyFactory.createCopyPolicy(resources, javaElements); if (copyPolicy.canEnable()) { JavaCopyProcessor processor= new JavaCopyProcessor(copyPolicy); CopyRefactoring refactoring= new JavaCopyRefactoring(processor); RefactoringWizard wizard= new ReorgCopyWizard(refactoring); processor.setNewNameQueries(new NewNameQueries(wizard)); processor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(refactoring, wizard, shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, RefactoringSaveHelper.SAVE_NOTHING); } }
public static void startMoveRefactoring(final IResource[] resources, final IJavaElement[] elements, final Shell shell) throws JavaModelException { IMovePolicy policy= ReorgPolicyFactory.createMovePolicy(resources, elements); if (policy.canEnable()) { final JavaMoveProcessor processor= new JavaMoveProcessor(policy); final JavaMoveRefactoring refactoring= new JavaMoveRefactoring(processor); final RefactoringWizard wizard= new ReorgMoveWizard(refactoring); processor.setCreateTargetQueries(new CreateTargetQueries(wizard)); processor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(refactoring, wizard, shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, RefactoringSaveHelper.SAVE_ALL); } }
public static void startCopyRefactoring(IResource[] resources, IJavaElement[] javaElements, Shell shell) throws JavaModelException { ICopyPolicy copyPolicy= ReorgPolicyFactory.createCopyPolicy(resources, javaElements); if (copyPolicy.canEnable()) { JavaCopyProcessor processor= new JavaCopyProcessor(copyPolicy); Refactoring refactoring= new CopyRefactoring(processor); RefactoringWizard wizard= new ReorgCopyWizard(processor, refactoring); processor.setNewNameQueries(new NewNameQueries(wizard)); processor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(wizard, shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, processor.getSaveMode()); } }
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 startMoveRefactoring(final IResource[] resources, final IJavaElement[] elements, final Shell shell) throws JavaModelException { IMovePolicy policy= ReorgPolicyFactory.createMovePolicy(resources, elements); if (policy.canEnable()) { JavaMoveProcessor processor= new JavaMoveProcessor(policy); Refactoring refactoring= new MoveRefactoring(processor); RefactoringWizard wizard= new ReorgMoveWizard(processor, refactoring); processor.setCreateTargetQueries(new CreateTargetQueries(wizard)); processor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(wizard, shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, processor.getSaveMode()); } }
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 static void startCopyRefactoring(IResource[] resources, IJavaElement[] javaElements, Shell shell) throws JavaModelException { ICopyPolicy copyPolicy= ReorgPolicyFactory.createCopyPolicy(resources, javaElements); if (copyPolicy.canEnable()) { JavaCopyProcessor processor= new JavaCopyProcessor(copyPolicy); Refactoring refactoring= new CopyRefactoring(processor); RefactoringWizard wizard= new ReorgCopyWizard(processor, refactoring); processor.setNewNameQueries(new NewNameQueries(wizard)); processor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(wizard, shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, processor.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()); } } }
public static void startMoveRefactoring(final IResource[] resources, final IJavaElement[] elements, final Shell shell) throws JavaModelException { IMovePolicy policy= ReorgPolicyFactory.createMovePolicy(resources, elements); if (policy.canEnable()) { JavaMoveProcessor processor= new JavaMoveProcessor(policy); Refactoring refactoring= new MoveRefactoring(processor); RefactoringWizard wizard= new ReorgMoveWizard(processor, refactoring); processor.setCreateTargetQueries(new CreateTargetQueries(wizard)); processor.setReorgQueries(new ReorgQueries(wizard)); new RefactoringStarter().activate(wizard, shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, processor.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()); } } }