Browse Source

Comitando

Igor 5 years ago
parent
commit
269fbdd168
100 changed files with 277 additions and 159 deletions
  1. 0 0
      .gitignore
  2. 0 0
      .vscode/launch.json
  3. 0 0
      .vscode/settings.json
  4. 86 54
      build/ivprog.bundle.js
  5. 1 1
      build/ivprog.bundle.js.map
  6. 0 0
      css/ivprog-term.css
  7. 25 9
      css/ivprog-visual-1.0.css
  8. 0 0
      grammar/en/ivprog.g4
  9. 0 0
      grammar/en/langFunctions.js
  10. 0 0
      grammar/en/langLibs.js
  11. 0 0
      grammar/es/ivprog.g4
  12. 0 0
      grammar/es/langFunctions.js
  13. 0 0
      grammar/es/langLibs.js
  14. 0 0
      grammar/index.js
  15. 0 0
      grammar/pt/ivprog.g4
  16. 0 0
      grammar/pt/langFunctions.js
  17. 0 0
      grammar/pt/langLibs.js
  18. 0 0
      i18n/en/error.json
  19. 0 0
      i18n/en/index.js
  20. 0 0
      i18n/en/message.json
  21. 3 1
      i18n/en/ui.json
  22. 0 0
      i18n/es/error.json
  23. 0 0
      i18n/es/index.js
  24. 0 0
      i18n/es/message.json
  25. 3 1
      i18n/es/ui.json
  26. 0 0
      i18n/i18n-database.json
  27. 0 0
      i18n/index.js
  28. 0 0
      i18n/pt/error.json
  29. 0 0
      i18n/pt/index.js
  30. 0 0
      i18n/pt/message.json
  31. 3 1
      i18n/pt/ui.json
  32. 0 0
      img/background-panel.png
  33. 57 58
      index.html
  34. 0 0
      ivprog.sublime-project
  35. 0 0
      js/Sortable.js
  36. 0 0
      js/assessment/ivprogAssessment.js
  37. 0 0
      js/ast/ASA.txt
  38. 0 0
      js/ast/commands/arrayAssign.js
  39. 0 0
      js/ast/commands/arrayDeclaration.js
  40. 0 0
      js/ast/commands/assign.js
  41. 0 0
      js/ast/commands/break.js
  42. 0 0
      js/ast/commands/case.js
  43. 0 0
      js/ast/commands/command.js
  44. 0 0
      js/ast/commands/commandBlock.js
  45. 0 0
      js/ast/commands/declaration.js
  46. 0 0
      js/ast/commands/doWhile.js
  47. 0 0
      js/ast/commands/for.js
  48. 0 0
      js/ast/commands/formalParameter.js
  49. 0 0
      js/ast/commands/function.js
  50. 0 0
      js/ast/commands/ifThenElse.js
  51. 0 0
      js/ast/commands/index.js
  52. 0 0
      js/ast/commands/return.js
  53. 0 0
      js/ast/commands/switch.js
  54. 0 0
      js/ast/commands/sysCall.js
  55. 0 0
      js/ast/commands/while.js
  56. 0 0
      js/ast/error/syntaxError.js
  57. 0 0
      js/ast/error/syntaxErrorFactory.js
  58. 0 0
      js/ast/expressions/arrayAccess.js
  59. 0 0
      js/ast/expressions/arrayLiteral.js
  60. 0 0
      js/ast/expressions/boolLiteral.js
  61. 0 0
      js/ast/expressions/expression.js
  62. 0 0
      js/ast/expressions/functionCall.js
  63. 0 0
      js/ast/expressions/index.js
  64. 0 0
      js/ast/expressions/infixApp.js
  65. 0 0
      js/ast/expressions/intLiteral.js
  66. 0 0
      js/ast/expressions/literal.js
  67. 0 0
      js/ast/expressions/realLiteral.js
  68. 0 0
      js/ast/expressions/stringLiteral.js
  69. 0 0
      js/ast/expressions/unaryApp.js
  70. 0 0
      js/ast/expressions/variableLiteral.js
  71. 0 0
      js/ast/ivprogParser.js
  72. 0 0
      js/ast/operators.js
  73. 0 0
      js/ast/sourceInfo.js
  74. 99 34
      js/iassign-integration-functions.js
  75. 0 0
      js/io/domConsole.js
  76. 0 0
      js/io/domInput.js
  77. 0 0
      js/io/domOutput.js
  78. 0 0
      js/io/input.js
  79. 0 0
      js/io/output.js
  80. 0 0
      js/jquery-3.3.1.min.js
  81. 0 0
      js/jquery-ui.js
  82. 0 0
      js/jquery.json-editor.min.js
  83. 0 0
      js/main.js
  84. 0 0
      js/processor/compatibilityTable.js
  85. 0 0
      js/processor/context.js
  86. 0 0
      js/processor/definedFunctions.js
  87. 0 0
      js/processor/error/processorErrorFactory.js
  88. 0 0
      js/processor/error/runtimeError.js
  89. 0 0
      js/processor/error/semanticError.js
  90. 0 0
      js/processor/ivprogProcessor.js
  91. 0 0
      js/processor/lib/arrays.js
  92. 0 0
      js/processor/lib/io.js
  93. 0 0
      js/processor/lib/lang.js
  94. 0 0
      js/processor/lib/math.js
  95. 0 0
      js/processor/lib/strings.js
  96. 0 0
      js/processor/modes.js
  97. 0 0
      js/processor/semantic/semanticAnalyser.js
  98. 0 0
      js/processor/store/store.js
  99. 0 0
      js/processor/store/storeObject.js
  100. 0 0
      js/processor/store/storeObjectArray.js

+ 0 - 0
.gitignore


+ 0 - 0
.vscode/launch.json


+ 0 - 0
.vscode/settings.json


File diff suppressed because it is too large
+ 86 - 54
build/ivprog.bundle.js


File diff suppressed because it is too large
+ 1 - 1
build/ivprog.bundle.js.map


+ 0 - 0
css/ivprog-term.css


+ 25 - 9
css/ivprog-visual-1.0.css

@@ -280,11 +280,12 @@ div.buttons_manage_columns {
 }
 .ui.comment, .ui.reader, .ui.writer, .ui.attribution, .ui.iftrue, .ui.repeatNtimes, .ui.whiletrue, .ui.dowhiletrue, .ui.switch, .ui.functioncall,
 .ui.return {
-	border: 1px solid gray;
 	padding: 5px;
-	border-radius: 5px;
 	margin: 5px;
-	background: #f9f9f9;
+	background: #f7f2c9;
+    border: 2px solid #4d4be3;
+    border-radius: 0.25em;
+    box-shadow: 1px 1px;
 }
 .ui.repeatNtimes .separator_character {
 	margin-right: 10px;
@@ -354,7 +355,10 @@ div.buttons_manage_columns {
 
 .ui.icon.red.exclamation.triangle.error_icon {
 	float: left;
-    margin-left: -30px;
+    margin-left: -1.6em;
+    z-index: 10;
+    position: absolute;
+    font-size: 1.5em;
 }
 
 .height_100 {
@@ -769,11 +773,6 @@ div.function_name_div_updated:active,
 	opacity: 1 !important;
 }
 
-.command_container {
-    background: #e9dede !important;
-	border: 2px solid #e76060 !important;
-    border-radius: 0.25em !important;
-}
 .command_drag {
 	cursor: move;
 }
@@ -790,4 +789,21 @@ div.function_name_div_updated:active,
 }
 div.ui.checkbox.transition.visible {
 	margin-bottom: 1em;
+}
+.var_menu_select_content_error {
+	background: #ff0000;
+    color: white !important;
+    border: 2px solid #3125ee;
+}
+.ui.comment:hover, .ui.reader:hover, .ui.writer:hover, .ui.attribution:hover, .ui.functioncall:hover,
+.ui.return:hover {
+    background: #f2e67f;
+}
+
+.ui.iftrue:hover, .ui.repeatNtimes:hover, .ui.whiletrue:hover, .ui.dowhiletrue:hover, .ui.switch:hover {
+	background: #c6c8f2;
+}
+
+.ui.iftrue, .ui.repeatNtimes, .ui.whiletrue, .ui.dowhiletrue, .ui.switch {
+    background: #787fe721;
 }

+ 0 - 0
grammar/en/ivprog.g4


+ 0 - 0
grammar/en/langFunctions.js


+ 0 - 0
grammar/en/langLibs.js


+ 0 - 0
grammar/es/ivprog.g4


+ 0 - 0
grammar/es/langFunctions.js


+ 0 - 0
grammar/es/langLibs.js


+ 0 - 0
grammar/index.js


+ 0 - 0
grammar/pt/ivprog.g4


+ 0 - 0
grammar/pt/langFunctions.js


+ 0 - 0
grammar/pt/langLibs.js


+ 0 - 0
i18n/en/error.json


+ 0 - 0
i18n/en/index.js


+ 0 - 0
i18n/en/message.json


+ 3 - 1
i18n/en/ui.json

@@ -78,6 +78,7 @@
   "text_menu_functions_conversion":"Conversion",
   "text_none_variable":"There is no declared variable",
   "text_none_variable_instruction":"Create a new variable to use it",
+  "text_ivprog_description":"Interactive Visual Programming on the Internet",
   "tooltip_visual": "Visual programming",
   "tooltip_textual": "Textual programming",
   "tooltip_upload": "Upload code file",
@@ -123,5 +124,6 @@
   "$castReal": "to_real",
   "$castInt": "to_integer",
   "$castBool": "to_logic",
-  "$castString": "to_string"
+  "$castString": "to_string",
+  "text_ivprog_version":"Version 2018_12_19 Build 13_18"
 }

