Menu

#196 Subset Sidebar: right click adds subset to highlighted subsets

2.6.0
closed
None
3
2016-02-11
2015-10-16
No

Selecting a subset using the context menu on rightclick leaves all currently highlighted subsets highlighted and adds the one on which the user clicked.

Discussion

  • Till Schäfer

    Till Schäfer - 2015-10-19
    • status: open --> needs-info
     
    • Karsten Klein

      Karsten Klein - 2015-12-20

      This seems to work fine now, as intended. Thanks!

       
  • Till Schäfer

    Till Schäfer - 2015-10-19

    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.

     
  • Karsten Klein

    Karsten Klein - 2015-10-20

    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?

     
  • Till Schäfer

    Till Schäfer - 2015-10-21

    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:

    1. grey out all non-commutative operations
    2. 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.

     
  • Till Schäfer

    Till Schäfer - 2015-10-21
    • summary: Subset highlighting on selection --> Subset Sidebar: right click adds subset to highlighted subsets
     
  • Till Schäfer

    Till Schäfer - 2015-11-10

    Ok, lets go for solution 2.

     
  • Till Schäfer

    Till Schäfer - 2015-11-10
    • status: needs-info --> open
     
  • Sven Schrinner

    Sven Schrinner - 2015-12-17

    Revision [872a92] contains solution 2.

     

    Related

    Commit: [872a92]

  • Sven Schrinner

    Sven Schrinner - 2015-12-17
    • status: open --> needs-review
    • Related To: -->
    • Group: any future version --> cdk update release
     
  • Karsten Klein

    Karsten Klein - 2015-12-20

    Looks like the issue is resolved. I checked for a couple of operations, all of which seemed to work as expected.

     
  • Karsten Klein

    Karsten Klein - 2015-12-20
    • status: needs-review --> closed
     
  • Till Schäfer

    Till Schäfer - 2015-12-21
    • status: closed --> in-progress
     
  • Till Schäfer

    Till Schäfer - 2015-12-21

    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)
    
     
  • Karsten Klein

    Karsten Klein - 2015-12-22

    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.

     
  • Sven Schrinner

    Sven Schrinner - 2015-12-27

    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]

  • Sven Schrinner

    Sven Schrinner - 2015-12-27
    • status: in-progress --> needs-review
     
  • Till Schäfer

    Till Schäfer - 2016-01-04
    • status: needs-review --> open
     
  • Till Schäfer

    Till Schäfer - 2016-01-04

    reopening: sometimes a selection is removed by right click

    steps to reproduce:

    • select 3 subsets (it also works with two, but 3 makes clear what is happening here)
    • right click on the second one
    • right click on the first one

    result:
    the second subset gets deselected after clicking the frist subset

     
  • Sven Schrinner

    Sven Schrinner - 2016-01-04

    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]

  • Sven Schrinner

    Sven Schrinner - 2016-01-04
    • status: open --> needs-review
     
  • Till Schäfer

    Till Schäfer - 2016-01-04
    • status: needs-review --> closed
     
  • Till Schäfer

    Till Schäfer - 2016-01-04

    looks good now

     

Log in to post a comment.

MongoDB Logo MongoDB