Coder Social home page Coder Social logo

eclipse-plugin-commander's Introduction

Eclipse Commander

Next generation command palette using KAVI interfaces exceeding capabilities of typical sublime like command palettes

Current interfaces provided:

  • Commander - provides interface for selecting and executing all Eclipse commands.
  • Finder - provides interface for selecting and opening workspace resources.


Background

The problem

  • In a very large complex application such as Eclipse, your workflow can be significantly slowed due to the massive complexity of the application.
  • Eclipse environments can easily have well over 2000 commands which are executed through menus, hot keys, custom dialogs or buttons.
  • Remembering where are the locations of menus, views, buttons or attempting to assign so many actions to hot keys proves to be impractical to impossible.
  • Think time increases simply attempting to navigate and execute your intentions.
  • Quick Access is the Eclipse attempt to address these issues, but fails to be an optimal implementation of a solution.
    • Modern fuzzy matching like sublime is not implemented requiring additional keystrokes
    • Ranking is not optimal, partially due also to group sorting of actions by category which requires navigation further down the list
    • Reuse of recent actions is not implemented in an intuitive way
    • Not designed with fast keyboard interaction in mind

Goals

  • Provide fastest workflow possible in a complex application
    • Interface should be faster than using mouse, menus, buttons, or even hot keys in most cases.
    • Typing flow should never be interrupted.
    • All actions should be possible without use of mouse.
    • Common used actions should have quicker access.

Optimum Experience

Once the working view is populated with commands that are used frequently, you should be able to experience the following benefits:

  1. Relevant Information: your working view presents you with only items which you actually use. This minimizes mental focus interuptions that subtly happen when presented with too much irrelevant visual information to consume.
  2. Focus on Recent: items are ordered in the working view by last use. Therefore to execute the last command again, simply launch the interface and press enter. The first item will already be selected, no other key strokes required. This feature can also be used in the Finder interface for navigating among recently viewed or opened files.
  3. Fast Interface Launch: this is dependent on how you configure your keybindings. The intent of the recommended key bindings is to provide an experience where you are not interupted in your typing flow to execute commands. shift+enter allows to launch the interface without moving your hands from natural typing position and immediately follow with typing into the input filter to select a command to execute. Also, it becomes very natural to re-execute the last command with a very fast sequence of shift+enter enter which can be executed fast enough that you may not even see the interface fully appear.
  4. Fast Selections: a combination of features allows for very fast selection and execution of commands. Since your working view is contstrained to only those items useful to you, your working view likely consists of dozens of items vs. thousands that are available in the application. You will therefore be able to select items with usually one or two keystrokes using first letter or acronym of a command. Equal weighted matches in the working view are also sorted by recent. So if you happen to have 5 different launch configurations, you can re-launch the last configuration simply by pressing l and enter. Additionaly, the interface has a fast select feature allowing you to execute any item in the list without scrolling, cursor down, or using the mouse.

The Optimum Exerpience should look something like the following:

In this short clip, the time to launch and execute commands is subsecond. This is all done without hot keys. Abreviations of the commands we use are easier to remember and faster to execute all without leaving our typing flow. Since the default command list is our set of recent or favorites, the selections become predictable and often can be done utilizing only 1 or 2 characters.

optimal

Installation

Eclipse Marketplace

Marketplace Installer

Recommended setup

All available commands available to key bindings can be found by going to the Eclipse key preferences and searching for dakara

  • Key Bindings - no default bindings are registered to avoid possible conflicts. Below are recommended bindings.
    • Commander - shift+enter - This is one of the fastest launching bindings possible which also does not interrupt the typing flow. You will likely need to bind this for both windows and dialogs as well as text editing. The exact terms and options differ for different platforms and plugins installed.
    • Finder - shift+space - This is another very fast binding, but for some this binding may be hit sometimes accidentally. Otherwise, you might opt to replace the default open resource binding to use Finder

key-bindings

  • First time use
    • Launching Commander and Finder initially opens your working view which contains the list of items you have been using recently. The first time you launch, these will be blank.
    • Press the tab key to switch to the discovery mode to find items.
    • In a short period of time, the working view will be populated with items you commonly use and you will only infrequently need to switch to discovery

KAVI implemented features for all interfaces