+ 0 - 0
i18n/es/error.json


+ 0 - 0
i18n/es/index.js


+ 0 - 0
i18n/es/message.json


+ 3 - 1
i18n/es/ui.json

@@ -78,6 +78,7 @@
   "text_menu_functions_conversion":"Conversion",
   "text_none_variable":"There is no declared variable",
   "text_none_variable_instruction":"Create a new variable to use it",
+  "text_ivprog_description":"Interactive Visual Programming on the Internet",
   "tooltip_visual": "Visual programming",
   "tooltip_textual": "Textual programming",
   "tooltip_upload": "Upload code file",
@@ -128,5 +129,6 @@
   "$castReal": "to_real",
   "$castInt": "to_integer",
   "$castBool": "to_logic",
-  "$castString": "to_string"
+  "$castString": "to_string",
+  "text_ivprog_version":"Version 2018_12_19 Build 13_18"
 }

+ 0 - 0
i18n/i18n-database.json


+ 0 - 0
i18n/index.js


+ 0 - 0
i18n/pt/error.json


+ 0 - 0
i18n/pt/index.js


+ 0 - 0
i18n/pt/message.json


+ 3 - 1
i18n/pt/ui.json

@@ -84,6 +84,7 @@
   "text_menu_functions_conversion":"Conversão",
   "text_none_variable":"Nenhuma variável declarada",
   "text_none_variable_instruction":"Antes de utilizar uma variável, é necessário criá-la",
+  "text_ivprog_description":"Programação Visual interativa na Internet",
   "tooltip_visual": "Programação visual",
   "tooltip_textual": "Programação textual",
   "tooltip_upload": "Upload de código fonte",
@@ -130,5 +131,6 @@
   "$castReal": "como_real",
   "$castInt": "como_inteiro",
   "$castBool": "como_logico",
-  "$castString": "como_cadeia"
+  "$castString": "como_cadeia",
+  "text_ivprog_version":"Versão 2018_12_19 Build 13_18"
 }

+ 0 - 0
img/background-panel.png


+ 57 - 58
index.html

@@ -28,84 +28,83 @@
 
       <div class="title default_visual_title">
         <i class="dropdown icon"></i>
-        
       </div>
 
     <div class="content height_100">
    
-    <div class="ui raised container segment div_to_body">
+      <div class="ui raised container segment div_to_body">
 
-      <div class="ui container main_title only_in_frame">
-      <h2>iVProg</h2>
-    </div>
+        <div class="ui container main_title only_in_frame">
+          <h2>iVProg</h2>
+        </div>
 
-      <div class="ui icon menu center aligned container" style="width: 438px; margin-top: -20px;">
-        <a class="item active visual_coding_button">
-          <i class="window maximize outline icon"></i>
-        </a>
-        <a class="item textual_coding_button">
-          <i class="code icon"></i>
-        </a>
-        <a class="item upload_file_button disabled">
-          <i class="upload icon"></i>
-        </a>
-        <a class="item download_file_button disabled">
-          <i class="download icon"></i>
-        </a>
-        <a class="item undo_button disabled">
-          <i class="undo icon"></i>
-        </a>
-        <a class="item redo_button disabled">
-          <i class="redo icon"></i>
-        </a>
-        <a class="item run_button">
-          <i class="play icon"></i>
-        </a>
-        <a class="item assessment assessment_button">
-          <i class="check icon"></i>
-        </a>
-        <!--<a class="item expand_button">
-          <i class="expand arrows alternate icon"></i>
-        </a>-->
-        <a class="item help_button">
-          <i class="help icon"></i>
-        </a>
-      </div>
+        <div class="ui icon menu center aligned container" style="width: 438px; margin-top: -20px;">
+          <a class="item active visual_coding_button">
+            <i class="window maximize outline icon"></i>
+          </a>
+          <a class="item textual_coding_button">
+            <i class="code icon"></i>
+          </a>
+          <a class="item upload_file_button disabled">
+            <i class="upload icon"></i>
+          </a>
+          <a class="item download_file_button disabled">
+            <i class="download icon"></i>
+          </a>
+          <a class="item undo_button disabled">
+            <i class="undo icon"></i>
+          </a>
+          <a class="item redo_button disabled">
+            <i class="redo icon"></i>
+          </a>
+          <a class="item run_button">
+            <i class="play icon"></i>
+          </a>
+          <a class="item assessment assessment_button">
+            <i class="check icon"></i>
+          </a>
+          <!--<a class="item expand_button">
+            <i class="expand arrows alternate icon"></i>
+          </a>-->
+          <a class="item help_button">
+            <i class="help icon"></i>
+          </a>
+        </div>
 
-      <div class="ui one column container segment ivprog_visual_panel loading">
+        <div class="ui one column container segment ivprog_visual_panel loading">
 
-        <div class="global_var">
-          <i class="icon plus circle purple add_global_button"></i>
-          <i class="icon circle white back"></i>
+          <div class="global_var">
+            <i class="icon plus circle purple add_global_button"></i>
+            <i class="icon circle white back"></i>
 
-          <div class="ui icon button add-globalVar-button add_global_button purple"><i class="icon superscript"></i></div>
+            <div class="ui icon button add-globalVar-button add_global_button purple"><i class="icon superscript"></i></div>
 
-          <div class="list_globals" id="listGlobalsHandle"></div>
+            <div class="list_globals" id="listGlobalsHandle"></div>
 
-        </div>
+          </div>
 
-        <div class="all_functions list-group" id="listWithHandle">
+          <div class="all_functions list-group" id="listWithHandle">
 
-        </div>
+          </div>
 
 
-        <div class="ui teal small labeled icon button add_function_button">
-          <data class="i18n" value="ui:btn_function">Function</data>
-          <i class="add icon"></i>
-        </div>
-        <div class="program_final"></div>
+          <div class="ui teal small labeled icon button add_function_button">
+            <data class="i18n" value="ui:btn_function">Function</data>
+            <i class="add icon"></i>
+          </div>
+          <div class="program_final"></div>
 
-      </div>
+        </div>
 
 
-      <div class="ui one column container segment ivprog_textual_panel loading" style="display: none;">
-        <textarea class="ivprog_textual_code" readonly></textarea>
-      </div>
+        <div class="ui one column container segment ivprog_textual_panel loading" style="display: none;">
+          <textarea class="ivprog_textual_code" readonly></textarea>
+        </div>
 
-      <div id='ivprog-term' class="six column wide">
-        <div class="div_toggle_console"><i class="inverted terminal icon green button_toggle_console"></i></div>
+        <div id='ivprog-term' class="six column wide">
+          <div class="div_toggle_console"><i class="inverted terminal icon green button_toggle_console"></i></div>
+        </div>
       </div>
-    </div>
 
     </div>
 

+ 0 - 0
ivprog.sublime-project


+ 0 - 0
js/Sortable.js


+ 0 - 0
js/assessment/ivprogAssessment.js


+ 0 - 0
js/ast/ASA.txt


+ 0 - 0
js/ast/commands/arrayAssign.js


+ 0 - 0
js/ast/commands/arrayDeclaration.js


+ 0 - 0
js/ast/commands/assign.js


+ 0 - 0
js/ast/commands/break.js


+ 0 - 0
js/ast/commands/case.js


+ 0 - 0
js/ast/commands/command.js


+ 0 - 0
js/ast/commands/commandBlock.js


+ 0 - 0
js/ast/commands/declaration.js


+ 0 - 0
js/ast/commands/doWhile.js


+ 0 - 0
js/ast/commands/for.js


+ 0 - 0
js/ast/commands/formalParameter.js


+ 0 - 0
js/ast/commands/function.js


+ 0 - 0
js/ast/commands/ifThenElse.js


+ 0 - 0
js/ast/commands/index.js


+ 0 - 0
js/ast/commands/return.js


+ 0 - 0
js/ast/commands/switch.js


+ 0 - 0
js/ast/commands/sysCall.js


+ 0 - 0
js/ast/commands/while.js


+ 0 - 0
js/ast/error/syntaxError.js


+ 0 - 0
js/ast/error/syntaxErrorFactory.js


+ 0 - 0
js/ast/expressions/arrayAccess.js


+ 0 - 0
js/ast/expressions/arrayLiteral.js


+ 0 - 0
js/ast/expressions/boolLiteral.js


+ 0 - 0
js/ast/expressions/expression.js


+ 0 - 0
js/ast/expressions/functionCall.js


+ 0 - 0
js/ast/expressions/index.js


+ 0 - 0
js/ast/expressions/infixApp.js


+ 0 - 0
js/ast/expressions/intLiteral.js


+ 0 - 0
js/ast/expressions/literal.js


+ 0 - 0
js/ast/expressions/realLiteral.js


+ 0 - 0
js/ast/expressions/stringLiteral.js


+ 0 - 0
js/ast/expressions/unaryApp.js


+ 0 - 0
js/ast/expressions/variableLiteral.js


+ 0 - 0
js/ast/ivprogParser.js


+ 0 - 0
js/ast/operators.js


+ 0 - 0
js/ast/sourceInfo.js


+ 99 - 34
js/iassign-integration-functions.js

@@ -115,27 +115,51 @@ function getiLMContent () {
     // O parâmetro "iLM_PARAM_Assignment" fornece o URL do endereço que deve ser
     // requisitado via AJAX para a captura dos dados da atividade
     $.get(iLMparameters.iLM_PARAM_Assignment, function (data) {
+        // Aluno está trabalhando em alguma atividade:
         if (iLMparameters.iLM_PARAM_SendAnswer == 'false') {
             previousContent = data;
             prepareActivityToStudent(data);
-        } else {
-
+        } else { // Professor está editando uma atividade:
+            previousContent = data;
+            prepareActivityToEdit(data);
         }
     });
 }
 
-function prepareActivityToStudent (ilm_cont) {
+function prepareActivityToEdit (ilm_cont) {
     var content = JSON.parse(ilm_cont.split('\n::algorithm::')[0]);
     testCases = content.testcases;
     settingsDataTypes = content.settings_data_types;
     settingsCommands = content.settings_commands;
     settingsFunctions = content.settings_functions;
+
+    for (var i = 0; i < testCases.length; i++) {
+        addTestCase(testCases[i]);
+    }
+
     if (ilm_cont.split('\n::algorithm::')[1]) {
         algorithm_in_ilm = ilm_cont.split('\n::algorithm::')[1].split('\n::logs::')[0];
-        window.program_obj.functions = JSON.parse(algorithm_in_ilm).functions;
-        window.program_obj.globals = JSON.parse(algorithm_in_ilm).globals;
+        $("input[name='include_algo']").prop('checked', true);
+        includePreviousAlgorithm();
+        renderAlgorithm();
+    }
+}
 
-        window.watchW.watch(window.program_obj.globals, function(){
+function includePreviousAlgorithm () {
+    window.program_obj.functions = JSON.parse(algorithm_in_ilm).functions;
+    window.program_obj.globals = JSON.parse(algorithm_in_ilm).globals;
+
+    window.watchW.watch(window.program_obj.globals, function(){
+      if (window.insertContext) {
+        setTimeout(function(){ renderAlgorithm(); }, 300);
+        window.insertContext = false;
+      } else {
+        renderAlgorithm();
+      }
+    }, 1);
+
+    for (var i = 0; i < window.program_obj.functions.length; i ++) {
+        window.watchW.watch(window.program_obj.functions[i].parameters_list, function(){
           if (window.insertContext) {
             setTimeout(function(){ renderAlgorithm(); }, 300);
             window.insertContext = false;
@@ -144,26 +168,7 @@ function prepareActivityToStudent (ilm_cont) {
           }
         }, 1);
 
-        for (var i = 0; i < window.program_obj.functions.length; i ++) {
-            window.watchW.watch(window.program_obj.functions[i].parameters_list, function(){
-              if (window.insertContext) {
-                setTimeout(function(){ renderAlgorithm(); }, 300);
-                window.insertContext = false;
-              } else {
-                renderAlgorithm();
-              }
-            }, 1);
-
-            window.watchW.watch(window.program_obj.functions[i].variables_list, function(){
-              if (window.insertContext) {
-                setTimeout(function(){ renderAlgorithm(); }, 300);
-                window.insertContext = false;
-              } else {
-                renderAlgorithm();
-              }
-            }, 1);
-        }
-        window.watchW.watch(window.program_obj.functions, function(){
+        window.watchW.watch(window.program_obj.functions[i].variables_list, function(){
           if (window.insertContext) {
             setTimeout(function(){ renderAlgorithm(); }, 300);
             window.insertContext = false;
@@ -171,6 +176,31 @@ function prepareActivityToStudent (ilm_cont) {
             renderAlgorithm();
           }
         }, 1);
+
+        if (window.program_obj.functions[i].is_main) {
+            window.program_obj.functions[i].name = LocalizedStrings.getUI("start");
+        }
+    }
+    window.watchW.watch(window.program_obj.functions, function(){
+      if (window.insertContext) {
+        setTimeout(function(){ renderAlgorithm(); }, 300);
+        window.insertContext = false;
+      } else {
+        renderAlgorithm();
+      }
+    }, 1);
+}
+
+function prepareActivityToStudent (ilm_cont) {
+    var content = JSON.parse(ilm_cont.split('\n::algorithm::')[0]);
+    testCases = content.testcases;
+    settingsDataTypes = content.settings_data_types;
+    settingsCommands = content.settings_commands;
+    settingsFunctions = content.settings_functions;
+
+    if (ilm_cont.split('\n::algorithm::')[1]) {
+        algorithm_in_ilm = ilm_cont.split('\n::algorithm::')[1].split('\n::logs::')[0];
+        includePreviousAlgorithm();
     }
     $('.assessment_button').removeClass('disabled');
     renderAlgorithm();
@@ -207,6 +237,12 @@ $(document).ready(function() {
         // Caso não esteja em modo de resolução de atividade, a visualização no momento
         // é para a elaboração de atividade:
         //$('.elaboracao').css("display","block");
+
+        // Se possuir o parâmetro iLMparameters.iLM_PARAM_Assignment, o professor
+        // está editando uma atividade:
+        if (iLMparameters.iLM_PARAM_Assignment) {
+            getiLMContent();
+        }
     }
 
     if (!testCases) {
@@ -264,8 +300,35 @@ function prepareTableTestCases (div_el) {
 
 var hist = false;
 
-function addTestCase () {
-    var new_row = $('<tr><td class="counter"></td><td class="expandingArea"><textarea rows="1" name="input" class="text_area_input"></textarea></td><td class="expandingArea"><textarea rows="1" name="output" class="text_area_output"></textarea></td><td class="btn_actions"><div class="ui button_remove_case"><i class="red icon times large"></i></div></td></tr>');
+function addTestCase (test_case = null) {
+    var new_row = null;
+    if (test_case) {
+        var text_row = '';
+
+        text_row += '<tr><td class="counter"></td><td class="expandingArea"><textarea rows="'+test_case.input.length+'" name="input" class="text_area_input">';
+
+        for (var i = 0; i < test_case.input.length; i ++) {
+            text_row += test_case.input[i];
+            if ((i + 1) < test_case.input.length) {
+                text_row += '\n';
+            }
+        }
+        
+        text_row += '</textarea></td><td class="expandingArea"><textarea rows="'+test_case.output.length+'" name="output" class="text_area_output">';
+
+        for (var i = 0; i < test_case.output.length; i ++) {
+            text_row += test_case.output[i];
+            if ((i + 1) < test_case.output.length) {
+                text_row += '\n';
+            }
+        }
+
+        text_row += '</textarea></td><td class="btn_actions"><div class="ui button_remove_case"><i class="red icon times large"></i></div></td></tr>';
+
+        new_row = $(text_row);
+    } else {
+        new_row = $('<tr><td class="counter"></td><td class="expandingArea"><textarea rows="1" name="input" class="text_area_input"></textarea></td><td class="expandingArea"><textarea rows="1" name="output" class="text_area_output"></textarea></td><td class="btn_actions"><div class="ui button_remove_case"><i class="red icon times large"></i></div></td></tr>');
+    }
     $('.content_cases').append(new_row);
 
     new_row.find('.button_remove_case').click(function(e) {
@@ -273,7 +336,7 @@ function addTestCase () {
         updateTestCaseCounter();
     });
 
-    $('textarea').on('input', function(e) {
+    new_row.find('textarea').on('input', function(e) {
         var lines = $(this).val().split('\n').length;
         $(this).attr('rows', lines);
     });
@@ -287,10 +350,12 @@ function addTestCase () {
             addTestCase();
         }
      });
-     if (!hist) {
-        $( ".content_cases tr:last" ).find('.text_area_input').focus();
-     } else {
-        hist = false;
+     if (test_case == null) {
+        if (!hist) {
+            $( ".content_cases tr:last" ).find('.text_area_input').focus();
+         } else {
+            hist = false;
+         }
      }
 }
 
@@ -393,7 +458,7 @@ function inIframe () {
 
 
 function full_screen() {
-     // check if user allows full screen of elements. This can be enabled or disabled in browser config. By default its enabled.
+    // check if user allows full screen of elements. This can be enabled or disabled in browser config. By default its enabled.
     //its also used to check if browser supports full screen api.
     if("fullscreenEnabled" in document || "webkitFullscreenEnabled" in document || "mozFullScreenEnabled" in document || "msFullscreenEnabled" in document) {
         if(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) {

+ 0 - 0
js/io/domConsole.js


+ 0 - 0
js/io/domInput.js


+ 0 - 0
js/io/domOutput.js


+ 0 - 0
js/io/input.js


+ 0 - 0
js/io/output.js


+ 0 - 0
js/jquery-3.3.1.min.js


+ 0 - 0
js/jquery-ui.js


+ 0 - 0
js/jquery.json-editor.min.js


+ 0 - 0
js/main.js


+ 0 - 0
js/processor/compatibilityTable.js


+ 0 - 0
js/processor/context.js


+ 0 - 0
js/processor/definedFunctions.js


+ 0 - 0
js/processor/error/processorErrorFactory.js


+ 0 - 0
js/processor/error/runtimeError.js


+ 0 - 0
js/processor/error/semanticError.js


+ 0 - 0
js/processor/ivprogProcessor.js


+ 0 - 0
js/processor/lib/arrays.js


+ 0 - 0
js/processor/lib/io.js


+ 0 - 0
js/processor/lib/lang.js


+ 0 - 0
js/processor/lib/math.js


+ 0 - 0
js/processor/lib/strings.js


+ 0 - 0
js/processor/modes.js


+ 0 - 0
js/processor/semantic/semanticAnalyser.js


+ 0 - 0
js/processor/store/store.js


+ 0 - 0
js/processor/store/storeObject.js


+ 0 - 0
js/processor/store/storeObjectArray.js


Some files were not shown because too many files changed in this diff