Package org.springframework.ide.eclipse.config.ui.editors

Examples of org.springframework.ide.eclipse.config.ui.editors.SpringConfigInputAccessor


    AbstractConfigMasterDetailsBlock block = page.getMasterDetailsBlock();
    IDetailsPage details = block.getDetailsPart().getCurrentPage();
    assertTrue("Could not load details part.", details instanceof AbstractNamespaceDetailsPart);

    AbstractNamespaceDetailsPart detailsPart = (AbstractNamespaceDetailsPart) details;
    SpringConfigInputAccessor accessor = new SpringConfigInputAccessor(cEditor, detailsPart.getInput());

    assertEquals("myConcreteClass", accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));
    assertEquals(detailsPart.getInput().getAttribute(BeansSchemaConstants.ATTR_ID),
        accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));

    accessor.editAttribute(BeansSchemaConstants.ATTR_ID, "foo");
    assertEquals("foo", accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));
    assertEquals(detailsPart.getInput().getAttribute(BeansSchemaConstants.ATTR_ID),
        accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));

    accessor.editAttribute(BeansSchemaConstants.ATTR_ID, "");
    assertEquals("", accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));
    assertNull(detailsPart.getInput().getAttributeNode(BeansSchemaConstants.ATTR_ID));

    accessor.editAttribute(BeansSchemaConstants.ATTR_ID, "myConcreteClass");
    assertEquals("myConcreteClass", accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));
    assertEquals(detailsPart.getInput().getAttribute(BeansSchemaConstants.ATTR_ID),
        accessor.getAttributeValue(BeansSchemaConstants.ATTR_ID));
  }
View Full Code Here


    AbstractConfigMasterDetailsBlock block = page.getMasterDetailsBlock();
    IDetailsPage details = block.getDetailsPart().getCurrentPage();
    assertTrue("Could not load details part.", details instanceof AbstractNamespaceDetailsPart);

    AbstractNamespaceDetailsPart detailsPart = (AbstractNamespaceDetailsPart) details;
    SpringConfigInputAccessor accessor = new SpringConfigInputAccessor(cEditor, detailsPart.getInput());

    assertEquals("A sample configuration file.", accessor.getElementValue());

    accessor.editElement("foo");
    assertEquals("foo", accessor.getElementValue());

    accessor.editElement("");
    assertEquals("", accessor.getElementValue());

    accessor.editElement("A sample configuration file.");
    assertEquals("A sample configuration file.", accessor.getElementValue());
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.config.ui.editors.SpringConfigInputAccessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.