@ -58,36 +58,31 @@ class FormApp extends AbstractAppProvider {
* @return
* @return
* /
* /
private JTemplate < Form , ? > compatibleForm ( FILE tplFile , HashMap < String , Class > classType ) {
private JTemplate < Form , ? > compatibleForm ( FILE tplFile , HashMap < String , Class > classType ) {
if ( ComparatorUtils . equals ( StableFactory . getRegisteredClass ( BaseJForm . XML_TAG ) , JForm . class ) ) {
classType . put ( Constants . ARG_2 , Parameter [ ] . class ) ;
classType . put ( Constants . ARG_2 , Parameter [ ] . class ) ;
JForm emptyForm = new JForm ( new Form ( new WBorderLayout ( "form" ) ) , tplFile ) ;
JForm emptyForm = new JForm ( new Form ( new WBorderLayout ( "form" ) ) , tplFile ) ;
OpenWorker < OpenResult < Form , Parameter [ ] > > worker = new OpenWorker < > (
OpenWorker < OpenResult < Form , Parameter [ ] > > worker = new OpenWorker < > (
new Callable < OpenResult < Form , Parameter [ ] > > ( ) {
new Callable < OpenResult < Form , Parameter [ ] > > ( ) {
@Override
@Override
public OpenResult < Form , Parameter [ ] > call ( ) throws Exception {
public OpenResult < Form , Parameter [ ] > call ( ) throws Exception {
Form form = getForm ( tplFile ) ;
Form form = getForm ( tplFile ) ;
return new OpenResult < > ( form , form . getParameters ( ) ) ;
return new OpenResult < > ( form , form . getParameters ( ) ) ;
}
}
} , emptyForm ) ;
} , emptyForm ) ;
worker . addCallBack ( new Callable < JTemplate < ? , ? > > ( ) {
worker . addCallBack ( new Callable < JTemplate < ? , ? > > ( ) {
@Override
@Override
public JTemplate < ? , ? > call ( ) throws Exception {
public JTemplate < ? , ? > call ( ) throws Exception {
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
new Object [ ] { result . getBaseBook ( ) , tplFile , result . getRef ( ) } , classType , BaseJForm . class ) ;
}
} ) ;
worker . start ( tplFile . getPath ( ) ) ;
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
if ( result ! = null ) {
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
new Object [ ] { result . getBaseBook ( ) , tplFile , new Parameter [ 0 ] } , classType , BaseJForm . class ) ;
new Object [ ] { result . getBaseBook ( ) , tplFile , result . getRef ( ) } , classType , BaseJForm . class ) ;
}
}
return emptyForm ;
} ) ;
} else {
worker . start ( tplFile . getPath ( ) ) ;
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
if ( result ! = null ) {
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
new Object [ ] { getForm ( tplFile ) , tplFile } , classType , BaseJForm . class ) ;
new Object [ ] { result . getBaseBook ( ) , tplFile , new Parameter [ 0 ] } , classType , BaseJForm . class ) ;
}
}
return emptyForm ;
}
}
@Nullable
@Nullable