How to open BAT (windows batch) file in Eclipse? - eclipse

How to open BAT (windows batch) file in Eclipse? When I am doing Open File... the file runs, not opens. How to open it in editor?
Dragging file on Eclipse also runs it.

The ShellEd plugin doesn't seem to be for Windows BAT files--only Linux/Unix shell languages.
Going to Preferences->General->Editors->File Associations is how to have Eclipse open BAT files in a text editor, though.

try with this plugin:
http://sourceforge.net/apps/trac/shelled/
And also I think you chould go to preferences->general -> editors->file associoations and add bat to the list

Theres is a new open source plugin called Batch-Editor available on eclipse market place. It has syntax color support for dark and white theme included and has an outline view + quick outline for labels.
Here an example screenshot:
.
It supports also echo and escaping:
PS: I am the author of the mentioned plugin.

Related

Is there a way to open launch eclipse from command line, like vscode?

I am wondering if there is a command similar to code ., but for eclipse.
I'm using a Windows 10 computer.
Yes, the command line lets you open files using the --launcher.openFile parameter, and I think it prompts you with the "open projects from file system" wizard when you give it a directory. I'm not sure it works as smoothly since Eclipse lets you use the same binary for more than one workspace.
https://wiki.eclipse.org/Eclipse/OpenFileFeature

Visual Studio Code in Explorer's context menu

I want to be Visual Studio Code my default editor for all text-based file types in Windows. For Notepad++ there is an extension in the Windows Explorer to provide "Edit in Notepad++" for each file.
How can I achieve this for "Edit with Visual Studio Code"?
Do I have to "program" such extension on my own or are there any ready-to-use solutions available?
According to this blog post you can set this option during the installation process. If you want to add this option afterwards you either can follow the instructions of the rest of the post or (as recommended) reinstall vscode and then select that option during reinstalling.
When I faced the same issue, for me it was more comfortable to simply reinstall vscode.
It is east !
step 1 -->
Right click the file you want to always open with VS code
example - if you want to always open .txt files in VS code then Right click on any .txt file that is in you system
see this
step 2 -->
click on 'open with'
see this
step 3 -->
click on 'choose another app'
see this
step 4 -->
a new window will open, it will show all the applications on you system that are capable to open that file
click on VS code
and check the box at the bottom that says 'always use this app to open .txt files'
see this
and then click on open
THATS IT
NOW ON .txt FILES WILL BE OPENED IN VS CODE
.txt file extension is just an example, you can do this to any file example .py, .html, .pdf etc.

How to force eclipse to use the SceneBuilder executable file? Mac os x

