Eclipseplugins
StructuredInclude.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 
25 public class StructuredInclude extends PaWizard implements INewWizard {
26 
30  public StructuredInclude() {
31  super();
32 
33  try {
34 
35  ArrayList<String> extensionList = new ArrayList<>();
36  extensionList.add("cdf");
37  extensionList.add("df");
38  extensionList.add("i");
39  extensionList.add("if");
40 
42  configuration.setWizardTitle("proALPHA Structured Include File");
43  configuration.setWizardDescription("This wizard creates a new proALPHA Structured Include File.");
44  configuration.setTemplateName("pAStructuredIncludeFile");
45  configuration.setExtensionList(extensionList);
46  configuration.setRootClass("");
47  configuration.setThirdDigit("");
48  configuration.setCheckRepository(false);
49  configuration.setSupportRepositoryCreateButton(false);
50  configuration.setCheckFileNameLength(true);
51  configuration.setCheckLowerCase(true);
52 
53  ArrayList<String> extensionListLib = new ArrayList<>();
54  extensionListLib.add("lib");
55 
57  configuration1.setWizardTitle("proALPHA Method Library File");
58  configuration1.setWizardDescription("This wizard creates a new proALPHA Method Library File.");
59  configuration1.setTemplateName("pAMethodLibrary");
60  configuration1.setExtensionList(extensionListLib);
61  configuration1.setRootClass("");
62  configuration1.setThirdDigit("");
63  configuration1.setCheckRepository(false);
64  configuration1.setSupportRepositoryCreateButton(false);
65  configuration1.setCheckFileNameLength(true);
66  configuration1.setCheckLowerCase(true);
67 
68  ArrayList<String> extensionListPif = new ArrayList<>();
69  extensionListPif.add("i");
70  extensionListPif.add("if");
71 
73  configuration2.setWizardTitle("Printlayout Converting Include File");
74  configuration2.setWizardDescription("This wizard creates a new Printlayout Converting Include File.");
75  configuration2.setTemplateName("pAPrintLayoutConvertingInclude");
76  configuration2.setExtensionList(extensionListPif);
77  configuration2.setRootClass("");
78  configuration2.setThirdDigit("");
79  configuration2.setCheckRepository(false);
80  configuration2.setSupportRepositoryCreateButton(false);
81  configuration2.setCheckFileNameLength(true);
82  configuration2.setCheckLowerCase(true);
83 
84  LinkedHashMap<String, WizardMainPageConfiguration> configList = new LinkedHashMap<>();
85  configList.put("Structured Include", configuration);
86  configList.put("Method Library", configuration1);
87  configList.put("Printlayout Include", configuration2);
88 
89  setConfigList(configList);
90 
91  } catch (Exception e) {
92  MessageDialog.openError(getShell(), "Unable to initialize Template", e.getMessage());
93 
94  }
95  }
96 
97 }