private void throwCoreException(Exception exception, String message) throws CoreException { throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.REFACTORING_HISTORY_IO_ERROR, message, exception)); }
private void throwCoreException(Exception exception, String message) throws CoreException { throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.REFACTORING_HISTORY_IO_ERROR, message, exception)); }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
public static CoreException asCoreException(MalformedTreeException e) { String message= e.getMessage(); if (message == null) message= "MalformedTreeException"; //$NON-NLS-1$ return new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.BAD_LOCATION, message, e)); } }
public static CoreException asCoreException(BadLocationException e) { String message= e.getMessage(); if (message == null) message= "BadLocationException"; //$NON-NLS-1$ return new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.BAD_LOCATION, message, e)); }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
public static CoreException asCoreException(BadLocationException e) { String message= e.getMessage(); if (message == null) message= "BadLocationException"; //$NON-NLS-1$ return new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.BAD_LOCATION, message, e)); }
public static CoreException asCoreException(MalformedTreeException e) { String message= e.getMessage(); if (message == null) message= "MalformedTreeException"; //$NON-NLS-1$ return new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.BAD_LOCATION, message, e)); } }
public static void log(Throwable t) { IStatus status= new Status( IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.INTERNAL_ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, t); ResourcesPlugin.getPlugin().getLog().log(status); }
public static void logRemovedListener(Throwable t) { IStatus status= new Status( IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.INTERNAL_ERROR, RefactoringCoreMessages.RefactoringCorePlugin_listener_removed, t); ResourcesPlugin.getPlugin().getLog().log(status); }
public static void logRemovedListener(Throwable t) { IStatus status= new Status( IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.INTERNAL_ERROR, RefactoringCoreMessages.RefactoringCorePlugin_listener_removed, t); ResourcesPlugin.getPlugin().getLog().log(status); }
private IStatus asStatus(RefactoringStatus status) { if (status.isOK()) { return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$ } else { return status.getEntryWithHighestSeverity().toStatus(); } }
private IStatus createStatus(ExecuteResult result) { if (!result.validationStatus.isOK()) { return result.validationStatus.getEntryWithHighestSeverity().toStatus(); } else { return new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IStatus.ERROR, RefactoringCoreMessages.UndoableOperation2ChangeAdapter_error_message, null); } }
private IStatus createStatus(ExecuteResult result) { if (!result.validationStatus.isOK()) { return result.validationStatus.getEntryWithHighestSeverity().toStatus(); } else { return new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IStatus.ERROR, RefactoringCoreMessages.UndoableOperation2ChangeAdapter_error_message, null); } }
private IStatus createStatus(ExecuteResult result) { if (!result.validationStatus.isOK()) { return result.validationStatus.getEntryWithHighestSeverity().toStatus(); } else { return new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IStatus.ERROR, RefactoringCoreMessages.UndoableOperation2ChangeAdapter_error_message, null); } }
public static void logRemovedParticipant(ParticipantDescriptor descriptor, Throwable t) { IStatus status= new Status( IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.PARTICIPANT_DISABLED, Messages.format( RefactoringCoreMessages.RefactoringCorePlugin_participant_removed, descriptor.getId()), t); ResourcesPlugin.getPlugin().getLog().log(status); }
public static void logRemovedParticipant(ParticipantDescriptor descriptor, Throwable t) { IStatus status= new Status( IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.INTERNAL_ERROR, Messages.format( RefactoringCoreMessages.RefactoringCorePlugin_participant_removed, descriptor.getId()), t); ResourcesPlugin.getPlugin().getLog().log(status); }
public static void logRemovedParticipant(ParticipantDescriptor descriptor, Throwable t) { IStatus status= new Status( IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.PARTICIPANT_DISABLED, Messages.format( RefactoringCoreMessages.RefactoringCorePlugin_participant_removed, descriptor.getId()), t); ResourcesPlugin.getPlugin().getLog().log(status); }
@Override public Change perform(IProgressMonitor pm) throws CoreException { if (fResourceState.verifyExistence(true)) { String message= Messages.format(RefactoringCoreMessages.UndoDeleteResourceChange_already_exists, BasicElementLabels.getResourceName(fResourceState.getName())); throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), message)); } IResource created= fResourceState.createResource(pm); created.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(pm, 1)); DeleteResourceChange change= new DeleteResourceChange(created.getFullPath(), true, false); change.setValidationMethod(ResourceChange.VALIDATE_NOT_READ_ONLY | ResourceChange.VALIDATE_NOT_DIRTY); return change; }
@Override public Change perform(IProgressMonitor pm) throws CoreException { if (fResourceState.verifyExistence(true)) { String message= Messages.format(RefactoringCoreMessages.UndoDeleteResourceChange_already_exists, BasicElementLabels.getResourceName(fResourceState.getName())); throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), message)); } IResource created= fResourceState.createResource(pm); created.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(pm, 1)); DeleteResourceChange change= new DeleteResourceChange(created.getFullPath(), true, false); change.setValidationMethod(ResourceChange.VALIDATE_NOT_READ_ONLY | ResourceChange.VALIDATE_NOT_DIRTY); return change; }