I'm trying to get SceneBuilder to work with Eclipse v4.4.2 on Mac OS X. I'm following the advice from this tutorial: http://code.makery.ch/library/javafx-8-tutorial/part1/. I downloaded the Mac OS .dmg version of the SceneBuilder app from here: http://gluonhq.com/products/downloads/. It works when I run it as a stand alone.
When I try to configure Eclipse to use the app as part of the e(fx)eclipse package, Eclipse seems to be configured to look for the file Contents/MacOs/scenebuilder-launcher.sh in the application package contents. The version of the app I have doesn't have it, instead it just has the executable Contents/MacOs/SceneBuilder.
Failure to launch SceneBuilder [...] Cannot run program "/Applications/SceneBuilder.app/Contents/MacOs/scenebuilder-launcher.sh". No such file or directory.
Does anyone know which version of SceneBuilder I should be using (and where I can get it), or is there a hacky solution to sort this?
Just playing around with the SceneBuilder standalone it seems like it's a big step up from WindowBuilder, shame that just finding a packaged/compiled version of it has been so difficult!
The answer provided by ItachiUchiha is not the full solution with the new binaries provided by Gluon. Obviously they have forgotten to package the file Contents/MacOs/scenebuilder-launcher.sh with the new binaries. It is however sufficient to just copy over this file from an old version of SceneBuilder to make the launch from within Eclipse work.
Hi guys my solution is not clean by the way I use:
On OSX :
$cd /Applications/SceneBuilder.app/Contents/MacOS/
$ln -s SceneBuilder scenebuilder-launcher.sh
And for that works.
On a Mac:
I just installed sceneBuilder 8.3.
After setting up Eclipse with the proper SceneBuilder executable (in the Applications folder)
I had the same problem.
Failure to launch SceneBuilder [...] Cannot run program "/Applications/SceneBuilder.app/Contents/MacOs/scenebuilder-launcher.sh". No such file or directory.Error=2
Then in Eclipse I went to the
Help Menu, Check for Updates and Installed
all of the latest updates offered.
When I was asked if OK to Re-Start Eclipse I clicked OK.
After Eclipse restart
I Right Clicked on a Main.fxml and selected
Open with SceneBuilder.
It worked perfectly.
Best of Luck to you all
You can change the path in
Eclipse -> Preference -> JavaFX -> SceneBuilder Executable
I had this same issue on my mac following the code.makery tutorial but discovered you can still use the official JavaFX Scene Builder 2.0 download from oracle.com available at JavaFX Scene Builder 2.0.
After downloading and installing (by double-clicking on the downloaded .dmg file and dragging to the application folder), simply navigate to Eclipse>preferences>JavaFX and then browse to your Applications folder and select the JavaFX Scene Builder app you just installed. Worked and is still working for me!
I downloaded the older version of scene builder from oracle site. Copied the scenebuilder-launcher.sh from the fresh installation directory to the Glueon scenebuilder directory. And this fixed the issue.
My solution on Mac OSX was gleaned from the bug report at https://github.com/gluonhq/scenebuilder/issues/2. Apparently newer versions of Scene Builder (not including version 2 and before) are missing the scenebuilder-launcher.sh file. To make this all work, do the following.
Install a new version of Scene Builder from Gluon (not Oracle). I used https://gluonhq.com/products/scene-builder/. Install AND OPEN Scene Builder. For this to work, it is important to actually open Scene Builder before attempting to use it in Eclipse. If you don't, the first invocation under Eclipse will attempt to pop up a the normal OSX security message which, of course, it can't do because it is being invoked from a shell script. This only happens on first invocation, so the next time you won't have the problem. You get a message to the effect that the application is damaged. You will also get this message if you install a new version. Just invoke the Scene Builder application standalone before continuing to use it with Eclipse.
open a terminal session (sorry I don't know of another way to do this otherwise as you need to make the file you create executable)
cd /Applications/SceneBuilder.app/Contents/MacOS
sudo vi scenebuilder.sh (or use your favorite editor other than vi)
cut-and-paste the file from the Gluon issue into your editor and save it.
sudo chmod +x scenebuilder.sh
open Eclipse and open Preferences > General > Editors > File Associations (or type file in the filter box and select File Associations.
scroll down to .fxml in the file type box and select it. If you don't see it, click add to the right of the file types list. Enter .fxml and click OK.
in the associations pane, click Add to the right of the associations pane and click the Internal radio button. Scroll down to Scene Builder and select it. Click OK, the Apply and Close.
You should now be able to right-click on an .fxml file and click Open with Scene Builder and Scene Builder should start with the fxml file open in the builder.

Is it possible to add external command line tools to Netbeans?

Is it possible to use external command line tools in Netbeans?
Thank you.
After searching and searching and searching, this feature is just missing in netbeans although it would absolutely straightforward to implement and has been ask by user for 2 more than years...
Regards,
Stéphane
There is a Terminal window in NetBeans 7:
Open the menu, Window -> Output -> Terminal
What about using an Ant target? Ant files are quite comfortable to run from Netbeans.
<exec executable="${executable-full-path}" ...
The best option I've found is to use jmarsault's plugin that he calls NetBeans Command Shortcuts. This give you an icon in the command line where you can add command and terminal scripts to run. The display shows in the output window.
Installation files are available here and he has kept it up to date with the newest versions of NetBeans.
NetBeans Command Shortcut plugin
Installation:
Download the .nbm file for your version of NetBeans
Open Tools / Plugins / Downloaded / Add Plugins...
Select the .nbm file and allow the installation of the plugin.
In since at least version 9.0, there are two decent options:
Just create a script file. (I think you need the C++ plugin for this. Otherwise you have to create it outside NetBeans or as a text file.) In my case I created a JLinkGDBServer.sh that just executes JLinkGDBServer as a prerequisite to start an embedded debug session. This automatically sends the executable's output to a NetBeans terminal.
Add a tool to Tools/Options/Miscellaneous/SendTo. SendTo is a pop-up menu item for certain project entities, for example files but not the project. In my case, I could add a SendTo running the executable and use it by right-clicking on for example the .elf file (although for the GDB server I don't need any file name as an argument).

Use an external editor for some file types with Netbeans

So with eclipse I would instruct it to open html/css/js files in textmate, and pretty much just use if for the php side of things.
Would like to do a similar thing with nb if possible.
Any thoughts?
Best,
Bob
There exists a Path Tools plugin for Netbeans. It has a command "Edit path...". With this you can select a file in the tree, click "Edit path..." and the file will be opened in an external editor.
You can customize the external program which is called under "Tools" -> "Options" -> "Miscellaneous" -> "Path Tools" -> "Edit Commands For File" .
You can't assign it to specific file types, but at least you can open files without leaving Netbeans.
The webpage of the Path Tools plugin looks not very active, but it works in Netbeans 6.9.1 without problems (Works on My Machine).
It also has other useful actions:
Copy Paths Action Copy the full paths of the files/folder of selected node to the clipboard.
Explore Action Launch the OS File Explorer
Shell On Path Action Launch the OS shell
Edit Action Launch the editor
This plugin should be integrated to Netbeans.
Thank you for the help on this.
Here is a way for the Path Tools 'Edit' toolbar button to pop up the Windows 'Open With...' dialog box for the selected file.
In Options, Path Tools... 'Edit Commands' 'For File' - change the command to this:
rundll32.exe C:\WINDOWS\system32\shell32.dll,OpenAs_RunDLL {path}
(Edit: I forgot to say this is for XP - idea is the same for newer Windows)
If you don't want to deal with manipulating plugins and configs, you can do it this way (valid for version 8.2):
Go to Tools > Options > Kepmap
search for "path"
It defaults to Alt + Shift + L
use that command in any editor window to get the path for the file, then simply open that path in whichever editor.
I agree it's not as smooth and savvy as having a readily-available "open in external editor" command, but it's almost there.