<commit_before>var UmlCanvas = {};

UmlCanvas.Model = Class.create( Canvas2D.Canvas, {
    addDiagram: function(diagram) {
	return this.addSheet(diagram);
    }
} );

UmlCanvas.determineVisibility = function(visibility) {
    switch(visibility) {
    case "protected": return "#";
    case "private":   return "-";
    case "package":   return "~";
    }
    return "+";
}
<commit_msg>added global static support for retrieving a diagram by name<commit_after>var UmlCanvas = {};

UmlCanvas.diagrams = {};

UmlCanvas.getDiagram = function(diagram) {
    return UmlCanvas.diagrams[diagram];
};

UmlCanvas.Model = Class.create( Canvas2D.Canvas, {
    addDiagram: function(diagram) {
	UmlCanvas.diagrams[diagram.name] = diagram;
	return this.addSheet(diagram);
    }
} );

UmlCanvas.determineVisibility = function(visibility) {
    switch(visibility) {
    case "protected": return "#";
    case "private":   return "-";
    case "package":   return "~";
    }
    return "+";
}

{'fraction_non_alphanumeric': 0.1476923076923077, 'fraction_numerical': 0.0020512820512820513, 'mean_word_length': 3.8078817733990147, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3568722', 'n_tokens_mistral': 328, 'n_tokens_neox': 317, 'n_words': 60}