Selecting a subset using the context menu on rightclick leaves all currently highlighted subsets highlighted and adds the one on which the user clicked.
I think this behavior was intentionally introduced to allow the right click on more than a single subset für multi-subset-operations like diff, setminus, union, etc. The Key problem to allow also the selection of new subset by right clicking was, that some uperations require an order or a reference subset (e.g. setminus depends on the input order). The reference subset (e.g. the subset all other subsets are substracted from) is always the subset one is clicking on.
Do you still see this behavior as problematic? In this case: Please give a workflow it breakts. Maybe we can find a workaround in for it. Another option would be to require the user to hold shift or ctrl while right clicking.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem here is that subsets successively get highlighted even though there is no
intended operation on them, plus it then looks weird.
For the set operation, why can't we use good old leftclick, which works fine?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The question here is: What happens if you right click on an unselected subset and choose an operation that requires a reference subset becuase the operation is not commutative (e.g. subsetminus).
Possible Solutions:
grey out all non-commutative operations
deselect all other subsets and only select the current subset
I think the second solution is also used in various file managers and threrefore aligns with the users expectations / might be preferable over the first one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
reopening, in the current version i was able to produce the follwing exception. After the exception was thrown, the sidebar behaves strange. E.g. it allowed multisubsetoperation on a single subset (some other deselected subset was choosen), or i was unable to right click on an not previously selected subset.
The Exception:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at edu.udo.scaffoldhunter.gui.SubsetTree$1.mouseClicked(SubsetTree.java:131)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
at java.awt.Component.processMouseEvent(Component.java:6519)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4501)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for picking that up. How did you create this, I cannot reproduce it?
A minor issue is that the selection is agnostic of the previous selection state, i.e. when an operation is executed with a right click, the set stays selected, if the operation is aborted the set is unselected.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The exception occured, if someone manages to have no subset selected and then perform a right-click. This is fixed in revision [2096a6]. The problem with set operations on a single subset occured, because the currently selected subsets were stored as list, not as set. If a single subset was added twice, the context menu allowed the set operations, be cause it "thought" more than one subset was selected. This is also fixed by in mentioned version.
If the popup menu is cancelled, then the clicked subst was deselected, even it was selected before the right-click. Should be fixed with revision [ea191b].
This seems to work fine now, as intended. Thanks!
I think this behavior was intentionally introduced to allow the right click on more than a single subset für multi-subset-operations like diff, setminus, union, etc. The Key problem to allow also the selection of new subset by right clicking was, that some uperations require an order or a reference subset (e.g. setminus depends on the input order). The reference subset (e.g. the subset all other subsets are substracted from) is always the subset one is clicking on.
Do you still see this behavior as problematic? In this case: Please give a workflow it breakts. Maybe we can find a workaround in for it. Another option would be to require the user to hold shift or ctrl while right clicking.
The problem here is that subsets successively get highlighted even though there is no
intended operation on them, plus it then looks weird.
For the set operation, why can't we use good old leftclick, which works fine?
The question here is: What happens if you right click on an unselected subset and choose an operation that requires a reference subset becuase the operation is not commutative (e.g. subsetminus).
Possible Solutions:
I think the second solution is also used in various file managers and threrefore aligns with the users expectations / might be preferable over the first one.
Ok, lets go for solution 2.
Revision [872a92] contains solution 2.
Related
Commit: [872a92]
Looks like the issue is resolved. I checked for a couple of operations, all of which seemed to work as expected.
reopening, in the current version i was able to produce the follwing exception. After the exception was thrown, the sidebar behaves strange. E.g. it allowed multisubsetoperation on a single subset (some other deselected subset was choosen), or i was unable to right click on an not previously selected subset.
The Exception:
Thanks for picking that up. How did you create this, I cannot reproduce it?
A minor issue is that the selection is agnostic of the previous selection state, i.e. when an operation is executed with a right click, the set stays selected, if the operation is aborted the set is unselected.
The exception occured, if someone manages to have no subset selected and then perform a right-click. This is fixed in revision [2096a6]. The problem with set operations on a single subset occured, because the currently selected subsets were stored as list, not as set. If a single subset was added twice, the context menu allowed the set operations, be cause it "thought" more than one subset was selected. This is also fixed by in mentioned version.
Related
Commit: [2096a6]
reopening: sometimes a selection is removed by right click
steps to reproduce:
result:
the second subset gets deselected after clicking the frist subset
If the popup menu is cancelled, then the clicked subst was deselected, even it was selected before the right-click. Should be fixed with revision [ea191b].
Related
Commit: [ea191b]
looks good now