Term Matching

Multi column

Default match will search across columns for matches. multi column

Specific column

Columns can be selected individual for matches by using a , to separate the column filters. specific column

Literal

A space after the filter text will cause the preceding text to be matched literal instead of fuzzy. literal column

Fuzzy multi word out of order

Contiguous characters matched using a fuzzy strategy that attempts to match words in any order. A space separating words will force matching of the literal words also allowing for out of order matces. fuzzy column

Quality filtering

One or two letters will not match in the middle of words. This is done to prevent a long tail of low ranking matches. quality

Acronym

Fuzzy matching also will attempt to match by acronym. You can force acronym pattern matching by preceding the input with a space.

acronym column

Ranking Sort

Items are sorted first by rank and then by name. This allows for grouping of items by rank and easier identification of items within the ranked group.

acronym column

Fast Select

Fast select allows list actions directly on target items without needing to navigate to the item with mouse or keyboard cursor. This mode is enabled when typing / in the filter input.

Immediate action invocation

With Fast Select enabled, typing the letters in the fast select guide next to the row immediately inititates that row action.

acronym column

Multi select

Fast Multi Select allows fast selection of multiple items. This mode is active when // is entered in the input field.

acronym column

Range select

A range can be selected by starting the row identifier with -. The range will be applied from the last selected item and will use the selected state of the that same item.

acronym column

Inverse select

Inverse select will inverse all selections currently in the filtered view.
Inverse select is performed by pressing ! after the fast select slashes //

All select/deselect

If any items in the view are selected, this action will deselect all selected. Otherwise, this same action will select all in the filtered view. All select/deselect is performed by pressing space after the fast select slashses //

Navigation

List paging

crtl+j will page down in the list. ctrl+k will page up in the list.

Cursor movement in input field

ctrl+j will move to beginning of input field ctrl+l will move to the end of the input field

Working and Discovery Modes

Working is a view of the set of items that consist of favorites and or recently used items. This view is intended to be the primary view that you would use most of the time and therefore is the default view. However, this view does need to be primed before it is useful. Over the course of a few days this view would accumulate actions or items you are currently using.

Discovery is a view of all possible items. Selection of items from Discovery will add them to the recent list which makes them appear in the Working view.

Switching modes

Press TAB to instantly switch view modes between Working and Discovery

mode-toggle

Recent

Recent items are shown in the Working view. The items are always sorted by most recent. To reuse the last used item, simply open the dialog and press enter which will default to using the first item in the list.

Favorites

Items can also be permanently added to the Working view. These are considered favorite items. They are also sorted in by most recently used in the same view as recent items. A vertical marker bar appears to the left of items which are favorites.

favorites

Export/Import preferences

The Working set of items is contained within preferences and will be exported and imported with Eclipse preferences.

Across workspaces

The Working set of items is stored in the global preferences store. Therefore, your recently used commands will still be available across workspaces.

Context Actions

Context actions are those actions that otherwise would require right clicking on an item to bring up another menu or dialog. Context actions here are initiated using the ; key. The context actions will be performed on all selected items from the previous view.

context

Copy selected to clipboard

This action will copy all items in the selection to the clipboard. clipboard

View Selected

This action will toggle showing only the selected items in the view. This allows you to type different input filters, select items and then finally see all the items you have selected at once before performing some action on those items.

Favorites

Favorites can be added or removed through context actions.

Sort

Items which are normally sorted by rank or sorted by most recent can be sorted by name using this context action.

Export/Import

All settings and history can be exported to and from a JSON file. Commander settings are per Eclipse configuration and Finder settings are per workspace.

Default view mode

The default mode can be set that the dialog will open when launched. This can be working or discovery

acronym column

Commander

Specific features for the commander interface

Columns

  1. Name and description of the command
  2. Category of the command

Launchers

Launch configurations are added to the list of available commands. Currently, all launch configurations are run in debug mode by default. In the future this may be configurable. acronym column

Finder

Specific features for the finder interface

Columns

  1. File name
  2. Project name
  3. File path within project

Working

The recent list ordering of items in finder will be updated whenever you change editors in Eclipse.
You can use this to always go back to previous file being editted after opening a view. Just launch the finder and hit enter to go back to the last editor.

