- Timestamp:
- 10/20/09 14:43:54 (15 years ago)
- Location:
- trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/settings
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/settings/SettingsComposite.java
r23 r32 22 22 private Text researchGroupText; 23 23 private Text researchGroupUrlText; 24 private Combo mysqlSSLCombo; 24 25 25 26 public SettingsComposite(Composite parent, int style) { … … 28 29 { 29 30 Label lblSvnLocation = new Label(this, SWT.NONE); 30 lblSvnLocation.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 31 lblSvnLocation.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 32 false, false, 1, 1)); 31 33 lblSvnLocation.setText("SVN Location"); 32 34 } 33 35 { 34 36 svnLocationText = new Text(this, SWT.BORDER); 35 svnLocationText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 37 svnLocationText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 38 true, false, 1, 1)); 36 39 } 37 40 new Label(this, SWT.NONE); 38 41 { 39 42 Label lblSvnWorkingCopy = new Label(this, SWT.NONE); 40 lblSvnWorkingCopy.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 43 lblSvnWorkingCopy.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 44 false, false, 1, 1)); 41 45 lblSvnWorkingCopy.setText("SVN Working Copy"); 42 46 } 43 47 { 44 48 svnWorkingCopyText = new Text(this, SWT.BORDER); 45 svnWorkingCopyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 49 svnWorkingCopyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 50 true, false, 1, 1)); 46 51 } 47 52 { … … 51 56 { 52 57 Label lblSvnUsername = new Label(this, SWT.NONE); 53 lblSvnUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 58 lblSvnUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 59 false, false, 1, 1)); 54 60 lblSvnUsername.setText("SVN Username"); 55 61 } 56 62 { 57 63 svnUsernameText = new Text(this, SWT.BORDER); 58 svnUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 64 svnUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 65 true, false, 1, 1)); 59 66 } 60 67 new Label(this, SWT.NONE); 61 68 { 62 69 Label lblSvnPassword = new Label(this, SWT.NONE); 63 lblSvnPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 70 lblSvnPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 71 false, false, 1, 1)); 64 72 lblSvnPassword.setText("SVN Password"); 65 73 } 66 74 { 67 75 svnPasswordText = new Text(this, SWT.BORDER | SWT.PASSWORD); 68 svnPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 76 svnPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 77 true, false, 1, 1)); 69 78 } 70 79 new Label(this, SWT.NONE); 71 80 { 72 81 Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); 73 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); 82 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, 83 false, 3, 1)); 74 84 } 75 85 { 76 86 Label lblMysqlHost = new Label(this, SWT.NONE); 77 lblMysqlHost.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 87 lblMysqlHost.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 88 false, false, 1, 1)); 78 89 lblMysqlHost.setText("MySQL Host"); 79 90 } 80 91 { 81 92 mysqlHostText = new Text(this, SWT.BORDER); 82 mysqlHostText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 93 mysqlHostText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 94 true, false, 1, 1)); 83 95 } 84 96 new Label(this, SWT.NONE); 85 97 { 86 98 Label lblMysqlDatabase = new Label(this, SWT.NONE); 87 lblMysqlDatabase.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 99 lblMysqlDatabase.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 100 false, false, 1, 1)); 88 101 lblMysqlDatabase.setText("MySQL Database"); 89 102 } 90 103 { 91 104 mysqlDatabaseText = new Text(this, SWT.BORDER); 92 mysqlDatabaseText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 105 mysqlDatabaseText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 106 true, false, 1, 1)); 93 107 } 94 108 new Label(this, SWT.NONE); 95 109 { 96 110 Label lblMysqlUsername = new Label(this, SWT.NONE); 97 lblMysqlUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 111 lblMysqlUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 112 false, false, 1, 1)); 98 113 lblMysqlUsername.setText("MySQL Username"); 99 114 } 100 115 { 101 116 mysqlUsernameText = new Text(this, SWT.BORDER); 102 mysqlUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 117 mysqlUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 118 true, false, 1, 1)); 103 119 } 104 120 new Label(this, SWT.NONE); 105 121 { 106 122 Label lblMysqlPassword = new Label(this, SWT.NONE); 107 lblMysqlPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 123 lblMysqlPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 124 false, false, 1, 1)); 108 125 lblMysqlPassword.setText("MySQL Password"); 109 126 } 110 127 { 111 mysqlPasswordText = new Text(this, SWT.BORDER); 112 mysqlPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 128 mysqlPasswordText = new Text(this, SWT.BORDER | SWT.PASSWORD); 129 mysqlPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 130 true, false, 1, 1)); 113 131 } 114 132 new Label(this, SWT.NONE); 115 133 { 116 134 Label lblMysqlSsl = new Label(this, SWT.NONE); 117 lblMysqlSsl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 135 lblMysqlSsl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 136 false, false, 1, 1)); 118 137 lblMysqlSsl.setText("MySQL SSL"); 119 138 } 120 139 { 121 Combo mysqlSSLCombo = new Combo(this, SWT.NONE); 122 mysqlSSLCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 140 mysqlSSLCombo = new Combo(this, SWT.READ_ONLY); 141 mysqlSSLCombo.add("Disabled"); 142 mysqlSSLCombo.add("Enabled"); 143 mysqlSSLCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 144 true, false, 1, 1)); 123 145 } 124 146 new Label(this, SWT.NONE); 125 147 { 126 148 Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); 127 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); 149 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, 150 false, 3, 1)); 128 151 } 129 152 { 130 153 Label lblPdfLatexPath = new Label(this, SWT.NONE); 131 lblPdfLatexPath.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 154 lblPdfLatexPath.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 155 false, false, 1, 1)); 132 156 lblPdfLatexPath.setText("pdfLatex Path"); 133 157 } 134 158 { 135 159 pdfLatexText = new Text(this, SWT.BORDER); 136 pdfLatexText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 160 pdfLatexText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, 161 false, 1, 1)); 137 162 } 138 163 { … … 142 167 { 143 168 Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); 144 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); 169 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, 170 false, 3, 1)); 145 171 } 146 172 { 147 173 Label lblResearchGroup = new Label(this, SWT.NONE); 148 lblResearchGroup.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 174 lblResearchGroup.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 175 false, false, 1, 1)); 149 176 lblResearchGroup.setText("Research Group"); 150 177 } 151 178 { 152 179 researchGroupText = new Text(this, SWT.BORDER); 153 researchGroupText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 180 researchGroupText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 181 true, false, 1, 1)); 154 182 } 155 183 new Label(this, SWT.NONE); 156 184 { 157 185 Label lblResearchGroupUrl = new Label(this, SWT.NONE); 158 lblResearchGroupUrl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 186 lblResearchGroupUrl.setLayoutData(new GridData(SWT.RIGHT, 187 SWT.CENTER, false, false, 1, 1)); 159 188 lblResearchGroupUrl.setText("Research Group URL"); 160 189 } 161 190 { 162 191 researchGroupUrlText = new Text(this, SWT.BORDER); 163 researchGroupUrlText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 192 researchGroupUrlText.setLayoutData(new GridData(SWT.FILL, 193 SWT.CENTER, true, false, 1, 1)); 164 194 } 165 195 new Label(this, SWT.NONE); … … 259 289 } 260 290 291 public Combo getMysqlSSLCombo() { 292 return mysqlSSLCombo; 293 } 294 295 public void setMysqlSSLCombo(Combo mysqlSSLCombo) { 296 this.mysqlSSLCombo = mysqlSSLCombo; 297 } 298 261 299 } -
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/settings/SettingsDialog.java
r31 r32 148 148 GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL)); 149 149 150 GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END); 151 gd.horizontalSpan = 1; 152 153 updateWidgets(); 154 155 return parent; 156 157 } 158 159 private void updateWidgets() { 150 160 Settings settings = Settings.getInstance(); 151 161 if (settings.isMysqlSSL()) … … 165 175 textResearchGroup.setText(settings.getResearchGroup()); 166 176 textResearchGroupUrl.setText(settings.getResearchGroupUrl()); 167 168 GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);169 gd.horizontalSpan = 1;170 171 return parent;172 173 177 } 174 178 -
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/settings/SettingsDialog2.java
r31 r32 1 1 package de.ugoe.cs.swe.exercises.settings; 2 3 import java.sql.DriverManager; 4 import java.sql.SQLException; 2 5 3 6 import org.eclipse.jface.dialogs.IDialogConstants; 4 7 import org.eclipse.jface.dialogs.TitleAreaDialog; 5 8 import org.eclipse.swt.SWT; 9 import org.eclipse.swt.events.SelectionEvent; 10 import org.eclipse.swt.events.SelectionListener; 6 11 import org.eclipse.swt.graphics.Point; 7 12 import org.eclipse.swt.layout.GridData; … … 11 16 import org.eclipse.swt.widgets.TabFolder; 12 17 import org.eclipse.swt.widgets.TabItem; 18 import org.tmatesoft.svn.core.SVNException; 19 import org.tmatesoft.svn.core.SVNURL; 20 import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; 21 import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; 22 import org.tmatesoft.svn.core.io.SVNRepository; 23 import org.tmatesoft.svn.core.io.SVNRepositoryFactory; 24 import org.tmatesoft.svn.core.wc.SVNWCUtil; 25 26 import de.ugoe.cs.swe.exercises.misc.Model; 13 27 14 28 public class SettingsDialog2 extends TitleAreaDialog { 29 private SettingsComposite settingsComposite; 30 private SettingsProfileComposite settingsProfileComposite; 31 private TabItem tbtmSettings; 32 private TabItem tbtmProfiledSettings; 33 private String activeTabItem; 34 private TabFolder tabFolder; 15 35 16 36 public SettingsDialog2(Shell parentShell) { … … 24 44 Composite area = (Composite) super.createDialogArea(parent); 25 45 { 26 TabFolder tabFolder = new TabFolder(area, SWT.NONE); 27 tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); 46 tabFolder = new TabFolder(area, SWT.NONE); 47 tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, 48 true, 1, 1)); 28 49 { 29 TabItemtbtmSettings = new TabItem(tabFolder, SWT.NONE);50 tbtmSettings = new TabItem(tabFolder, SWT.NONE); 30 51 tbtmSettings.setText("Settings"); 31 52 { 32 Composite composite = new SettingsComposite(tabFolder, SWT.NONE); 33 tbtmSettings.setControl(composite); 53 settingsComposite = new SettingsComposite(tabFolder, 54 SWT.NONE); 55 tbtmSettings.setControl(settingsComposite); 34 56 } 35 57 } 36 58 { 37 TabItemtbtmProfiledSettings = new TabItem(tabFolder, SWT.NONE);59 tbtmProfiledSettings = new TabItem(tabFolder, SWT.NONE); 38 60 tbtmProfiledSettings.setText("Profiled Settings"); 39 61 { 40 Composite composite = new SettingsProfileComposite(tabFolder, SWT.NONE); 41 tbtmProfiledSettings.setControl(composite); 62 settingsProfileComposite = new SettingsProfileComposite( 63 tabFolder, SWT.NONE); 64 tbtmProfiledSettings.setControl(settingsProfileComposite); 42 65 } 43 66 } 44 67 } 68 tabFolder.addSelectionListener(new SelectionListener() { 69 @Override 70 public void widgetSelected(SelectionEvent e) { 71 activeTabItem = ((TabItem) e.item).getText(); 72 } 73 74 @Override 75 public void widgetDefaultSelected(SelectionEvent e) { 76 } 77 }); 78 tabFolder.setSelection(tbtmSettings); 79 activeTabItem = tbtmSettings.getText(); 80 81 updateWidgets(); 45 82 46 83 return area; 84 } 85 86 private void updateWidgets() { 87 Settings settings = Settings.getInstance(); 88 if (settings.isMysqlSSL()) { 89 settingsComposite.getMysqlSSLCombo().select(1); 90 settingsProfileComposite.getMysqlSSLCombo().select(1); 91 } else { 92 settingsComposite.getMysqlSSLCombo().select(0); 93 settingsProfileComposite.getMysqlSSLCombo().select(0); 94 } 95 96 settingsComposite.getSvnLocationText().setText( 97 settings.getSvnLocation()); 98 settingsComposite.getMysqlHostText().setText(settings.getMysqlHost()); 99 settingsComposite.getMysqlDatabaseText().setText(settings.getMysqlDb()); 100 settingsComposite.getResearchGroupText().setText( 101 settings.getResearchGroup()); 102 settingsComposite.getResearchGroupUrlText().setText( 103 settings.getResearchGroupUrl()); 104 105 settingsComposite.getSvnWorkingCopyText().setText( 106 settings.getWorkingDirectory()); 107 settingsProfileComposite.getSvnWorkingCopyText().setText( 108 settings.getWorkingDirectory()); 109 110 settingsComposite.getSvnUsernameText().setText( 111 settings.getSvnUsername()); 112 settingsProfileComposite.getSvnUsernameText().setText( 113 settings.getSvnUsername()); 114 115 settingsComposite.getSvnPasswordText().setText( 116 settings.getSvnPassword()); 117 settingsProfileComposite.getSvnPasswordText().setText( 118 settings.getSvnPassword()); 119 120 settingsComposite.getMysqlUsernameText().setText( 121 settings.getMysqlUsername()); 122 settingsProfileComposite.getMysqlUsernameText().setText( 123 settings.getMysqlUsername()); 124 125 settingsComposite.getMysqlPasswordText().setText( 126 settings.getMysqlPassword()); 127 settingsProfileComposite.getMysqlPasswordText().setText( 128 settings.getMysqlPassword()); 129 130 settingsComposite.getPdfLatexText().setText(settings.getPdfLatexPath()); 131 settingsProfileComposite.getPdfLatexText().setText( 132 settings.getPdfLatexPath()); 133 } 134 135 protected void okPressed() { 136 updateSettings(); 137 Settings settings = Settings.getInstance(); 138 139 // validate settings 140 try { 141 DAVRepositoryFactory.setup(); 142 SVNURL url = SVNURL.parseURIDecoded(settings.getSvnLocation()); 143 SVNRepository repository = SVNRepositoryFactory.create(url); 144 ISVNAuthenticationManager authManager = SVNWCUtil 145 .createDefaultAuthenticationManager(settings 146 .getSvnUsername(), settings.getSvnPassword()); 147 ((SVNRepository) repository).setAuthenticationManager(authManager); 148 repository.testConnection(); 149 150 } catch (SVNException ex) { 151 setErrorMessage(ex.getMessage()); 152 return; 153 } 154 155 System.setProperty("javax.net.ssl.trustStorePassword", settings 156 .getMysqlPassword()); 157 String path = Model.class.getProtectionDomain().getCodeSource() 158 .getLocation().getPath(); 159 if (path.endsWith("bin/")) 160 path = path.replaceFirst("bin/$", ""); 161 path += "keystore"; 162 System.setProperty("javax.net.ssl.trustStore", path); 163 164 try { 165 // Step 1: Load the JDBC driver. 166 Class.forName("com.mysql.jdbc.Driver").newInstance(); 167 // Step 2: Establish the connection to the database. 168 String url = "jdbc:mysql://" + settings.getMysqlHost() + "/" 169 + settings.getMysqlDb() + "?useSSL=" 170 + String.valueOf(settings.isMysqlSSL()); 171 DriverManager.getConnection(url, settings.getMysqlUsername(), 172 settings.getMysqlPassword()); 173 } catch (SQLException ex) { 174 setErrorMessage(ex.getMessage()); 175 return; 176 } catch (Exception ex2) { 177 setErrorMessage(ex2.getMessage()); 178 return; 179 } 180 181 // save settings 182 Settings.getInstance().save(); 183 setReturnCode(OK); 184 close(); 47 185 } 48 186 … … 55 193 } 56 194 195 private void updateSettings() { 196 Settings settings = Settings.getInstance(); 197 198 if (activeTabItem.contains("Profiled Settings")) { 199 settings.setWorkingDirectory(settingsProfileComposite 200 .getSvnWorkingCopyText().getText()); 201 settings.setSvnUsername(settingsProfileComposite 202 .getSvnUsernameText().getText()); 203 settings.setSvnPassword(settingsProfileComposite 204 .getSvnPasswordText().getText()); 205 settings.setMysqlUsername(settingsProfileComposite 206 .getMysqlUsernameText().getText()); 207 settings.setMysqlPassword(settingsProfileComposite 208 .getMysqlPasswordText().getText()); 209 settings.setPdfLatexPath(settingsProfileComposite.getPdfLatexText() 210 .getText()); 211 if (settingsProfileComposite.getMysqlSSLCombo().getSelectionIndex() == 1) { 212 settings.setMysqlSSL(true); 213 } else { 214 settings.setMysqlSSL(false); 215 } 216 } else { 217 settings.setSvnLocation(settingsComposite.getSvnLocationText() 218 .getText()); 219 settings.setMysqlHost(settingsComposite.getMysqlHostText() 220 .getText()); 221 settings.setMysqlDb(settingsComposite.getMysqlDatabaseText() 222 .getText()); 223 settings.setResearchGroup(settingsComposite.getResearchGroupText() 224 .getText()); 225 settings.setResearchGroupUrl(settingsComposite 226 .getResearchGroupUrlText().getText()); 227 228 settings.setWorkingDirectory(settingsComposite 229 .getSvnWorkingCopyText().getText()); 230 settings.setSvnUsername(settingsComposite.getSvnUsernameText() 231 .getText()); 232 settings.setSvnPassword(settingsComposite.getSvnPasswordText() 233 .getText()); 234 settings.setMysqlUsername(settingsComposite.getMysqlUsernameText() 235 .getText()); 236 settings.setMysqlPassword(settingsComposite.getMysqlPasswordText() 237 .getText()); 238 settings.setPdfLatexPath(settingsComposite.getPdfLatexText() 239 .getText()); 240 if (settingsComposite.getMysqlSSLCombo().getSelectionIndex() == 1) { 241 settings.setMysqlSSL(true); 242 } else { 243 settings.setMysqlSSL(false); 244 } 245 } 246 } 247 57 248 @Override 58 249 protected Point getInitialSize() { -
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/settings/SettingsHandler.java
r23 r32 12 12 public Object execute(ExecutionEvent event) throws ExecutionException { 13 13 IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); 14 SettingsDialog dialog = new SettingsDialog(window.getShell());15 //SettingsDialog2 dialog = new SettingsDialog2(window.getShell());14 // SettingsDialog dialog = new SettingsDialog(window.getShell()); 15 SettingsDialog2 dialog = new SettingsDialog2(window.getShell()); 16 16 dialog.open(); 17 17 return null; -
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/settings/SettingsProfileComposite.java
r23 r32 18 18 private Text pdfLatexText; 19 19 private Text profileText; 20 private Combo mysqlSSLCombo; 20 21 21 22 public SettingsProfileComposite(Composite parent, int style) { … … 24 25 { 25 26 Label lblProfileFile = new Label(this, SWT.NONE); 26 lblProfileFile.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 27 lblProfileFile.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 28 false, false, 1, 1)); 27 29 lblProfileFile.setText("Profile File"); 28 30 } 29 31 { 30 32 profileText = new Text(this, SWT.BORDER); 31 profileText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 33 profileText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, 34 false, 1, 1)); 32 35 } 33 36 { … … 37 40 { 38 41 Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); 39 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); 42 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, 43 false, 3, 1)); 40 44 } 41 45 { 42 46 Label lblSvnWorkingCopy = new Label(this, SWT.NONE); 43 lblSvnWorkingCopy.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 47 lblSvnWorkingCopy.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 48 false, false, 1, 1)); 44 49 lblSvnWorkingCopy.setText("SVN Working Copy"); 45 50 } 46 51 { 47 52 svnWorkingCopyText = new Text(this, SWT.BORDER); 48 svnWorkingCopyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 53 svnWorkingCopyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 54 true, false, 1, 1)); 49 55 } 50 56 { … … 54 60 { 55 61 Label lblSvnUsername = new Label(this, SWT.NONE); 56 lblSvnUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 62 lblSvnUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 63 false, false, 1, 1)); 57 64 lblSvnUsername.setText("SVN Username"); 58 65 } 59 66 { 60 67 svnUsernameText = new Text(this, SWT.BORDER); 61 svnUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 68 svnUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 69 true, false, 1, 1)); 62 70 } 63 71 new Label(this, SWT.NONE); 64 72 { 65 73 Label lblSvnPassword = new Label(this, SWT.NONE); 66 lblSvnPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 74 lblSvnPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 75 false, false, 1, 1)); 67 76 lblSvnPassword.setText("SVN Password"); 68 77 } 69 78 { 70 79 svnPasswordText = new Text(this, SWT.BORDER | SWT.PASSWORD); 71 svnPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 80 svnPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 81 true, false, 1, 1)); 72 82 } 73 83 new Label(this, SWT.NONE); 74 84 { 75 85 Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); 76 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); 86 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, 87 false, 3, 1)); 77 88 } 78 89 { 79 90 Label lblMysqlUsername = new Label(this, SWT.NONE); 80 lblMysqlUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 91 lblMysqlUsername.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 92 false, false, 1, 1)); 81 93 lblMysqlUsername.setText("MySQL Username"); 82 94 } 83 95 { 84 96 mysqlUsernameText = new Text(this, SWT.BORDER); 85 mysqlUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 97 mysqlUsernameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 98 true, false, 1, 1)); 86 99 } 87 100 new Label(this, SWT.NONE); 88 101 { 89 102 Label lblMysqlPassword = new Label(this, SWT.NONE); 90 lblMysqlPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 103 lblMysqlPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 104 false, false, 1, 1)); 91 105 lblMysqlPassword.setText("MySQL Password"); 92 106 } 93 107 { 94 mysqlPasswordText = new Text(this, SWT.BORDER); 95 mysqlPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 108 mysqlPasswordText = new Text(this, SWT.BORDER | SWT.PASSWORD); 109 mysqlPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 110 true, false, 1, 1)); 96 111 } 97 112 new Label(this, SWT.NONE); 98 113 { 99 114 Label lblMysqlSsl = new Label(this, SWT.NONE); 100 lblMysqlSsl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 115 lblMysqlSsl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 116 false, false, 1, 1)); 101 117 lblMysqlSsl.setText("MySQL SSL"); 102 118 } 103 119 { 104 Combo mysqlSSLCombo = new Combo(this, SWT.NONE); 105 mysqlSSLCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 120 mysqlSSLCombo = new Combo(this, SWT.READ_ONLY); 121 mysqlSSLCombo.add("Disabled"); 122 mysqlSSLCombo.add("Enabled"); 123 mysqlSSLCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, 124 true, false, 1, 1)); 106 125 } 107 126 new Label(this, SWT.NONE); 108 127 { 109 128 Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); 110 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); 129 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, 130 false, 3, 1)); 111 131 } 112 132 { 113 133 Label lblPdfLatexPath = new Label(this, SWT.NONE); 114 lblPdfLatexPath.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); 134 lblPdfLatexPath.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, 135 false, false, 1, 1)); 115 136 lblPdfLatexPath.setText("pdfLatex Path"); 116 137 } 117 138 { 118 139 pdfLatexText = new Text(this, SWT.BORDER); 119 pdfLatexText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); 140 pdfLatexText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, 141 false, 1, 1)); 120 142 } 121 143 { … … 178 200 } 179 201 202 public Combo getMysqlSSLCombo() { 203 return mysqlSSLCombo; 204 } 205 206 public void setMysqlSSLCombo(Combo mysqlSSLCombo) { 207 this.mysqlSSLCombo = mysqlSSLCombo; 208 } 209 210 public Text getProfileText() { 211 return profileText; 212 } 213 214 public void setProfileText(Text profileText) { 215 this.profileText = profileText; 216 } 217 180 218 }
Note: See TracChangeset
for help on using the changeset viewer.