Eclipseplugins
BackgroundProgram.java
1 package com.proalpha.pds.ui.wizards.controller;
2 
3 import java.util.ArrayList;
4 import java.util.LinkedHashMap;
5 
6 import org.eclipse.jface.dialogs.MessageDialog;
7 import org.eclipse.ui.INewWizard;
8 
9 import com.proalpha.pds.ui.wizards.wizardpages.WizardMainPageConfiguration;
10 
23 public class BackgroundProgram extends PaWizard implements INewWizard {
24 
28  public BackgroundProgram() {
29  super();
30 
31  try {
32 
33  ArrayList<String> extensionList = new ArrayList<>();
34  extensionList.add("p");
35 
37  configuration.setWizardTitle("proALPHA Job Program File");
38  configuration.setWizardDescription("This wizard creates a new proALPHA Job Program File.");
39  configuration.setTemplateName("pAJobProgramFile");
40  configuration.setExtensionList(extensionList);
41  configuration.setRootClass("Batch Program");
42  configuration.setThirdDigit("v");
43  configuration.setCheckRepository(true);
44  configuration.setSupportRepositoryCreateButton(true);
45  configuration.setCheckFileNameLength(true);
46  configuration.setCheckLowerCase(true);
47 
49  configuration1.setWizardTitle("proALPHA Structured Program File");
50  configuration1.setWizardDescription("This wizard creates a new proALPHA Structured Program File.");
51  configuration1.setTemplateName("pAStructuredProgramFile");
52  configuration1.setExtensionList(extensionList);
53  configuration1.setRootClass("Background Objects");
54  configuration1.setThirdDigit("");
55  configuration1.setCheckRepository(true);
56  configuration1.setSupportRepositoryCreateButton(true);
57  configuration1.setCheckFileNameLength(true);
58  configuration1.setCheckLowerCase(true);
59 
61  configuration2.setWizardTitle("proALPHA Workflow Job Program File");
62  configuration2.setWizardDescription("This wizard creates a new proALPHA Workflow Job Program File.");
63  configuration2.setTemplateName("pAWorkflowJobProgramFile");
64  configuration2.setExtensionList(extensionList);
65  configuration2.setRootClass("Workflow Batch Program");
66  configuration2.setThirdDigit("v");
67  configuration2.setCheckRepository(true);
68  configuration2.setSupportRepositoryCreateButton(true);
69  configuration2.setCheckFileNameLength(true);
70  configuration2.setCheckLowerCase(true);
71 
73  configuration3.setWizardTitle("proALPHA Workflow Decision Program File");
74  configuration3.setWizardDescription("This wizard creates a new proALPHA Workflow Decision Program File.");
75  configuration3.setTemplateName("pAWorkflowDecisionProgramFile");
76  configuration3.setExtensionList(extensionList);
77  configuration3.setRootClass("Workflow Decision Program");
78  configuration3.setThirdDigit("");
79  configuration3.setCheckRepository(true);
80  configuration3.setSupportRepositoryCreateButton(true);
81  configuration3.setCheckFileNameLength(true);
82  configuration3.setCheckLowerCase(true);
83 
85  configuration4.setWizardTitle("proALPHA Workflow Event Check Program File");
86  configuration4.setWizardDescription("This wizard creates a new proALPHA Workflow Event Check Program File.");
87  configuration4.setTemplateName("pAWorkflowEventCheckProgramFile");
88  configuration4.setExtensionList(extensionList);
89  configuration4.setRootClass("Workflow Event Check Program");
90  configuration4.setThirdDigit("");
91  configuration4.setCheckRepository(true);
92  configuration4.setSupportRepositoryCreateButton(true);
93  configuration4.setCheckFileNameLength(true);
94  configuration4.setCheckLowerCase(true);
95 
96  LinkedHashMap<String, WizardMainPageConfiguration> configList = new LinkedHashMap<>();
97  configList.put("Job Program", configuration);
98  configList.put("Structured Program", configuration1);
99  configList.put("Wfl Batch Program", configuration2);
100  configList.put("Wfl Decision Program", configuration3);
101  configList.put("Wfl Event Check Program", configuration4);
102 
103  setConfigList(configList);
104 
105  } catch (Exception e) {
106  MessageDialog.openError(getShell(), "Unable to initialize Template", e.getMessage());
107  }
108  }
109 
110 }