Giter Club home page Giter Club logo

vocabhunter's Introduction

VocabHunter

Build Status Code Coverage SonarCloud Latest Release Twitter Follow

VocabHunter

VocabHunter is a system to help learners of foreign languages. The best place to go for information about VocabHunter is the project website: vocabhunter.github.io.

To get all the latest news about VocabHunter including announcements of new releases, follow @vocabhunterapp on Twitter.

VocabHunter

Prerequisites

You will need Java 17 (or above) to build and run VocabHunter. The version provided by Adoptium is an excellent choice for this. Everything else, including Gradle, will be downloaded by the build process.

How To Run VocabHunter

Go to the download page of the website to get the latest release of VocabHunter. Alternatively, you can run the development version from the command line as follows:

./gradlew :gui:run

How to Use VocabHunter

Do you want to use VocabHunter to help you to learn a foreign language? You'll find everything you need to know to get you started in the guide How to Use VocabHunter.

How To Build VocabHunter

You can build the entire system with the following command:

./gradlew clean build

How To Run The GUI Test

By default the GUI test runs as part of the standard Gradle build, in headless mode. If you'd like to run the GUI test in a non-headless mode so that you can see what is happening, use the following command:

./gradlew :gui:test --tests io.github.vocabhunter.gui.main.GuiTest --rerun-tasks -PnoHeadless

How to Build The Installable Bundle

Installable Java Apps with jpackage

In the article Installable Java Apps with jpackage you can read about how installable bundles for Mac, Windows and Linux are created and how you can do this in your own project. These self-contained installers allow users to setup VocabHunter on their computer without the need to first install Java.

You can also find full, step-by-step instructions for creating the VocabHunter installable bundle in PACKAGING.md.

Technical Articles

If you'd like to know more about how VocabHunter works and the technologies used to build it, take a look at the following articles that explore various aspects of the implementation:

  • Read (Almost) Any Document in Java (VocabHunter Blog) - VocabHunter uses Apache Tika to read documents in a wide variety of formats ranging from Microsoft Word through to PDF. This article explains how it is done.
  • How JavaFX was used to build a desktop application (King Tech Blog) - A detailed look at several important features of JavaFX using VocabHunter as an example.
  • Migrating to JUnit 5 (VocabHunter Blog) - How the VocabHunter project was updated to use JUnit 5 for testing. This article explains the changes that were made, the problems that were encountered and how they were solved.
  • Dependency Injection in JavaFX (VocabHunter Blog) - How Gluon Ignite and Google Guice are used for the Dependency Injection in VocabHunter.
  • User Interface Testing with TestFX (VocabHunter Blog) - A guide to automating user interface tests using TestFX. VocabHunter includes a complete automated GUI test suite and here you can learn how it works.
  • Building a JavaFX Search Bar (VocabHunter Blog) - How the user interface for the VocabHunter search bar works with details of the use of ControlsFX in giving the bar a distinctive style.
  • VocabHunter – A tool for learners of foreign languages (King Tech Blog) - An introduction to some of the technologies being used in VocabHunter.

VocabHunter

vocabhunter's People

Contributors

adamcarroll avatar fibrefox avatar ypid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vocabhunter's Issues

Linux package creation licence warning

Building the .deb file on Linux results in a warning about a missing licence:

$ ./gradlew jfxNative
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :package:jfxNative 
Debian packages should specify a license.  The absence of a license will cause some linux distributions to complain about the quality of the application.
This bundler might take some while longer than expected.
For details about this, please go to: https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_Why_is_dpkg_so_slow_when_using_new_filesystems_such_as_btrfs_or_ext4.3F

VocabHunter is Open Source software under the Apache 2.0. licence and so it should be possible to include the licence file and avoid this problem.

JDK 8 FontAwesomeFX doesn't work on JDK 9

Running the JDK 8 version of FontAwesomeFX on JDK 9 doesn't work. There is a special version of FontAwesomeFX for JDK 9 but it isn't backward compatible. This special version is included in the JDK9 VocabHunter branch.

PMD Generates Incremental Analysis Warning

