-
Notifications
You must be signed in to change notification settings - Fork 504
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
8306021: Add event handler management to EventTarget #1090
Conversation
👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into |
If we proceed with this, we will need a CSR that documents the incompatibilities that are mentioned in the thread on openjfx-dev. /reviewers 3 |
@kevinrushforth |
@kevinrushforth has indicated that a compatibility and specification (CSR) request is needed for this pull request. @mstr2 please create a CSR request for issue JDK-8306021 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
This PR assumes that changing the first method signature to the second is a binary-compatible change:
To verify this, I've created the following test: import java.util.function.Consumer;
// Test.java
public class Test {
public static <T> void test(Consumer<T> c) {
System.out.println("it works");
}
}
// Main.java
public class Main {
public static void main(String[] args) {
Consumer<String> c = param -> {};
Test.test(c);
}
} Note that |
Webrevs
|
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 checked everything, and didn't see any problems; looks good!
I've reverted a change that caused a unit test failure. |
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.
Looks good overall.
modules/javafx.base/src/main/java/javafx/event/EventTarget.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/main/java/javafx/event/EventTarget.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/TableColumnBase.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/TableColumnBase.java
Outdated
Show resolved
Hide resolved
Looks good to me too! Maybe we can also add some parameterized tests. Not necessary needed for this ticket but probably a good idea to do still. |
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 think this is a logical change.
Limited testing on Mac shows no ill effects.
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.
LGTM
I think CSR needs to be out of Draft status to move this PR along. |
I changed the status to Proposed. |
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.
The spec looks fine except for a few missing @since
tags that need to be restored, a suggestion on adding @implSpec
(from Joe), and a couple unrelated doc changes that should be reverted. See inline.
As for the implementation, the event handling methods in the Dialog
and Tab
classes are new (although they just delegate to an existing instance of EventHandlerManager
). Would it be possible to provide a test?
modules/javafx.graphics/src/main/java/javafx/concurrent/Service.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/concurrent/Task.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/transform/Transform.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/TableColumn.java
Outdated
Show resolved
Hide resolved
modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableColumn.java
Outdated
Show resolved
Hide resolved
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.
Looks good. I'll Review the CSR and then you can Finalize it.
@mstr2 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 59 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 614dc55.
Your commit was automatically rebased without conflicts. |
This PR adds the following methods to the
EventTarget
interface:addEventHandler
removeEventHandler
addEventFilter
removeEventFilter
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1090/head:pull/1090
$ git checkout pull/1090
Update a local copy of the PR:
$ git checkout pull/1090
$ git pull https://git.openjdk.org/jfx.git pull/1090/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1090
View PR using the GUI difftool:
$ git pr show -t 1090
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1090.diff
Webrev
Link to Webrev Comment