public void onSourceCodeOpenButtonClick() { File fileToParse = view.pickFileToParse(); if (fileToParse != null) { view.clearConsole(); try { view.displayHighlightedSourceCode(new String(Files.readAllBytes(Paths.get(fileToParse.getPath())), configurationModel.getCharset())); } catch (IOException e) { throw new RuntimeException(e); } model.setSourceCode(fileToParse, configurationModel.getCharset()); view.displayHighlightedSourceCode(model.getHighlightedSourceCode()); view.displayAst(model.getAstNode()); view.displayXml(model.getXml()); view.scrollSourceCodeTo(new Point(0, 0)); view.setFocusOnAbstractSyntaxTreeView(); view.enableXPathEvaluateButton(); } }
public void onSourceCodeOpenButtonClick() { File fileToParse = view.pickFileToParse(); if (fileToParse != null) { view.clearConsole(); try { view.displayHighlightedSourceCode(new String(Files.readAllBytes(Paths.get(fileToParse.getPath())), configurationModel.getCharset())); } catch (IOException e) { throw new RuntimeException(e); } model.setSourceCode(fileToParse, configurationModel.getCharset()); view.displayHighlightedSourceCode(model.getHighlightedSourceCode()); view.displayAst(model.getAstNode()); view.displayXml(model.getXml()); view.scrollSourceCodeTo(new Point(0, 0)); view.setFocusOnAbstractSyntaxTreeView(); view.enableXPathEvaluateButton(); } }
public void onSourceCodeOpenButtonClick() { File fileToParse = view.pickFileToParse(); if (fileToParse != null) { view.clearConsole(); try { view.displayHighlightedSourceCode(Files.toString(fileToParse, configurationModel.getCharset())); } catch (IOException e) { Throwables.propagate(e); } model.setSourceCode(fileToParse, configurationModel.getCharset()); view.displayHighlightedSourceCode(model.getHighlightedSourceCode()); view.displayAst(model.getAstNode()); view.displayXml(model.getXml()); view.scrollSourceCodeTo(new Point(0, 0)); view.setFocusOnAbstractSyntaxTreeView(); view.enableXPathEvaluateButton(); } }