fixes for system and utils
parent
fabb7b79ac
commit
7234726501
|
@ -8,13 +8,13 @@ const Utils = require('.././r3-utils');
|
|||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
start(options)
|
||||
stop(options)
|
||||
start(options) - Just calls System.Start(options)
|
||||
stop(options) - Just calls System.Stop(options)
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
Start(options)
|
||||
Stop(options)
|
||||
Start(options) - Starts the system by registering subscriptions to events
|
||||
Stop(options) - Stops the system by removing these subscriptions to events
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
**/
|
||||
|
@ -50,15 +50,19 @@ class System {
|
|||
}
|
||||
//GENERATE_CONSTRUCTOR_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
//GENERATE_METHODS_START
|
||||
|
||||
/**
|
||||
* start
|
||||
* start() - Just calls System.Start(options)
|
||||
* options
|
||||
*
|
||||
*/
|
||||
start(options) {
|
||||
|
||||
//CUSTOM_START_METHOD_START
|
||||
|
||||
System.Start(options);
|
||||
|
||||
/**
|
||||
|
@ -66,24 +70,19 @@ class System {
|
|||
*/
|
||||
|
||||
console.log('something else');
|
||||
|
||||
|
||||
|
||||
|
||||
//CUSTOM_START_METHOD_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* stop
|
||||
* stop() - Just calls System.Stop(options)
|
||||
* options
|
||||
*
|
||||
*/
|
||||
stop(options) {
|
||||
|
||||
//CUSTOM_STOP_METHOD_START
|
||||
System.Stop(options);
|
||||
|
||||
|
||||
|
||||
//CUSTOM_STOP_METHOD_END
|
||||
|
||||
}
|
||||
|
@ -92,37 +91,32 @@ class System {
|
|||
//GENERATE_STATIC_METHODS_START
|
||||
|
||||
/**
|
||||
* Start
|
||||
* Start() - Starts the system by registering subscriptions to events
|
||||
* options
|
||||
*
|
||||
*/
|
||||
static Start(options) {
|
||||
|
||||
//CUSTOM_STATIC_START_METHOD_START
|
||||
console.log('Starting system X');
|
||||
|
||||
|
||||
|
||||
//CUSTOM_STATIC_START_METHOD_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop
|
||||
* Stop() - Stops the system by removing these subscriptions to events
|
||||
* options
|
||||
*
|
||||
*/
|
||||
static Stop(options) {
|
||||
|
||||
//CUSTOM_STATIC_STOP_METHOD_START
|
||||
console.log('Stopping system X');
|
||||
|
||||
|
||||
|
||||
//CUSTOM_STATIC_STOP_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATE_STATIC_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
}
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
|
|
|
@ -38,12 +38,6 @@ class Utils {
|
|||
}
|
||||
//GENERATE_CONSTRUCTOR_END
|
||||
|
||||
//GENERATE_METHODS_START
|
||||
//GENERATE_METHODS_END
|
||||
|
||||
//GENERATE_STATIC_METHODS_START
|
||||
//GENERATE_STATIC_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
static GetFirstParent(object, constructor) {
|
||||
|
||||
|
@ -1279,6 +1273,12 @@ class Utils {
|
|||
};
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
//GENERATE_METHODS_START
|
||||
//GENERATE_METHODS_END
|
||||
|
||||
//GENERATE_STATIC_METHODS_START
|
||||
//GENERATE_STATIC_METHODS_END
|
||||
|
||||
}
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
|
|
|
@ -446,11 +446,15 @@ function doMethodUpdate($template, $tokens, $token)
|
|||
$params = "@param " . $params;
|
||||
}
|
||||
|
||||
$comment = preg_match('/.*?\).*?(\w.*$)/', $item, $matches);
|
||||
$result = preg_match('/.*?\).*?(\w.*$)/', $item, $matches);
|
||||
if ($result !== false && sizeof($matches) >= 2) {
|
||||
$comment = $matches[1];
|
||||
}
|
||||
|
||||
if ($result === 0) {
|
||||
$comment = 'No comment';
|
||||
}
|
||||
|
||||
$returns = preg_split('/@return[s]*\s*/', $comment);
|
||||
|
||||
if (sizeof($returns) > 1) {
|
||||
|
|
Loading…
Reference in New Issue