RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v16]

Oliver Kopp duke at openjdk.org
Wed Apr 24 07:48:35 UTC 2024


On Tue, 23 Apr 2024 20:23:40 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> tests/system/src/test/java/test/com/sun/glass/ui/win/WinTextRangeProviderTest.java line 28:
>> 
>>> 26: 
>>> 27: import com.sun.javafx.PlatformUtil;
>>> 28: import com.sun.glass.ui.win.WinTextRangeProviderShim;
>> 
>> this generates an error in Eclipse (the project dependencies must be fixed)
>> 
>> 
>> Description	Resource	Path	Location
>> The import com.sun.glass.ui.win cannot be resolved	WinTextRangeProviderTest.java	/systemTests-test/java/test/com/sun/glass/ui/win	line 28
>
> Please replace tests/system/src/test/.classpath with this:
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> 	<classpathentry combineaccessrules="false" kind="src" path="/swing">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 		</attributes>
> 	</classpathentry>
> 	<classpathentry combineaccessrules="false" kind="src" path="/base">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 			<attribute name="add-exports" value="javafx.base/com.sun.javafx=ALL-UNNAMED:javafx.base/test.util.memory=ALL-UNNAMED"/>
> 		</attributes>
> 	</classpathentry>
> 	<classpathentry combineaccessrules="false" kind="src" path="/graphics">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 			<attribute name="add-exports" value="javafx.graphics/com.sun.glass.ui=ALL-UNNAMED:javafx.graphics/com.sun.glass.ui.monocle=ALL-UNNAMED:javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED:javafx.graphics/com.sun.prism.impl=ALL-UNNAMED:javafx.graphics/com.sun.javafx.image.impl=ALL-UNNAMED:javafx.graphics/com.sun.glass.events=ALL-UNNAMED:javafx.graphics/com.sun.javafx.application=ALL-UNNAMED:javafx.graphics/com.sun.javafx.css=ALL-UNNAMED:javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED:javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED:javafx.graphics/com.sun.glass.ui.mac=ALL-UNNAMED:javafx.graphics/com.sun.glass.ui.win=ALL-UNNAMED:javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED:javafx.graphics/com.sun.javafx.text=ALL-UNNAMED:javafx.graphics/com.sun.javafx.font=ALL-UNNAMED"/>
> 		</attributes>
> 	</classpathentry>
> 	<classpathentry combineaccessrules="false" kind="src" path="/controls">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 			<attribute name="add-exports" value="javafx.controls/test.com.sun.javafx.scene.control.infrastructure=ALL-UNNAMED:javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED"/>
> 		</attributes>
> 	</classpathentry>
> 	<classpathentry combineaccessrules="false" kind="src" path="/fxml">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 		</attributes>
> 	</classpathentry>
> 	<classpathentry combineaccessrules="false" kind="src" path="/web">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 			<attribute name="add-exports" value="javafx.web/com.sun.webkit=ALL-UNNAMED"/>
> 		</attributes>
> 	</classpathentry>
> 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
> 		<attributes>
> 			<attribute name="module" value="true"/>
> 			<attribute name="add-exports" value="java.desktop/sun.awt.datatransfer=ALL-UNNAMED"/>
> 		</attributes>
> 	...

Done.

I opened the project in Eclipse (instead of IntelliJ). How can I run the test in Eclipse?

A simple "run" does not work, because the output is then:


WARNING: Unknown module: javafx.base specified to --patch-module
WARNING: Unknown module: javafx.web specified to --patch-module
WARNING: Unknown module: javafx.controls specified to --patch-module
WARNING: Unknown module: javafx.graphics specified to --patch-module


How do I need to modify the JUnit "run configuration" inside Eclipse?

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1442#discussion_r1577436180


More information about the openjfx-dev mailing list