+
+ public class NormalizationDialog extends TitleAreaDialog {
+ private Text versionT;
+ private String version;
+ private Button overridePomsC;
+ private Boolean overridePoms;
+
+ public NormalizationDialog(Shell parentShell) {
+ super(parentShell);
+ }
+
+ protected Point getInitialSize() {
+ return new Point(300, 250);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Composite dialogarea = (Composite) super.createDialogArea(parent);
+ dialogarea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+ true));
+ Composite composite = new Composite(dialogarea, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+ false));
+ versionT = createLT(composite, "Version");
+ overridePomsC = createLC(composite, "Override POMs");
+ setMessage("Configure normalization", IMessageProvider.NONE);
+
+ parent.pack();
+ return composite;
+ }
+
+ @Override
+ protected void okPressed() {
+ version = versionT.getText();
+ overridePoms = overridePomsC.getSelection();
+ super.okPressed();
+ }
+
+ /** Creates label and text. */
+ protected Text createLT(Composite parent, String label) {
+ new Label(parent, SWT.NONE).setText(label);
+ Text text = new Text(parent, SWT.SINGLE | SWT.LEAD | SWT.BORDER
+ | SWT.NONE);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ return text;
+ }
+
+ /** Creates label and check. */
+ protected Button createLC(Composite parent, String label) {
+ new Label(parent, SWT.NONE).setText(label);
+ Button check = new Button(parent, SWT.CHECK);
+ check.setSelection(false);
+ check.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ return check;
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText("Normalize...");
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public Boolean getOverridePoms() {
+ return overridePoms;
+ }
+
+ }
+
+ /* DEPENDENCY INJECTION */
+ public void setNodeRepository(Repository nodeRepository) {
+ this.nodeRepository = nodeRepository;
+ }
+
+ public void setRepositoryFactory(RepositoryFactory repositoryFactory) {
+ this.repositoryFactory = repositoryFactory;
+ }
+
+ public void setKeyring(Keyring keyring) {
+ this.keyring = keyring;
+ }
+}
\ No newline at end of file