Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -1,30 +1,30 @@
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.*;
5 - import org.litesoft.commonfoundation.typeutils.*;
6 - import org.litesoft.xml.*;
7 -
8 - public abstract class AbstractTestPlanParserActionFactoryClickCellButton implements TestPlanActionFactory {
9 - private String mTagName;
10 -
11 - public AbstractTestPlanParserActionFactoryClickCellButton( String pTagName ) {
12 - mTagName = pTagName;
13 - }
14 -
15 - @Override
16 - public TestPlanAction parse( PullParserProxy pParser ) {
17 - pParser.validateIsStartTag( mTagName );
18 - String zName = Strings.noEmpty( pParser.getAttributeValue( "name" ) );
19 - String zTitle = Strings.noEmpty( pParser.getAttributeValue( "title" ) );
20 - String zModifiers = Strings.noEmpty( pParser.getAttributeValue( "modifiers" ) );
21 - KeyboardKeyModifier zKeyboardKeyModifier = (zModifiers != null) ? KeyboardKeyModifier.valueOf( zModifiers ) : null;
22 - pParser.validateNextIsEndTag( mTagName );
23 - if ( (zName == null) && (zTitle == null) ) {
24 - throw new IllegalStateException( mTagName + " must have either a 'name' or a 'title'" );
25 - }
26 - return createAction( zName, zTitle, zKeyboardKeyModifier );
27 - }
28 -
29 - abstract protected TestPlanAction createAction( String pName, String pTitle, KeyboardKeyModifier pKeyboardKeyModifier );
30 - }
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.*;
5 + import org.litesoft.commonfoundation.base.*;
6 + import org.litesoft.xml.*;
7 +
8 + public abstract class AbstractTestPlanParserActionFactoryClickCellButton implements TestPlanActionFactory {
9 + private String mTagName;
10 +
11 + public AbstractTestPlanParserActionFactoryClickCellButton( String pTagName ) {
12 + mTagName = pTagName;
13 + }
14 +
15 + @Override
16 + public TestPlanAction parse( PullParserProxy pParser ) {
17 + pParser.validateIsStartTag( mTagName );
18 + String zName = ConstrainTo.significantOrNull( pParser.getAttributeValue( "name" ) );
19 + String zTitle = ConstrainTo.significantOrNull( pParser.getAttributeValue( "title" ) );
20 + String zModifiers = ConstrainTo.significantOrNull( pParser.getAttributeValue( "modifiers" ) );
21 + KeyboardKeyModifier zKeyboardKeyModifier = (zModifiers != null) ? KeyboardKeyModifier.valueOf( zModifiers ) : null;
22 + pParser.validateNextIsEndTag( mTagName );
23 + if ( (zName == null) && (zTitle == null) ) {
24 + throw new IllegalStateException( mTagName + " must have either a 'name' or a 'title'" );
25 + }
26 + return createAction( zName, zTitle, zKeyboardKeyModifier );
27 + }
28 +
29 + abstract protected TestPlanAction createAction( String pName, String pTitle, KeyboardKeyModifier pKeyboardKeyModifier );
30 + }