View Revisions: Issue #5741

Summary 0005741: Java router code assistance
Revision 2023-03-23 14:09 by elong
Description Add code assistance features to the Configure -> Router screen for Java routers. After pressing a period, it should provide code completion by looking at the preceding expression to provide a drop-down list of possible method calls.

Add a drop-down list at the top of the editor labelled as "Variables" with a list of:

context - SimpleRouterContext
dataMetaData - DataMetaData
dialect - ISymmetricDialect
engine - ISymmetricEngine
initialLoad - boolean
initialLoadSelectUsed - boolean
log - Logger
nodes - Set<Node>
triggerRouter - TriggerRouter

Add a drop-down list at the top of the editor labelled as "Snippets" with a list of:

addNodeId(nodeId, routeToNodes, nodes);
Map<String, String> map = getDataMap(dataMetaData, dialect);
Map<String, Object> map = getDataObjectMap(dataMetaData, dialect, true);
toNodeIds(nodes, routeToNodes);
toExternalIds(nodes);

When the dialog for the code editor pops up, if there is no expression, then pre-populate it with:

Set<String> routeToNodes = new HashSet<String>();
return routeToNodes;

Allow code editor window to resize and expand in size.
Revision 2023-03-15 18:57 by elong
Description Add code assistance features to the Configure -> Router screen for Java routers. After pressing a period, it should provide code completion by looking at the preceding expression to provide a drop-down list of possible method calls.

Add a drop-down list at the top of the editor labelled as "Variables" with a list of:

context - SimpleRouterContext
dataMetaData - DataMetaData
engine - ISymmetricEngine
initialLoad - boolean
initialLoadSelectUsed - boolean
log - Logger
nodes - Set<Node>
triggerRouter - TriggerRouter

Add a drop-down list at the top of the editor labelled as "Snippets" with a list of:

addNodeId(nodeId, routeToNodes, nodes);
Map<String, String> map = getDataMap(dataMetaData, symmetricDialect);
Map<String, Object> map = getDataObjectMap(dataMetaData, symmetricDialect, true);
toNodeIds(nodes, routeToNodes);
toExternalIds(nodes);

When the dialog for the code editor pops up, if there is no expression, then pre-populate it with:

Set<String> routeToNodes = new HashSet<String>();
return routeToNodes;

Modify JavaDataRouter to construct a JavaDataRouterExt with the following modifications:
- implements interface ISymmetricEngineAware
- member variables for engine and symmetricDialect
- member variable Logger log = LoggerFactory.getLogger() and pass in name using getClass().getCanonicalName() + "." + router.getRouterId()
- setSymmetricEngine() sets member variables

Allow code editor window to resize and expand in size.
Revision 2023-03-15 17:48 by elong
Description Add code assistance features to the Configure -> Router screen for Java routers. After pressing a period, it should provide code completion by looking at the preceding expression to provide a drop-down list of possible method calls.

Add a drop-down list at the top of the editor labelled as "Variables" with a list of:

context - SimpleRouterContext
dataMetaData - DataMetaData
engine - ISymmetricEngine
initialLoad - boolean
initialLoadSelectUsed - boolean
log - Logger
nodes - Set<Node>
triggerRouter - TriggerRouter

Add a drop-down list at the top of the editor labelled as "Snippets" with a list of:

addNodeId(nodeId, routeToNodes, nodes);
Map<String, String> map = getDataMap(dataMetaData, symmetricDialect);
Map<String, Object> map = getDataObjectMap(dataMetaData, symmetricDialect, true);
toNodeIds(nodes, routeToNodes);
toExternalIds(nodes);

When the dialog for the code editor pops up, if there is no expression, then pre-populate it with:

Set<String> routeToNodes = new HashSet<String>();
return routeToNodes;

Modify JavaDataRouter to construct a JavaDataRouterExt with the following modifications:
- implements interface ISymmetricEngineAware
- member variables for engine and symmetricDialect
- member variable Logger log = LoggerFactory.getLogger() and pass in name using getClass().getCanonicalName() + "." + router.getRouterId()
- setSymmetricEngine() sets member variables