Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-10-25 23:58:22 -0400
committerslewis2007-10-25 23:58:22 -0400
commit707f6e5ca87762ca9829fb4abaadf38c9607ab79 (patch)
treee2d9cb9594507a83a2a5ae0bbe2647cfa4ad8103 /examples
parent270dc62e02bd307839e8e47e104caf2e0d8cbb2f (diff)
downloadorg.eclipse.ecf-707f6e5ca87762ca9829fb4abaadf38c9607ab79.tar.gz
org.eclipse.ecf-707f6e5ca87762ca9829fb4abaadf38c9607ab79.tar.xz
org.eclipse.ecf-707f6e5ca87762ca9829fb4abaadf38c9607ab79.zip
Fixed errors in javadocs
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java67
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/StreamSender.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java50
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java12
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/hyperlink/ECFGenericHyperlink.java2
5 files changed, 56 insertions, 77 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java
index 3b87d59d2..0cfaf3225 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java
@@ -15,6 +15,7 @@ import java.io.File;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
+
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.sharedobject.ISharedObjectConfig;
import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerTransaction;
@@ -28,8 +29,7 @@ import org.eclipse.ecf.internal.example.collab.ui.FileSenderUI;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
-public class EclipseFileTransfer extends FileTransferSharedObject implements
- FileTransferListener {
+public class EclipseFileTransfer extends FileTransferSharedObject implements FileTransferListener {
private static final long serialVersionUID = -4496151870561737078L;
@@ -39,8 +39,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
protected FileReceiverUI receiverUI = null;
protected EclipseCollabSharedObject receiver = null;
- public EclipseFileTransfer(FileSenderUI view, ID target, InputStream ins,
- FileTransferParams params, ID sharedObjectID) {
+ public EclipseFileTransfer(FileSenderUI view, ID target, InputStream ins, FileTransferParams params, ID sharedObjectID) {
super(target, ins, params);
this.senderUI = view;
this.progressListener = this;
@@ -48,7 +47,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
}
protected void addRemoteParticipants(ID ids[]) {
- ID groupID = getContext().getConnectedID();
+ final ID groupID = getContext().getConnectedID();
if (ids != null && participantIDs != null) {
for (int i = 0; i < ids.length; i++) {
if (groupID != null && groupID.equals(ids[i]))
@@ -64,20 +63,16 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
}
}
- protected ReplicaSharedObjectDescription getReplicaDescription(
- ID remoteMember) {
- HashMap map = new HashMap();
- map.put(ARGS_PROPERTY_NAME, new Object[] { transferParams,
- sharedObjectID });
- return new ReplicaSharedObjectDescription(getClass(), getID(),
- getConfig().getHomeContainerID(), map, getNextReplicateID());
+ protected ReplicaSharedObjectDescription getReplicaDescription(ID remoteMember) {
+ final HashMap map = new HashMap();
+ map.put(ARGS_PROPERTY_NAME, new Object[] {transferParams, sharedObjectID});
+ return new ReplicaSharedObjectDescription(getClass(), getID(), getConfig().getHomeContainerID(), map, getNextReplicateID());
}
- public void init(ISharedObjectConfig config)
- throws SharedObjectInitException {
+ public void init(ISharedObjectConfig config) throws SharedObjectInitException {
super.init(config);
- Map props = config.getProperties();
- Object[] args = (Object[]) props.get(ARGS_PROPERTY_NAME);
+ final Map props = config.getProperties();
+ final Object[] args = (Object[]) props.get(ARGS_PROPERTY_NAME);
if (args != null && args.length == 2) {
transferParams = (FileTransferParams) args[0];
sharedObjectID = (ID) args[1];
@@ -98,6 +93,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
*
* @param params
* the file send parameters associated with this file delivery
+ * @param receiverID
*/
public EclipseFileTransfer(FileTransferParams params, ID receiverID) {
super(params);
@@ -124,18 +120,16 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
senderUI.sendDone(transferParams.getRemoteFile(), e);
}
- protected File createPath(EclipseCollabSharedObject sharedObject,
- boolean server, File file, long length, float rate) {
- File downloadDir = new File(sharedObject.getLocalFullDownloadPath());
+ protected File createPath(EclipseCollabSharedObject sharedObject, boolean server, File file, long length, float rate) {
+ final File downloadDir = new File(sharedObject.getLocalFullDownloadPath());
// create directories if we need them
downloadDir.mkdirs();
// Then create new file
- File retFile = new File(downloadDir, file.getName());
+ final File retFile = new File(downloadDir, file.getName());
return retFile;
}
- public void receiveStart(FileTransferSharedObject obj, File aFile,
- long length, float rate) {
+ public void receiveStart(FileTransferSharedObject obj, File aFile, long length, float rate) {
final FileReceiver r = new FileReceiver(aFile, length, rate);
Display.getDefault().syncExec(new Runnable() {
public void run() {
@@ -161,8 +155,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
// Abort!
// If no problems, and the number of participants to here from is 0,
// then we're done
- } else if (state == ISharedObjectContainerTransaction.VOTING
- && participantIDs.size() == 0) {
+ } else if (state == ISharedObjectContainerTransaction.VOTING && participantIDs.size() == 0) {
// Success!
return true;
}
@@ -172,8 +165,8 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
private class FileReceiver implements Runnable {
private File aFile = null;
- private long length;
- private float rate;
+ private final long length;
+ private final float rate;
public FileReceiver(File aFile, long length, float rate) {
this.aFile = aFile;
@@ -187,25 +180,18 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
* @see java.lang.Runnable#run()
*/
public void run() {
- if (ClientPlugin.getDefault().getPluginPreferences().getBoolean(
- ClientPlugin.PREF_CONFIRM_FILE_RECEIVE)) {
- MessageDialog dialog = new MessageDialog(ClientPlugin
- .getDefault().getActiveShell(),
- "File Receive Confirmation", null, "Accept file?",
- MessageDialog.QUESTION, null, 0);
+ if (ClientPlugin.getDefault().getPluginPreferences().getBoolean(ClientPlugin.PREF_CONFIRM_FILE_RECEIVE)) {
+ final MessageDialog dialog = new MessageDialog(ClientPlugin.getDefault().getActiveShell(), "File Receive Confirmation", null, "Accept file?", MessageDialog.QUESTION, null, 0);
dialog.setBlockOnOpen(true);
- int response = dialog.open();
+ final int response = dialog.open();
if (response == MessageDialog.CANCEL)
return;
}
- receiver = (EclipseCollabSharedObject) getContext()
- .getSharedObjectManager().getSharedObject(sharedObjectID);
+ receiver = (EclipseCollabSharedObject) getContext().getSharedObjectManager().getSharedObject(sharedObjectID);
- receiverUI = receiver.getFileReceiverUI(EclipseFileTransfer.this,
- transferParams);
- localFile = createPath(receiver, getContext().isGroupManager(),
- aFile, length, rate);
+ receiverUI = receiver.getFileReceiverUI(EclipseFileTransfer.this, transferParams);
+ localFile = createPath(receiver, getContext().isGroupManager(), aFile, length, rate);
// Our superclass depends upon the transferParams.getRemoteFile()
// call
// to give a valid file.
@@ -213,8 +199,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements
transferParams.setRemoteFile(localFile);
if (receiverUI != null)
- receiverUI.receiveStart(getHomeContainerID(), localFile,
- length, rate);
+ receiverUI.receiveStart(getHomeContainerID(), localFile, length, rate);
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/StreamSender.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/StreamSender.java
index ac28005ea..505e6d5ff 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/StreamSender.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/StreamSender.java
@@ -21,7 +21,7 @@ public interface StreamSender {
* around and call the 'add' method on their SharedObjectInputStream to
* receive the data.
*
- * @param bytesSentCount
+ * @param currentCount
* the length of the data (assuming data are compressed)
* @param data
* the actual data to send
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 cfa371973..25ffa8bd5 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
@@ -25,8 +25,7 @@ import org.osgi.framework.BundleContext;
/**
* The main plug-in class to be used in the desktop.
*/
-public class ClientPlugin extends AbstractUIPlugin implements
- ClientPluginConstants {
+public class ClientPlugin extends AbstractUIPlugin implements ClientPluginConstants {
public static final String PLUGIN_ID = "org.eclipse.ecf.example.collab"; //$NON-NLS-1$
// The shared instance.
private static ClientPlugin plugin;
@@ -35,18 +34,14 @@ public class ClientPlugin extends AbstractUIPlugin implements
private ServerStartup serverStartup = null;
private DiscoveryStartup discoveryStartup = null;
public static final String TCPSERVER_DISCOVERY_TYPE = "_ecftcp._tcp.local."; //$NON-NLS-1$
- protected static String serviceTypes[] = new String[] { TCPSERVER_DISCOVERY_TYPE };
+ protected static String serviceTypes[] = new String[] {TCPSERVER_DISCOVERY_TYPE};
public static void log(String message) {
- getDefault().getLog().log(
- new Status(IStatus.OK, ClientPlugin.getDefault().getBundle()
- .getSymbolicName(), IStatus.OK, message, null));
+ getDefault().getLog().log(new Status(IStatus.OK, ClientPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, message, null));
}
public static void log(String message, Throwable e) {
- getDefault().getLog().log(
- new Status(IStatus.ERROR, ClientPlugin.getDefault().getBundle()
- .getSymbolicName(), IStatus.OK, message, e));
+ getDefault().getLog().log(new Status(IStatus.ERROR, ClientPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, message, e));
}
/**
@@ -71,7 +66,7 @@ public class ClientPlugin extends AbstractUIPlugin implements
public void startDiscovery() {
try {
getDefault().initDiscovery();
- } catch (Exception e) {
+ } catch (final Exception e) {
ClientPlugin.log("Exception initializing discovery", e);
}
}
@@ -107,31 +102,25 @@ public class ClientPlugin extends AbstractUIPlugin implements
}
protected void setPreferenceDefaults() {
- this.getPreferenceStore().setDefault(ClientPlugin.PREF_USE_CHAT_WINDOW,
- false);
- this.getPreferenceStore().setDefault(
- ClientPlugin.PREF_DISPLAY_TIMESTAMP, true);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_USE_CHAT_WINDOW, false);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_DISPLAY_TIMESTAMP, true);
// this.getPreferenceStore().setDefault(ClientPlugin.PREF_CHAT_FONT,
// "");
- this.getPreferenceStore().setDefault(
- ClientPlugin.PREF_CONFIRM_FILE_SEND, true);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_CONFIRM_FILE_SEND, true);
// this.getPreferenceStore().setDefault(ClientPlugin.PREF_CONFIRM_FILE_RECEIVE,
// true);
- this.getPreferenceStore().setDefault(
- ClientPlugin.PREF_CONFIRM_REMOTE_VIEW, true);
- this.getPreferenceStore().setDefault(ClientPlugin.PREF_START_SERVER,
- false);
- this.getPreferenceStore().setDefault(ClientPlugin.PREF_REGISTER_SERVER,
- false);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_CONFIRM_REMOTE_VIEW, true);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_START_SERVER, false);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_REGISTER_SERVER, false);
- this.getPreferenceStore().setDefault(
- ClientPlugin.PREF_SHAREDEDITOR_PLAY_EVENTS_IMMEDIATELY, true);
- this.getPreferenceStore().setDefault(
- ClientPlugin.PREF_SHAREDEDITOR_ASK_RECEIVER, true);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_SHAREDEDITOR_PLAY_EVENTS_IMMEDIATELY, true);
+ this.getPreferenceStore().setDefault(ClientPlugin.PREF_SHAREDEDITOR_ASK_RECEIVER, true);
}
/**
* This method is called upon plug-in activation
+ * @param context
+ * @throws Exception
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -186,6 +175,8 @@ public class ClientPlugin extends AbstractUIPlugin implements
/**
* This method is called when the plug-in is stopped
+ * @param context
+ * @throws Exception
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
@@ -208,15 +199,14 @@ public class ClientPlugin extends AbstractUIPlugin implements
* @see org.eclipse.ui.plugin.AbstractUIPlugin#createImageRegistry()
*/
protected ImageRegistry createImageRegistry() {
- ImageRegistry registry = super.createImageRegistry();
- registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER,
- AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID,
- "icons/default_provider_image.gif").createImage());
+ final ImageRegistry registry = super.createImageRegistry();
+ registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/default_provider_image.gif").createImage());
return registry;
}
/**
* Returns the shared instance.
+ * @return default client plugin
*/
public static ClientPlugin getDefault() {
return plugin;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java
index dfcea485f..121b51848 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java
@@ -18,8 +18,7 @@ import java.util.ResourceBundle;
public class MessageLoader {
private static final String RESOURCE_BUNDLE = MessageLoader.class.getName();
- private static ResourceBundle fgResourceBundle = ResourceBundle
- .getBundle(RESOURCE_BUNDLE);
+ private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
private MessageLoader() {
}
@@ -27,7 +26,7 @@ public class MessageLoader {
public static String getString(String key) {
try {
return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
+ } catch (final MissingResourceException e) {
return '!' + key + '!';
}
}
@@ -37,13 +36,18 @@ public class MessageLoader {
*
* @param key
* the string used to get the bundle value, must not be null
+ * @param arg
+ * @return formatted string
*/
public static String getFormattedString(String key, Object arg) {
- return MessageFormat.format(getString(key), new Object[] { arg });
+ return MessageFormat.format(getString(key), new Object[] {arg});
}
/**
* Gets a string from the resource bundle and formats it with arguments
+ * @param key
+ * @param args
+ * @return formatted string.
*/
public static String getFormattedString(String key, Object[] args) {
return MessageFormat.format(getString(key), args);
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/hyperlink/ECFGenericHyperlink.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/hyperlink/ECFGenericHyperlink.java
index 276c86e9f..73581491c 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/hyperlink/ECFGenericHyperlink.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/hyperlink/ECFGenericHyperlink.java
@@ -29,7 +29,7 @@ public class ECFGenericHyperlink extends AbstractURLHyperlink {
* Creates a new URL hyperlink.
*
* @param region
- * @param urlString
+ * @param uri
*/
public ECFGenericHyperlink(IRegion region, URI uri) {
super(region, uri);

Back to the top