[ https://issues.apache.org/jira/browse/NETBEANS-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825049#comment-16825049 ]
mck edited comment on NETBEANS-888 at 4/24/19 11:49 AM: -------------------------------------------------------- The stacktrace for choosing an menuItem under {{RecentProjects}} is {code} at org.netbeans.modules.project.ui.actions.RecentProjects$MenuItemActionListener.actionPerformed(RecentProjects.java:219) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369) at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:129) at java.desktop/java.awt.MenuItem.processActionEvent(MenuItem.java:690) at java.desktop/java.awt.MenuItem.processEvent(MenuItem.java:649) at java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:375) at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:363) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:139) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) {code} The stacktrace for {{RecentFileAction}} doesn't make it through the {{MenuComponent.dispatchEventImpl(..)}} call as the following code in {{MenuItem}} returns false {code} boolean eventEnabled(AWTEvent e) { if (e.id == ActionEvent.ACTION_PERFORMED) { if ((eventMask & AWTEvent.ACTION_EVENT_MASK) != 0 || actionListener != null) { return true; } return false; } return super.eventEnabled(e); } {code} This method returns {{true}} for {{RecentProjects}} because the {{actionListener}} exists. It is of type {{ScreenMenuItem}}, with its {{fMenuItem}} field of type {{RecentProjects$1}} that's created here: https://github.com/apache/incubator-netbeans/blob/release110/ide/projectui/src/org/netbeans/modules/project/ui/actions/RecentProjects.java#L151 was (Author: michaelsembwever): Under these conditions the {{java.awt.event.ActionEvent}} passes through {{java.awt.EventQueue}} without being handled. See https://hg.openjdk.java.net/jdk/jdk11/file/1ddf9a99e4ad/src/java.desktop/share/classes/java/awt/EventQueue.java#l765 The method argument {{src}} is of class {{com.apple.laf.ScreenMenuItem}} and is a subclass of {{MenuComponent}}. The stacktrace for choosing an menuItem under {{RecentProjects}} is {code} at org.netbeans.modules.project.ui.actions.RecentProjects$MenuItemActionListener.actionPerformed(RecentProjects.java:219) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369) at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:129) at java.desktop/java.awt.MenuItem.processActionEvent(MenuItem.java:690) at java.desktop/java.awt.MenuItem.processEvent(MenuItem.java:649) at java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:375) at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:363) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:139) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) {code} The stacktrace for {{RecentFileAction}} doesn't make it through the {{MenuComponent.dispatchEventImpl(..)}} call as the following code in {{MenuItem}} returns false {code} boolean eventEnabled(AWTEvent e) { if (e.id == ActionEvent.ACTION_PERFORMED) { if ((eventMask & AWTEvent.ACTION_EVENT_MASK) != 0 || actionListener != null) { return true; } return false; } return super.eventEnabled(e); } {code} This method returns {{true}} for {{RecentProjects}} because the {{actionListener}} exists. It is of type {{ScreenMenuItem}}, with its {{fMenuItem}} field of type {{RecentProjects$1}} that's created here: https://github.com/apache/incubator-netbeans/blob/release110/ide/projectui/src/org/netbeans/modules/project/ui/actions/RecentProjects.java#L151 > Open Recent file not working > ---------------------------- > > Key: NETBEANS-888 > URL: https://issues.apache.org/jira/browse/NETBEANS-888 > Project: NetBeans > Issue Type: Bug > Components: ide - UI > Affects Versions: 9.0, 10.0, 11.0 > Environment: MacOS High Sierra version 10.13.4 > MacOS Mojave 10.14.4 > JDK 11 > Reporter: Javier A. Ortiz > Priority: Major > > Clicking on File>Open Recent File>File doesn't open the file but using the > shortcut for the most recent one works. > No error or suspecting messages in the log either. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists