Skip to content

improvements to default launch behavior #2499

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

Closed
devoncarew opened this issue Apr 9, 2012 · 16 comments
Closed

improvements to default launch behavior #2499

devoncarew opened this issue Apr 9, 2012 · 16 comments
Assignees
Labels
closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug

Comments

@devoncarew
Copy link
Member

From the mailing list:

When we just click play or hit the shortcut key, launch the target we picked last time. Basically make the launch launch target the default until we specifically select another launch target... then make that the default.

@DartBot
Copy link

DartBot commented Apr 10, 2012

This comment was originally written by [email protected]


How about this:

  1. Does the currently selected file in the file explorer view have an entry point or is it an html file? Use that.
  2. Do we know what the last launched target is? (stored in project settings and persisted between editor sessions) Use that.
  3. Does the current project have any launch targets? Use the 1st one we find.
  4. Show an error message.

@keertip
Copy link
Contributor

keertip commented Apr 12, 2012

How about this:
 - To launch a target for the first time - select the entry point/html file, context menu > Run, or Tools > Run selected

  • The toolbar button would always launch the last run.

The Manage Launches Dialog can also be used to create, modify and run.

Our goal here is to make it very explicit and clear to the user how to launch and not try to guess at the user's intentions.
 

@keertip
Copy link
Contributor

keertip commented Apr 12, 2012

Set owner to @keertip.

@keertip
Copy link
Contributor

keertip commented Apr 12, 2012

Luke,

What do you think about the above proposal? Would like your feedback.


Set owner to @lukechurch.

@DartBot
Copy link

DartBot commented Apr 12, 2012

This comment was originally written by [email protected]


I would be perfectly happy with that. As long as I don't have to repeatedly pick my launch target over and over and over and over. :-)

@lukechurch
Copy link
Contributor

I think we have 2 cases here to consider:

(1) First Run. We should try hard to run the thing, the current implementation seems okish - I haven't seen major problems in studies. Pick an HTML file/run point and run it.

(2) Repeated Runs - agreed, it should do the same thing as last time. To override this, we should use a config or drop-down. Ideally the tooltip for the icon should change to whatever the name of the last config was.

Are there any use cases that people are concerned these don't cover? I may be missing something.

Both cases are important. We can't have the 'you have to do this obscure thing before first run' that I've seen some Eclipses do, and we can't have the 'have to set over and over again' like Eric says, because it's just plain annoying :)

Any 'ambient hints' we can can give, like tool tips, or glow indicators as when you move the mouse over the run button get us bonus marks....

@keertip
Copy link
Contributor

keertip commented Apr 13, 2012

So here's the plan:

For the Run toolbar button behavior
If there have been no previous launches at all, then we key off selection and try to figure out what to run, else always run the last launched.

To run a different application, user has to select app, right click > run or tools > run selected or ctrl+shift+r . Or of course use Manage Launches.


Set owner to @keertip.

@lukechurch
Copy link
Contributor

As discussed, SGTM.

Please ping back to me for review when implemented.

@DartBot
Copy link

DartBot commented Apr 13, 2012

This comment was originally written by [email protected]


This is why I proposed something a little more complex. Because it should be as smart as it possibly can be on 1st launch. It seems like it would be fairly easy to analyze the project and know what the possibly entry points are. So if they are selected on an entry point on 1st run, then use it. If not and there is no other non-magical way to determine what they meant, then show them the list of entry points and let them pick.

@keertip
Copy link
Contributor

keertip commented Apr 16, 2012

@DartBot
Copy link

DartBot commented Apr 16, 2012

This comment was originally written by [email protected]


I just tried this out. It works if you press the run button, but not if you use the run keyboard shortcut (ctrl-shift-r).

Which BTW, I really wish could be something a little friendlier on the hand. It looks like it's F11 to debug last launched program in Eclipse. Also, I don't see keyboard shortcuts for stepping. Do they exist?

@devoncarew
Copy link
Member Author

ctrl-shift-r is "run selected" - I think you want ctrl-r - "run last".

The shortcuts for stepping show up when you have an active debug session. W/o that they don't show up in the menu. You should see step into = F5, over = F6, and out = F7.

@DartBot
Copy link

DartBot commented Apr 17, 2012

This comment was originally written by [email protected]


Ahh... that helps a lot. I would say that those keyboard shortcuts are not discoverable at all though. Maybe the shortcuts should appear in a tooltip when you hover over the buttons. Also, I still say that even Shift-R is too much finger contortion for such a common action as running the project. Any reason you guys chose that? It seems as though F11 is the Eclipse shortcut. Why can't we use that?

@danrubel
Copy link

The cmd-shift-r shortcut does not appear next to the "Run > Run selection" menu on Mac.
Windows? Linux?
We should show the shortcut if it exists.


Added Triaged label.

@keertip
Copy link
Contributor

keertip commented Apr 25, 2012

For a short while we had cmd-shift-r for run selection. Then realized that that particular key binding is usually used for open resource. So need to come up with another key binding.

@keertip
Copy link
Contributor

keertip commented Apr 30, 2012

Added Duplicate label.
Marked as being merged into #2730.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants