-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intelligent commands #2681
Comments
Nice concept! I miss a "Configure" goal for commands. Most of the time new projects are created by cloning a Git repo. I find myself creating commands for configuring the projects after their creation. Things like:
|
Thanks for the inputs. We have a different concept in mind for the configuration of projects called a workspace template. Think of it containing all of the configuration that must be completed for a workspace to start, but the configuration items may vary by the person starting the workspace. For example, your workspace may need ssh keys to clone a project but the keys to be provided are personal to the person who creates the workspace. We would create a nice guided workflow that has users fill in the dependencies of a workspace template upon workspace creation. I think all of those configuration items would happen here. |
Nice but I'd say there are some overall problem overthinking and overusing the Command as a first class entity IMO it is more useful to make context dependent IDE Actions (menu item, toolbar button, context menu for project tree, context menu for particular position inside opened file etc). That would bring alot of services for developers with zero or small experience with particular technology but also experienced developers for scratching some things on very start of a project. While command related UX can duplicated this but primarily would be for more complex things to run. If we need ability to assign commands to particular machine or even have some "smart" mechanism for recognizing command compatibility (mentioned as dependency), we need really strong vision about how to implement some semantic relationships between workspace/environment definition and software installed on machine runtimes. Otherwise it will be working for only limited cases (like it will work for perfectly written template but will not when something changed there). |
Thanks for your inputs @gazarenkov. I think the ability to provide contextualized IDE Actions is a good idea. I know you always had that in mind. The only issue I see with that, is how a user would be able to customize the Actions (ie: command executed behind an Action)? About "Project dependent commands" could be associated with Project Type - yes indeed. I agree with that. How to recognize the command compatibility:
At first, we need to extend the configurability options for commands and improve the associated UI and UX. |
No way to extend the Actions. They do what is logical for concrete context and do it nicely, with dedicated UX. Agents... Recognize command compatibility:
|
about agents :
Eclipse Che could propose me to add some MySQL facets/tools by seeing that my image contains MySQL as well (and I could have some UI about MySQL for running scripts into my machine) In the same way I expect that an IDE propose me to select the type of the project (or facets, builders, etc) I would also expect that it could check what is my runtime and propose tools matching this runtime. |
Yes, all of this can be implemented with IDE plugins |
This should all be server-side, however. Maven as a plug-in is not bound to the IDE - only actions should be. So the maven-specific part of the command is managed as a set of server-side activities. But then in the IDE, there could be a maven IDE Plugin that introduces an action or a widget that is bound to the server-side plugin. The context of the client would be passed as an input into the server-side command. |
Added Sub-tasks section |
Goals
Eclipse Che commands are proposing a very high level of configurability, but in certain use cases, the navigation and access to the right command is difficult and user might run into commands which will not be executed properly.
With the new capabilities around multi-machine in workspace, the commands should also target the correct machine.
Commands are tied to a context which define in which situation they might be used. Intelligent commands are providing contextualized command definition and ability for the system to know when a command is appropriate or not.
Sub-Tasks
This section is providing the state of the implementation of the following specification. It also provides the list of all sub-tasks linked to it:
Command Explorer + Command Editor Command Explorer + Command Editor #2898
Add popup to explore the commands macro Add popup to explore the command macros from the IDE #2899
Command's goals Commands' goals #3256
Implement possibility to execute commands with a right-click from the explorer Implement possibility to execute commands from the context menu #2900
Add Command Palette Commands Palette #2901
Better display when the commands are long in process panel Better handle "Process Panel" when commands are long #2911
Add Command target definition Add ability to manage commands' targets #3501
Add abillity to try a command from the command's editor Add ability to try a command #3502
Save when command editor is closed Ask user to save the command modifications on closing editor #3497
Sync command editor with workspace's projects updates Projects table in command editor should be updated when projects are changed #3496
Update command's editor title when command name edited The title of the command editor tab isn't updated after changing command's name and saving it #3494
UX improvements in the commands panel Position of create/remove/duplicate buttons aren't correct when Commands Explorer width is too small #3493
Provide autocompletion for macros in command editor Add autocomplete for macros in command line and preview URL editors #3498
Light theme compliance for command editor Command editor styles should respect IDE's light theme #3495
Implement new toolbar for execution commands New toolbar for execution of commands and access to preview #3519
Change schema data type for project attributes Change schema data type for project attributes #3758
Hide Zoom ruler and Overview ruler in command line and preview URL editors Add ability to set different settings for different text editors #3779
Values
Commands's context
To run properly a command needs to be executed with the right context. Commands could be:
So the command’s context is defined by the following meta-datas:
To know its context, the command will have new settings options.
1- A command will know on which machine(s) it can be executed
Phase1:
Phase2:
2- A command will know on which project it has to be applied
The command will have meta-datas to let the system know for which projects it can be applied.
If those meta-datas are not defined, it means the command is not project-specific and available in all project context.
For example:
3- A command use macros in its definition to be apply to an IDE context (currently existing)
In a single workspace, the user might have multiple Maven projects.
Workspace:
It is possible to define a command which will just be executed across the currently selected project (in the IDE project explorer). In this case the command definition will use the macros that we already have into the system:https://eclipse-che.readme.io/docs/commands#macros
Command definition
cd ./projects/${explorer.current.file.relpath}/ mvn clean install
4- A command could have a set of pre-conditions defined ?
There could be the possibility to define pre-check conditions in order to execute a command. This could be a script.
For example: before executing a mvn clean install command, the user will be able to configure the pre-conditions to check if the command can be executed.
Command’s goal:
When a user is configuring a commands, he is always doing it for a certain purpose, a certain goal or a certain phase of the project lifecycle. For example, he will define a command to “Build” the projects in the workspaces, he will define a command to “Run” a project, he will define a command to “Deploy” the project and so on.
Considering this notion of goal for a command, we will use them in order to better contextualize the commands:
Che will provide default set of goals, but user would have the ability to define/configure them
Command’s goal allow to configure default workspace commands and provide clearer organization and navigation into the commands.
Associated features
Panel displayed with keyboard shortcut which allow to browse and start any configured command.
Ability to select the command used by default “build button” and “run button”
To regroup commands together, the user will have to give them a name and use slash (/) in the name of the command and we will treat these as a group separator.
For examples, two commands named Maven/Clean-Install and Maven/Package will be grouped together into a submenu named Maven
Mockups (design not final)
Toolbar
Palette
Right Click actions
Command Explorer - Info
Command Explorer - Arguments
Command Explorer - Arguments - Macros Catalog
Command Explorer - Preview URL
Command Explorer - Common
The text was updated successfully, but these errors were encountered: