Skip to content

Commit

Permalink
Merge pull request #6 from gsdlab/develop
Browse files Browse the repository at this point in the history
Release 0.4.4
  • Loading branch information
mantkiew committed Sep 19, 2016
2 parents 57f62a5 + 6ddeb0a commit 33de67f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Client/ClaferAPI.js
Expand Up @@ -62,12 +62,12 @@ ClaferAPI = {
'superClafer' : 'super.exp.binding',
'supers' : 'super.iType.hi',
'reference' : (function(){
var p = 'reference.dref.exp.binding';
var p = 'reference.ref.exp.binding';
if( _.hasPath(clafer, p)) {
return p;
} else {

return 'reference.dref.exp';
return 'reference.ref.exp';
}
})(),
//Goals
Expand Down
9 changes: 5 additions & 4 deletions Client/model/clafer_processor.js
Expand Up @@ -65,9 +65,10 @@ ClaferProcessor.method("getAllChildren", function(clafer) {
_.each(ClaferAPI.getProperty(clafer, 'supers'), function(superUID){

var superClafer = processor.getByUID(superUID)[0],
children = _.filter(processor.clafers, function(cl){
return !cl.isAbstract && cl.parentUID === ClaferAPI.getProperty(superClafer, 'uid');
})
children = processor.getAllChildren(superClafer);
// children = _.filter(processor.clafers, function(cl){
// return !cl.isAbstract && cl.parentUID === ClaferAPI.getProperty(superClafer, 'uid');
// })

result = result.concat(children);
});
Expand All @@ -78,7 +79,7 @@ ClaferProcessor.method("getAllChildren", function(clafer) {

ClaferProcessor.method("calcClaferType", function(clafer) {

if (clafer.superClafer === 'integer')
if (clafer.reference === 'integer')
return 'int';

if (clafer.superClafer === 'string')
Expand Down
6 changes: 3 additions & 3 deletions Client/modules/md_feature_quality_matrix.js
Expand Up @@ -241,23 +241,23 @@ FeatureQualityMatrix.method("sort", function(path, sortFlag)

switch(sortFlag) {
case 'asc' : {
data.matrix = _(groups[0]).sortBy(function(obj){ return +obj[path] });
data.matrix = _.sortBy(groups[0],function(obj){ return +obj[path] });
if(groups.length>1){
data.matrix = _.union(groups[1], data.matrix);
}
break;
}

case 'desc' : {
data.matrix = _(groups[0]).sortBy(function(obj){ return -obj[path] });
data.matrix = _.sortBy(groups[0], function(obj){ return -obj[path] });
if(groups.length>1){
data.matrix = _.union(data.matrix, groups[1]);
}
break
}

case 'none' : {
data.matrix = _(data.matrix).sortBy(function(obj){ return +obj['id'] });
data.matrix = _.sortBy(data.matrix, function(obj){ return +obj['id'] });
break;
}
}
Expand Down
42 changes: 31 additions & 11 deletions Client/visualizers/table_visualizer.js
Expand Up @@ -253,26 +253,34 @@ TableVisualizer.method("refresh", function(sdata)
{
var b = (d.card != "");

me.append("span").attr("class", "emvalueEq").text(' = ').style("display", b ? null : "none");
me.append("span").attr("class", "emvalue " + mappedObject.tdClass).html(
var emvalue = (mappedObject.tdClass.indexOf("no") >= 0) ? "no" : "yes";

//var emvalue = (mappedObject.tdClass.indexOf("no") >= 0) ? "no" : d.em;

(mappedObject.tdClass.indexOf("no") >= 0) ? "no" : "yes"
).style("display", b ? null : "none");
me.append("span").attr("class", "emvalueEq").text(' = ').style("display", b ? null : "none");
me.append("span").attr("class", "emvalue " + mappedObject.tdClass).html(emvalue).style("display", b ? null : "none");
}
else
{
me.append("span").attr("class", "emvalueEq").text(' = ');
me.append("span").attr("class", "emvalue " + mappedObject.tdClass).html(mappedObject.elemContent);
}

// if(d.type == "clafer" && d.reference) {
// me.classed('emClaferReference', true);
// }

me.classed("emabstract", true);
}
else {

if(d.type == "clafer" && d.reference){
me.append("input").attr("type", "text").attr("class", "filter-input").attr('placeholder', 'Filter...').on('change', function(d){
context.chartListeners.onFilterChanged(d.path,this.value);
});
});



}

}
Expand Down Expand Up @@ -303,7 +311,11 @@ TableVisualizer.method("refresh", function(sdata)
d3.select(this).html(" \u21B4");
context.expand(d.path);
}
})
}).each(function(){
$(this).filter(function(){
return $(this).parent().find('.emvalue.no').length;
}).click();
});
}

}
Expand Down Expand Up @@ -438,11 +450,12 @@ TableVisualizer.method("refresh", function(sdata)
{
var b = (field.card != "");

col.select(".emvalueEq").text(' = ').style("display", b ? null : "none");
col.select(".emvalue").attr("class", "emvalue " + mappedObject.tdClass).html(
var emvalue = (mappedObject.tdClass.indexOf("no") >= 0) ? "no" : context.filterClaferValue(field.em);



(mappedObject.tdClass.indexOf("no") >= 0) ? "no" : "yes"
).style("display", b ? null : "none");
col.select(".emvalueEq").text(' = ').style("display", b ? null : "none");
col.select(".emvalue").attr("class", "emvalue " + mappedObject.tdClass).html(emvalue).style("display", b ? null : "none");
}
else
{
Expand Down Expand Up @@ -712,8 +725,15 @@ TableVisualizer.method("mapValue", function(field, sVal, denyEMCheck)
result.elem = 'span';
result.elemContent = ' ';
result.tdClass += ' em';

/*if(field.type == "clafer" && field.reference!==undefined) {
result.tdClass += ' emClaferReference';
result.elemContent = field.em
}*/


}

return result;
});

Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,14 +1,14 @@
ClaferToolsUICommonPlatform
===========================

##### v0.4.3
##### v0.4.4

A superset platform used as a submodule by all the three Clafer Web Tools: [ClaferIDE](https://github.com/gsdlab/ClaferIDE), [ClaferMooVisualizer](https://github.com/gsdlab/ClaferMooVisualizer) and [ClaferConfigurator](https://github.com/gsdlab/ClaferConfigurator).

Contributors
------------

* [Alexandr Murashkin](http://gsd.uwaterloo.ca/amurashk). Main developer.
* [Alexandr Murashkin](http://gsd.uwaterloo.ca/amurashk). Original developer.
* [Eldar Khalilov](http://gsd.uwaterloo.ca/ekhalilov). Developer. Upgrade to 0.4.2 (replace XML with JSON, test suites).

Installation
Expand Down Expand Up @@ -36,10 +36,10 @@ This installation procedure applies to all three web tools, which use the same b

* Getting Binaries

Binary distributions of the release 0.4.3 of Clafer Tools for Windows, Mac, and Linux, can be downloaded from [Clafer Tools - Binary Distributions](http://http://gsd.uwaterloo.ca/clafer-tools-binary-distributions). There you can get binaries for `Clafer Compiler`, `ClaferIG` and the `ClaferChocoIG` backend.
Binary distributions of the release 0.4.4 of Clafer Tools for Windows, Mac, and Linux, can be downloaded from [Clafer Tools - Binary Distributions](http://http://gsd.uwaterloo.ca/clafer-tools-binary-distributions). There you can get binaries for `Clafer Compiler`, `ClaferIG` and the `ClaferChocoIG` backend.

The fastest way is to unzip a binary distribution into the folder `<bin>`.
By default, `<bin>=/home/clafertools040`
By default, `<bin>=/home/clafertools040/bin`

* Install [ClaferIG](https://github.com/gsdlab/claferIG) following the installation instructions into `<bin>`.

Expand Down

0 comments on commit 33de67f

Please sign in to comment.