private void processImports ( Source doc ) { doc . getAllElements ( ) . stream ( ) . filter ( element -> "vue-gwt:import" . equalsIgnoreCase ( element . getName ( ) ) ) . peek ( importElement -> { String classAttributeValue = importElement . getAttributeValue ( "class" ) ; if ( classAttributeValue != null ) { context . addImport ( classAttributeValue ) ; } String staticAttributeValue = importElement . getAttributeValue ( "static" ) ; if ( staticAttributeValue != null ) { context . addStaticImport ( staticAttributeValue ) ; } } ) . forEach ( outputDocument :: remove ) ; }
Add java imports in the template to the context .