test_class.declarator: view
test_class.modifier: @Mock
test_class.original_string: @Mock
      SourceCodeEditor.View view;
test_class.type: SourceCodeEditor.View
test_class.var_name: view
test_class.declarator: onChange
test_class.modifier: @Mock
test_class.original_string: @Mock
      Command onChange;
test_class.type: Command
test_class.var_name: onChange
test_class.declarator: htmlValidator
test_class.modifier: @Mock
test_class.original_string: @Mock
      HtmlValidator htmlValidator;
test_class.type: HtmlValidator
test_class.var_name: htmlValidator
test_class.declarator: jsValidator
test_class.modifier: @Mock
test_class.original_string: @Mock
      JsValidator jsValidator;
test_class.type: JsValidator
test_class.var_name: jsValidator
test_class.declarator: presenter
test_class.original_string: SourceCodeEditor presenter;
test_class.type: SourceCodeEditor
test_class.var_name: presenter
test_class.file: dashbuilder-client/dashbuilder-displayer-client/src/test/java/org/dashbuilder/displayer/client/widgets/sourcecode/SourceCodeEditorTest.java
test_class.identifier: SourceCodeEditorTest
test_case.body: @Test
      public void testEmpty() {
          reset(htmlValidator);
          presenter.init(SourceCodeType.HTML, null, new HashMap<>(), onChange);
          verify(htmlValidator, never()).validate(any());
  
          reset(htmlValidator);
          presenter.init(SourceCodeType.HTML, "", new HashMap<>(), onChange);
          verify(htmlValidator, never()).validate(any());
  
          reset(jsValidator);
          presenter.init(SourceCodeType.JAVASCRIPT, null, new HashMap<>(), onChange);
          verify(jsValidator, never()).validate(any(), anyCollection());
  
          reset(jsValidator);
          presenter.init(SourceCodeType.JAVASCRIPT, "", new HashMap<>(), onChange);
          verify(jsValidator, never()).validate(any(), anyCollection());
      }
test_case.class_method_signature: SourceCodeEditorTest.testEmpty()
test_case.full_signature: @Test public void testEmpty()
test_case.identifier: testEmpty
test_case.invocations: reset init validate verify never any reset init validate verify never any reset init validate verify never any anyCollection reset init validate verify never any anyCollection
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmpty()
focal_class.declarator: view
focal_class.original_string: View view;
focal_class.type: View
focal_class.var_name: view
focal_class.declarator: type
focal_class.original_string: SourceCodeType type;
focal_class.type: SourceCodeType
focal_class.var_name: type
focal_class.declarator: code
focal_class.original_string: String code;
focal_class.type: String
focal_class.var_name: code
focal_class.declarator: onSourceCodeChanged
focal_class.original_string: Command onSourceCodeChanged;
focal_class.type: Command
focal_class.var_name: onSourceCodeChanged
focal_class.declarator: htmlValidator
focal_class.original_string: HtmlValidator htmlValidator;
focal_class.type: HtmlValidator
focal_class.var_name: htmlValidator
focal_class.declarator: jsValidator
focal_class.original_string: JsValidator jsValidator;
focal_class.type: JsValidator
focal_class.var_name: jsValidator
focal_class.declarator: hasErrors = false
focal_class.original_string: boolean hasErrors = false;
focal_class.type: boolean
focal_class.var_name: hasErrors
focal_class.declarator: varMap
focal_class.original_string: Map<String,String> varMap;
focal_class.type: Map<String,String>
focal_class.var_name: varMap
focal_class.file: dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/widgets/sourcecode/SourceCodeEditor.java
focal_class.identifier: SourceCodeEditor
focal_class.interfaces: implements IsWidget
focal_class.class_method_signature: SourceCodeEditor.SourceCodeEditor(View view, HtmlValidator htmlValidator, JsValidator jsValidator)
focal_class.full_signature: @Inject public  SourceCodeEditor(View view, HtmlValidator htmlValidator, JsValidator jsValidator)
focal_class.identifier: SourceCodeEditor
focal_class.modifiers: @Inject public
focal_class.parameters: (View view, HtmlValidator htmlValidator, JsValidator jsValidator)
focal_class.signature:  SourceCodeEditor(View view, HtmlValidator htmlValidator, JsValidator jsValidator)
focal_class.class_method_signature: SourceCodeEditor.asWidget()
focal_class.full_signature: @Override public Widget asWidget()
focal_class.identifier: asWidget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Widget
focal_class.signature: Widget asWidget()
focal_class.class_method_signature: SourceCodeEditor.getCode()
focal_class.full_signature: public String getCode()
focal_class.identifier: getCode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCode()
focal_class.class_method_signature: SourceCodeEditor.hasErrors()
focal_class.full_signature: public boolean hasErrors()
focal_class.identifier: hasErrors
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasErrors()
focal_class.class_method_signature: SourceCodeEditor.init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_class.full_signature: public void init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_class.identifier: init
focal_class.modifiers: public
focal_class.parameters: (SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_class.return: void
focal_class.signature: void init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_class.class_method_signature: SourceCodeEditor.focus()
focal_class.full_signature: public void focus()
focal_class.identifier: focus
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void focus()
focal_class.class_method_signature: SourceCodeEditor.validateSourceCode(String newCode)
focal_class.full_signature: public String validateSourceCode(String newCode)
focal_class.identifier: validateSourceCode
focal_class.modifiers: public
focal_class.parameters: (String newCode)
focal_class.return: String
focal_class.signature: String validateSourceCode(String newCode)
focal_class.class_method_signature: SourceCodeEditor.onVariableSelected(String var)
focal_class.full_signature: public void onVariableSelected(String var)
focal_class.identifier: onVariableSelected
focal_class.modifiers: public
focal_class.parameters: (String var)
focal_class.return: void
focal_class.signature: void onVariableSelected(String var)
focal_class.class_method_signature: SourceCodeEditor.onSourceCodeChanged(String newCode)
focal_class.full_signature: public boolean onSourceCodeChanged(String newCode)
focal_class.identifier: onSourceCodeChanged
focal_class.modifiers: public
focal_class.parameters: (String newCode)
focal_class.return: boolean
focal_class.signature: boolean onSourceCodeChanged(String newCode)
focal_method.body: public void init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged) {
          this.type = type;
          this.code = code;
          this.varMap = varMap == null ? new HashMap<>() : varMap;
          this.hasErrors = false;
          this.onSourceCodeChanged = onSourceCodeChanged;
  
          view.clearAll();
          view.edit(type, code);
          view.focus();
  
          for (String var : varMap.keySet()) {
              view.declareVariable(var, varMap.get(var));
          }
  
          String error = validateSourceCode(code);
          if (error != null) {
              hasErrors = true;
              view.error(error);
          }
      }
focal_method.class_method_signature: SourceCodeEditor.init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_method.full_signature: public void init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_method.identifier: init
focal_method.invocations: clearAll edit focus keySet declareVariable get validateSourceCode error
focal_method.modifiers: public
focal_method.parameters: (SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)
focal_method.return: void
focal_method.signature: void init(SourceCodeType type, String code, Map<String,String> varMap, Command onSourceCodeChanged)