Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restoring editor fires TextEditActivity #7

Open
dpp-gerrit opened this issue Jul 1, 2009 · 2 comments
Open

Restoring editor fires TextEditActivity #7

dpp-gerrit opened this issue Jul 1, 2009 · 2 comments
Labels
Area: Eclipse Issue affecting Saros for Eclipse (Saros/E)

Comments

@dpp-gerrit
Copy link

When an editor needed to be restored, somehow an TextEditActivity that contained the whole file content was fired. This is no appropriate behaviour because we only want to get notified about activities that were triggered by the user.

DEBUG 17:05:46 (EditorAPI.java:273) IWorkbenchPage.getEditorReferences() returned IEditorPart which needs to be restored: TestA.java
DEBUG 17:05:48 (TextEditCollector.java:108) Recieved chars written from You (whitespaces omitted): 108 [package de.fu_berlin.saros;\n\npublic class TestA {\n\t\/\/ empty asdf asas\n\t\n\t\n\t\n\tpublic String toString() {\n\t\treturn \"I am the SimpleTest\";\n\t}\n}\n]

Reported by: nobody

Original Ticket: dpp/bugs/259

@dpp-gerrit
Copy link
Author

The problem might be the one central IDocumentListener, that collects the document events and hands it to EditorManager#textAboutToBeChanged. At this point, we don't know anymore to which path or editor input the changed document belongs.

It would be better if every IDocument would get its own listener that knows path and editor input.

Original comment by: *anonymous

@dpp-gerrit
Copy link
Author

To clarify the problem:

When a TextEditActivity is fired for an editor restore, this activity would be send to all other participants as well, causing them to have the file contents twice which would result in an inconsistency.

Original comment by: *anonymous

@dpp-gerrit dpp-gerrit self-assigned this Mar 27, 2018
@dpp-gerrit dpp-gerrit removed their assignment Mar 27, 2018
@m273d15 m273d15 added Area: Eclipse Issue affecting Saros for Eclipse (Saros/E) and removed Eclipse Integration labels Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Eclipse Issue affecting Saros for Eclipse (Saros/E)
Projects
None yet
Development

No branches or pull requests

3 participants