use of org.eclipse.core.runtime.IStatus in project che by eclipse.
the class Changes method validateModifiesFiles.
public static RefactoringStatus validateModifiesFiles(IFile[] filesToModify) {
RefactoringStatus result = new RefactoringStatus();
IStatus status = Resources.checkInSync(filesToModify);
if (!status.isOK())
result.merge(RefactoringStatus.create(status));
status = Resources.makeCommittable(filesToModify, null);
if (!status.isOK()) {
result.merge(RefactoringStatus.create(status));
if (!result.hasFatalError()) {
result.addFatalError(RefactoringCoreMessages.Changes_validateEdit);
}
}
return result;
}
use of org.eclipse.core.runtime.IStatus in project che by eclipse.
the class RefactoringCorePlugin method logRemovedListener.
public static void logRemovedListener(Throwable t) {
IStatus status = new Status(IStatus.ERROR, getPluginId(), IRefactoringCoreStatusCodes.INTERNAL_ERROR, RefactoringCoreMessages.RefactoringCorePlugin_listener_removed, t);
log(status);
}
use of org.eclipse.core.runtime.IStatus in project che by eclipse.
the class RefactoringCorePlugin method logRemovedParticipant.
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);
log(status);
}
use of org.eclipse.core.runtime.IStatus in project tdi-studio-se by Talend.
the class ThreadDumpEditor method parseDumpFile.
/**
* Parses the dump file.
*
* @param filePath The file path
*/
private void parseDumpFile(final String filePath) {
Job job = new Job(Messages.parseThreadDumpFileJobLabel) {
@Override
protected IStatus run(IProgressMonitor monitor) {
final ThreadDumpParser parser = new ThreadDumpParser(new File(filePath), threadListElements, monitor);
try {
parser.parse();
} catch (ParserConfigurationException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load thread dump file.", e);
} catch (SAXException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load thread dump file.", e);
} catch (IOException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load thread dump file.", e);
}
setProfileInfo(parser.getProfileInfo());
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
if (threadSashForm != null) {
threadSashForm.refresh();
}
}
});
return Status.OK_STATUS;
}
};
job.schedule();
}
use of org.eclipse.core.runtime.IStatus in project tdi-studio-se by Talend.
the class HeapDumpEditor method parseDumpFile.
/**
* Parses the dump file.
*
* @param filePath The file path
*/
private void parseDumpFile(final String filePath) {
Job job = new Job(Messages.parseHeapDumpFileJobLabel) {
@Override
protected IStatus run(IProgressMonitor monitor) {
HeapDumpParser parser = new HeapDumpParser(new File(filePath), heapListElements, monitor);
try {
parser.parse();
} catch (ParserConfigurationException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load heap dump file.", e);
} catch (SAXException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load heap dump file.", e);
} catch (IOException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load heap dump file.", e);
}
setProfileInfo(parser.getProfileInfo());
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
if (heapHistogramPage != null) {
heapHistogramPage.refresh();
}
}
});
return Status.OK_STATUS;
}
};
job.schedule();
}
Aggregations