Package de.hunsicker.jalopy

Examples of de.hunsicker.jalopy.Jalopy.format()


    Jalopy jalopy = initializeJalopy();
    try {
      jalopy.setInput(sequence.getString(), file.getAbsolutePath());
      StringBuffer sb = new StringBuffer();
      jalopy.setOutput(sb);
      jalopy.format();
      sequence.set(sb);
    } finally {
      cleanupJalopy();
    }
  }
View Full Code Here


                            ex.printStackTrace();
                        }
                    }
                    jal.setInput(input,"what is this?");
                    jal.setOutput(output);
                    jal.format();
                    doc.remove(0,doc.getLength());
                    doc.insertString(0,output.getBuffer().toString(),null);
                } catch (BadLocationException ex) {
                    ex.printStackTrace();
                }
View Full Code Here

            if ( isBackup() )
            {
                jalopy.setBackupDirectory( currentFile.getParentFile() );
            }

            jalopy.format();

            logMessage( jalopy, currentFile );
        }
    }
View Full Code Here

        convention.put(
                ConventionKeys.COMMENT_JAVADOC_TEMPLATE_INTERFACE,
                env.interpolate(classMask));

        jalopy.format();

        String newContent = sb.toString();

        // Remove double blank lines after the package or last import
View Full Code Here

    protected void format(CharacterSequence sequence, File file) {
        Jalopy jalopy = initializeJalopy();
        jalopy.setInput(sequence.getString(), file.getAbsolutePath());
        StringBuffer sb = new StringBuffer();
        jalopy.setOutput(sb);
        jalopy.format();
        sequence.set(sb);
    }

    private Jalopy initializeJalopy() {
        Jalopy jalopy = new Jalopy();
View Full Code Here

         
          jalopy.setInput(stringWriter.toString(), file.getPath());
          jalopy.setOutput(buffer);
         
          FileWriter writer = new FileWriter(file);
          if (jalopy.format() && Jalopy.State.PARSED == jalopy.getState()) {
            writer.write(buffer.toString());
          } else {
            writer.write(stringWriter.toString());
          }
          writer.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.