Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
@@ -47,6 +47,8 @@ function generate_intellisense(code) {
47 47 clean_global_definitions_found();
48 48
49 49 clean_defun_definitions_found();
  50 +
  51 + GlobalIntellisenseRoot.source = code.split("\n");
50 52
51 53 return GlobalIntellisenseRoot;
52 54 }
3  src/js/intellisense/data_types.js
@@ -400,7 +400,7 @@ function type_usage() {
400 400 this.code_str = "";
401 401 this.line = -1;
402 402
403   - this.get_code_string = function () { return this.code_str; }
  403 + this.get_code_string = function () { return GlobalIntellisenseRoot.source[this.line]; }
404 404 this.get_line_number = function () { return this.line; }
405 405 }
406 406
@@ -551,6 +551,7 @@ function global_node() {
551 551 this.distinct_global_var_definition_found = {}; // For global variables
552 552 this.distinct_defun_found = {};
553 553 this.variable_class_mapping = {}; // For global variables holding composition.
  554 + this.source_code = "";
554 555
555 556 this.scratch_class_mapping = {}; // Used by internal functions
556 557
4 src/js/intellisense/utils.js
@@ -116,4 +116,8 @@ function count_dictionary_items(dict) {
116 116 }
117 117
118 118 return count;
  119 +}
  120 +
  121 +function split_name(qualified_name) {
  122 + return qualified_name.split(".")[1];
119 123 }
6 src/js/znode/nodegraph.js
@@ -876,7 +876,7 @@ function NodeGraph(canvas_id, canvas_width, canvas_height, canvasName) {
876 876 var usage_obj = tempObj.get_usage();
877 877
878 878 var row_span = count_dictionary_items(usage_obj);
879   - html += "<tr><td style='color:blue;font-weight:bold'><center>" + key + "</center></td>";
  879 + html += "<tr><td style='color:blue;font-weight:bold'><center>" + split_name(key) + "</center></td>";
880 880
881 881 html += "<td style='color:blue;font-weight:bold'><center>" + inherited_class + "</center></td>";
882 882
@@ -927,7 +927,7 @@ function NodeGraph(canvas_id, canvas_width, canvas_height, canvasName) {
927 927 var usage_obj = member_list[key].get_usage();
928 928
929 929 var row_span = count_dictionary_items(usage_obj);
930   - html = html + "<tr><td style='color:red;font-weight:bold' rowspan='" + row_span + "'><center>" + key + "</center></td>";
  930 + html = html + "<tr><td style='color:red;font-weight:bold' rowspan='" + row_span + "'><center>" + split_name(key) + "</center></td>";
931 931
932 932 var type = member_list[key].type;
933 933 html = html + "<td rowspan='" + row_span + "'><center>" + type + "</center></td>";
@@ -977,7 +977,7 @@ function NodeGraph(canvas_id, canvas_width, canvas_height, canvasName) {
977 977 var row_span = count_dictionary_items(usage_obj);
978 978 html += "<tr><td style='color:blue;font-weight:bold'><center>" + key + "</center></td>";
979 979
980   - html += "<td style='color:blue;font-weight:bold'><center>" + composition_class + "</center></td>";
  980 + html += "<td style='color:blue;font-weight:bold'><center>" + split_name(composition_class) + "</center></td>";
981 981
982 982 var type = tempObj.type;
983 983 html += "<td><center>" + type + "</center></td>";

0 comments on commit 1e1465b

Please sign in to comment.
Something went wrong with that request. Please try again.