This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Here's an example (generated by code at the end of this note. The selection number is bigger than the number of rows in the table. rows=34 min=42 max=42 anchor=42 lead=42, empty=false, adjusting=false The expandPath is called by an action on a popup menu on the node. In ETable.changeSelectionInModel, "rowsInView" is 42, which is impossible. The bogus values are introduced during: "AWT-EventQueue-0" javax.swing.DefaultListSelectionModel.insertIndexInterval(DefaultListSelectionModel.java:584) org.netbeans.swing.etable.ETableSelectionModel.insertIndexInterval(ETableSelectionModel.java:59) javax.swing.JTable.tableRowsInserted(JTable.java:4459) javax.swing.JTable.tableChanged(JTable.java:4395) org.netbeans.swing.etable.ETable.tableChanged(ETable.java:1242) org.netbeans.swing.outline.Outline.tableChanged(Outline.java:879) org.netbeans.swing.outline.EventBroadcaster.fireTableChange(EventBroadcaster.java:221) org.netbeans.swing.outline.EventBroadcaster.fireTableChange(EventBroadcaster.java:247) org.netbeans.swing.outline.EventBroadcaster.treeExpanded(EventBroadcaster.java:522) org.netbeans.swing.outline.TreePathSupport.fireTreeExpansion(TreePathSupport.java:157) org.netbeans.swing.outline.TreePathSupport.expandPath(TreePathSupport.java:113) org.netbeans.swing.outline.Outline.expandPath(Outline.java:611) com.raelity.logman.ui.LogOutlinePanel$PopupListener.makeVisible(LogOutlinePanel.java:759) com.raelity.logman.ui.LogPopupMouseListener.expandSubtree(LogPopupMouseListener.java:412) com.raelity.logman.ui.LogPopupMouseListener.expandSubtree(LogPopupMouseListener.java:410) com.raelity.logman.ui.LogPopupMouseListener$ExpandAction.actionPerformed(LogPopupMouseListener.java:402) === output generated by: System.err.format("updateSelectedPath: rows=%d min=%d max=%d" + " anchor=%d lead=%d, empty=%b, adjusting=%b\n", outline.getRowCount(), lsm.getMinSelectionIndex(), lsm.getMaxSelectionIndex(), lsm.getAnchorSelectionIndex(), lsm.getLeadSelectionIndex(), lsm.isSelectionEmpty(), lsm.getValueIsAdjusting());
Forgot to say... Single selection mode. Every call to expand path produces an out of bounds selection, no matter the expand/collapse state of all the various nodes in the tree.
It looks like this might be a problem of the layout, which translates paths to the row number. We'd need some more detailed description or better a test case to be able to have a better insight into this problem. The event passed to tableChanged() is TableModelEvent.INSERT, which is constructed at EventBroadcaster.java:689 in method private TableModelEvent translateEvent (TreeExpansionEvent e, boolean expand) firstRow is set to getLayout().getRowForPath(path) + 1, therefore if it's too big, it's a problem of the layout. Where is the output code placed? This is not clear from the report.