AlexeyDmitriev / JHelper

GNU Lesser General Public License v3.0
119 stars 31 forks source link

focus was switched to the first task in the list after a task deleted #124

Open GoBigorGoHome opened 4 years ago

GoBigorGoHome commented 4 years ago

I think there should be an option to disable such default behavior, because it is distracting.

AlexeyDmitriev commented 4 years ago

The editor automatically switches when some run configuration is chosen. (and vice versa when you open some file correct run configuration is chosen). Are you proposing to disable this behaviour completely?

PS: I don't quite get while it's distracting because when you delete configuration, the file gets deleted as well, so some other will be focused anyway

GoBigorGoHome commented 4 years ago

Tasks are listed chronologically i.e. the latest added task is the last one in the list. Usually, the first tasks in the list are not the ones one is working on and not opened in the editor. It is not resonable to switch focus to the first task in the list and open it in editor if it is not opened at the time. task-list

GoBigorGoHome commented 4 years ago

PS: I don't quite get while it's distracting because when you delete configuration, the file gets deleted as well, so some other will be focused anyway

But it is not resonable to switch to the first task in the list. An alternative is to switch

  1. to any task open in editor, or
  2. to the last task in the list if no task is open in editor, or
  3. to Build All if task list is empty.
AlexeyDmitriev commented 4 years ago

I think it depends on the use case. As for me (person who almost never have tasks for upsolving after the next context), what happens quite often: I just created task for a new problem and I see that there's number of problems I no longer care about, so I want to remove them all. In that case for me your suggestion will make things only harder (probably only open file as well as the last task) is one I care about, so I will need to choose the task to delete each time.

Also I don't really like any complex logic there.

One option to proceed I see is to choose next configuration in the list -- it will work for deletion AND will less likely open old problem you don't care about. Also one option is to temporarily disable files auto-opening but I don't think it's a good idea (1. it's a dependency of two currently independent subsystem, 2. it makes harder opening the correct file if you want it)