Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-02-23 06:23:24 +0000
committerslewis2005-02-23 06:23:24 +0000
commitda3877ec44ffec0979283b634a646662da6ff9a9 (patch)
tree36e72986c256a173b3e7689a351e12afbf2f42ca
parentd9dd9ec2e5a269208ef10a2fe04fc392605f0224 (diff)
downloadorg.eclipse.ecf-da3877ec44ffec0979283b634a646662da6ff9a9.tar.gz
org.eclipse.ecf-da3877ec44ffec0979283b634a646662da6ff9a9.tar.xz
org.eclipse.ecf-da3877ec44ffec0979283b634a646662da6ff9a9.zip
Fix for combo box (make read-only) in JoinGroupWizardPage. Also added additional properties to those reported about user on entry to generic shared object container
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/Client.java37
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java2
2 files changed, 28 insertions, 11 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/Client.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/Client.java
index 61ef5d319..888f846e3 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/Client.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/Client.java
@@ -48,12 +48,6 @@ public class Client {
public static final String USERNAME = System.getProperty("user.name");
public static final String ECFDIRECTORY = "ECF_" + FILE_DIRECTORY + "/";
static ID defaultGroupID = null;
- /*
- static ISharedObjectContainer client = null;
- static EclipseCollabSharedObject sharedObject = null;
- static ID groupID = null;
- static ID sharedObjectID = null;
- */
static Hashtable clients = new Hashtable();
public static class ClientEntry {
@@ -143,13 +137,36 @@ public class Client {
defaultGroupID = IDFactory.makeStringID(DEFAULT_SERVER_ID);
}
- protected User getUserData(String containerType, ID clientID, String usernick, String proj) {
+ protected User getUserData(String containerType, ID clientID, String usernick, String proj, IProject project) {
Vector topElements = new Vector();
String contType = containerType.substring(containerType.lastIndexOf(".")+1);
topElements.add(new TreeItem("Project", proj));
SimpleDateFormat sdf = new SimpleDateFormat(JOIN_TIME_FORMAT);
- topElements.add(new TreeItem("Join Time",sdf.format(new Date())));
- topElements.add(new TreeItem("Container Type",contType));
+ topElements.add(new TreeItem("Time",sdf.format(new Date())));
+ try {
+ String activeTitle = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getTitle();
+ topElements.add(new TreeItem("Active Part",activeTitle));
+ } catch (Exception e) {}
+ try {
+ String userLang = System.getProperty("user.language");
+ topElements.add(new TreeItem("Language",userLang));
+ } catch (Exception e) {}
+ try {
+ String timeZone = System.getProperty("user.timezone");
+ topElements.add(new TreeItem("Time Zone",timeZone));
+ } catch (Exception e) {}
+ try {
+ String osgiVersion = System.getProperty("org.osgi.framework.version");
+ topElements.add(new TreeItem("OSGI version",osgiVersion));
+ } catch (Exception e) {}
+ try {
+ String javaVersion = System.getProperty("java.version");
+ topElements.add(new TreeItem("Java",javaVersion));
+ } catch (Exception e) {}
+ try {
+ String osName = Platform.getOS();
+ topElements.add(new TreeItem("OS",osName));
+ } catch (Exception e) {}
return new User(clientID, usernick, topElements);
}
@@ -202,7 +219,7 @@ public class Client {
String fileDir = getSharedFileDirectoryForProject(project);
String projName = (project == null) ? "<workspace>" : project.getName();
User user = getUserData(client.getClass().getName(),client.getContainer().getConfig().getID(),
- (username == null) ? USERNAME : username, projName);
+ (username == null) ? USERNAME : username, projName, proj);
makeAndAddSharedObject(client, project, user, fileDir);
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
index 78897a7de..3c29ad06b 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
@@ -158,7 +158,7 @@ public class JoinGroupWizardPage extends WizardPage {
final Label label_4 = new Label(container, SWT.NONE);
label_4.setText("Provider:");
- combo = new Combo(container, SWT.NONE);
+ combo = new Combo(container, SWT.READ_ONLY);
final GridData gridData_1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
combo.setLayoutData(gridData_1);

Back to the top