Search in sources :

Example 6 with Status

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);
}
Also used : IStatus(org.eclipse.scout.rt.platform.status.IStatus) Status(org.eclipse.scout.rt.platform.status.Status) IProcessingStatus(org.eclipse.scout.rt.platform.exception.IProcessingStatus)

Example 7 with Status

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());
}
Also used : InvalidSequenceStatus(org.eclipse.scout.rt.client.ui.form.fields.sequencebox.InvalidSequenceStatus) Status(org.eclipse.scout.rt.platform.status.Status) IMultiStatus(org.eclipse.scout.rt.platform.status.IMultiStatus) MultiStatus(org.eclipse.scout.rt.platform.status.MultiStatus) IMultiStatus(org.eclipse.scout.rt.platform.status.IMultiStatus) Test(org.junit.Test)

Example 8 with Status

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());
}
Also used : InvalidSequenceStatus(org.eclipse.scout.rt.client.ui.form.fields.sequencebox.InvalidSequenceStatus) Status(org.eclipse.scout.rt.platform.status.Status) IMultiStatus(org.eclipse.scout.rt.platform.status.IMultiStatus) MultiStatus(org.eclipse.scout.rt.platform.status.MultiStatus) IMultiStatus(org.eclipse.scout.rt.platform.status.IMultiStatus) MultiStatus(org.eclipse.scout.rt.platform.status.MultiStatus) Test(org.junit.Test)

Example 9 with Status

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);
}
Also used : IStatus(org.eclipse.scout.rt.platform.status.IStatus) Status(org.eclipse.scout.rt.platform.status.Status) Test(org.junit.Test)

Example 10 with Status

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());
}
Also used : IStatus(org.eclipse.scout.rt.platform.status.IStatus) Status(org.eclipse.scout.rt.platform.status.Status) IStatus(org.eclipse.scout.rt.platform.status.IStatus) Test(org.junit.Test)

Aggregations

Status (org.eclipse.scout.rt.platform.status.Status)23 Test (org.junit.Test)15 IStatus (org.eclipse.scout.rt.platform.status.IStatus)14 MultiStatus (org.eclipse.scout.rt.platform.status.MultiStatus)11 IMultiStatus (org.eclipse.scout.rt.platform.status.IMultiStatus)9 InvalidSequenceStatus (org.eclipse.scout.rt.client.ui.form.fields.sequencebox.InvalidSequenceStatus)8 ParsingFailedStatus (org.eclipse.scout.rt.client.ui.form.fields.ParsingFailedStatus)3 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)2 IProcessingStatus (org.eclipse.scout.rt.platform.exception.IProcessingStatus)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)1 ITableCustomizer (org.eclipse.scout.rt.client.ui.basic.table.customizer.ITableCustomizer)1 TableUserFilterManager (org.eclipse.scout.rt.client.ui.basic.table.userfilter.TableUserFilterManager)1 ITreeNode (org.eclipse.scout.rt.client.ui.basic.tree.ITreeNode)1 ISearchForm (org.eclipse.scout.rt.client.ui.desktop.outline.pages.ISearchForm)1 Order (org.eclipse.scout.rt.platform.Order)1 ConfigOperation (org.eclipse.scout.rt.platform.annotations.ConfigOperation)1 ProcessingException (org.eclipse.scout.rt.platform.exception.ProcessingException)1 VetoException (org.eclipse.scout.rt.platform.exception.VetoException)1