Comments (16)
@Jugen Ok, I will try.
from richtextfx.
I don't think there is.
from richtextfx.
@Jugen But RichTextFx supports insert mode. So, as I understand, there must be some variable that keeps information about current mode. Maybe this variable should be made public as a ReadOnlyProperty?
from richtextfx.
Ahh you are right, it's in GenericStyledAreaBehavior (see line 306) but currently a private boolean.
Unfortunately there's currently no reference to GenericStyledAreaBehavior in GenericStyledArea (see line 819).
Anyway it looks like a straightforward type of change, would you like to submit a PR for this ?
from richtextfx.
@Jugen Could you say how I should build the project - I don't see it in readme. Should all tests be passed? When I do ./gradlew build -x test
I get errors in integration tests
from richtextfx.
Executing gradle clean build
in the root folder of the project should work, and finish with no errors.
from richtextfx.
@Jugen This is what I have (using gradle 7.0.2):
pavel@home:~/Temp/RichTextFX$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
pavel@home:~/Temp/RichTextFX$ javac -version
javac 11.0.2
pavel@homel:~/Temp/RichTextFX$ /opt/gradle-7.0.2/bin/gradle clean build
> Configure project :richtextfx
Project :richtextfx => no module-info.java found
> Configure project :richtextfx-demos
Project :richtextfx-demos => no module-info.java found
> Task :richtextfx:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :richtextfx:javadoc
warning: The code being documented uses packages in the unnamed module, but the packages defined in https://openjfx.io/javadoc/11/ are in named modules.
/home/pavel/Temp/RichTextFX/richtextfx/src/main/java/org/fxmisc/richtext/CaretNode.java:77: warning: Duplicate comment for property.
@Override public ObjectProperty<javafx.util.Duration> blinkRateProperty() { return blinkRate; }
^
Remove the comment on the property field or on this method to suppress this warning.
2 warnings
> Task :richtextfx:compileTestJava
Note: /home/pavel/Temp/RichTextFX/richtextfx/src/test/java/org/fxmisc/richtext/model/ParagraphTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :richtextfx:test FAILED
org.fxmisc.richtext.model.ParagraphTest > multiStyleParagraphReturnsCorrect_subSequenceOfLength PASSED
org.fxmisc.richtext.model.ParagraphTest > restylingEmptyParagraphViaEmptyStyleSpansWorks PASSED
org.fxmisc.richtext.model.ParagraphTest > restylingEmptyParagraphViaStyleSpansWorks PASSED
org.fxmisc.richtext.model.ParagraphTest > concatEmptyParagraphsTest PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest$Void > initializationError FAILED
org.junit.runners.model.InvalidTestClassError: Invalid test class 'org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest$Void':
1. The class org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest$Void is not public.
2. Test class should have exactly one public constructor
3. No runnable methods
at org.junit.runners.ParentRunner.validate(ParentRunner.java:525)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:102)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:84)
at org.junit.runners.JUnit4.<init>(JUnit4.java:23)
at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:10)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:78)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:121)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:1583)
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testNegativeOffsetWithBackwardBias PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testRightBoundary PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testNegativeOffsetWithForwardBias PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testZeroOffsetWithBackwardBias PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testZeroOffsetWithForwardBias PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testLeftBoundary PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testPositiveOffsetWithBackwardBias PASSED
org.fxmisc.richtext.model.TwoLevelNavigatorTest > testPositiveOffsetWithForwardBias PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest > deleteNewlineTest PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest > testUndo PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest > testMultiParagraphFromSegment PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentTest > testRestyle PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testGetTextWithEndAfterNewline PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testSetNonEmptyParagraphStyle PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testSetEmptyParagraphStyle PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testGetStyleRangeAtPosition PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testUnixParagraphCount PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testWinDocumentLength PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testConsistencyOfLengthWithText PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testConsistencyOfTextWithLength PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testMacParagraphCount PASSED
org.fxmisc.richtext.model.SimpleEditableStyledDocumentTest > testWinParagraphCount PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > adding_multiple_styled_segment_single_paragraph_works PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > adding_single_segment_single_styleSpans_single_paragraph_works PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > adding_single_segment_single_style_single_paragraph_works PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > adding_single_segment_list_single_styleSpans_single_paragraph_works PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > using_a_builder_more_than_once_throws_exception PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > adding_single_segment_single_style_without_par_style_paragraph_list_works PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > adding_single_segment_single_style_with_par_style_paragraph_list_works PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > attempting_to_build_ReadOnlyStyledDocument_using_empty_paragraph_list_throws_exception PASSED
org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilderTest > creating_paragraph_with_different_segment_and_style_length_throws_exception PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_new_subscriber_when_list_has_contents_does_not_fire_change_event PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_and_removing_element_fires_change_event PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_subscriber_before_content_is_added_will_subscribe_to_changes_when_item_is_added PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_new_subscriber_when_list_has_contents_does_not_fire_invalidation_event PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_subscriber_and_later_removing_it_will_unsubscribe_from_all_elements PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_subscriber_after_content_is_added_will_subscribe_to_changes PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_and_removing_element_fires_invalidation_event PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > removing_item_from_list_will_stop_subscription PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest > adding_subscriber_and_removing_it_will_not_throw_exception PASSED
org.fxmisc.richtext.util.SubscribeableContentsObsSetTest$BoxedProperty > initializationError FAILED
java.lang.IllegalArgumentException: Test class can only have one constructor
at org.junit.runners.model.TestClass.<init>(TestClass.java:48)
at org.junit.runners.JUnit4.<init>(JUnit4.java:23)
at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:10)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:78)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:121)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:1583)
----------------------------------------------------------------------
| Results: FAILURE (46 tests, 44 successes, 2 failures, 0 skipped) |
----------------------------------------------------------------------
46 tests completed, 2 failed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':richtextfx:test'.
> There were failing tests. See the report at: file:///home/pavel/Temp/RichTextFX/richtextfx/build/reports/tests/test/index.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 9s
11 actionable tasks: 10 executed, 1 up-to-date
from richtextfx.
I'm using gradle 7.5.1, try that and see ....
from richtextfx.
@Jugen This is what I have with 7.5.1
pavel@home:~/Temp/RichTextFX$ /opt/gradle-7.5.1/bin/gradle clean build
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '/home/pavel/Temp/RichTextFX/settings.gradle' (/home/pavel/.gradle/caches/7.5.1/scripts/4nnxgv2xm5g3ijvzdb1znhc8v).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 596ms
from richtextfx.
Try setting the JAVA_HOME
environment variable.
I think it's something like: export JAVA_HOME="path to JDK 11 root"
from richtextfx.
@Jugen Thank you for your help, but I still can't build it:
pavel@home:~/Temp/RichTextFX$ /opt/gradle-7.5.1/bin/gradle -Dorg.gradle.java.home=/opt/jdk-11.0.2 clean build
> Configure project :richtextfx
Project :richtextfx => no module-info.java found
> Configure project :richtextfx-demos
Project :richtextfx-demos => no module-info.java found
> Task :richtextfx:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :richtextfx:javadoc
javadoc: error - The code being documented uses packages in the unnamed module, but the packages defined in https://openjfx.io/javadoc/11/ are in named modules.
1 error
> Task :richtextfx:javadoc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':richtextfx:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/home/pavel/Temp/RichTextFX/richtextfx/build/tmp/javadoc/javadoc.options'
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
7 actionable tasks: 6 executed, 1 up-to-date
from richtextfx.
Okay, just submit your PR and I'll check it my side.
from richtextfx.
I finally built it. What I did:
In root build.gradle I added:
subprojects {
.....
tasks.withType(Javadoc).all { enabled = false }
}
After that
$ /opt/gradle-7.5.1/bin/gradle -Dorg.gradle.java.home=/opt/jdk-11.0.2 clean build
Although the next IT failed:
AcceleratorsTests. typing_alt_control_combinations_dont_consume_events_if_they_dont_have_any_character_assigned
PageUpDownTests. page_down_leaves_caret_at_BOTTOM_of_viewport_when_LAST_line_IS_visible
PageUpDownTests. page_down_leaves_caret_at_TOP_of_viewport_when_LAST_line_NOT_visible
PageUpDownTests. page_up_leaves_caret_at_BOTTOM_of_viewport_when_FIRST_line_NOT_visible
PageUpDownTests. page_up_leaves_caret_at_TOP_of_viewport_when_FIRST_line_IS_visible
PageUpDownTests. shift_page_down_leaves_caret_at_top_of_viewport_and_makes_selection
PageUpDownTests. shift_page_up_leaves_caret_at_bottom_of_viewport_and_makes_selection
MultiLineGridlikeTextTests$When_Shortcut_And_Shift_Pressed. end_selects_up_to_the_end_of_current_paragraph
MultiLineGridlikeTextTests$When_Shortcut_And_Shift_Pressed. home_selects_up_to_the_start_of_current_paragraph
MultiLineJaggedTextTests. pressing_down_moves_caret_to_next_line
SingleLineTests$When_Shortcut_And_Shift_Pressed. left_once_selects_up_to_left_boundary_of_current_word
SingleLineTests$When_Shortcut_And_Shift_Pressed. left_twice_selects_up_to_start_boundary_of_previous_word
SingleLineTests$When_Shortcut_And_Shift_Pressed. right_once_selects_up_to_right_boundary_of_current_word
SingleLineTests$When_Shortcut_And_Shift_Pressed. right_twice_selects_up_to_end_boundary_of_next_word
from richtextfx.
Well done. Interesting those tests pass on Windows but fail on Linux/MacOs ?
from richtextfx.
@Jugen I've opened a PR. What about IT - I don't know. I've not used Windows OS for a long time. What about the javadoc problem I had, maybe this topic can be useful - https://stackoverflow.com/questions/58836862/jdk-11-and-javadoc
from richtextfx.
Thanks for the feedback, will have a look.
from richtextfx.
Related Issues (20)
- Question: codeArea.removeSelection delayed display HOT 1
- CodeArea seems to intercept the input method, preventing it from being passed to other TextFields.
- Remove null character at end of pasted string
- JDK8 project HOT 1
- Question: is it possible to disable scrolling to bottom on appending text? HOT 2
- Question: How to set background color for current line/paragraph using CSS? HOT 4
- Question: How to make wave underline? HOT 4
- Question: What is the strategy to implement Highlight All for found matches for modifiable text? HOT 5
- Question: Getting font size of the CodeArea HOT 3
- Question: when to use StyleSpans? HOT 8
- Bug: Observer is not removed from richChanges() HOT 3
- Question: how to get real size of one span at position X? HOT 15
- Code building fails on Ubuntu HOT 19
- How to remove all styles from undo text? HOT 4
- How to convert absolute position to paragraph/column position? HOT 1
- Question: is textArea.getLength() equal to the number of Unicode code points HOT 5
- Bug: text area removes selection on text append HOT 10
- Selected color with alpha add extra colors HOT 3
- How to select text and move caret to the beginning of the selection? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richtextfx.