Search in sources :

Example 1 with WranglerWarningException

use of org.erlide.wrangler.refactoring.core.exception.WranglerWarningException in project erlide_eclipse by erlang.

the class AbstractDuplicatesSearcherAction method run.

/**
 * Runs the refactoring.
 */
public void run() {
    // TODO: run it in a new thread
    selectionChanged();
    if (getUserInput()) {
        final IProgressMonitor monitor = new NullProgressMonitor();
        try {
            IResultParser result;
            monitor.beginTask("Detecting..", 0);
            result = callRefactoring();
            if (result.isSuccessful()) {
                showDuplicatesView();
                addDuplicates(result.getDuplicates());
            } else {
                DuplicatesUIManager.closeDuplicatesView();
                displayErrorNotification(result.getErrorMessage());
            }
        } catch (final WranglerWarningException e) {
        } catch (final WranglerRpcParsingException e) {
            displayErrorNotification(rpcErrorMsg);
        } catch (final CoreException e) {
            displayErrorNotification(rpcErrorMsg);
        } catch (final IOException e) {
            displayErrorNotification(rpcErrorMsg);
        } finally {
            monitor.done();
        }
    }
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) CoreException(org.eclipse.core.runtime.CoreException) WranglerWarningException(org.erlide.wrangler.refactoring.core.exception.WranglerWarningException) IOException(java.io.IOException) WranglerRpcParsingException(org.erlide.wrangler.refactoring.exception.WranglerRpcParsingException)

Aggregations

IOException (java.io.IOException)1 CoreException (org.eclipse.core.runtime.CoreException)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 WranglerWarningException (org.erlide.wrangler.refactoring.core.exception.WranglerWarningException)1 WranglerRpcParsingException (org.erlide.wrangler.refactoring.exception.WranglerRpcParsingException)1