@aliokan aliokan released this Aug 8, 2017 · 11 commits to master since this release

Assets 3

Features

Custom parser can be declared in flow DSL with @Parser metadata
@context( name = 'applicationContext' )
@parser( package.MyCustomSumParser )
{
	s = sum( "hello", space, "world", space, "!" );
	space =  " ";
	
	i = sum( 6, five );
	five = 5;
	
	p = sum( p1, new hex.structures.Point( 3, 4 ), p2 );
	p1 = new hex.structures.Point( 5, 5 );
	p2 = new hex.structures.Point( 3, 4 );
}
Triggers are working with flow.
@context( name = 'applicationContext' )
{
	model = new hex.mock.MockModelWithTrigger();
	model.trigger.connect( listenerInterface );
	model.callbacks.connect( listenerMethod.onTrigger );
	
	listenerInterface = new hex.mock.MockTriggerListener();
	listenerMethod = new hex.mock.MockTriggerListener();
}
Code compilation can be cloned with unique assembler reference.
var code = StaticFlowCompiler.compile( assembler, "context/flow/dsl.flow" );
code.execute();
		
var clonedCode = code.clone( new ApplicationAssembler() );
clonedCode.execute();

Assert.isInstanceOf( code.locator.instance, MockClassWithoutArgument );
Assert.isInstanceOf( clonedCode .locator.instance, MockClassWithoutArgument );
		
Assert.notEquals( code.locator.instance, clonedCode .locator.instance );

Enhancements

  • ApplicationDomainDispatcher is a multiton depending on ApplicationContext reference (optional argument).
  • AnnotationProvider instance depend on (optional) application context reference (useful for multiple application instances).
  • Colors added to TraceNotifier ouput.

Changes

  • DSL compiler.extend needs assembler reference as 1st argument.
  • InjectionUtil is renamed as InjectorUtil.
  • InjectionUtil .method addDefinition is extracted to MappingDefinitionUtil.
  • InjectorUtil.unmapDependency added.
  • IApplicationContext moved to core repository.
  • ICoreFactory moved to core repository.
  • ModuleMessage class removed. Modules don't send standard messages by default.
  • #if debug conditionals removed to have IsLoggable annotations in release mode as well.

Bugfixes

  • ModuleTest tests are not ignored in release mode.