Running the VocabHunter build generates multiple warnings from PMD about incremental analysis. The following example shows a quick way to generate one of these warnings:

$ ./gradlew clean :core:pmdMain

> Task :core:pmdMain 
This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/pmd-6.0.1/pmd_userdocs_getting_started.html#incremental-analysis


BUILD SUCCESSFUL in 10s
8 actionable tasks: 3 executed, 5 up-to-date

There doesn't seem to be a way to fix the Gradle build to avoid the warning.

Read CSV format filter files

VocabHunter allows users to filter out lists of words that they already know. These lists can come in the form of text documents (read using Apache Tika) or Excel spreadsheets with one or more columns of words (read using Apache POI). It should also be possible to read CSV format filter files.

Ideally this should be implemented using a standard Open Source CSV reader component. The key interface for this work is TextGrid.

See also: #21

Headless tests don't work in OpenJDK

Running the headless GUI tests in the OpenJDK produces the following error that doesn't occur with the Oracle JDK:

io.github.vocabhunter.gui.main.GuiTest > classMethod FAILED
    java.lang.RuntimeException: java.lang.RuntimeException: java.lang.AbstractMethodError: com.sun.glass.ui.monocle.NativePlatform.createInputDeviceRegistry()Lcom/sun/glass/ui/monocle/InputDeviceRegistry;
        at org.testfx.util.WaitForAsyncUtils.waitFor(WaitForAsyncUtils.java:161)
        at org.testfx.api.FxToolkit.waitForLaunch(FxToolkit.java:264)
        at org.testfx.api.FxToolkit.registerPrimaryStage(FxToolkit.java:126)
        at io.github.vocabhunter.gui.main.GuiTest.setupSpec(GuiTest.java:90)

        Caused by:
        java.lang.RuntimeException: java.lang.AbstractMethodError: com.sun.glass.ui.monocle.NativePlatform.createInputDeviceRegistry()Lcom/sun/glass/ui/monocle/InputDeviceRegistry;

            Caused by:
            java.lang.AbstractMethodError: com.sun.glass.ui.monocle.NativePlatform.createInputDeviceRegistry()Lcom/sun/glass/ui/monocle/InputDeviceRegistry;

This was tested on Ubuntu 16.04 with OpenJDK v1.8.0_91.

The Linux installation doesn't work without a hack

After installing the Linux version of the system from the .deb file it is necessary to make a change to a configuration file for the system to run.

The work around for now is to include the following hack in the installation instructions for Linux:

$ sudo sed -i "s|app.runtime=.*|app.runtime=$JAVA_HOME|g" /opt/VocabHunter/app/VocabHunter.cfg

Include Install Bundle Creation in Travis CI Build

The Travis CI build should include the Gradle jfxbundle task for the main Linux build. At the moment this is not possible as the install bundle creation fails in Travis. My guess is that the Travis Linux image does not include the dpkg-deb package that according to the following document is required:

https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html

This package is not whitelisted by Travis and therefore cannot be installed. I have requested the whitelisting here:

travis-ci/apt-package-safelist#2726

This request did not work as a result of not having the source package. I have requested this here:

travis-ci/apt-source-safelist#258

Problem opening a session file on the Mac

On the Mac, if the VocabHunter application is not open when the user double clicks on a session file (.wordy file) the VocabHunter application opens as you would expect but the program doesn't open the session. Note that this problem only occurs if the application is not open when the user double clicks on a session file. If VocabHunter is already open then there is no problem and the session opens perfectly.

I've created a question on Stack Overflow about this here: http://stackoverflow.com/questions/34569389.

Create an export dialogue

There are currently two export options: “Export Selection” and “Export Selection Without Notes”. The first exports a tab-separated value file containing the words marked as “unknown” with any notes in a column to the right of the words. The second of these excludes any notes. These two options should be replaced with a single option to bring up an export dialogue. The dialogue should include these options along with the option to select any combination of the words marked as “known”, “unknown” or “unseen”. This will allow, for example, a user who wants to export new vocabulary that they want to learn to a flashcard program by selecting the option for “unknown” words but leaving “known” and “unseen” unselected. A user wanting a list of all of the vocabulary, regardless of whether they know the words would select all three options: “known”, “unknown” and “unseen”.

As Discussed with @AdamCarroll in #41

Allow the user to copy the current word to the clipboard

Add a menu item in the “Words” menu to allow the user to copy a word to the system clipboard. There should also be a keyboard shortcut, Control-C (or Command-C on the Mac) to perform the same action. The option should only be available when a session is open.

As Discussed with @AdamCarroll in #41

Update packaging to use JDK 16

The version of VocabHunter currently on the master branch is bundled with JDK 11 using an external tool. This needs to be switched to use the jpackage supplied with JDK 16. This work is now underway in the JDK-16 branch of the VocabHunter project.

Cycling Progress Bar Doesn't work on JDK 11

When starting new sessions, saving sessions etc, VocabHunter displays a cycling progress bar in the bottom right hand corner to show the user that something is happening. This progress bar does not appear when running the version on the JDK 9 branch of VocabHunter.

JDK 8 ControlsFX doesn't work on JDK 9

Running the JDK 8 version of ControlsFX on JDK 9 doesn't work. There is a special version of ControlsFX for JDK 9 but it isn't backward compatible. This special version is included in the JDK9 VocabHunter branch.

Investigate grouping related words using language-aware deep text analysis

Words such as “look”, “looks” and “looking” in English could all be grouped together to avoid the user having to examine each individually. A similar situation exists in other languages, for example in Spanish “puedo”, “puedes” and “poder” are all forms of the same verb. It would be interesting to investigate how a deeper textual analysis could be used to achieve this and then how this could be incorporated into VocabHunter.

As Discussed with @AdamCarroll in #41

Packaging fails under JDK 9

The packager fails on JDK 9 in the experimental JDK 9 branch. To reproduce the problem, checkout the branch and run the following command:

$ ./gradlew clean build jfxNative

On a Mac this fails to create the DMG file:

* Where:
Build file '/Users/adam/Documents/IntelliJ/wordy/package/build.gradle' line: 113

* What went wrong:
Execution failed for task ':package:checkBundle'.
> Unable to create bundle file 'VocabHunter-1.0.0.dmg'

Note that this problem only applies to JDK 9. On JDK 8 on the master branch there is no problem.

The session file icon doesn't work on Linux

The .deb installation bundle for Linux should include an icon for the file association. After installing from the .deb bundle the file association itself works perfectly: you can double-click a .wordy file and open VocabHunter. The problem is that the .wordy files don't show the corresponding icon.

The icon for session files works as expected on Mac and on Windows.

I've asked for help on this in this question on StackOverflow.

Display the note frame directly

The note textbox requires a mouse click to activate. I think it should be edited directly, without clicking on that icon.

Gradle application plugin installDist is missing JavaFX dependencies

Running the installDist Gradle task should produce a directory containing a binary that can be run from the command line. However, the bundle appears to be missing the JavaFX dependencies:

$ ./gradlew clean installDist

> Configure project :gui
Project :gui => no module-info.java found

BUILD SUCCESSFUL in 3s
13 actionable tasks: 9 executed, 4 up-to-date
$ gui/build/install/VocabHunter/bin/VocabHunter
Error: JavaFX runtime components are missing, and are required to run this application

Support web searches for current word

Issue Description: Add a feature to open the web browser to lookup the current word on the user’s chosen reference site. For example, if the user has chosen Word Reference searches in English and the current word is “Java" then the browser would open on the page https://www.wordreference.com/definition/java. This would be achieved by inserting the current word into the URL of the form https://www.wordreference.com/definition/${word}. We will need a way to allow the user to select their reference website of choice, perhaps from a pre-defined list of options.

As Discussed with @AdamCarroll in #41

Couple of Enhancements Requests

First of All, thanks a lot for this GREAT tool I use it heavily to learn new languages.

