X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Futil%2FForesterUtil.java;h=1c914c800799ee453b4130476fd4c7ce042a4e62;hb=8e37534c03f75befdad0d75fbf8e05be11cde71a;hp=58dbf453bb55a9af5823952e689569056a8df3ea;hpb=3be5f9e46469980f068a9f8170e1d20849b5eaf8;p=jalview.git diff --git a/forester/java/src/org/forester/util/ForesterUtil.java b/forester/java/src/org/forester/util/ForesterUtil.java index 58dbf45..1c914c8 100644 --- a/forester/java/src/org/forester/util/ForesterUtil.java +++ b/forester/java/src/org/forester/util/ForesterUtil.java @@ -95,6 +95,10 @@ public final class ForesterUtil { sb.append( separator ); } } + + final public static String getForesterLibraryInformation() { + return "forester " + ForesterConstants.FORESTER_VERSION + " (" + ForesterConstants.FORESTER_DATE + ")"; + } public static boolean seqIsLikelyToBeAa( final String s ) { final String seq = s.toLowerCase(); @@ -731,20 +735,29 @@ public final class ForesterUtil { } final public static void printProgramInformation( final String prg_name, + final String desc, final String prg_version, final String date, final String email, - final String www ) { - final int l = prg_name.length() + prg_version.length() + date.length() + 4; + final String www, + final String based_on ) { + String my_prg_name = new String( prg_name ); + if ( !ForesterUtil.isEmpty( desc ) ) { + my_prg_name += ( " - " + desc ); + } + final int l = my_prg_name.length() + prg_version.length() + date.length() + 4; System.out.println(); - System.out.println( prg_name + " " + prg_version + " (" + date + ")" ); + System.out.println( my_prg_name + " " + prg_version + " (" + date + ")" ); for( int i = 0; i < l; ++i ) { System.out.print( "_" ); } System.out.println(); System.out.println(); - System.out.println( "WWW : " + www ); - System.out.println( "Contact: " + email ); + System.out.println( "WWW : " + www ); + System.out.println( "Contact : " + email ); + if ( !ForesterUtil.isEmpty( based_on ) ) { + System.out.println( "Based on: " + based_on ); + } if ( !ForesterUtil.isEmpty( ForesterUtil.JAVA_VERSION ) && !ForesterUtil.isEmpty( ForesterUtil.JAVA_VENDOR ) ) { System.out.println(); System.out.println( "[running on Java " + ForesterUtil.JAVA_VERSION + " " + ForesterUtil.JAVA_VENDOR + "]" ); @@ -752,6 +765,14 @@ public final class ForesterUtil { System.out.println(); } + final public static void printProgramInformation( final String prg_name, + final String prg_version, + final String date, + final String email, + final String www ) { + printProgramInformation( prg_name, null, prg_version, date, email, www, null ); + } + final public static void printWarningMessage( final String prg_name, final String message ) { System.out.println( "[" + prg_name + "] > warning: " + message ); }