Commit 8024b846 authored by Jean-Luc PONS's avatar Jean-Luc PONS
Browse files

Keep only maven info

parent 8f083b4c
Loading
Loading
Loading
Loading
Loading
+12 −9
Changes for src/main/java/jive3/MainPanel.java: 12 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -148,27 +148,30 @@ public class MainPanel extends JFrame implements ChangeListener,NavigationListen

  private String getJTangoInfo() {

    String message = "No available info";
    String message = "";

    // Retrieve jtango.properties
    InputStream stream = MainPanel.class.getResourceAsStream("/jtango-versions.properties");
    InputStream stream = MainPanel.class.getResourceAsStream("/META-INF/maven/org.tango-controls/JTangoClientLang/pom.properties");
    if( stream!=null ) {
      try {
        message = new String(stream.readAllBytes());
        message += new String(stream.readAllBytes()) + "\n";
      } catch (IOException e) {
        message = "getJTangoInfo() failed :" + e.getMessage();
        message = "getJTangoInfo() failed :" + e.getMessage() + "\n";
      }
    } else {
      stream = MainPanel.class.getResourceAsStream("/META-INF/maven/org.tango-controls/JTangoClientLang/pom.properties");
    }

    // Retrieve jtango.properties
    stream = MainPanel.class.getResourceAsStream("/META-INF/maven/org.tango-controls/JTangoCommons/pom.properties");
    if( stream!=null ) {
      try {
          message = new String(stream.readAllBytes());
        message += new String(stream.readAllBytes()) + "\n";
      } catch (IOException e) {
          message = "getJTangoInfo() failed :" + e.getMessage();
        }
        message = "getJTangoInfo() failed :" + e.getMessage() + "\n";
      }
    }

    if( message.isEmpty() ) message = "No available info";

    return message;

  }