Design and Technical Notes

Fuzzy matching

There are multiple types of user intentions when matching

  1. User has in mind words or abbreviations of a term
  2. User is unsure of spelling or exact phrasing and is exploring using character guesses in the filter input
  3. User is attempting to narrow existing displayed results using any random characters within the displayed row

Commander has chosen to focus only on intention #1. Therefore less than 2 letter consecutive intra word matches are ignored. This appears to typically be better when filtering very long lists of thousands of items such as eclipse commands or large project files.

Ranking

In contrast to other typical fuzzy matching command palletes, Commander does not use unlimited ranking scale. There are only 4 levels of ranking from very strong to weak. This was done to present some order to the found items making it easier to visually assess the information and locate items of interest. Therefore, within each of the 4 ranking categories items are alphabetically sorted.

User intention

Unlike other fuzzy matchers, Commander attempts to take into account the user intention where possible. For example, terms separated by a space are considered to be literal words and fuzzy matching is not used. A trailing space can be used to specify intent for literal matching of a single filter term and a leading space will indicate that the following term should be used as acronym only matching. Also options to specify how fuzzy a match might also be considered.

Software

  • Plugin is built using Java 8 features. Minimum Eclipse is therefore Neon
  • Java 8 streams are utilized to parallelize the matching algorithm. Each row is scored on a thread.
  • RxJava is used to debounce the input. All matching and scoring is done in background off the UI thread.

Building Plugin

  • Install Eclipse Committers edition which has the required eclipse SDK bundled.

eclipse-plugin-commander's People

Contributors

d-akara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eclipse-plugin-commander's Issues

Configure to set default mode

Providing an option to set the default mode (active mode when the dialog first appears) to "Discovery" would be very nice.

Great job!

Allow to search only in the first column

If I search for com I will find all packages that start with com but I am looking for classes that contain com.

,com and ,,com search the second and third column but there is no way to restrict to the first column.

missing requirements -osgi.bundle; org.junit 0.0.0

Eclipse IDE for C/C++ Developers (includes Incubating components)

Version: 2020-12 (4.18.0)
Build id: 20201210-1552

Error during installation because of missing dependencies:

Cannot complete the install because one or more required items could not be found.

Missing requirement: Commander 1.4.0.202002211146 (dakara.eclipse.commander.plugin 1.4.0.202002211146) requires 'osgi.bundle; org.junit 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Commander Feature 1.4.0 (dakara.eclipse.commander.feature.feature.group 1.4.0)
To: org.eclipse.equinox.p2.iu; dakara.eclipse.commander.plugin [1.4.0.202002211146,1.4.0.202002211146]

Support traditional user interface paradigms where appropriate

  • Despite having features like fast select , it can take a while to transition to an alternative mode of interacting with a new interface.
  • Commander already provides normal keyboard cursor movement and mouse click support; however, should consider what other common methods might make sense like keyboard selections such as shift down arrow etc.

Improve finder matching algorithm

Hi,

When it comes to find classes, the finder algorithm is not very good in some case.
For example, if I search "String" well I cannot find it. Class matching exactly the searched expression seems to not be returned at the top in most cases.

The same for Acronym search. For example the search "IABar" or "IActionBar" to find IActionBar does not return IActionBar whereas it should. The problem seems to be related to capital letters next to others

Am I missing something?

Thanks

Commander: search "maven add dependency" results?

new user pain point, simple task:

shift+enter, tab, 'maven add'.

expect to see "Maven Add Dependency"

I see eclipse standard keymapping Ctrl+Shift+D doesn't work while editing java file either, so likely not the plugin's fault, but something should be done here (might even mean ignoring eclipse filters to suggest how it could be enabled)

Export/Import Settings as JSON

  • maybe just export/import from clipboard as first option. Import would add to existing, not replace.
  • option to export hidden or non active items as well.

eclipse 2019-12 install failed

With following error messages:

Cannot complete the install because one or more required items could not be found.
Software currently installed: Commander Feature 1.4.0 (dakara.eclipse.commander.feature.feature.group 1.4.0)
Missing requirement: Commander 1.4.0.202002211146 (dakara.eclipse.commander.plugin 1.4.0.202002211146) requires 'osgi.bundle; org.junit 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Commander Feature 1.4.0 (dakara.eclipse.commander.feature.feature.group 1.4.0)
To: org.eclipse.equinox.p2.iu; dakara.eclipse.commander.plugin [1.4.0.202002211146,1.4.0.202002211146]

Context action seems not activated by ';' key

Whenever I try to activate the context action with the ';' key the corresponding context mode is not activate.

For example, here are the steps I have tried:

  1. Activate the Finder
  2. Press the ';' key
  3. The context mode is not activated

infix/sufix search

Adding shortcuts for following search strategies would be nice:

infix search - prioritize matches that contain the search term inside the name. See screenshot, The ALocal.java should be on top with an infix search.

unbenannt

suffix search - prioritize matches that contain the given term at the end

One more nice to have would be to lower the rank of .class files. It is unlikely that someone searches for a .class file. And there are lots and lots of them...

Commander window hangs deactivated

When open Commander window with bound key and tried to search some class after pressing enter the Commander window hangs and deactivates. I can't select the window with mouse click it changes the cursor position in the underlying editor window instead. The only option to get rid of it is to restart eclipse.

EclipseCommanderBug

Eclipse IDE for Enterprise Java Developers.
Version: 2019-12 (4.14.0)
Build id: 20191212-1212

Use number for selection within list

When selecting within a list, number should be used first, e.g. sequence of

1,2,3,4,5,6,7,8,9,a,b,c,d,e,f...

instead of starting with a,b,c,d

New User intro: A hint to press tab in the dialog

great plugin! This plugin should be standard in eclipse!

documentation is wordy!

was pretty hard to spot; "Press the tab key to switch to the discovery mode to find items."

Please add a fish-style hint to the blank dialog

... other thoughts on new user....

in general, might be nice to have a quickstart at the top of the readme. Coming from VSCode command pallate, all this text is not very necessary. Increase adoption by (at the top of the doc)

NEW USERS STEPS

  1. install plugin
  2. Not bound to keys be default You must:
    Set your keybindings (recc: shift+enter for "Commander", and shift+space for "Finder". Keybindings are in your eclipse preferences.
  3. Use: invoke with your new keybinding, then press TAB to get to "discovery mode" (needed until recently used is established)

NPE in Finder

Seems a resource might have null name, path or project

Ability to specify if a column should be part of default search

This is useful for Finder where often you want to search for just the resource name, but fuzzy matching on the folder path makes results less accurate.

The current work around is simply to do searchterm, which limits to the first column.
It might be useful that a user can specify this as default behavior

Reduce fast select to only single character when possible

  • consider drawing fast select as a separate widget
  • sync/update when the table scroll stops
  • this would allow using single letter selectors in most cases as long as what is visible is 26 items or less
  • hook into the display update from ILazyContentProvider to update the fast select on content change not sure if there is a scrolling hook

Finder open performance

In very large workspaces of more than a million resources, Finder can be slow to open.

There are a number of reasons, but the one we can most easily address is the validation check for items in the current history that must be done against all items in the workspace.

The only real solution to this is to not keep a global history, but to store this with each workspace. This actually makes more sense for Finder, whereas Commander it does make sense to have one global history.

Status Info addition details

  • show state of selection view
  • show state of current sorting method
  • provide a details section for item of cursor row

Adaptive fuzzy matching

Consider strategies that take into account the number of items found.
For example, no point in showing 1000 low ranking matches, but if there are only a couple of matches and they are low ranking they probably should be shown.

Provide features of Eclipse Open Type

Finder currently only shows resources the same as the open resources Eclipse Command.
We should either combine into Finder or provide another dialog for the equivalent open type

Installing encountered a problem

Hi @dakaraphi

Thank you very much for developing this plugin.

I tried to install it via marketplace (default procedure Eclipse > Help > Eclipse Marketplace)

I got an error because one or required items could not be found:

screen shot 2018-03-03 at 00 27 48

The manual installation failed as well.

I double checked the behavior to ensure I do nothing wrong. Unfortunately, I cannot find violations. Am I the only one with this issue?

  • OS: macOS Sierra 10.12.6
  • Eclipse: Oxygen.2 (4.7.2)
    • Build id: M20171130-0510

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.