use of com.twinsoft.convertigo.eclipse.views.references.model.ConnectorNode in project convertigo by convertigo.
the class ReferencesView method handleTargetRequestable.
private void handleTargetRequestable(String targetRequestableName, ProjectExplorerView projectExplorerView, RequiresNode requiresNode) throws EngineException {
StringTokenizer st = new StringTokenizer(targetRequestableName, ".");
int count = st.countTokens();
String projectName = st.nextToken();
Project project = getProject(projectName, projectExplorerView);
if (project != null) {
ProjectNode requiresProjectNode = new ProjectNode(requiresNode, projectName, project);
if (count == 2) {
String sequenceName = count == 2 ? st.nextToken() : "";
Sequence sequence = project.getSequenceByName(sequenceName);
SequenceNode sequenceNode = new SequenceNode(requiresProjectNode, sequenceName, sequence);
requiresProjectNode.addChild(sequenceNode);
} else if (count == 3) {
String connectorName = count == 3 ? st.nextToken() : "";
Connector connector = project.getConnectorByName(connectorName);
ConnectorNode connectorNode = new ConnectorNode(requiresProjectNode, connectorName, connector);
requiresProjectNode.addChild(connectorNode);
String transactionName = count == 3 ? st.nextToken() : "";
Transaction transaction = connector.getTransactionByName(transactionName);
TransactionNode transactionNode = new TransactionNode(connectorNode, transactionName, transaction);
connectorNode.addChild(transactionNode);
}
if (requiresProjectNode.hasChildren()) {
requiresNode.addChild(requiresProjectNode);
}
}
}
Aggregations