I am proposing some enhancements to the tool that could make it way better and useful.
I Know that each one should have it's own issue but I Think we need to talk about them first and create new issues going forward depending on there feasibility & how easy are they to be implemented.

  • Copy the word: If I don't know a word and i need to check i have to rewrite the whole word again in the dictionary, this is very time consuming when we talk about thousands of words this feature will allow me to just copy & past.
  • Search in a dictionary: It would be even better to click on a button and i got all the possible meanings to this word from something like google translate or Cambridge dictionary.
  • Add New document Feature: In this Feature user can click on "Add New document" and it will add the words in this document to the current file.
  • Export All: A Feature to Export Known & Unknown words to CSV to use outside of the tool.
  • Detect duplicate Plural words: sometimes i got the same word twice singular & plural.
  • Detect verbs ending with ing: sometimes i got the same word twice because of that too.

Add New document Feature

The use-case for this feature is for example a user clicked on "New" and chose PDF document vocab1.pdf to be analyzed then he saved the session to .wordy file and after marking all the document in this file as known or unknown he want to add more words.
This feature can enable any user to add more documents to the .wordy file for example add vocab2.pdf unique words that don't already marked as known or unknown before.

As Discussed with @AdamCarroll in #41

ExcelGridReaderTest fails on windows

The ExcelGridReaderTest fails on Windows:

java.io.IOException: Unable to delete file: C:\Users\vagrant\AppData\Local\Temp\ExcelGridReaderTest8673434925888313721\test.xls
	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2400)
	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1721)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1617)
	at io.github.vocabhunter.test.utils.TestFileManager.cleanup(TestFileManager.java:48)
	at io.github.vocabhunter.analysis.grid.ExcelGridReaderTest.tearDown(ExcelGridReaderTest.java:31)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:628)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:117)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeMethodInExtensionContext(ClassTestDescriptor.java:439)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$16(ClassTestDescriptor.java:431)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$10(TestMethodTestDescriptor.java:227)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$14(TestMethodTestDescriptor.java:245)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:243)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachMethods(TestMethodTestDescriptor.java:226)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:102)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:82)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:78)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy5.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.base/java.lang.Thread.run(Thread.java:834)

Upgrading to JavaFX v16 causes the headless GUI test to fail

If I change the JavaFX version in JavaFX plugin from v13.0.2 to v15.0.1, the headless GUI test fails:

$ ./gradlew :gui:test --tests io.github.vocabhunter.gui.main.GuiTest --info
...
    INFO  STEP 9: Begin - Write note and add to word
    INFO  STEP 9:   End - Write note and add to word
    INFO  STEP 10: Begin - Open note with keyboard

Gradle Test Executor 53 finished executing tests.

> Task :gui:test FAILED

GuiTest > testWalkThrough(FxRobot) FAILED
    org.testfx.service.query.EmptyNodeQueryException: there is no node in the scene-graph matching the query: NodeQuery: from nodes: [BorderPane@389a5b93[styleClass=root]],
    lookup by function: "org.testfx.util.NodeQueryUtils$$Lambda$679/0x0000000800631840@6203ffa1",
    lookup by selector: "#textAreaNoteText"
        at org.testfx.service.query.impl.NodeQueryImpl.query(NodeQueryImpl.java:132)
        at org.testfx.api.FxAssert.toNode(FxAssert.java:168)
        at org.testfx.api.FxAssert.verifyThat(FxAssert.java:71)
        at io.github.vocabhunter.gui.main.GuiTestSteps.lambda$part2BasicWalkThrough$9(GuiTestSteps.java:107)
        at io.github.vocabhunter.gui.main.GuiTestSteps.step(GuiTestSteps.java:385)
        at io.github.vocabhunter.gui.main.GuiTestSteps.part2BasicWalkThrough(GuiTestSteps.java:105)
        at io.github.vocabhunter.gui.main.GuiTest.testWalkThrough(GuiTest.java:160)

1 test completed, 1 failed
...
BUILD FAILED in 20s
10 actionable tasks: 2 executed, 8 up-to-date

Apache Tika Generates Warning Output

When reading documents, Apache tika generates warning output. For example:

Dec 09, 2017 11:45:02 AM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: JBIG2ImageReader not loaded. jbig2 files will be ignored
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.
TIFFImageWriter not loaded. tiff files will not be processed
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.
J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

