summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-09-28 07:51:39 (EDT)
committerEike Stepper2007-09-28 07:51:39 (EDT)
commit31c9b0ce010c942229b70597e7e548cb825499b1 (patch)
tree6129951a9c26164aab422266e8e88aaf14eb6847
parent08747051b4c0528d10d0d50dbc70ce4e806f81bf (diff)
downloadcdo-31c9b0ce010c942229b70597e7e548cb825499b1.zip
cdo-31c9b0ce010c942229b70597e7e548cb825499b1.tar.gz
cdo-31c9b0ce010c942229b70597e7e548cb825499b1.tar.bz2
[204732] Add dialog for "Open Session"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204732
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java
index fd72245..c070a29 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java
@@ -104,10 +104,14 @@ public class OpenSessionDialog extends TitleAreaDialog
new Label(composite, SWT.NONE).setText("Server Description:");
connector = new HistoryText(composite, SWT.BORDER | SWT.SINGLE, connectorHistory);
connector.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
- new Label(composite, SWT.NONE);
- example = new Label(composite, SWT.NONE);
- example.setText("example: tcp://estepper@dev.eclipse.org:2036");
- example.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
+
+ if (connectorHistory.isEmpty())
+ {
+ new Label(composite, SWT.NONE);
+ example = new Label(composite, SWT.NONE);
+ example.setText("example: tcp://estepper@dev.eclipse.org:2036");
+ example.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
+ }
new Label(composite, SWT.NONE).setText("Repository Name:");
repository = new HistoryText(composite, SWT.BORDER | SWT.SINGLE, repositoryHistory);
@@ -120,12 +124,18 @@ public class OpenSessionDialog extends TitleAreaDialog
{
public void focusGained(FocusEvent e)
{
- example.setVisible(true);
+ if (example != null)
+ {
+ example.setVisible(true);
+ }
}
public void focusLost(FocusEvent e)
{
- example.setVisible(false);
+ if (example != null)
+ {
+ example.setVisible(false);
+ }
}
});