osoco / sublimetext-grails

Grails support for Sublime Text
75 stars 21 forks source link

adding News features #6

Open diniremix opened 11 years ago

diniremix commented 11 years ago

Hello, thank you very much support for Sublime Text 2, I thought if possible, add some commands from Grails console to this editor using python to extend the plugin as follows:

example to launch the QuickPanel in Sublime Text 2:

def show_quickpanel(self):
    commands = []
    commands.append(['Run a command','using the command line'])
    commands.append(['create-app','create-app [--inplace] [NAME]'])
    commands.append(['create-controller','create-controller [NAME]'])
    commands.append(['generate-all','generate-all -- Generates a CRUD interface (controller + views) for a domain class'])
    commands.append(['create-domain-class','create-domain-class -- Creates a new domain class'])
    commands.append(['test-app','test-app -- Run a Grails applications unit tests'])
    commands.append(['run-app', 'Runs a Grails application'])
    commands.append(['war', 'Creates a WAR archive for deployment onto a Java EE application server'])
    self.window.show_quick_panel(commands, self.run_command)

Apologize for the translation, I'm using Google Translator

gcrick commented 10 years ago

Sorry, this issue must have slipped past me while I was on vacation! Sounds like a great idea, and thanks for the code. I'll do some testing and see how it works compared to integrating with the Command Palette or other alternatives. Google translator worked pretty well, no worries :) But if you have trouble in the future, también hablamos español :)