diff options
| author | slewis | 2005-06-18 23:07:41 +0000 |
|---|---|---|
| committer | slewis | 2005-06-18 23:07:41 +0000 |
| commit | 53513dc28c2b8e6e04574e62c0138ae8d1dd624c (patch) | |
| tree | eb9d478f4ebdfd01dac116910897dcc7eed8c6e4 | |
| parent | c53866c7d902754febf6c8eee94a7af16bc0000e (diff) | |
| download | org.eclipse.ecf-53513dc28c2b8e6e04574e62c0138ae8d1dd624c.tar.gz org.eclipse.ecf-53513dc28c2b8e6e04574e62c0138ae8d1dd624c.tar.xz org.eclipse.ecf-53513dc28c2b8e6e04574e62c0138ae8d1dd624c.zip | |
Fixes for compiler warnings
17 files changed, 57 insertions, 85 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 0e652a537..ebfc53519 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 @@ -176,7 +176,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements public String getLocalFullProjectPath() { String eclipseDir = null; - String result = null; try { eclipseDir = Platform.getLocation().toOSString(); } catch (Exception e) { @@ -209,7 +208,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements protected LineChatClientView getOutputWindow() { final String pn = (localProject == null || localProject.getName().trim().equals("")) ? "<workspace>" : localProject .getName(); - final String projectName = pn; final String init = INIT_TEXT + pn + "\n\n"; Display.getDefault().syncExec(new Runnable() { public void run() { @@ -363,7 +361,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements if (sender == null || name == null) throw new NullPointerException("sender or proxyClass is null"); // loadClass and create instance if possible - EclipseProjectComponent ec = null; try { checkRegisterProxyPolicy("deregister", sender, name); } catch (SecurityException e) { @@ -401,7 +398,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements protected void handleUserMessage(final User sender, String msg) { // Show line on local interface - final String username = sender.getNickname(); final String message = msg; if (sender == null) return; @@ -456,8 +452,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements if (localGUI != null) { line.setText("Connecting to " + remote.getName()); - String name = remote.getName(); - localGUI.showLine(line); } crs.joinGroup(remote, data); diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java index e36ba0aa5..cd35e31ab 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java @@ -21,7 +21,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Display; public class EclipseMessage extends GenericSharedObject { - public static final Trace trace = Trace + public static final Trace emtrace = Trace .create("eclipsemessagesharedobject"); String message; String sender; @@ -37,21 +37,21 @@ public class EclipseMessage extends GenericSharedObject { } protected void trace(String msg) { - if (Trace.ON && trace != null) { - trace.msg(msg); + if (Trace.ON && emtrace != null) { + emtrace.msg(msg); } } protected void traceDump(String msg, Throwable e) { - if (Trace.ON && trace != null) { - trace.dumpStack(e, msg); + if (Trace.ON && emtrace != null) { + emtrace.dumpStack(e, msg); } } - public void init(ISharedObjectConfig config) + public void init(ISharedObjectConfig soconfig) throws SharedObjectInitException { - super.init(config); - Map aMap = config.getProperties(); + super.init(soconfig); + Map aMap = soconfig.getProperties(); Object[] args = (Object[]) aMap.get("args"); if (args != null && args.length == 2) { this.message = (String) args[0]; @@ -74,8 +74,8 @@ public class EclipseMessage extends GenericSharedObject { .getName(), map, replicateID++); } - protected void showMessage(final String message, final String sender) { - final String msg = sender + " says '" + message + "'"; + protected void showMessage(final String m, final String s) { + final String msg = sender + " says '" + m + "'"; try { if (!getContext().isGroupManager()) { Display.getDefault().syncExec(new Runnable() { diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java index 47ec825e8..9ddbb5af6 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java @@ -100,9 +100,9 @@ public class GenericSharedObject implements ISharedObject { public void destroySelfLocal() { try { - ISharedObjectConfig config = getConfig(); - if (config != null) { - ID myID = config.getSharedObjectID(); + ISharedObjectConfig soconfig = getConfig(); + if (soconfig != null) { + ID myID = soconfig.getSharedObjectID(); ISharedObjectContext context = getContext(); if (context != null) { ISharedObjectManager manager = context.getSharedObjectManager(); @@ -195,8 +195,8 @@ public class GenericSharedObject implements ISharedObject { } public ISharedObjectContext getContext() { - ISharedObjectConfig config = getConfig(); - if (config != null) return config.getContext(); + ISharedObjectConfig soconfig = getConfig(); + if (soconfig != null) return soconfig.getContext(); else return null; } @@ -204,16 +204,16 @@ public class GenericSharedObject implements ISharedObject { return config; } protected ID getHomeContainerID() { - ISharedObjectConfig config = getConfig(); - if (config != null) { - return config.getHomeContainerID(); + ISharedObjectConfig soconfig = getConfig(); + if (soconfig != null) { + return soconfig.getHomeContainerID(); } else return null; } public ID getID() { - ISharedObjectConfig config = getConfig(); - if (config != null) { - return config.getSharedObjectID(); + ISharedObjectConfig soconfig = getConfig(); + if (soconfig != null) { + return soconfig.getSharedObjectID(); } else return null; } @@ -226,10 +226,10 @@ public class GenericSharedObject implements ISharedObject { } protected SharedObjectDescription getReplicaDescription(ID receiver) { - ISharedObjectConfig config = getConfig(); - if (config != null) { + ISharedObjectConfig soconfig = getConfig(); + if (soconfig != null) { return new SharedObjectDescription(getID(), getClass().getName(), - config.getProperties(), replicateID++); + soconfig.getProperties(), replicateID++); } else return null; } diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java index ad831f157..c90230626 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java @@ -14,11 +14,10 @@ package org.eclipse.ecf.example.collab.share; import org.eclipse.ecf.core.events.RemoteSharedObjectEvent; import org.eclipse.ecf.core.identity.ID; -/** - * - */ public class RemoteSharedObjectMsgEvent extends RemoteSharedObjectEvent { - /** + private static final long serialVersionUID = -7198080945310388254L; + + /** * @param senderObj * @param remoteCont * @param data diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TestEclipseSessionComponent.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TestEclipseSessionComponent.java index 17c9e1819..88cfd9cd7 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TestEclipseSessionComponent.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TestEclipseSessionComponent.java @@ -34,10 +34,10 @@ public class TestEclipseSessionComponent implements EclipseProjectComponent { return null; } - public void register(EclipseProject obj, final User requestor) + public void register(EclipseProject obj, final User r) throws Exception { this.repobj = obj; - this.requestor = requestor; + this.requestor = r; showMsg("Registration request from " + requestor.getNickname() + ". ID: " + requestor.getUserID(), "EclipseProjectComponent '" + this.getClass().getName() diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java index 0dcaf377f..3950317f6 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java @@ -21,7 +21,7 @@ import org.eclipse.ecf.example.collab.Trace; public class TransactionSharedObject extends GenericSharedObject implements ISharedObjectContainerTransaction { - static Trace trace = Trace.create("transactionsharedobject"); + static Trace tsotrace = Trace.create("transactionsharedobject"); // If the "replicaCommit" method name is changed, the name of this variable should // change @@ -51,8 +51,8 @@ public class TransactionSharedObject extends GenericSharedObject implements ISha } protected void traceDump(String msg, Throwable t) { - if (Trace.ON && trace != null) { - trace.dumpStack(t, msg); + if (Trace.ON && tsotrace != null) { + tsotrace.dumpStack(t, msg); } } protected void init() @@ -65,8 +65,8 @@ public class TransactionSharedObject extends GenericSharedObject implements ISha } public void activated(ID [] others) { - if (Trace.ON && trace != null) { - trace.msg("activated() on "+getID()); + if (Trace.ON && tsotrace != null) { + tsotrace.msg("activated() on "+getID()); } // No other state changes while this is going on synchronized (lock) { diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java index 7361b71fe..b86d846e5 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java @@ -15,6 +15,7 @@ import java.io.Serializable; public class TreeItem implements Serializable { + private static final long serialVersionUID = -1223990714505395727L; public static final String DEFAULT_SEPARATOR = ": "; protected String label; protected String labelValue; @@ -85,8 +86,8 @@ public class TreeItem implements Serializable { } public String toString() { - String labelValue = getLabelValue(); - if (labelValue == null || labelValue.equals("")) { + String lv = getLabelValue(); + if (lv == null || lv.equals("")) { return getLabel(); } else return getLabel() + getSeparator() + getLabelValue(); diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/User.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/User.java index c6711036a..647c89853 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/User.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/User.java @@ -18,6 +18,7 @@ import org.eclipse.ecf.core.identity.ID; public class User implements Serializable { + private static final long serialVersionUID = -9164887171441293342L; protected Vector userFields; protected ID userID; protected String nickname; 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 30a651565..d80cf10e5 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 @@ -32,6 +32,8 @@ import org.eclipse.swt.widgets.Display; public class EclipseFileTransfer extends FileTransferSharedObject implements FileTransferListener { + private static final long serialVersionUID = -4496151870561737078L; + FileSenderUI senderUI; ID eclipseStageID; @@ -144,7 +146,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements public void receiveStart(FileTransferSharedObject obj, File aFile, long length, float rate) { - final FileReceiver r = new FileReceiver(obj, aFile, length, rate); + final FileReceiver r = new FileReceiver(aFile, length, rate); Display.getDefault().syncExec(new Runnable() { public void run() { if (r != null) r.run(); @@ -174,8 +176,6 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements // participants in // the transaction. If so, we throw. if (failedParticipants != null && failedParticipants.size() > 0) { - ID remoteID = (ID) failedParticipants.keys().nextElement(); - Exception e = (Exception) failedParticipants.get(remoteID); // In this case, we're going to go ahead and continue anyway return true; // Abort! @@ -193,13 +193,11 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements } private class FileReceiver implements Runnable { - private FileTransferSharedObject obj = null; private File aFile = null; private long length; private float rate; - public FileReceiver(FileTransferSharedObject obj, File aFile, long length, float rate) { - this.obj = obj; + public FileReceiver(File aFile, long length, float rate) { this.aFile = aFile; this.length = length; this.rate = rate; @@ -211,7 +209,6 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements boolean isServer = false; if (ClientPlugin.getDefault().getPluginPreferences().getBoolean(ClientPlugin.PREF_CONFIRM_FILE_RECEIVE)) { - Display d = ClientPlugin.getDefault().getActiveShell().getDisplay(); MessageDialog dialog = new MessageDialog(ClientPlugin.getDefault().getActiveShell(), "File Receive Confirmation", null, "Accept file?", MessageDialog.QUESTION, null , 0); dialog.setBlockOnOpen(true); int response = dialog.open(); diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java index 430cdbbfb..7bf87ca21 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java @@ -23,7 +23,8 @@ import org.eclipse.swt.widgets.Display; public class EclipseFileTransferAndLaunch extends EclipseFileTransfer { - public EclipseFileTransferAndLaunch() { + private static final long serialVersionUID = -7524767418102487435L; + public EclipseFileTransferAndLaunch() { } public void sendDone(FileTransferSharedObject obj, Exception e) { diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java index 2f9f9b100..b484ccb39 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java @@ -17,7 +17,8 @@ import java.util.Date; public class FileTransferParams implements Serializable { - protected static int DEFAULT_CHUNK_SIZE = 1024; + private static final long serialVersionUID = -2871056005778727843L; + protected static int DEFAULT_CHUNK_SIZE = 1024; protected static int DEFAULT_WAIT_TIME = 1000; protected static int DEFAULT_FILE_LENGTH = -1; protected static boolean DEFAULT_INCLUDE_SERVER = false; diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java index 9f37dfe64..bea173f67 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java @@ -16,12 +16,10 @@ import java.io.File; import org.eclipse.ecf.example.collab.ClientPlugin; import org.eclipse.help.browser.IBrowser; import org.eclipse.help.internal.browser.BrowserManager; -import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; public class GetExec { private static String DEFAULT_UNIX_BROWSER = "mozilla"; - private static final String EMBEDDED_VALUE = "embedded"; // The flag to display a url. private static final String UNIX_FLAG = ""; @@ -33,7 +31,6 @@ public class GetExec { // The default system browser under windows. private static final String WIN_PATH = "rundll32"; protected static void displayURL(String url, boolean external) { - boolean win32 = SWT.getPlatform().equals("win32"); IBrowser browser = BrowserManager.getInstance() .createBrowser(external); @@ -45,7 +42,6 @@ public class GetExec { } public static String getBrowserExec(String unixBrowser, String url) { boolean windows = isWindowsPlatform(); - String cmd = null; if (windows) return WIN_PATH + " " + WIN_FLAG + " " + url; else { diff --git a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/impl/RosterGroup.java b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/impl/RosterGroup.java index f554e7ba2..1aa21c1cf 100644 --- a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/impl/RosterGroup.java +++ b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/impl/RosterGroup.java @@ -94,7 +94,6 @@ public class RosterGroup implements IRosterGroup { */ public IRosterEntry removeEntry(IRosterEntry entry) { synchronized (entries) { - boolean hasEntry = entries.containsValue(entry); IRosterEntry res = (IRosterEntry) entries.remove(entry.getUserID()); return res; } diff --git a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/dialogs/AddBuddyDialog.java b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/dialogs/AddBuddyDialog.java index f410fcbda..608a5835c 100644 --- a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/dialogs/AddBuddyDialog.java +++ b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/dialogs/AddBuddyDialog.java @@ -53,8 +53,6 @@ public class AddBuddyDialog extends Dialog { gridLayout_2.numColumns = 2; composite.setLayout(gridLayout_2); - final Label label = new Label(composite, SWT.NONE); - final Label label_4 = new Label(composite, SWT.NONE); label_4.setText("<user>@<jabberserver>"); diff --git a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatWindow.java b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatWindow.java index e5bd7fdfd..2d423f34c 100644 --- a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatWindow.java +++ b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatWindow.java @@ -79,14 +79,6 @@ public class ChatWindow extends ApplicationWindow implements IMessageListener { } }; - private final Runnable showImageRunnable = new Runnable() { - public void run() { - Shell shell = getShell(); - if (!shell.isDisposed() && image != null && !image.isDisposed()) - shell.setImage(image); - } - }; - private Flash flash; private class Flash implements Runnable { @@ -244,7 +236,6 @@ public class ChatWindow extends ApplicationWindow implements IMessageListener { }); } public boolean hasFocus() { - boolean result = false; Display.getDefault().syncExec(new Runnable() { public void run() { if (getShell().isDisposed()) diff --git a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/RosterView.java b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/RosterView.java index cb83970a9..b838e12db 100644 --- a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/RosterView.java +++ b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/RosterView.java @@ -356,7 +356,6 @@ public class RosterView extends ViewPart implements IPresenceListener, public String[] getAllGroupNames() { TreeObject[] objs = root.getChildren(); - String[] groups = null; if (objs != null) { List l = new ArrayList(); for (int i = 0; i < objs.length; i++) { @@ -947,11 +946,6 @@ public class RosterView extends ViewPart implements IPresenceListener, }); } - private void showMessage(String message) { - MessageDialog.openInformation(viewer.getControl().getShell(), - "Roster View", message); - } - /** * Passing the focus request to the viewer's control. */ diff --git a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/TextChatComposite.java b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/TextChatComposite.java index 6b3c3563e..2992f1840 100644 --- a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/TextChatComposite.java +++ b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/TextChatComposite.java @@ -309,8 +309,8 @@ public class TextChatComposite extends Composite { StyleRange sr = new StyleRange(); sr.start = startRange; sr.length = sb.length(); - IUser localUser = getLocalUser(); - if (localUser != null && localUser.getID().equals(text.getOriginator().getID())) { + IUser lu = getLocalUser(); + if (lu != null && lu.getID().equals(text.getOriginator().getID())) { sr.foreground = meColor; } else { sr.foreground = otherColor; @@ -361,11 +361,11 @@ public class TextChatComposite extends Composite { protected void sendTextLineInput(String text) { if (inputHandler != null) { - IUser localUser = getLocalUser(); - IUser remoteUser = getRemoteUser(); - if (localUser != null && remoteUser != null) { - inputHandler.inputText(remoteUser.getID(),text); - appendText(new ChatLine(text,localUser)); + IUser lu = getLocalUser(); + IUser ru = getRemoteUser(); + if (lu != null && ru != null) { + inputHandler.inputText(ru.getID(),text); + appendText(new ChatLine(text,lu)); } else { UiPlugin.getDefault().getLog().log(new Status(Status.ERROR,UiPlugin.PLUGIN_ID,100,"Null localUser or remoteUser for textchatcomposite",new NullPointerException())); } @@ -376,10 +376,10 @@ public class TextChatComposite extends Composite { protected void sendStartedTyping() { if (inputHandler != null) { - IUser localUser = getLocalUser(); - IUser remoteUser = getRemoteUser(); - if (localUser != null && remoteUser != null) { - inputHandler.startTyping(remoteUser.getID()); + IUser lu = getLocalUser(); + IUser ru = getRemoteUser(); + if (lu != null && ru != null) { + inputHandler.startTyping(ru.getID()); } else { UiPlugin.getDefault().getLog().log(new Status(Status.ERROR,UiPlugin.PLUGIN_ID,100,"Null localUser or remoteUser for textchatcomposite",new NullPointerException())); } |
