Eclipse External Tool Configuration - separate button on toolbar for a specific configuration - eclipse

Is it possible to create an External Tool Configuraion for running an external tool and assign it to a separate button on a Toolbar? When I use two different External Tool Configurations, I have to select from dropdown menu and that's not perfect. I use Eclipse Luna.

You have to write your own plugin for this there is no other way.
You can call the external program launch configurations by keyboard.
Assign keyboard short cut key for External Tools.. command as shown here. I assigne Ctrl + `
When you press this key then below dialog will popup.
Type the name of external configuration to filter, when your configuration is selected in the tree then press Enter twice to launch the program.
Other way
Click on dropdown button of the Run external tool button then you will get the below menu.
You can press the corresponding number assigned to each launch configuration. In the picture shown above when you press 3 then tmp will be called.

If you are using RAD, there exists a separate button in the toolbar for external tools.

Related

Using Blueprism, How to right click on a web application and select an option using Key or Click events?

Using BluePrism, how to right click on a web application and select an option using Key or Click events in Region Mode or Accessibility Mode?
It doesn't spy any of the menu items with an error saying :
Unable to spy the element
I had the same problem and fixed it with the following:
Because the window that shows up is a System window, it means it's no longer part of the IE Application Modeller, as it's using a different thread and a different ID.
So you'll need to create a different object specifically for this operation. I created one with
Object Name: IE - Popup Message
Window Title: Message from webpage
Windows Process iexplore
When attaching to it use index of 0, and then you can easily use UI Automation or Acessibility to identify the button you want to press.
But yes, you'll need to use a different object, I'd suggest making this one and every time there's a system popup for IE to identify the different buttons and use this object as a common interface between them.
This needs clear details about right-click behaviour; where is it showing a specific menu item or general right-click option.
In case application-specific option ->
then you can select global mouse click with text as 'right' to select the menu item and then finally using the Arrow keys (Up, Down to move the desired location )

Eclipse, shortcut to create new Java class

Is it possible to assign a shortcut to go automatically on New Java Class Dialog? At the very beginning of a project when I am creating a lot of classes, it's quite annoying have to go through the 'New..' wizard.
Here's the image of the dialog I want to reach.
Select Window -> Preferences -> General -> Keys and search for New (Class). Click on Binding, press the keyboard shortcut you want, and click OK to configure the shortcut.
Press alt+shift+n it will give you a context menu from where you can select new class,package,interface
Ctrl+n will launch new wizard, there you can select the class/any to create new document.
There's an icon (C icon) in the header toolbar for creating class! Its available by default Just click it!
hit alt+shift+N and then click the respective first character for creating
the respective file. For example, let's suppose you want to create a new java class:
Hit alt+shift+N.
Hit c (stands for creating java class).
j (it will highlight the java package).
like this you can use shortcut keys as well as first character of the word what you want to create.
Hope this might help.
You could use Ctrl+3 to open the "Quick Access" Wizard and type in "java class"
on Mac alt(option)+command+N > displays a menu, scroll using arrow keys for appropriate selection and hit Enter.
You can use the New Java Class wizard to create a Java class. It can be invoked in different ways:
By clicking on the File menu and selecting New → Class.
By right clicking in the package explorer and selecting New → Class.
By clicking on the class drop down button and selecting class.
The shortcuts for basic Eclipse file management actions are different between Mac and Windows/Linux environment.
Check it out:
Visit for more Eclipse shortcuts.
First press
ctrl + n and then press c
then press Enter
press ctrl + n
press c (for selecting the class)
press Enter (for creating a class name)
and then class will easily created.

Eclipse Shortcut for Team - Synchronize with Repository

What are the shortcuts for the context menu actions "Team -> Synchronize with Repository" and "Team -> Update" on the whole project?
I have already found shortcuts, but these are executed only on the file i have currently opened. But I want to execute it on the whole project without having to scroll the project explorer to the top and right-clicking on the project.
If there are no such shortcuts, how can I create them?
As john.k.doe indicates, that's the right solution, but you also need to do something else in order to make the shortcut actually work, which is go to Window > Customize Perspective > Command Groups Availability and there just check the SVN box ;)
you can almost always get the key shortcuts you want by
go to preferences type "keys" or go to General -> Keys
in the field presented when you click on "Keys"
in the left pane, type the command you are interested in setting up a shortcut for:
the image below is from my mac, but it works the same way on windows/linux, you just might choose something besides Cmd-Y as your shortcut modifier. the U under User indicates that i was the one to add that modification.
I have written a small Eclipse plug-in which selects the active project in the Package Explorer so you can execute other actions (like 'Sync with repo' and 'Update') on it. I think this approach is more flexible compared to writing a plug-in that selects the project and executes a predefined action.
You can get the plug-in at http://code.google.com/a/eclipselabs.org/p/eclipse-tweaks/downloads/list, it is named "com.xakcop.select". Download it and put it in the dropins/ folder of your Eclipse installation. Then when you restart Eclipse, you will find a new command Select project in Windows->Preferences->Keys. The default key binding is Ctrl+Shift+Backspace but you can change it to whatever you want.
When you are in the Java editor just press Ctrl+Shift+Backspace, this will select the project that the current file belongs to in Package Explorer. Then press the shortcut for "Synchronize with repository" and you are done.
The source code of the plug-in is also available as part of my eclipse-tweaks project: http://code.google.com/a/eclipselabs.org/p/eclipse-tweaks/source/browse/com.xakcop.select
I think the answer to this question adresses the issue.
The quickest way I've found to update/synchronize, after having set the shortcut keys, is to click on the minimize button in the Project/Package Explorer and then press the keys. After the update, simply clicking on the last used file in the editor returns to the previous workspace state (provided the "Link with Editor" button in Project Explorer is selected).
I should clarify: I use a working set for each project. The working sets are displayed as default Top Level Elements in the Package Explorer so, by clicking on the minimize button the desired Project' working set, they collapse and are easy to select. Then, I apply the shortcut on the selected working set.
From my point of view, the problem is the focus of the commands you execute.
The Team commands Snychronize and Update are executed on the current object (In my case). As you noticed, when you execute the command on the project, the project is synchonized - when you do it on a file, only the file is synchronized.
What I did as workaround is the following:
I created Key-Bindings for the commands Show in (Navigator) (Alt-N), Go to (Alt-G), and Show View (Naviator) (CTRL+SHIFT+Q, N).
With Alt-N I show the current File in the Navigator. I can then use the keys to navigate to the root that I want to synchronize (it's not always the whole project for me). If the root is to far away I use Alt-G and type the Project or Folder where I want to go to and execute afterwards the Synchronize commands.
(Go to works only in the current view)
If you have selected the Project once you just have to switch to the navigator (Show View command) and execute your synchronize commands.
You could also use rgerganov's plugin then you would not have to execute as many commands.
The procedure works also with other views (package explorer, project explorer)
What about this approach? It should also work for other SCM's or commands you want to execute on any object in the explorer views.

How to create default debug and run configuration in Eclipse?

Whenever I hit Debug or Run in Eclipse, I get a dialog asking me what configuration I want to use.
How do I set a default configuration and bind a keyboard shortcut?
Maybe this article from Eclipse One Tips will help you:
How to run the last launched application
The answer lies in a preference hidden on the Run/Debug page:
Go to Window > Preferences > Run/Debug > Launching.
Select the option Always launch the previously launched application. It’s located at the bottom of the dialog.
The preference should look something like this:
Now you’re free to press
F11, Ctrl+F11 or click the Run/Debug
icons on the toolbar with confidence, knowing it’s going to run what
you expect it to run.
One question arises: How do you quickly run a class as a specific
application (eg. a JUnit test) if you can’t press F11 to
run it? You have some options available:
The fastest way is to use keyboard shortcuts. Eclipse allows you to launch classes using a keystroke, including JUnit tests, Java
applications, etc using Alt+Shift+X.
Alternatively, right-click on the class and select Run As. The submenu will show available options for launching the class.
Lastly, you could click the pulldown arrow on the run/debug icons in the toolbar and select Run As. The submenu once again shows
available options for launching the class.
Eclipse plug-ins that add new project types may contribute 'Launch Configurations' to control how Eclipse executes the application. For example, J2EE based projects need to publish content and start the application server. Contrast this with simply starting a JVM for a regular Java application.
When you select a configuration, Eclipse records this for future use. You can access these by selecting the 'Run/Run Configurations' menu item or selecting 'Run Configurations' from the little drop down menu next to the run and debug toolbar buttons. You can also add new launch configurations through the Run/Debug Configurations dialog that opens. In this dialog, you should see one or more configurations that you previously launched. Selecting one reveals all the info Eclipse uses to launch your application. One tab called 'Common' contains options for controlling the your favorites menu. Checking the box next to Run or Debug will add this launch configuration to the top of its corresponding menu.
If you only have a single configuration in your menu then Eclipse will launch it when you click the associated button. If you have more than one then Eclipse launches (sometimes) the most recently used. I say sometimes because, occasionally, one launch configuration causes another to launch, which cause the last used configuration to be the second one when you would expect it to be the first one. Usually this happens to me when I launch an application, which needs to be built and the build launches a tool. When this happens, just select the correct launch configuration from the drop down menu.
You can bind a keystroke combination to the Run and Debug commands through the 'Windows/Preferences' menu item. Then select 'General/Keys' in the tree control on the left.

Running Eclipse projects on the Command Prompt

I have a console-based C project in Eclipse. Is there a button I can press to launch my application in a Command Prompt window?
You can run your application as an External Tool, and there's a toolbar item for that. Looks like a green circle with a white arrow, beside a red toolbox. I'm a Java developer so I don't really know the CDT, but at least in the JDT you can run any command line tool in this way. (If it's not in your toolbar, right-click the toolbar and choose Customize Perspective… then find the External Tools item under Launch, and add it.)
First, click the down-arrow beside the button and then choose External Tools Configurations…. In the dialog, select Program from the left side and then click the New button in the toolbar. You are basically creating a shortcut that will live in the toolbar. At this point you can fill out the command line details to run your application. There's a lot of goodies like setting up environment variables, requiring a build of your projects before launching, etc. When you're done, save it, and you can run it as often as you like by clicking the arrow-and-toolbox button. You can come back and edit it later too, make duplicates, etc.
If you're working with a team, or you just want to do a really nice job:
In the Common tab, under Save as, choose Shared File. This will create a file in your project to represent the tool shortcut that you're building. That means you can check it into your source tree, and others can use it too. These files are XML so you want to check them in as text, not binary.
Start your working directory with ${workspace_loc} so that anyone who checks out your project can run it without having to adjust the shortcut for their file system.
Not directly, but you could configure an Ant task to run it (if it doesn't require console input), or you can configure firing up a JVM under Run|External Tools.