Package net.sf.rej.gui.editor.row

Examples of net.sf.rej.gui.editor.row.ClassCommentRow


    if (sfA == null && sfB == null) {
      // Add nothing, neither has a source file attribute
    } else if (sfA == null || sfB == null) {
      // Only one has a source file attribute
      if (sfA != null) {
        ClassCommentRow sfComment = new ClassCommentRow("SourceFile = " + sfA.getSourceFile());
        this.rowsA.add(sfComment);
        this.rowsAll.add(sfComment);
      }
     
      if (sfB != null) {
        ClassCommentRow sfComment = new ClassCommentRow("SourceFile = " + sfB.getSourceFile());
        this.rowsB.add(sfComment);
        this.rowsAll.add(sfComment);       
      }
     
    } else {
      // Both have source file attributes
      if (sfA.getSourceFile().equals(sfB.getSourceFile())) {
        ClassCommentRow sfComment = new ClassCommentRow("SourceFile = " + sfA.getSourceFile());
        this.rowsAll.add(sfComment);
      } else {
        ClassCommentRow sfCommentA = new ClassCommentRow("SourceFile = " + sfA.getSourceFile());
        this.rowsA.add(sfCommentA);
        this.rowsAll.add(sfCommentA);

        ClassCommentRow sfCommentB = new ClassCommentRow("SourceFile = " + sfB.getSourceFile());
        this.rowsB.add(sfCommentB);
        this.rowsAll.add(sfCommentB);
      }
    }
   
    // Class version
    if (cfA.getMajorVersion() == cfB.getMajorVersion()
     && cfA.getMinorVersion() == cfB.getMinorVersion()) {
        ClassCommentRow versionComment = new ClassCommentRow("Class Version: " + cfA.getMajorVersion() + "." + cfA.getMinorVersion());
        this.rowsAll.add(versionComment);
    } else {
      ClassCommentRow versionCommentA = new ClassCommentRow("Class Version: " + cfA.getMajorVersion() + "." + cfA.getMinorVersion());
      this.rowsA.add(versionCommentA);
      ClassCommentRow versionCommentB = new ClassCommentRow("Class Version: " + cfB.getMajorVersion() + "." + cfB.getMinorVersion());
      this.rowsB.add(versionCommentB);
      this.rowsAll.add(versionCommentA);
      this.rowsAll.add(versionCommentB);
    }
View Full Code Here


    // Add some useful information as comments

    // Source file name
    SourceFileAttribute sf = cf.getAttributes().getSourceFileAttribute();
    if (sf != null) {
      ClassCommentRow sfComment = new ClassCommentRow("SourceFile = " + sf.getSourceFile());
      this.rows.add(sfComment);
    }
   
    // Class version
      ClassCommentRow versionComment = new ClassCommentRow("Class Version: " + cf.getMajorVersion() + "." + cf.getMinorVersion());
      this.rows.add(versionComment);

    // Class annotations
    RuntimeInvisibleAnnotationsAttribute annInvisible = cf.getAttributes()
        .getRuntimeInvisibleAnnotationsAttribute();
View Full Code Here

        } else if (er instanceof ImportDefRow) {
            ImportDefRow idr = (ImportDefRow)er;
            sd.drawKeyword("import ");
            sd.drawDefault(idr.getImport() + ";");
        } else if (er instanceof ClassCommentRow) {
          ClassCommentRow ccr = (ClassCommentRow) er;
          sd.drawComment("// ");
          sd.drawComment(ccr.getComment());
        } else if (er instanceof ClassDefRow) {
            ClassDefRow cdr = (ClassDefRow)er;
            if (cdr.isClosing()) {
                sd.drawDefault("}");
            } else {
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.editor.row.ClassCommentRow

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.