rvmiller89 / multitype

Eclipse Plug-in for collaborative code editing similar to Google Docs
0 stars 0 forks source link

What to do with editor tabs on Host_Disconnect or Server_Disconnect #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have to figure out what to do.

Original issue reported on code.google.com by rvmille...@gmail.com on 13 Apr 2011 at 10:52

GoogleCodeExporter commented 9 years ago
Making Yeong the leader on this

Original comment by rvmille...@gmail.com on 13 Apr 2011 at 11:34

GoogleCodeExporter commented 9 years ago
======== For Host_Disconnect ===========

I think all you have to add is a call to 
FEUManager.getInstance().editorManager.removeDocumentDueToHostAction(...)
foreach fileid in the sharedFiles hashmap.

ie.

 Iterator<Integer> iter = Activator.getDefault().sharedFiles.keySet().iterator();
 int id;
 while (iter.hasNext())
 {
     // call to removeDocumentDueToHost...
}
// Now clear hashmap and other stuff

====== For Server_Disconnect ==============

Same as above, but call removeDocumentDueToUserInput(...)

foreach fileid in hashmap (with isTabClose = false)

Original comment by rvmille...@gmail.com on 13 Apr 2011 at 11:41

GoogleCodeExporter commented 9 years ago
Actually, nevermind, call 

removeDocumentDueToUserInput(...)

for both cases.  The user doesn't need to be repeatedly shown a dialog saying 
that the host stopped sharing this file.

Original comment by rvmille...@gmail.com on 13 Apr 2011 at 11:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
OKAY, update again:

John's already sending out a Close_host_file foreach fileid upon a 
Host_Disconnect.

So you don't have to do anything special for that case.

But, we should definitely still handle the Server_Disconnect case as described 
above

Original comment by rvmille...@gmail.com on 14 Apr 2011 at 12:02

GoogleCodeExporter commented 9 years ago
Also handle User_Disconnected

... instead of closing all the tabs, just display a dialog saying "You will not 
longer receive updates for these shared files."

Original comment by rvmille...@gmail.com on 14 Apr 2011 at 3:54

GoogleCodeExporter commented 9 years ago

Original comment by rvmille...@gmail.com on 15 Apr 2011 at 1:13