Examples of ErrorLog


Examples of sos.scheduler.editor.app.ErrorLog

          }

        } catch (Exception ex) {
          try {
            System.out.println("..error in " + sos.util.SOSClassUtil.getMethodName() + ": " +ex.getMessage());
            new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName(), ex);
          } catch(Exception ee) {
            //tu nichts
          }


        }
      }
    });
    butXML.setText("Open XML");

    butDocumentation = new Button(jobChainGroup, SWT.NONE);
    butDocumentation.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
    butDocumentation.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
        String filename = null;
        try {

          if(type == Editor.JOB_CHAINS) {
            filename = detailListener.getConfigurationFilename();
          } else {
            if(dom!=null) {
              filename = dom.getFilename();
            }
          }
          if (filename != null && filename.length() > 0) {
            File file = new File(filename);
            if(file.exists()) {
              //Runtime.getRuntime().exec("cmd /C START iExplore ".concat(filename));

              Program prog = Program.findProgram("html");
              if (prog != null) {
                prog.execute(new File(filename).toURL().toString());               
              } else {
                String[] split = Options.getBrowserExec(new File(filename).toURL().toString(), Options.getLanguage());
                Runtime.getRuntime().exec(split);               

              }                  

            } else
              MainWindow.message("Missing documentation " + file.getCanonicalPath() , SWT.ICON_ERROR);
          } else {
            MainWindow.message("Please save jobchain configuration before opening documentation." , SWT.ICON_ERROR);

          }
        } catch (Exception ex) {
          try {
            System.out.println("..could not open file " + filename + " " + ex.getMessage());           
            new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() + "..could not open file " + filename, ex);
          } catch(Exception ee) {
            //tu nichts
          }


        }
      }
    });
    butDocumentation.setText("Documentation");

    final Label fileLabel = new Label(parameterGroup, SWT.NONE);
    fileLabel.setLayoutData(new GridData());
    fileLabel.setText("Job Documentation: ");

    txtParamsFile = new Text(parameterGroup, SWT.BORDER);
    txtParamsFile.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        txtParamsFile.selectAll();
      }
    });
    txtParamsFile.addModifyListener(new ModifyListener() {
      public void modifyText(final ModifyEvent e) {
        detailListener.setParamsFileName(txtParamsFile.getText());

        if(gui!=null )
          gui.updateNote();

        butApply.setEnabled(isEditable);
      }
    });
    txtParamsFile.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 4, 1));

   


    statusBar = new Label(composite, SWT.BORDER);   
    final GridData gridData_11 = new GridData(GridData.FILL, GridData.END, false, false);
    gridData_11.widthHint = 496;
    gridData_11.heightHint = 18;
    statusBar.setLayoutData(gridData_11);
    statusBar.setText("Configurations File:");
    setToolTipText();

    if(type == Editor.JOB_CHAINS)
      setEnabled_(false);
    setVisibility();
    } catch (Exception e) {
      try {
          new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() + "cause: " + e.toString(), e);
        } catch (Exception ee){
          //tu nichts
        }
    }
  }
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

        dom.setChanged(true);

    } catch (Exception e) {
      try {
        System.out.println("..error in " + sos.util.SOSClassUtil.getMethodName() + ": " +e.getMessage());
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName(), e);
      } catch(Exception ee) {
        //tu nichts
      }
    }   
    Utils.stopCursor(getShell());
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

      butApply.setEnabled(true);     
    } catch (Exception e) {

      try {
        System.out.println("..error in " + sos.util.SOSClassUtil.getMethodName() + ": " +e.getMessage());
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName(), e);
      } catch(Exception ee) {
        //tu nichts
      }

