-
Notifications
You must be signed in to change notification settings - Fork 236
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
2+ Views (areas) share the same Model (document) #232
Conversation
…hat uses AreaFactory to construct an area.
…o refer to the same values as before (if they still exist) and to be within the area's bounds when a clone modifies the document
… document so that, when one modifies the underlying document, all of their suspendables are suspended. This insures that their values are always valid and correct.
@@ -446,26 +449,41 @@ public void setStyleCodecs(Codec<S> textStyleCodec, Codec<PS> paragraphStyleCode | |||
* content model | |||
*/ | |||
private final EditableStyledDocument<S, PS> content; | |||
protected final EditableStyledDocument<S, PS> getCloneDocument() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably just call it getDocument()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would but there's already a method with that name (see Line 336).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. What about getContent()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I've updated the method name.
manageSubscription(omniSuspendable.suspendWhen(content.beingUpdatedProperty())) |
Aye... that would be much cleaner. Did you make a new release so I can update the code? |
Yes, I updated the snapshot release ( |
Great. I've had my first run-through it. If |
…ame EditableStyledDocument to be cleaner.
I ported |
No, we need to keep another |
…removed 2 commits ago.
Ah... I see. Fixed it. |
👍 |
2+ Views (areas) share the same Model (document)
Cool 😃 |
So I merged this, but the supported use is limited. For example, if the document is edited from both areas, undo will not work very well. One area's undo will be regarded as a new edit in the other area. It is a complex problem on its own, so for now I would just say that such a use is not supported. |
Dang.... Yeah, that's quite a problem. On another note, when will there be a new mainstream release (meaning, not a snapshot release)? |
I'll open an issue for this as well, just so it's on file. |
I can make a new release as soon as
|
What are the known regressions? Would this include the Undo-related problem mentioned above?
:) What else needs to be done in Flowless and ReactFX before they get their releases? |
I've also noticed a problem in the richtextfx's build.gradle file. It lists UndoFX as a dependency twice: the first, with its transitive dependencies overrules the second, one without transitive dependencies. I've had to comment out the first instance or else I get compile warnings. |
Yeah, the first one should have been deleted when the second one was added. This is a mistake. Anyway, the |
This is the same result of the #231 but with a cleaner commit history.