use of org.eclipse.scout.rt.platform.status.Status in project scout.rt by eclipse.
the class ErrorPopup method parseInterruptedError.
/**
* Sets the member variables for an exception that indicates an interruption.
*/
protected void parseInterruptedError(Throwable t) {
m_header = TEXTS.get("InterruptedErrorTitle");
m_body = TEXTS.get("InterruptedErrorText");
m_html = null;
m_status = new Status(IStatus.INFO);
}
use of org.eclipse.scout.rt.platform.status.Status in project scout.rt by eclipse.
the class FormFieldTest method testAddDifferentErrorStatus.
@Test
public void testAddDifferentErrorStatus() throws Exception {
SimpleTestFormField testField = new SimpleTestFormField();
P_PropertyChangeEventCounter counter = new P_PropertyChangeEventCounter();
testField.addPropertyChangeListener(IFormField.PROP_ERROR_STATUS, counter);
IMultiStatus status0 = testField.getErrorStatus();
testField.addErrorStatus(new Status("error"));
assertTrue(testField.getErrorStatus().containsStatus(Status.class));
IMultiStatus status1 = testField.getErrorStatus();
testField.addErrorStatus(new Status("another message"));
assertTrue(testField.getErrorStatus().containsStatus(Status.class));
IMultiStatus status2 = testField.getErrorStatus();
assertNotEquals(status0, status1);
assertNotEquals(status1, status2);
assertEquals(2, counter.getCount());
}
use of org.eclipse.scout.rt.platform.status.Status in project scout.rt by eclipse.
the class FormFieldTest method testSetDifferentErrorStatus.
@Test
public void testSetDifferentErrorStatus() throws Exception {
SimpleTestFormField testField = new SimpleTestFormField();
P_PropertyChangeEventCounter counter = new P_PropertyChangeEventCounter();
testField.addPropertyChangeListener(IFormField.PROP_ERROR_STATUS, counter);
final MultiStatus ms = new MultiStatus();
ms.add(new Status("error"));
testField.setErrorStatus(ms);
assertEquals(ms, testField.getErrorStatus());
assertNotSame(ms, testField.getErrorStatus());
final MultiStatus ms2 = new MultiStatus();
// another object, should trigger its own event
ms2.add(new Status("another message"));
testField.setErrorStatus(ms2);
assertEquals(ms2, testField.getErrorStatus());
assertNotSame(ms2, testField.getErrorStatus());
assertEquals(2, counter.getCount());
}
use of org.eclipse.scout.rt.platform.status.Status in project scout.rt by eclipse.
the class StatusTest method testStatusCompare.
@Test
public void testStatusCompare() {
TestStatus highPrioError = new TestStatus();
assertTrue(m_warningStatus.compareTo(m_infoStatus) < 0);
assertTrue(highPrioError.compareTo(new Status(IStatus.ERROR)) < 0);
}
use of org.eclipse.scout.rt.platform.status.Status in project scout.rt by eclipse.
the class AbstractTableFieldTest method testSetTableStatusToTable.
@Test
public void testSetTableStatusToTable() {
IStatus status = new Status("Hello hello", IStatus.ERROR);
setTableStatus(status);
Assert.assertSame(status, getTable().getTableStatus());
}
Aggregations