Dec 09, 2017 11:45:03 AM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: org.xerial's sqlite-jdbc is not loaded.
Please provide the jar on your classpath to parse sqlite files.
See tika-parsers/pom.xml for the correct version.

It should be possible to disable this as image reading etc. is not required for VocabHunter.

GUI walkthrough test in build takes over the main display

The build includes a GUI walkthrough test and when this runs it takes over the main display, moving the mouse pointer to click on the the various controls. At least when this is run from the build script, this should run in a "headless" manner so as not bother the person running the build. This should also make it possible to build the software in automated build environments such as Jenkins and Travis.

VocabHunter uses TestFX for the GUI walkthrough test. It looks like this tool can be run in a headless mode. This should be investigated to see if it can be configured for the build script. Ideally, the GUI walkthrough test should continue to work as normal (i.e. in a visual way) when run from an IDE to make it easier to debug problems.

The system forgets the last used window position

When the user has moved the window to a new position or has changed the positions of the "curtains" (the lines that divide the sections of the GUI), this information is lost when the user next starts the application. To solve this, the information should be stored in the settings.json file. If possible, this should also record the last screen for the application where the user has more than one screen attached to the system.

Note that the settings.json file and the associated serialisation mechanism already exists. The system should use the existing default values if there are no settings stored for window size etc.

ePub reading sometimes lets formatting through

When reading a document into VocabHunter you shouldn't ever see any of the original document formatting information, regardless of the original format. However for some ePub files, formatting information appears, as if it were a part of the original text. For example if you analyse the ePub file for "Don Quijote de la Mancha" downloaded from the following site you will see the problem:

http://www.literanda.com/don-quijote-de-la-mancha--miguel-de-cervantes--epub

It seems that the problem also occurs if you open the file directly with the Apache Tika stand-alone app.

This problem occurs with Apache Tika 1.14.

Headless GUI Test Fails on Windows

The headless GUI test that works on Mac and Linux, fails on Windows. If instead the build is launched with the -PnoHeadless, the build works without problems.

This was tested with OpenJDK 11.0.2 (AdoptOpenJDK) on Windows 10. The error is as follows:

C:\Users\vagrant\Desktop\GitRepos\VocabHunter>gradlew :gui:test --tests io.github.vocabhunter.gui.main.GuiTest

> Task :gui:test
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa34584879, pid=2644, tid=3040
#
# JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
# Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, serial gc, windows-amd64)
# Problematic frame:
# C  [javafx_font.dll+0x4879]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\vagrant\Desktop\GitRepos\VocabHunter\gui\hs_err_pid2644.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-build/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Unexpected exception thrown.
org.gradle.internal.remote.internal.MessageIOException: Could not write '/127.0.0.1:50886'.
        at org.gradle.internal.remote.internal.inet.SocketConnection.flush(SocketConnection.java:135)
        at org.gradle.internal.remote.internal.hub.MessageHub$ConnectionDispatch.run(MessageHub.java:325)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
        at java.base/sun.nio.ch.SocketDispatcher.write0(Native Method)
        at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
        at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113)
        at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:58)
        at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:50)
        at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:466)
        at org.gradle.internal.remote.internal.inet.SocketConnection$SocketOutputStream.writeWithNonBlockingRetry(SocketConnection.java:273)
        at org.gradle.internal.remote.internal.inet.SocketConnection$SocketOutputStream.writeBufferToChannel(SocketConnection.java:261)
        at org.gradle.internal.remote.internal.inet.SocketConnection$SocketOutputStream.flush(SocketConnection.java:255)
        at org.gradle.internal.remote.internal.inet.SocketConnection.flush(SocketConnection.java:133)
        ... 7 more

> Task :gui:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gui:test'.
> Process 'Gradle Test Executor 2' finished with non-zero exit value 1
  This problem might be caused by incorrect test process configuration.
  Please refer to the test execution section in the User Manual at https://docs.gradle.org/5.2.1/userguide/java_testing.html#sec:test_execution

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 31s
10 actionable tasks: 1 executed, 9 up-to-date

Integrate OSX Travis CI Build

The main Travis CI build is for Linux (see the build here). This should be updated to include an OSX build as well. The branch travis-osx contains a draft verson of the config required for this.

Handle newlines and spaces in note

When I want to add a note, I look up a dictionary. There can be multiple lines in an entry in a dictionary. I hope that the program can convert a newline and its following spaces to a semicolon and a space (or other characters). This can save a lot of time.

Feature Request: Add Notes to Words

Hi,

I apologize if this is not the place to ask questions or make comments. I have never used github before and I have just opened an account.

First, thank you so much for making this app. I am learning French at the moment and it is helping out so much. I have no programming knowledge, yet. But I hope to learn to make something as I am learning Java.

Anyway, I wanted to make a feature request. Apologies if this is not the place, but I couldn't find an email to reach you at. I would like if the text I marked unknown and known had a small text box under it to make notes or add comments. I have added a screenshot to show what it would look like. Thank you.

screenshot-app

There is no installation bundle for Windows

There are now installation bundles for Mac and Linux (.dmg and .deb files respectively) but there is nothing other than the .zip file for Windows. The packaging should be updated to support the generation of .exe installers for Windows.

building project with java 14

I downloaded the project and ran the createBundle task with java 14 successfully but it makes no jar.
I can run the project using gradle run with no problem.
java 14 has the jpackage tool officially but it has got some changes. for example the name has been changed from jpackager to jpackage so I had to change name in build.gradle and pass the -DJpackagerPath.

Read Open Office format filter files

VocabHunter allows users to filter out lists of words that they already know. These lists can come in the form of text documents (read using Apache Tika) or Excel spreadsheets with one or more columns of words (read using Apache POI). It should also be possible to read Open Office format filter files.

Ideally this should be implemented using a standard Open Source Open Office reader component. The key interface for this work is TextGrid.

See also: #20

Open other then .wordy document throws exception

Hi Adam,

I downloaded the zip VocabHunter-1.0.15.

I see that 'Open' should used for loading a saved session. But I see that it's possible to choose the option All Files (*.*) in the FileChooser. So I give it a try 😄 .

I try to load a xy.log file, here the program throws an exception about the extention unknown extention: .log and loading a xy.properties throws the following exception (see the attached file).

I think if no other then a .wordy document can be open with the Open button then the FileChooser shouldn't have the option to choose All Files (*.*).

Greetings
Peter

exception.txt

Use javafx-gradle plugin

In the gui project you could use the javafx-gradle-plugin (see link, or openjfx gradle samples) to simplify dealing with the JavaFX modules.

You could remove javafxCompile, and just use something like:

plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.7'
}

javafx {
    modules = ['javafx.controls', 'javafx.fxml']
}

run {
    jvmArgs += ['--add-exports', 'javafx.base/com.sun.javafx.runtime=ALL-UNNAMED']
}

TestFX Gradle dependency needs to be modified for JDK 9

On the VocabHunter master branch the dependencies on TestFX are specified as follows:

testCompile 'org.testfx:testfx-core:4.0.10-alpha'
testRuntime 'org.jfxtras:openjfx-monocle:1.8.0_20'

However to get the build working on the JDK branch it was necessary to modify this as follows:

testCompile('org.testfx:testfx-core:4.0.10-alpha') {
    exclude group: 'org.testfx', module: 'testfx-internal-java8'
}
testRuntime 'org.testfx:testfx-internal-java9:4.0.10-alpha'
testRuntime 'org.testfx:openjfx-monocle:jdk-9+181'

Ideally, the same build would work both for JDK 8 and for JDK 9.

Open .properties file shows the content in one sentence not in xy sentence

Hi Adam,

I downloaded the zip VocabHunter-1.0.15 and tried to create a New session with the option All Files (*.*) to load a xy.properties file.

Loading can be done, but I see that the engine doesn't split the content from the .properties file into xy sentence. So I see in the application when I selected a word a really long sentence.

So I think if
a) A .properties file isn't supported, then a dialog should shows this information,
b) if a .properties file is okay, then the parser? should split the content from the file (lines) into sentences.

Greetings
Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.