Skip to content
Snippets Groups Projects
Commit 8993661b authored by Oliver Rieger's avatar Oliver Rieger
Browse files

concurrent control mechanism initiated.

parent b968a405
Branches
Tags
No related merge requests found
......@@ -110,7 +110,7 @@ public class TextEditActivity implements IActivity {
if(obj instanceof TextEditActivity){
TextEditActivity other = (TextEditActivity) obj;
return offset == other.offset &&
editor.equals(other.editor) &&
(editor != null && other.editor != null && editor.equals(other.editor)) &&
text.equals(other.text) &&
replace == other.replace ;
}
......
......@@ -357,7 +357,7 @@ public class EditorManager implements IActivityProvider, ISharedProjectListener
if (!isDriver)
return;
TextEditActivity newAct = new TextEditActivity(offset, text, replace);
TextEditActivity newAct = new TextEditActivity(offset, text, replace,activeDriverEditor);
/* check if text edit activity is executed by other driver activity recently. */
//TODO: check scenario of concurrent edit in same position.
if(newAct.sameLike(currentExecuteActivity)){
......
......@@ -218,9 +218,9 @@ public class SharedProject implements ISharedProject {
* @see de.fu_berlin.inf.dpp.ISharedProject
*/
public boolean isDriver() {
if(activitySequencer.getConcurrentManager() != null){
return activitySequencer.getConcurrentManager().isDriver(driver);
}
// if(activitySequencer.getConcurrentManager() != null){
// return activitySequencer.getConcurrentManager().isDriver(driver);
// }
return driver.getJid().equals(myID);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment