简体   繁体   中英

Plugin to switch run configuration quickly in eclipse

Is there a plugin which can help to switch run configuration quickly in eclipse?

I am trying to learn django with practice a Eclipse with PyDev. I am follwing this page . This page frequently need to supply different parameters to manage.py, for example:

If you're interested, also run the following commands:

 python manage.py validate -- Checks for any errors in the 

construction of your models. python manage.py sqlcustom polls -- Outputs any custom SQL statements (such as table modifications or constraints) that are defined for the application. python manage.py sqlclear polls -- Outputs the necessary DROP TABLE statements for this app, according to which tables already exist in your database (if any).

To follow the tutorial, I will need to click the triangle next to the run button , then click "Run Configurations..", then select "Arguments" tab. Modify the argument, press "Apply", then press "Run".

I don't want to repeat each step to have different parameters. Is there other way to do it quickly? Maybe a plugin?

I am not sure if this is the right place to ask, if not, please help to move it to proper place.

Eclipse Runner可以为您完成此操作。

Actually, for Django, the PyDev integration should have what you want builtin...

The steps on http://pydev.org/manual_adv_django.html should be more complete, but mainly you have to configure your project as Django and then in any PyDev editor you can do

Ctrl+2 dj (and then press enter)

to open a dialog to choose which django command to run.

Or you may enter the command directly there... ie:

Ctrl+2 dj syncdb (when pressing enter syncdb will be run directly)

-- note that it'll use the manage.py configured in the project to which the editor is related to run the command (so, the opened editor must be an editor from the project).

Another option would be right clicking the project and selecting the option under the 'Django menu'.

ps: If in some occasion you really had to change the command line all the time, the ${string_prompt} variable could help you -- although other variables in the run configuration could be more suited depending on your use case.

ps2: I think you could rename this question to note that what you want is related to running the django manage.py in PyDev (if that's really your use case).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM