}
} 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
}
}
}