|
@@ -436,35 +436,6 @@ public class Tools
|
|
|
.addContainerGap(71, Short.MAX_VALUE)));
|
|
|
// </editor-fold>
|
|
|
|
|
|
- //Auskommentierter Fail!
|
|
|
- // <editor-fold defaultstate="collapsed" desc="FailTry">
|
|
|
-/*javax.swing.JButton btnYes = new javax.swing.JButton();
|
|
|
- btnYes.addActionListener
|
|
|
- (
|
|
|
- new java.awt.event.ActionListener()
|
|
|
- {
|
|
|
- public void actionPerformed(java.awt.event.ActionEvent evt)
|
|
|
- {
|
|
|
- btnCTNActionPerformed(evt);
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- javax.swing.JButton btnNo = new javax.swing.JButton();
|
|
|
- btnNo.addActionListener
|
|
|
- (
|
|
|
- new java.awt.event.ActionListener()
|
|
|
- {
|
|
|
- public void actionPerformed(java.awt.event.ActionEvent evt)
|
|
|
- {
|
|
|
- btnSTPActionPerformed(evt);
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- btnYes.setText("Fortsetzen");
|
|
|
- btnNo.setText("Abbrechen");*/
|
|
|
- //d.add(new JButton());// </editor-fold>
|
|
|
-
|
|
|
-
|
|
|
//p.add(btnYes);
|
|
|
//p.add(btnNo);
|
|
|
d.add(p);
|
|
@@ -640,97 +611,6 @@ public class Tools
|
|
|
}
|
|
|
return cret;
|
|
|
}
|
|
|
- //public void runProcessBuilderCmd(String workdir,String executable)
|
|
|
- //{
|
|
|
- // ProcessBuilder p = new ProcessBuilder(executable);
|
|
|
- // p.directory(new File(workdir));
|
|
|
- // p.start();
|
|
|
- //}
|
|
|
-
|
|
|
- // <editor-fold defaultstate="collapsed" desc="Altlast">
|
|
|
- /*
|
|
|
- public static int cmdrunner(final ProcessBuilder p, final String[] runnable)
|
|
|
- {
|
|
|
- return cmdrunner(p,runnable,true);
|
|
|
- }*/
|
|
|
- /*
|
|
|
- public static int cmdrunner(final ProcessBuilder p, final String[] runnable, final boolean bjCmd)
|
|
|
- {
|
|
|
- //try {
|
|
|
- Thread t = new Thread(new Runnable() {
|
|
|
-
|
|
|
- //@SuppressWarnings("SleepWhileInLoop")//Hx
|
|
|
- @SuppressWarnings("CallToThreadDumpStack")
|
|
|
- public void run() {
|
|
|
-
|
|
|
- //try {
|
|
|
- d = null;
|
|
|
- d = new JDialog();
|
|
|
-
|
|
|
- try {
|
|
|
- //e.
|
|
|
- //exp=null;
|
|
|
- //exp = new ExpectJ(5);
|
|
|
- String run = arraytools.ArrayKleben(runnable," ");
|
|
|
- //Spawn s = exp.spawn(run);
|
|
|
- try {
|
|
|
- e = p.start();
|
|
|
- //s.expectErr(".");
|
|
|
- } catch (Exception ex) {
|
|
|
- ex.printStackTrace();
|
|
|
- }
|
|
|
- output = new StreamGobbler(e.getInputStream(), ">>");
|
|
|
- error = new StreamGobbler(e.getErrorStream(), "!>");
|
|
|
- output.start();
|
|
|
- error.start();
|
|
|
-
|
|
|
- if(bjCmd)
|
|
|
- {
|
|
|
- jCmd();
|
|
|
- }
|
|
|
- /* else
|
|
|
- {
|
|
|
- while(error.)
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- }*
|
|
|
- * /
|
|
|
- //int r = 1;
|
|
|
- } catch (Exception ex) {
|
|
|
- ex.printStackTrace();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //e.
|
|
|
- /*}
|
|
|
- catch (IOException ex)
|
|
|
- {
|
|
|
- ex.printStackTrace();
|
|
|
- r=100;
|
|
|
- }*
|
|
|
- * /
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- t.start();
|
|
|
- /*NOP* /
|
|
|
- r = 1;
|
|
|
- return r;
|
|
|
- /*} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
- }
|
|
|
- return 0;* /
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- */
|
|
|
- //</editor-fold>
|
|
|
private static void btnYesActionPerformed(java.awt.event.ActionEvent evt)
|
|
|
{
|
|
|
ContState = true;
|
|
@@ -739,36 +619,7 @@ public class Tools
|
|
|
d = new JDialog();
|
|
|
}
|
|
|
|
|
|
- // <editor-fold defaultstate="collapsed" desc="Altlast">
|
|
|
- /*
|
|
|
- private static void cmdQuitActionPerformed(java.awt.event.ActionEvent evt)
|
|
|
- {
|
|
|
-
|
|
|
- hideDialog();
|
|
|
- d=null;
|
|
|
- d = new JDialog();
|
|
|
- e.destroy();
|
|
|
- //error.
|
|
|
- }*/
|
|
|
- //@SuppressWarnings("CallToThreadDumpStack")
|
|
|
- /* private static void eingabeActionPerformed(java.awt.event.ActionEvent evt)
|
|
|
- {
|
|
|
- String cmd = cmdline.getText()+"\n";
|
|
|
- //NOP;
|
|
|
- OutputStreamWriter osw = new OutputStreamWriter(e.getOutputStream());
|
|
|
- BufferedWriter bw = new BufferedWriter(osw);
|
|
|
- try {
|
|
|
- bw.write(cmd,0,cmd.length());
|
|
|
- log("I>"+cmd);
|
|
|
- //output.start();
|
|
|
- //error.start();
|
|
|
- } catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
- }
|
|
|
- d.validate();
|
|
|
- }*/
|
|
|
- //</editor-fold>
|
|
|
- private static void btnNoActionPerformed(java.awt.event.ActionEvent evt)
|
|
|
+ private static void btnNoActionPerformed(java.awt.event.ActionEvent evt)
|
|
|
{
|
|
|
ContState = false;
|
|
|
hideDialog();
|
|
@@ -811,7 +662,7 @@ public class Tools
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
- {
|
|
|
+ { //Evil loop :P (linenumber)
|
|
|
for (int i = 0; i > toTrunc.length - number; i++)
|
|
|
{
|
|
|
int j = i + number;
|
|
@@ -1490,33 +1341,6 @@ public class Tools
|
|
|
|
|
|
return line.replaceAll("#"+varname+"#", toReplace.replace("\\", "\\\\")).replace("\\\\", "\\");
|
|
|
|
|
|
- /*
|
|
|
- String linemod = line;
|
|
|
- int varstart = linemod.indexOf("#");
|
|
|
- int varend = linemod.indexOf("#", varstart + 1);
|
|
|
- String preVar = "";
|
|
|
- if (varstart == -1||varend == -1)
|
|
|
- {
|
|
|
- return line;
|
|
|
- }
|
|
|
- if (varstart > 0)
|
|
|
- {
|
|
|
- preVar = linemod.substring(0, varstart);
|
|
|
- }
|
|
|
- String postVar = linemod.substring(varend + 1);
|
|
|
- String var = linemod.substring(varstart + 1, varend);
|
|
|
- if(var.equalsIgnoreCase(varname))
|
|
|
- {
|
|
|
- var = toReplace;
|
|
|
- postVar=replaceHashmarkedVars(postVar, varname, toReplace);//falls sich noch wo anders eine versteckt
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var="#"+var+"#";
|
|
|
- postVar=replaceHashmarkedVars(postVar, varname, toReplace);//falls sich noch wo anders eine versteckt
|
|
|
- }
|
|
|
- line = preVar + var + postVar;
|
|
|
- return line;*/
|
|
|
}
|
|
|
|
|
|
public static void DebugHelperPrint(String msg,boolean dbgonly,String debugEnablePreference)
|