Merge "Issue #2865 - added more null and dispose checks" into development

Former-commit-id: 6380c83d55 [formerly 6d02134d89] [formerly ae63879ddf] [formerly 6380c83d55 [formerly 6d02134d89] [formerly ae63879ddf] [formerly 36f72f23dc [formerly ae63879ddf [formerly 5c21cbb43cda9274a77b2358749ba53b397ef0e1]]]]
Former-commit-id: 36f72f23dc
Former-commit-id: c68de2cde1 [formerly 2e127e20eb] [formerly 3b6c997b64c9324be5f2db8be91ce169da136a9f [formerly d7fc7f791d]]
Former-commit-id: 2d48a8c746b38e90cb3aa4006caf4afff503d429 [formerly 8d909c1b14]
Former-commit-id: d5a9ae9d79
This commit is contained in:
Lee Venable 2014-03-11 17:43:48 -05:00 committed by Gerrit Code Review
commit 3a2d97c2e9
3 changed files with 20 additions and 9 deletions

View file

@ -90,7 +90,7 @@ import com.raytheon.viz.ui.views.CaveFloatingView;
* Feb 24, 2014 2632 mpduff Moved sound generation code to CollaborationUtils
* Mar 06, 2014 #2865 lvenable Fixed font memory leaks added SWT dispose checks when
* running in an asynchronous thread.
*
* Mar 11, 2014 #2865 lvenable Added null checks for msgArchive.
* </pre>
*
* @author rferrel
@ -446,7 +446,9 @@ public abstract class AbstractSessionView<T extends IUser> extends
}
// Archive the message
msgArchive.archive(sb.toString());
if (msgArchive != null) {
msgArchive.archive(sb.toString());
}
// Append the text to the search control.
if (searchComp.isDisposed() == false) {
@ -636,7 +638,9 @@ public abstract class AbstractSessionView<T extends IUser> extends
}
// Archive the message
msgArchive.archiveLine(builder.toString());
if (msgArchive != null) {
msgArchive.archiveLine(builder.toString());
}
// Append the text to the search control.
if (searchComp.isDisposed() == false) {

View file

@ -98,6 +98,7 @@ import com.raytheon.viz.ui.input.EditableManager;
* Feb 19, 2014 2751 bclement add change color and transfer leader icons
* Mar 06, 2014 2751 bclement moved users table refresh logic to refreshParticipantList()
* Mar 06, 2014 2848 bclement moved colormanager update code to session container
* Mar 11, 2014 #2865 lvenable Added null checks in threads
*
* </pre>
*
@ -546,7 +547,9 @@ public class CollaborationSessionView extends SessionView implements
VizApp.runAsync(new Runnable() {
@Override
public void run() {
usersTable.refresh();
if (usersTable.getTable().isDisposed() == false) {
usersTable.refresh();
}
}
});
}
@ -556,7 +559,9 @@ public class CollaborationSessionView extends SessionView implements
VizApp.runAsync(new Runnable() {
@Override
public void run() {
usersTable.refresh();
if (usersTable.getTable().isDisposed() == false) {
usersTable.refresh();
}
}
});
}
@ -839,8 +844,7 @@ public class CollaborationSessionView extends SessionView implements
VizApp.runAsync(new Runnable() {
@Override
public void run() {
if (usersTable != null
&& !usersTable.getTable().isDisposed()) {
if (usersTable != null && !usersTable.getTable().isDisposed()) {
refreshParticipantList();
}
sendParticipantSystemMessage(event.getNewLeader(),

View file

@ -108,6 +108,7 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
* to participantArrived.
* Mar 06, 2014 2751 bclement moved users table refresh logic to refreshParticipantList()
* Mar 06, 2014 2848 bclement get venueName directly from session
* Mar 11, 2014 #2865 lvenable Added null checks in threads
*
* </pre>
*
@ -646,7 +647,9 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
participantPresenceUpdated(participant, presence);
break;
case UPDATED:
usersTable.refresh();
if (usersTable.getTable().isDisposed() == false) {
usersTable.refresh();
}
if (description != null) {
sendParticipantSystemMessage(participant, description);
}
@ -661,7 +664,7 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
/**
* get an updated list of participants from session and refresh usersTable
*/
protected void refreshParticipantList(){
protected void refreshParticipantList() {
IVenue venue = session.getVenue();
Collection<VenueParticipant> participants = venue.getParticipants();
if (session.isAdmin()) {