private void addUpdateReferenceComponent(Composite result) { final JavaMoveProcessor processor= getJavaMoveProcessor(); if (! processor.canUpdateReferences()) return; fReferenceCheckbox= new Button(result, SWT.CHECK); fReferenceCheckbox.setText(ReorgMessages.JdtMoveAction_update_references); fReferenceCheckbox.setSelection(processor.getUpdateReferences()); fReferenceCheckbox.setEnabled(canUpdateReferences()); fReferenceCheckbox.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { processor.setUpdateReferences(((Button)e.widget).getSelection()); updateUIStatus(); } }); }
private boolean canUpdateReferences() { return getJavaMoveProcessor().canUpdateReferences(); }
protected IReorgDestinationValidator getDestinationValidator() { return getJavaMoveProcessor(); }
protected IJavaElement[] getJavaElements() { return getJavaMoveProcessor().getJavaElements(); }
protected IResource[] getResources() { return getJavaMoveProcessor().getResources(); }
protected Object getInitiallySelectedElement() { return getJavaMoveProcessor().getCommonParentForInputElements(); }
@Override protected IReorgDestinationValidator getDestinationValidator() { return getJavaMoveProcessor(); }
@Override protected boolean performFinish() { return super.performFinish() || getJavaMoveProcessor().wasCanceled(); //close the dialog if canceled }
@Override protected Object getInitiallySelectedElement() { return getJavaMoveProcessor().getCommonParentForInputElements(); }
@Override protected IJavaElement[] getJavaElements() { return getJavaMoveProcessor().getJavaElements(); }
@Override protected IJavaElement[] getJavaElements() { return getJavaMoveProcessor().getJavaElements(); }
@Override protected IReorgDestinationValidator getDestinationValidator() { return getJavaMoveProcessor(); }
@Override protected Object getInitiallySelectedElement() { return getJavaMoveProcessor().getCommonParentForInputElements(); }
protected boolean performFinish() { return super.performFinish() || getJavaMoveProcessor().wasCanceled(); //close the dialog if canceled }
@Override protected RefactoringStatus verifyDestination(Object selected) throws JavaModelException{ JavaMoveProcessor processor= getJavaMoveProcessor(); final RefactoringStatus refactoringStatus= processor.setDestination(ReorgDestinationFactory.createDestination(selected)); updateUIStatus(); fDestination= selected; return refactoringStatus; }
@Override protected IResource[] getResources() { return getJavaMoveProcessor().getResources(); }
@Override protected boolean performFinish() { return super.performFinish() || getJavaMoveProcessor().wasCanceled(); //close the dialog if canceled }
@Override protected IResource[] getResources() { return getJavaMoveProcessor().getResources(); }
@Override protected RefactoringStatus verifyDestination(Object selected) throws JavaModelException{ JavaMoveProcessor processor= getJavaMoveProcessor(); final RefactoringStatus refactoringStatus= processor.setDestination(ReorgDestinationFactory.createDestination(selected)); updateUIStatus(); fDestination= selected; return refactoringStatus; }
protected RefactoringStatus verifyDestination(Object selected) throws JavaModelException{ JavaMoveProcessor processor= getJavaMoveProcessor(); final RefactoringStatus refactoringStatus; if (selected instanceof IJavaElement) refactoringStatus= processor.setDestination((IJavaElement)selected); else if (selected instanceof IResource) refactoringStatus= processor.setDestination((IResource)selected); else refactoringStatus= RefactoringStatus.createFatalErrorStatus(ReorgMessages.ReorgMoveWizard_4); updateUIStatus(); fDestination= selected; return refactoringStatus; }