scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Added keyboard shortcut to clear evaluation results #134

Closed ukstv closed 11 years ago

ukstv commented 11 years ago

New eclipse Action added.

Keyboard shortcut Ctrl+Shift+C now clears evaluation results.

Fix #132.

Review @dragos

skyluc commented 11 years ago

Sergey, thanks for the pull request. I'll start to review it. In the meantime, we need you to sign the Typesafe CLA. It is required for us to be able to accept your contribution. It can be done using your github account at http://typesafe.com/contribute/cla.

ukstv commented 11 years ago

OK, have just signed it.

skyluc commented 11 years ago

The current code is not working, the default handler defined in the plugin.xml doesn't exists.

But using handlers is the way you should go. Using directly Action is mostly deprecated. So you should implement the handler, like it is done for EvalScript. And then use the org.eclipse.ui.menus extension point, to add the action to the editor context menu. You can see an example in the Play2 plugin code.

Don't hesitate to ask if you are stuck on something.

ukstv commented 11 years ago

Aha, I've missed the menu entry. Despite of lack of the handler entry, the code worked, and Ctrl+Shift+C cleared results.

skyluc commented 11 years ago

Yes, but it still throws exception when opening a worksheet. Check the error log in Window > Show View > Error Log.

ukstv commented 11 years ago

Could you please tell me if there is a shortcut command to run tests somewhere.

scala-jenkins commented 11 years ago

(kitty-note-to-self: ignore 18288021) :cat: Roger! Rebuilding worksheet-2.1-2.9-pr-validator for dfae5d44. :rotating_light:

dragos commented 11 years ago

@ukstv if you run the build locally, it runs the tests, too. From the command line:

mvn -P scala-2.10.x,scala-ide-stable,eclipse-indigo clean install

dragos commented 11 years ago

BTW, it looks like the last build succeeded, but the build bot missed the result.

ukstv commented 11 years ago

There is a problem nevertheless with code duplication and lack of tests. Really, I just visually missed testing project. I am going to add tests and then open new pull-request. On May 23, 2013 2:15 PM, "Iulian Dragos" notifications@github.com wrote:

BTW, it looks like the last build succeeded, but the build bot missed the result.

— Reply to this email directly or view it on GitHubhttps://github.com/scala-ide/scala-worksheet/pull/134#issuecomment-18334577 .