Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-10 22:56:04 +0000
committerslewis2008-03-10 22:56:04 +0000
commit060339b8566eca8026fb3a724b252b10c2314e3f (patch)
tree5d5afdbc722bbbf97ad34497c15ebbb72c5cb421 /examples/bundles/org.eclipse.ecf.example.collab/src/org
parent5037ecec7b2458a21c10882514e47c224c6edec6 (diff)
downloadorg.eclipse.ecf-060339b8566eca8026fb3a724b252b10c2314e3f.tar.gz
org.eclipse.ecf-060339b8566eca8026fb3a724b252b10c2314e3f.tar.xz
org.eclipse.ecf-060339b8566eca8026fb3a724b252b10c2314e3f.zip
Improvements in docshare (shared editing UI...menu text and icons). Also changes to collab example selection sharing.
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.example.collab/src/org')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java3
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java14
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java16
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java160
6 files changed, 86 insertions, 111 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
index d321c494e..82acb5cf2 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
@@ -192,7 +192,8 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
final IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
final IWorkbenchPage wp = ww.getActivePage();
wp.showView(LineChatView.VIEW_ID);
- LineChatView.setViewName(NLS.bind(Messages.EclipseCollabSharedObject_TITLE_BAR, localUser.getNickname()));
+ windowTitle = NLS.bind(Messages.EclipseCollabSharedObject_TITLE_BAR, localUser.getNickname());
+ LineChatView.setViewName(windowTitle);
localGUI = LineChatView.createClientView(EclipseCollabSharedObject.this, projectName, NLS.bind(Messages.EclipseCollabSharedObject_PROJECT_NAME, projectName), getLocalFullDownloadPath());
} catch (final Exception e) {
log("Exception creating LineChatView", e); //$NON-NLS-1$
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java
index c91cc23e3..0ee62dc02 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java
@@ -23,6 +23,9 @@ import org.osgi.framework.BundleContext;
*/
public class ClientPlugin extends AbstractUIPlugin implements ClientPluginConstants {
public static final String PLUGIN_ID = "org.eclipse.ecf.example.collab"; //$NON-NLS-1$
+
+ public static final String COLLABORATION_IMAGE = "collaboration";
+
// The shared instance.
private static ClientPlugin plugin;
@@ -119,15 +122,8 @@ public class ClientPlugin extends AbstractUIPlugin implements ClientPluginConsta
return this.getWorkbench().getDisplay().getActiveShell();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#createImageRegistry()
- */
- protected ImageRegistry createImageRegistry() {
- final ImageRegistry registry = super.createImageRegistry();
- registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/default_provider_image.gif").createImage()); //$NON-NLS-1$
- return registry;
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ registry.put(COLLABORATION_IMAGE, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/collaboration.gif")); //$NON-NLS-1$
}
/**
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java
index c08696bbc..009f5936a 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java
@@ -42,6 +42,4 @@ public interface ClientPluginConstants {
public static final String SHARED_MARKER_TYPE = "org.eclipse.ecf.example.collab.sharedmarker"; //$NON-NLS-1$
public static final String SHARED_MARKER_KEY = "owner"; //$NON-NLS-1$
- public static final String DECORATION_DEFAULT_PROVIDER = "DECORATION_DEFAULT_PROVIDER"; //$NON-NLS-1$
-
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java
index d3fc91204..5d0af8be7 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java
@@ -10,9 +10,11 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
@@ -27,11 +29,15 @@ public class EditorCompoundContributionItem extends CompoundContributionItem {
private static final IContributionItem[] EMPTY = new IContributionItem[] {};
+ private final ImageDescriptor menuImageDescriptor;
+
public EditorCompoundContributionItem() {
+ menuImageDescriptor = ClientPlugin.getDefault().getImageRegistry().getDescriptor(ClientPlugin.COLLABORATION_IMAGE);
}
public EditorCompoundContributionItem(String id) {
super(id);
+ menuImageDescriptor = ClientPlugin.getDefault().getImageRegistry().getDescriptor(ClientPlugin.COLLABORATION_IMAGE);
}
protected IFile getFileForPart(IEditorPart editorPart) {
@@ -108,7 +114,15 @@ public class EditorCompoundContributionItem extends CompoundContributionItem {
}
};
- action.setText(Messages.EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME);
+ final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
+ if (entry == null)
+ return EMPTY;
+ final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
+ if (collabsharedobject == null)
+ return EMPTY;
+ action.setText(NLS.bind(Messages.EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME, collabsharedobject.getWindowTitle()));
+ if (menuImageDescriptor != null)
+ action.setImageDescriptor(menuImageDescriptor);
//action.setAccelerator(SWT.CTRL | SWT.SHIFT | '1');
return new IContributionItem[] {new Separator(), new ActionContributionItem(action)};
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
index 855e8ace5..26cdebd5c 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
@@ -46,7 +46,7 @@ EclipseFileTransfer_DIALOG_RECEIVE_CONF_TEXT=Accept file?
EclipseFileTransfer_DIALOG_RECEIVE_CONF_TITLE=File Receive Confirmation
EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_MESSAGE=Not connected to any collaboration group. To connect, open Collaboration View
EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_TITLE=Not Connected to Collaboration Session
-EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME=Share Selection
+EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME=Share Resource to {0}
FileTransferSharedObject_EXCEPTION_FILE_LARGER_THAN_LEN=File larger than {0}
FileTransferSharedObject_EXCEPTION_INPUTSTREAM_NOT_NULL=Input stream cannot be null
FileTransferSharedObject_EXCEPTION_REMOTE_FILE_NOT_NULL=Remote file is null
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java
index 733c9d3c8..b190e5673 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java
@@ -19,7 +19,6 @@ import java.util.Map;
import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.ContainerTypeDescription;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
-import org.eclipse.ecf.internal.example.collab.ClientPluginConstants;
import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
@@ -53,32 +52,25 @@ public class ConnectionDialog extends TitleAreaDialog {
private static final int PROVIDER_TABLE_WIDTH = 150;
- protected static final String CLASSNAME = JoinGroupWizardPage.class
- .getName();
+ protected static final String CLASSNAME = JoinGroupWizardPage.class.getName();
protected static final String USER_NAME_SYSTEM_PROPERTY = "user.name"; //$NON-NLS-1$
protected static final String ISSERVER_PROP_NAME = CLASSNAME + ".isServer"; //$NON-NLS-1$
- protected static final String DEFAULTGROUPID_PROP_NAME = CLASSNAME
- + ".defaultgroupid"; //$NON-NLS-1$
+ protected static final String DEFAULTGROUPID_PROP_NAME = CLASSNAME + ".defaultgroupid"; //$NON-NLS-1$
- protected static final String EXAMPLEGROUPID_PROP_NAME = CLASSNAME
- + ".examplegroupid"; //$NON-NLS-1$
+ protected static final String EXAMPLEGROUPID_PROP_NAME = CLASSNAME + ".examplegroupid"; //$NON-NLS-1$
- protected static final String USEPASSWORD_PROP_NAME = CLASSNAME
- + ".usepassword"; //$NON-NLS-1$
+ protected static final String USEPASSWORD_PROP_NAME = CLASSNAME + ".usepassword"; //$NON-NLS-1$
- protected static final String USENICKNAME_PROP_NAME = CLASSNAME
- + ".usenickname"; //$NON-NLS-1$
+ protected static final String USENICKNAME_PROP_NAME = CLASSNAME + ".usenickname"; //$NON-NLS-1$
protected static final String URLPREFIX_NAME = CLASSNAME + ".urlprefix"; //$NON-NLS-1$
- protected static final String GROUPIDLABEL_PROP_NAME = CLASSNAME
- + ".groupIDLabel"; //$NON-NLS-1$
+ protected static final String GROUPIDLABEL_PROP_NAME = CLASSNAME + ".groupIDLabel"; //$NON-NLS-1$
- protected static final String NAMESPACE_PROP_NAME = CLASSNAME
- + ".namespace"; //$NON-NLS-1$
+ protected static final String NAMESPACE_PROP_NAME = CLASSNAME + ".namespace"; //$NON-NLS-1$
protected static final String PAGE_DESCRIPTION = Messages.ConnectionDialog_SELECT_PROVIDER_DESCRIPTION;
@@ -120,7 +112,7 @@ public class ConnectionDialog extends TitleAreaDialog {
private IDialogSettings dialogSettings;
- private GlobalModifyListener listener = new GlobalModifyListener();
+ private final GlobalModifyListener listener = new GlobalModifyListener();
private Button autoLogin = null;
@@ -132,16 +124,15 @@ public class ConnectionDialog extends TitleAreaDialog {
}
protected Control createDialogArea(Composite parent) {
- Composite main = new Composite((Composite) super
- .createDialogArea(parent), SWT.NONE);
+ final Composite main = new Composite((Composite) super.createDialogArea(parent), SWT.NONE);
main.setLayout(new GridLayout());
main.setLayoutData(new GridData(GridData.FILL_BOTH));
- Label providerLabel = new Label(main, SWT.NONE);
+ final Label providerLabel = new Label(main, SWT.NONE);
providerLabel.setText(Messages.ConnectionDialog_PROTOCOL_TEXT);
- Composite providerComp = new Composite(main, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
+ final Composite providerComp = new Composite(main, SWT.NONE);
+ final GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
providerComp.setLayout(layout);
@@ -152,22 +143,22 @@ public class ConnectionDialog extends TitleAreaDialog {
viewer.setLabelProvider(new ECFProviderLabelProvider());
viewer.addSelectionChangedListener(new ProviderSelector());
- Table table = viewer.getTable();
- GridData gData = new GridData(GridData.FILL_VERTICAL);
+ final Table table = viewer.getTable();
+ final GridData gData = new GridData(GridData.FILL_VERTICAL);
gData.widthHint = PROVIDER_TABLE_WIDTH;
gData.heightHint = PROVIDER_TABLE_HEIGHT;
table.setLayoutData(gData);
-/*
- * table.setHeaderVisible(true); TableColumn tc = new TableColumn(table,
- * SWT.NONE); tc.setText("Name"); tc = new TableColumn(table, SWT.NONE);
- * tc.setText("Classname");
- *
- */
+ /*
+ * table.setHeaderVisible(true); TableColumn tc = new TableColumn(table,
+ * SWT.NONE); tc.setText("Name"); tc = new TableColumn(table, SWT.NONE);
+ * tc.setText("Classname");
+ *
+ */
viewer.setInput(ContainerFactory.getDefault().getDescriptions());
paramComp = new Composite(providerComp, SWT.NONE);
- GridLayout glayout = new GridLayout();
+ final GridLayout glayout = new GridLayout();
glayout.marginTop = 0;
glayout.marginBottom = 0;
paramComp.setLayout(glayout);
@@ -183,23 +174,22 @@ public class ConnectionDialog extends TitleAreaDialog {
});
new Label(main, SWT.NONE);
- Label sep = new Label(main, SWT.SEPARATOR | SWT.HORIZONTAL);
+ final Label sep = new Label(main, SWT.SEPARATOR | SWT.HORIZONTAL);
sep.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
this.setTitle(Messages.ConnectionDialog_CONNECTION_TITLE);
- this
- .setMessage(Messages.ConnectionDialog_CHOOSE_PROVIDER_MESSAGE);
+ this.setMessage(Messages.ConnectionDialog_CHOOSE_PROVIDER_MESSAGE);
this.getShell().setText(Messages.ConnectionDialog_CONNECT_TEXT);
return parent;
}
protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
+ final Control control = super.createContents(parent);
try {
restoreDialogSettings();
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
@@ -210,16 +200,14 @@ public class ConnectionDialog extends TitleAreaDialog {
return new Point(500, 400);
}
- private class ECFProviderContentProvider implements
- IStructuredContentProvider {
+ private class ECFProviderContentProvider implements IStructuredContentProvider {
public Object[] getElements(Object inputElement) {
- List rawDescriptions = (List) inputElement;
- List elements = new ArrayList();
+ final List rawDescriptions = (List) inputElement;
+ final List elements = new ArrayList();
- for (Iterator i = rawDescriptions.iterator(); i.hasNext();) {
- final ContainerTypeDescription desc = (ContainerTypeDescription) i
- .next();
+ for (final Iterator i = rawDescriptions.iterator(); i.hasNext();) {
+ final ContainerTypeDescription desc = (ContainerTypeDescription) i.next();
if (!desc.isServer() && !desc.isHidden())
elements.add(desc);
}
@@ -236,7 +224,7 @@ public class ConnectionDialog extends TitleAreaDialog {
public String getJoinGroupText() {
String textValue = joinGroup.trim();
- String namespace = getNamespace();
+ final String namespace = getNamespace();
if (namespace != null) {
return textValue;
} else {
@@ -268,13 +256,12 @@ public class ConnectionDialog extends TitleAreaDialog {
}
private void restoreDialogSettings() throws IOException {
- IDialogSettings dialogSettings = getDialogSettings();
+ final IDialogSettings dialogSettings = getDialogSettings();
if (dialogSettings != null) {
- IDialogSettings pageSettings = dialogSettings
- .getSection(DIALOG_SETTINGS);
+ final IDialogSettings pageSettings = dialogSettings.getSection(DIALOG_SETTINGS);
if (pageSettings != null) {
- int intVal = pageSettings.getInt("provider"); //$NON-NLS-1$
+ final int intVal = pageSettings.getInt("provider"); //$NON-NLS-1$
viewer.getTable().setSelection(intVal);
viewer.setSelection(viewer.getSelection());
String strVal = pageSettings.get("url"); //$NON-NLS-1$
@@ -301,10 +288,9 @@ public class ConnectionDialog extends TitleAreaDialog {
}
private void saveDialogSettings() {
- IDialogSettings dialogSettings = this.getDialogSettings();
+ final IDialogSettings dialogSettings = this.getDialogSettings();
if (dialogSettings != null) {
- IDialogSettings pageSettings = dialogSettings
- .getSection(DIALOG_SETTINGS);
+ IDialogSettings pageSettings = dialogSettings.getSection(DIALOG_SETTINGS);
if (pageSettings == null)
pageSettings = dialogSettings.addNewSection(DIALOG_SETTINGS);
@@ -312,19 +298,18 @@ public class ConnectionDialog extends TitleAreaDialog {
pageSettings.put("nickname", this.getNicknameText()); //$NON-NLS-1$
pageSettings.put("password", this.getPasswordText()); //$NON-NLS-1$
- int i = viewer.getTable().getSelectionIndex();
+ final int i = viewer.getTable().getSelectionIndex();
if (i >= 0)
pageSettings.put("provider", i); //$NON-NLS-1$
-/*
- * try { dialogSettings.save(this.getClass().toString()); } catch (IOException
- * e) { // TODO Auto-generated catch block e.printStackTrace(); }
- */ }
+ /*
+ * try { dialogSettings.save(this.getClass().toString()); } catch (IOException
+ * e) { // TODO Auto-generated catch block e.printStackTrace(); }
+ */}
}
private boolean savePassword() {
- return ClientPlugin.getDefault().getPluginPreferences().getBoolean(
- ClientPlugin.PREF_STORE_PASSWORD);
+ return ClientPlugin.getDefault().getPluginPreferences().getBoolean(ClientPlugin.PREF_STORE_PASSWORD);
}
protected void okPressed() {
@@ -343,23 +328,16 @@ public class ConnectionDialog extends TitleAreaDialog {
private class ECFProviderLabelProvider implements ITableLabelProvider {
public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) {
- // TODO: If the container description contains an image for the
- // provider, display it here.
- return ClientPlugin.getDefault().getImageRegistry().get(
- ClientPluginConstants.DECORATION_DEFAULT_PROVIDER);
- }
-
return null;
}
public String getColumnText(Object element, int columnIndex) {
- ContainerTypeDescription desc = (ContainerTypeDescription) element;
+ final ContainerTypeDescription desc = (ContainerTypeDescription) element;
switch (columnIndex) {
- case 0:
- return desc.getDescription();
- case 1:
- return desc.getName();
+ case 0 :
+ return desc.getDescription();
+ case 1 :
+ return desc.getName();
}
return ""; //$NON-NLS-1$
@@ -383,10 +361,8 @@ public class ConnectionDialog extends TitleAreaDialog {
private class ProviderSelector implements ISelectionChangedListener {
public void selectionChanged(SelectionChangedEvent event) {
- StructuredSelection selection = (StructuredSelection) event
- .getSelection();
- ContainerTypeDescription desc = (ContainerTypeDescription) selection
- .getFirstElement();
+ final StructuredSelection selection = (StructuredSelection) event.getSelection();
+ final ContainerTypeDescription desc = (ContainerTypeDescription) selection.getFirstElement();
if (desc != null) {
containerType = desc.getName();
// XXX replace with access to desc.getParameters()
@@ -397,12 +373,9 @@ public class ConnectionDialog extends TitleAreaDialog {
protected void createPropertyComposite(Composite parent, Map properties) {
if (properties != null) {
- String usePassword = (String) properties
- .get(USEPASSWORD_PROP_NAME);
- String examplegroupid = (String) properties
- .get(EXAMPLEGROUPID_PROP_NAME);
- String useNickname = (String) properties
- .get(USENICKNAME_PROP_NAME);
+ final String usePassword = (String) properties.get(USEPASSWORD_PROP_NAME);
+ final String examplegroupid = (String) properties.get(EXAMPLEGROUPID_PROP_NAME);
+ final String useNickname = (String) properties.get(USENICKNAME_PROP_NAME);
urlPrefix = (String) properties.get(URLPREFIX_NAME);
namespace = (String) properties.get(NAMESPACE_PROP_NAME);
@@ -412,10 +385,9 @@ public class ConnectionDialog extends TitleAreaDialog {
removeChildren(parent);
- String groupLabel = (String) properties
- .get(GROUPIDLABEL_PROP_NAME);
+ final String groupLabel = (String) properties.get(GROUPIDLABEL_PROP_NAME);
- Label groupIDLabel = new Label(parent, SWT.NONE);
+ final Label groupIDLabel = new Label(parent, SWT.NONE);
if (groupLabel != null) {
groupIDLabel.setText(groupLabel);
@@ -424,41 +396,35 @@ public class ConnectionDialog extends TitleAreaDialog {
}
joingroup_text = new Text(parent, SWT.BORDER);
- joingroup_text.setLayoutData(new GridData(
- GridData.FILL_HORIZONTAL));
+ joingroup_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
joingroup_text.addModifyListener(listener);
if (examplegroupid != null) {
- Label example_label = new Label(parent, SWT.NONE);
+ final Label example_label = new Label(parent, SWT.NONE);
// set examplegroupid text
- example_label
- .setText((examplegroupid != null) ? examplegroupid
- : ""); //$NON-NLS-1$
- example_label.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_END));
+ example_label.setText((examplegroupid != null) ? examplegroupid : ""); //$NON-NLS-1$
+ example_label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
// joingroup_text.setText((defaultgroupid != null) ?
// defaultgroupid : "");
}
// turn off password unless used
if (usePassword != null) {
- Label password_label = new Label(parent, SWT.NONE);
+ final Label password_label = new Label(parent, SWT.NONE);
password_label.setText(Messages.ConnectionDialog_PASSWORD_TEXT);
password_text = new Text(parent, SWT.BORDER);
- password_text.setLayoutData(new GridData(
- GridData.FILL_HORIZONTAL));
+ password_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
password_text.setEchoChar('*');
password_text.addModifyListener(listener);
}
// turn off nickname unless used
if (useNickname != null) {
- Label nickname_label = new Label(parent, SWT.NONE);
+ final Label nickname_label = new Label(parent, SWT.NONE);
nickname_label.setText(NICKNAME_FIELDNAME);
nickname_text = new Text(parent, SWT.BORDER);
- nickname_text.setLayoutData(new GridData(
- GridData.FILL_HORIZONTAL));
+ nickname_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
nickname_text.addModifyListener(listener);
}
autoLogin.setSelection(false);
@@ -469,7 +435,7 @@ public class ConnectionDialog extends TitleAreaDialog {
private void removeChildren(Composite composite) {
if (composite != null && composite.getChildren() != null) {
while (composite.getChildren().length > 0) {
- Control child = composite.getChildren()[0];
+ final Control child = composite.getChildren()[0];
if (child instanceof Composite) {
removeChildren((Composite) child);
}

Back to the top