eclipse sh edit and run - eclipse

What would be the best way to run and edit a .sh script within Eclipse?
Regarding the editing part, I've found the ShellEd plugin, but it seems very minimalistic, is there no alternative?
Regarding the running part, I've found that there's a built in console that can be accessed by right clicking the .sh, then clicking 'remote system view', then clicking 'local'. But it's very minimalistic, there is not even tab completion. I would like something that could be as close to Bash as possible.

You may find these two hyperlinks to be useful:
http://www.linuxforums.org/forum/applications/132034-running-shellscripts-eclipse.html
Bash script plugin for Eclipse?
I do not know much about Eclipse. I prefer Geany; however, it does not execute shell scripts.

Related

How to replicate the following Spyder behavior in VSCode?

I'm new to coding Python in VSCode. Previously I used Spyder but decided to move to VSCode as the project management seems better in it (I could easily switch to other files/folders by clicking on the path, just like in PyCharm). But I really need this one workflow which I still have not managed to do it in VSCode.
write some codes like Selenium.
Click run (F5)
The selenium browser opens up.
I could use the Ipython terminal to access the code interactively (find the element in the browser etc) and send new command.
I would like to have this workflow in VSCode. Im also quite overwhelmed by the difference in these 2 IDEs, for example, in VSCode, you have integrated terminal, a debugging console and an output tab, while im used to have only one-for-all Ipython tab.
Ok, I figured out what I need. Basically I just need to right click on the python file that I want to run on the side bar. Then I have to select 'run current file in interactive window'. The only difference is on the Ipython console, I have to use shift+Enter to send my input instead of just clicking enter. But its not a big deal.

Some questions about Ubuntu permissions and shortcuts

I just downloaded Eclipse IDE and Netbeans directly from the websites and installed then in my Ubuntu 12.04. I have some questions:
1 - How can I add their shortcuts in the Ubuntu's sidebar?
2 - When I add shortcuts in desktop using the gnome-desktop-item-edit app, I can't have super user permissions to manipulate then, the Netbeans IDE (that uses a script file to start) shows lots of erros telling that some files are read-only. How can I add sudo privileges in a launcher created with gnome-desktop-item-edit?
Sorry by my poor english.
As far as question #1, first, open the program. Find its icon on the side bar, and right-click it, then select “Keep in Launcher.”
As for #2, in Ubuntu, you can edit the item to run with gksudo COMMAND, but that's extremely unwise (running anything with elevated privileges on the desktop. You should probably instead fix the permissions of the relevant files (right-click on the file, and give yourself permission)
Well, after some days trying to find the better solution for my problem, I think that the better solution is first, Download Eclipse and/or NetBeans IDE from the Ubuntu Software Center and after:
For NetBeans:
Use the IDE's plugin's manager to download the needed ones, and make (if you want) an IDE update process.
For Eclipse:
After download, follow the steps of this link.
After follow this, you can easely create favorite links to your "sidebar" if you use Gnome 3 as me, or make desktop shortcuts without needing sudo privileges, just using the gnome-desktop-item-edit tool or whatever you prefer.

Notepad++ using "Run" command in a macro

Is it possible to create a macro in Notepad++ that is able to utilize the "Run" command so that I may call an external .exe to operate on the file specified? I am able to do it manually, but when I create a macro that includes the run (F5) and give it a specified command it fails to execute. Is this because the run command isn't supported when creating macros? If so, is there a work-around method?
Thanks
edit: to add context -- I've written a couple ruby scripts to facilitate data-entry that's done using notepad++, and would like to integrate them to the editor. Having them run by a shortcut method created by recording a macro seems to be the best way to do this, unless it's not possible to utilize the run command.
FWIW The Zeus and Zeus Lite editors can do this.
You can do it with the NppExec plugin (available in the Notepad++ wiki ). It allows you to create mini-scripts with keywords that perform commands.
You will also be able to add your script in the contextual (right-click) menu, or assign a shortcut to it.
I personaly uses it to saves a sql file, place myself in the current directory, and then executes isql.exe (external executable) on that file. That simple script transforms my Notepad++ into a rather handy SQL IDE.
I don't think you do it using only Notepad++.
Please see this thread:
http://sourceforge.net/projects/notepad-plus/forums/forum/331754/topic/4805532
If I understood you correctly, you have it all set up but are having issues with running it through Notepad++'s run command?
If so, try what I mentioned here.
I had similar issues with running php compiler and resolved it with the "cmd /c" added like in that mentioned example. And a "& pause" at the end, just so I see what goes on.

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.
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... i.e.:
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'.
p.s.: 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.
p.s.2: 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).
Eclipse Runner could do this for you.

Eclipse - Running programs not in the native eclipse console

I'm currently writing some ncurses code and the native Eclipse (3.2.2) console can't display its graphics. I'd instead like to run the program through xterm. What I want is to be able to start xterm and run from there. I'd prefer to not get involved with any plugins or that jazz. Just something simple.
EDIT
So I have the answer and it was pretty simple...
Run -> External Tools -> External Tools -> New Launch Config...
Then select location of your terminal emulator. /usr/bin/gnome-terminal in my case.
after that set the appropriate arguments. "-e ~/ncurses/start" in my case.
Then make sure you aren't allocating a console by unchecking that option in the "Common" tab.
Annon add to his question:
its a pain to keep switching back and forth from eclipse and the terminal. I'm looking for a way to just hit something like"F5" and have it run my ncurses program in a new xterm terminal process
The simplest way to do that is to report the command line into an external tool configuration, and point eclipse to use a shell (like described in this program)
In the argument, you will add the command line eclipse execute (command line which can be retrieved as mentioned in the second part of this answer below).
Of course, replace 'cmd.exe' by the shell of your choice, and try not setting the 'Allocate Console' checkbox in the Common tab of that external launcher.
To launch through a xterm, without eclipse involved (not what you are asking for, just keep here for archive)
You can launch your program through Eclipse (Run Configurations), and observe through a 'ps' command the exact Java command line used.
Or launch it in debug mode, and right click the task in Debug view and open Properties. It will show the command line, as documented here.
Then launch that command line directly in your console (Eclipse being not involved at all at this point).