Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Show only one line for every usage object

  • Loading branch information...
commit 1e1465b000d603bd25868649e4b9857302e2f429 1 parent e61864d
Soumya Tripathy authored
2  src/js/intellisense/api.js
View
@@ -47,6 +47,8 @@ function generate_intellisense(code) {
clean_global_definitions_found();
clean_defun_definitions_found();
+
+ GlobalIntellisenseRoot.source = code.split("\n");
return GlobalIntellisenseRoot;
}
3  src/js/intellisense/data_types.js
View
@@ -400,7 +400,7 @@ function type_usage() {
this.code_str = "";
this.line = -1;
- this.get_code_string = function () { return this.code_str; }
+ this.get_code_string = function () { return GlobalIntellisenseRoot.source[this.line]; }
this.get_line_number = function () { return this.line; }
}
@@ -551,6 +551,7 @@ function global_node() {
this.distinct_global_var_definition_found = {}; // For global variables
this.distinct_defun_found = {};
this.variable_class_mapping = {}; // For global variables holding composition.
+ this.source_code = "";
this.scratch_class_mapping = {}; // Used by internal functions
4 src/js/intellisense/utils.js
View
@@ -116,4 +116,8 @@ function count_dictionary_items(dict) {
}
return count;
+}
+
+function split_name(qualified_name) {
+ return qualified_name.split(".")[1];
}
6 src/js/znode/nodegraph.js
View
@@ -876,7 +876,7 @@ function NodeGraph(canvas_id, canvas_width, canvas_height, canvasName) {
var usage_obj = tempObj.get_usage();
var row_span = count_dictionary_items(usage_obj);
- html += "<tr><td style='color:blue;font-weight:bold'><center>" + key + "</center></td>";
+ html += "<tr><td style='color:blue;font-weight:bold'><center>" + split_name(key) + "</center></td>";
html += "<td style='color:blue;font-weight:bold'><center>" + inherited_class + "</center></td>";
@@ -927,7 +927,7 @@ function NodeGraph(canvas_id, canvas_width, canvas_height, canvasName) {
var usage_obj = member_list[key].get_usage();
var row_span = count_dictionary_items(usage_obj);
- html = html + "<tr><td style='color:red;font-weight:bold' rowspan='" + row_span + "'><center>" + key + "</center></td>";
+ html = html + "<tr><td style='color:red;font-weight:bold' rowspan='" + row_span + "'><center>" + split_name(key) + "</center></td>";
var type = member_list[key].type;
html = html + "<td rowspan='" + row_span + "'><center>" + type + "</center></td>";
@@ -977,7 +977,7 @@ function NodeGraph(canvas_id, canvas_width, canvas_height, canvasName) {
var row_span = count_dictionary_items(usage_obj);
html += "<tr><td style='color:blue;font-weight:bold'><center>" + key + "</center></td>";
- html += "<td style='color:blue;font-weight:bold'><center>" + composition_class + "</center></td>";
+ html += "<td style='color:blue;font-weight:bold'><center>" + split_name(composition_class) + "</center></td>";
var type = tempObj.type;
html += "<td><center>" + type + "</center></td>";
Please sign in to comment.
Something went wrong with that request. Please try again.