Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-03-03 07:10:06 +0000
committerEike Stepper2007-03-03 07:10:06 +0000
commit91564cb4cfe12d14600f9e169c9083c2c352430a (patch)
tree78e59d583ce5f6faacb6fa23cbd6da636ffe74d1
parenta04abe02ec76c4012b3a4be451189923d25c1f96 (diff)
downloadcdo-91564cb4cfe12d14600f9e169c9083c2c352430a.tar.gz
cdo-91564cb4cfe12d14600f9e169c9083c2c352430a.tar.xz
cdo-91564cb4cfe12d14600f9e169c9083c2c352430a.zip
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewEditorWizardPage.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewSessionWizardPage.java42
2 files changed, 76 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewEditorWizardPage.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewEditorWizardPage.java
index 9b5319465f..95ea5bdf24 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewEditorWizardPage.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewEditorWizardPage.java
@@ -159,6 +159,40 @@ public class NewEditorWizardPage extends WizardPage
{
loadComposite.setEnabled(loadResourceButton.getSelection());
createComposite.setEnabled(createResourceButton.getSelection());
+
+ if (loadComposite.isEnabled() && loadComposite.getViewer().getSelection().isEmpty())
+ {
+ updateStatus("Select an existing resource to be loaded from the list.");
+ return;
+ }
+
+ if (createComposite.isEnabled())
+ {
+ if (createComposite.getText().getText().isEmpty())
+ {
+ updateStatus("Select an existing resource to be loaded from the list.");
+ return;
+ }
+
+ if (createComposite.getViewer().getSelection().isEmpty())
+ {
+ updateStatus("Select an existing resource to be loaded from the list.");
+ return;
+ }
+ }
+
+// if (connectorText.isEnabled() && connectorText.getText().length() == 0)
+// {
+// updateStatus("Enter a description to create a new connector.");
+// return;
+// }
+//
+// if (repositoryText.getText().length() == 0)
+// {
+// updateStatus("Enter the name of a remote repository.");
+// return;
+// }
+
updateStatus(null);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewSessionWizardPage.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewSessionWizardPage.java
index 6437d18096..44818648f1 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewSessionWizardPage.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/wizards/NewSessionWizardPage.java
@@ -6,6 +6,8 @@ import org.eclipse.net4j.container.ContainerManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
@@ -68,6 +70,13 @@ public class NewSessionWizardPage extends WizardPage
connectorList = new List(connectorGroup, SWT.BORDER | SWT.SINGLE);
connectorList.setSize(300, 100);
connectorList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ connectorList.addSelectionListener(new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent e)
+ {
+ dialogChanged();
+ }
+ });
newConnectorButton = new Button(connectorGroup, SWT.RADIO);
newConnectorButton.setText("New connector:");
@@ -82,6 +91,13 @@ public class NewSessionWizardPage extends WizardPage
connectorText = new Text(connectorGroup, SWT.BORDER);
connectorText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ connectorText.addModifyListener(new ModifyListener()
+ {
+ public void modifyText(ModifyEvent e)
+ {
+ dialogChanged();
+ }
+ });
Group repositoryGroup = new Group(container, SWT.None);
repositoryGroup.setText("Repository");
@@ -93,6 +109,13 @@ public class NewSessionWizardPage extends WizardPage
repositoryText = new Text(repositoryGroup, SWT.BORDER);
repositoryText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ repositoryText.addModifyListener(new ModifyListener()
+ {
+ public void modifyText(ModifyEvent e)
+ {
+ dialogChanged();
+ }
+ });
initialize();
dialogChanged();
@@ -147,6 +170,25 @@ public class NewSessionWizardPage extends WizardPage
{
connectorList.setEnabled(existingConnectorButton.getSelection());
connectorText.setEnabled(newConnectorButton.getSelection());
+
+ if (connectorList.isEnabled() && connectorList.getSelectionCount() == 0)
+ {
+ updateStatus("Select an existing connector from the list.");
+ return;
+ }
+
+ if (connectorText.isEnabled() && connectorText.getText().length() == 0)
+ {
+ updateStatus("Enter a description to create a new connector.");
+ return;
+ }
+
+ if (repositoryText.getText().length() == 0)
+ {
+ updateStatus("Enter the name of a remote repository.");
+ return;
+ }
+
updateStatus(null);
}

Back to the top