Skip to content
Snippets Groups Projects
Commit 7f66360b authored by Tobias Moebert's avatar Tobias Moebert
Browse files

# [Discoverer] minor corrections

parent ae8d6bf4
No related branches found
No related tags found
No related merge requests found
......@@ -361,9 +361,8 @@ define(['attributeList', 'attribute', 'translation', 'parameter', 'parameterList
if (!theAggregator._hasComponent(theComponent.getId())) {
// if component is a widget and it wasn't added before, subscribe to its callbacks
if (theComponent instanceof Widget) {
console.log("Discoverer: It's a Widget.");
theAggregator.addWidgetSubscription(theComponent);
console.log("Discoverer: The Aggregator did subscribe to "+theComponent.name+".");
console.log("Discoverer: I found "+theComponent.name+" and the Aggregator did subscribe to it.");
this._removeAttributesSatisfiedByWidget(aggregatorId, theComponent, unsatisfiedAttributes);
} else if (theComponent instanceof Interpreter) { // if the component is an interpreter and all its in attributes can be satisfied, add the interpreter
console.log("Discoverer: It's an Interpreter.");
......@@ -393,7 +392,6 @@ define(['attributeList', 'attribute', 'translation', 'parameter', 'parameterList
*/
Discoverer.prototype._getUnregisteredComponentsForUnsatisfiedAttributes = function(aggregatorId, unsatisfiedAttributes) {
var theAggregator = this.getAggregator(aggregatorId);
console.log("Discoverer: Let's look at the unregistered components.");
//check all Widget's outAttributes
......@@ -407,8 +405,8 @@ define(['attributeList', 'attribute', 'translation', 'parameter', 'parameterList
//create temporary OutAttributeList
var tempWidgetOutList = AttributeList.fromAttributeDescription(this, theWidget.inOut.out);
for(var tempOutAttribute = 0; tempOutAttribute < tempWidgetOutList.size(); tempOutAttribute++) {
if (theUnsatisfiedAttribute.equalsTypeOf(tempWidgetOutList.getItems()[tempOutAttribute])) {
for(var tempWidgetOutListIndex in tempWidgetOutList.getItems()) {
if (theUnsatisfiedAttribute.equalsTypeOf(tempWidgetOutList.getItems[tempWidgetOutListIndex])) {
console.log("Discoverer: I have found an unregistered "+theWidget.name+".");
var newWidget = new theWidget(this, tempWidgetOutList);
theAggregator.addWidgetSubscription(newWidget);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment