Package com.wiquery.plugins.demo.code.SourceInfo

Examples of com.wiquery.plugins.demo.code.SourceInfo.FORMAT


      @Override
      public String getObject() {
        try {
          String resourceName = CodeReaderPanel.this.sourceInfo.getResourceName();
          Class<?> context = CodeReaderPanel.this.sourceInfo.getContext();
          FORMAT format = CodeReaderPanel.this.sourceInfo.getFormat();
          JavaSourceConversionSettings settings = JavaSourceConversionSettings.getDefault();         
          settings.getConversionOptions().setShowLineNumbers(true);
          if(format.equals(FORMAT.JAVA) || format.equals(FORMAT.HTML)|| format.equals(FORMAT.XML)) {
            InputStream in = context.getResourceAsStream(resourceName);
            if(in != null)
              return Java2Html.convertToHtml(new String(FileUtils.bytes(in)),settings);
            return new StringBuffer().append("File ").append(resourceName).append(" not found!").toString();
          }
View Full Code Here

TOP

Related Classes of com.wiquery.plugins.demo.code.SourceInfo.FORMAT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.