View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

      }

    } catch( Exception ex ) {
      try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , ex);
      } catch(Exception ee) {
        //tu nichts
      }

      ex.printStackTrace();
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

      jobParameterShell.layout();
      jobParameterShell.pack();
      jobParameterShell.open();
    } catch (Exception e) {
      try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
      } catch(Exception ee) {
        //tu nichts
      }

      System.out.println("..error in JobAssistentImportJobParamsForm.showAllImportJobParams " + ": " + e.getMessage());
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

        paramListener.fillParams(listOfRequired, table, false);

      }
    } catch (Exception e) {
      try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
      } catch(Exception ee) {
        //tu nichts
      }

      throw new Exception("error in JobAssistentImportJobParamsForm.fillTable() "  + e.toString());
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

            retVal[i] = stateList.get(i).toString();
        }
        //if(!listOfElement_3.isEmpty())
      } catch (Exception e){
        try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
      } catch(Exception ee) {
        //tu nichts
      }
      }
      return retVal;
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

      }


    } catch( Exception ex ) {
      try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , ex);
      } catch(Exception ee) {
        //tu nichts
      }

      ex.printStackTrace();
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

              } else {
                MainWindow.message(shell, sos.scheduler.editor.app.Messages.getString("no_jobdescription"), SWT.ICON_WARNING | SWT.OK );                
              }
            } catch(Exception ex) {
              try {
                new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() + " ;could not open description " + txtJobname.getText() , ex);
              } catch(Exception ee) {
                //tu nichts
              }

              System.out.println("..could not open description " + txtJobname.getText() + " " + ex);             
            }           
          }
        });
        butdescription.setText("Description");
      }
      butShow = new Button(composite, SWT.NONE);
      butShow.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
      butShow.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          HashMap attr = getJobFromDescription();
          JobAssistentImportJobParamsForm defaultParams = new JobAssistentImportJobParamsForm();         
          ArrayList listOfParams = defaultParams.parseDocuments(txtPath.getText(),"");             
          attr.put("params", listOfParams);
          Element job = null;
          if(flagBackUpJob) {
            if(assistentType == Editor.JOB_WIZZARD) {
              //Starten der Wizzard f�r bestehende Job. Die Einstzellungen im Jobbeschreibungen mergen mit backUpJob wenn assistentype = Editor.Job_Wizzard
              Element currJob = (Element)(joblistener.getJob().clone());
              job  = listener.createJobElement(attr, currJob);
            } else {
              job = listener.createJobElement(attr);
            }
          } else {
            job = (Element)(jobBackUp.clone());            
          }


          Utils.showClipboard(Utils.getElementAsString(job), shell, false, null, false, null, false);

          job.removeChildren("param");
        }
      });
      butShow.setText("Show");
      {
        butImport = new Button(composite, SWT.NONE);       
        butImport.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            try {
              if(!check()) return;           

              HashMap h = getJobFromDescription();

              if(jobname != null)
                jobname.setText(txtJobname.getText());

              JobAssistentImportJobParamsForm defaultParams = new JobAssistentImportJobParamsForm();             
              ArrayList listOfParams = defaultParams.parseDocuments(txtPath.getText(),"required");             
              h.put("params", listOfParams);

              if(assistentType == Editor.JOB_WIZZARD) {

                //Starten der Wizzard f�r bestehende Job. Die Einstzellungen im Jobbeschreibungen mergen mit backUpJob wenn assistentype = Editor.Job_Wizzard             

                Element job = joblistener.getJob();              
                job = job.setContent(listener.createJobElement(h, joblistener.getJob()).cloneContent());
                if(jobForm != null)//diese Zeile l�schen
                  jobForm.initForm();

                if(jobDocForm != null)
                  jobDocForm.initForm();

              } else if(assistentType == Editor.PARAMETER) {
                //Starten der Wizzard f�r bestehende Job. Die Einstzellungen im Jobbeschreibungen mergen mit backUpJob wenn assistentype = Editor.Job_Wizzard             
                //joblistener.getJob().setContent(listener.createJobElement(h, joblistener.getJob()).cloneContent());
                Element job = joblistener.getJob();
                if(job.getName().equals("job")) {
                  job = job.setContent(listener.createJobElement(h, joblistener.getJob()).cloneContent());
                  paramListener.fillParams(tParameter);
                } else
                  paramListener.fillParams(listOfParams, tParameter, false);
              } else {           
                if(listener.existJobname(txtJobname.getText())) {
                  MainWindow.message(shell,  Messages.getString("assistent.error.job_name_exist"), SWT.OK );
                  txtJobname.setFocus();
                  return;
                }
                Element job = null;
                if(flagBackUpJob) {
                  job = listener.createJobElement(h);
                } else {
                  job = joblistener.getJob();
                  job = job.setContent(jobBackUp.cloneContent());
                }
                listener.newImportJob(job, assistentType);

                if(Options.getPropertyBoolean("editor.job.show.wizard"))           
                  Utils.showClipboard(Utils.getElementAsString(job), shell, false, null, false, null, true);

              }
              closeDialog = true;

              //Event ausl�sen
              if(refreshDetailsText != null)
                refreshDetailsText.setText("X");
              shell.dispose();
            } catch (Exception ex) {
              try {
                new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , ex);
              } catch(Exception ee) {
                //tu nichts
              }
              System.err.print(ex.getMessage());
            }
          }
        });
      }
      butImport.setText("Finish");

      butBack = new Button(composite, SWT.NONE);     

      butBack.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          JobAssistentTypeForms typeForms = new JobAssistentTypeForms(dom, update);         
          typeForms.showTypeForms(jobType, jobBackUp, assistentType);
          closeDialog = true;

          shell.dispose();
        }
      });
      butBack.setText("Back");

      butParameters = new Button(composite, SWT.NONE);
      butParameters.setFont(SWTResourceManager.getFont("", 8, SWT.BOLD));
      butParameters.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));

      butParameters.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {

          Utils.startCursor(shell);

          if(!check()) return;

          HashMap attr = getJobFromDescription();

          if(assistentType == Editor.JOB_WIZZARD || assistentType == Editor.JOB) {

            Element job  = listener.createJobElement(attr, joblistener.getJob());
            JobAssistentImportJobParamsForm paramsForm = new JobAssistentImportJobParamsForm(joblistener.get_dom(), joblistener.get_main(), job, assistentType);       
            paramsForm.setBackUpJob(jobBackUp, jobForm);
            paramsForm.setJobForm(jobForm);
            paramsForm.showAllImportJobParams(txtPath.getText());

          } else if(assistentType == Editor.PARAMETER) {
            JobAssistentImportJobParamsForm paramsForm = new JobAssistentImportJobParamsForm(joblistener.get_dom(), joblistener.get_main(), joblistener, tParameter, assistentType);
            paramsForm.showAllImportJobParams(txtPath.getText());
          } else {
            if(assistentType != Editor.JOB_WIZZARD && listener.existJobname(txtJobname.getText())) {
              MainWindow.message(shell,  Messages.getString("assistent.error.job_name_exist"), SWT.OK );
              txtJobname.setFocus();
              return;
            }

            Element job = null;

            if(flagBackUpJob) {
              if(jobBackUp != null && assistentType != Editor.JOB_WIZZARD) {             
                int cont = MainWindow.message(shell, sos.scheduler.editor.app.Messages.getString("assistent.discard_changes"), SWT.ICON_QUESTION | SWT.YES |SWT.NO |SWT.CANCEL );
                if(cont == SWT.CANCEL) {
                  return;
                }else if(cont != SWT.YES) {               
                  job = joblistener.getJob().setContent(jobBackUp.cloneContent());             
               
              }           
            } else {
              //der backUpJob wurde nicht ver�ndert
              job = joblistener.getJob().setContent(jobBackUp.cloneContent());
            }
            if(job==null){
              job = listener.createJobElement(attr);
            }
            JobAssistentImportJobParamsForm paramsForm = null;
            if(assistentType == Editor.JOB_WIZZARD) {
              paramsForm = new JobAssistentImportJobParamsForm(dom, update, joblistener, assistentType);
            } else {
              paramsForm = new JobAssistentImportJobParamsForm(dom, update, job, assistentType);
            }
            paramsForm.showAllImportJobParams(txtPath.getText());
            if(jobname != null)                          
              paramsForm.setJobname(jobname);
            paramsForm.setBackUpJob(jobBackUp, jobForm);
          }
          closeDialog = true;

          Utils.stopCursor(shell);

          shell.dispose();
        }
      });

      butParameters.setText("Next");

      Utils.createHelpButton(composite, "assistent.import_jobs", shell);

      if(assistentType == Editor.JOB) {         
        this.butImport.setVisible(true);
        butParameters.setText("Import Parameters");
      }

      if(assistentType == Editor.JOB_WIZZARD) {
        txtJobname.setEnabled(false);
        txtTitle.setEnabled(true);
        butShow.setEnabled(true);
        butBack.setEnabled(true);
      } else if(assistentType == Editor.JOB) {
        txtJobname.setEnabled(false);
        txtTitle.setEnabled(false);
        butShow.setEnabled(false);
        butBack.setEnabled(false);
      } else if(assistentType == Editor.JOB_CHAINS) {
        txtJobname.setEnabled(true);
        txtTitle.setEnabled(true);
        butShow.setEnabled(true);
        butBack.setEnabled(false);
      } else {
        txtJobname.setEnabled(true);
        txtTitle.setEnabled(true);
        butShow.setEnabled(true);
        butBack.setEnabled(true);
      }

      if(joblistener != null) {
        if(joblistener.getJob().getName().equals("start_job") ||
            joblistener.getJob().getName().equals("process") ||
            joblistener.getJob().getName().equals("order") ||
            joblistener.getJob().getName().equals("config")) {       
          txtJobname.setEnabled(false);
        }

      }

      java.awt.Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize();

      shell.setBounds((screen.width - shell.getBounds().width) /2,
          (screen.height - shell.getBounds().height) /2,
          shell.getBounds().width,
          shell.getBounds().height);
      final Group jobnamenGroup = new Group(shell, SWT.NONE);
      final GridLayout gridLayout_1 = new GridLayout();
      gridLayout_1.marginTop = 5;
      gridLayout_1.marginRight = 5;
      gridLayout_1.marginLeft = 5;
      jobnamenGroup.setLayout(gridLayout_1);
      jobnamenGroup.setText("Jobs");
      final GridData gridData_3 = new GridData(GridData.FILL, GridData.FILL, true, true);
      gridData_3.heightHint = 154;
      jobnamenGroup.setLayoutData(gridData_3);
      jobnamenGroup.getBounds().height=100;
      tree = new Tree(jobnamenGroup, SWT.FULL_SELECTION | SWT.BORDER);
      tree.setHeaderVisible(true);
      tree.getBounds().height = 100;
      tree.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {             
          txtTitle.setText(tree.getSelection()[0].getText(1));
          txtPath.setText(tree.getSelection()[0].getText(2));
          txtJobname.setFocus();
          flagBackUpJob = true;
        }
      });
      final GridData gridData_2 = new GridData(GridData.FILL, GridData.FILL, true, true);
      tree.setLayoutData(gridData_2);

      TreeColumn column1 = new TreeColumn(tree, SWT.LEFT);
      column1.setText("Name");         
      column1.setWidth(165);       
      TreeColumn column2 = new TreeColumn(tree, SWT.LEFT);
      column2.setText("Title");         
      column2.setWidth(200);
      TreeColumn column3 = new TreeColumn(tree, SWT.LEFT);
      column3.setText("Filename");         
      column3.setWidth(209);

      try {
        createTreeIteam();
      } catch (Exception e) {
        try {
          new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
        } catch(Exception ee) {
          //tu nichts
        }
        System.err.print(e.getMessage());
      }           

      if(joblistener != null) {
        selectTree();
      }
      setToolTipText();
      shell.layout();
      shell.pack();           

      shell.open();

    } catch(Exception e) {
      try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
      } catch(Exception ee) {
        //tu nichts
      }
      System.err.println("error in JobAssistentImportJobsForm.showAllImportJob(): " + e.getMessage());
    }
View Full Code Here

Examples of sos.scheduler.editor.app.ErrorLog

          }
        }
      }
    } catch(Exception e) {
      try {
        new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , e);
      } catch(Exception ee) {
        //tu nichts
      }
      System.out.println("error in JobAssistentImportJobsForm.createTreeIteam(): " + e.getMessage());
    }
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.