Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Server/src/org/litesoft/testplan/ActionParserSetAttribute.java

Diff revisions: vs.
  @@ -1,25 +1,25 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.testplan;
3 -
4 - import org.litesoft.GWT.client.dev.ui.actions.*;
5 - import org.litesoft.commonfoundation.typeutils.*;
6 - import org.litesoft.xml.*;
7 -
8 - public class ActionParserSetAttribute extends ActionParserBase {
9 - private static final String TAG_NAME = "SetAttribute";
10 - private static final String ATTR_NAME = "name";
11 - private static final String ATTR_VALUE = "value";
12 -
13 - public ActionParserSetAttribute() {
14 - super( TAG_NAME );
15 - }
16 -
17 - @Override
18 - public SetAttributeActionSpec parse( PullParserProxy pParser ) {
19 - pParser.validateIsStartTag( TAG_NAME );
20 - String name = Strings.assertNotNullNotEmpty( TAG_NAME + ' ' + ATTR_NAME, pParser.getAttributeValue( ATTR_NAME ) );
21 - String value = Strings.assertNotNullNotEmpty( TAG_NAME + ' ' + ATTR_VALUE, pParser.getAttributeValue( ATTR_VALUE ) );
22 - pParser.validateNextIsEndTag( TAG_NAME );
23 - return new SetAttributeActionSpec( name, value );
24 - }
25 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.testplan;
3 +
4 + import org.litesoft.GWT.client.dev.ui.actions.*;
5 + import org.litesoft.commonfoundation.base.*;
6 + import org.litesoft.xml.*;
7 +
8 + public class ActionParserSetAttribute extends ActionParserBase {
9 + private static final String TAG_NAME = "SetAttribute";
10 + private static final String ATTR_NAME = "name";
11 + private static final String ATTR_VALUE = "value";
12 +
13 + public ActionParserSetAttribute() {
14 + super( TAG_NAME );
15 + }
16 +
17 + @Override
18 + public SetAttributeActionSpec parse( PullParserProxy pParser ) {
19 + pParser.validateIsStartTag( TAG_NAME );
20 + String name = Confirm.significant( TAG_NAME + ' ' + ATTR_NAME, pParser.getAttributeValue( ATTR_NAME ) );
21 + String value = Confirm.significant( TAG_NAME + ' ' + ATTR_VALUE, pParser.getAttributeValue( ATTR_VALUE ) );
22 + pParser.validateNextIsEndTag( TAG_NAME );
23 + return new SetAttributeActionSpec( name, value );
24 + }
25 + }