Is there a way to create an action in eclipse to export my jar to a certain directory? - eclipse

Is there someone to configure a one click or one key action to export my build product to a certain directory? I'm coming from Visual Studio where I can set the output directory and press F6 to do this.

You can right click on project. Export... Then click on Java/Jar file and next. You will se something like this. Specify output filename, and on the next screen click on save description ( see pictures below ). Then after you saved jardesc to the project root, right click and "Create JAR" command. Two click, not one (if you check overwrite in first screen). If you want to automate with a shortcut, try the plugin in this answer.

Related

How can I configure Eclipse to save console out for my build?

I specifically only want console out for Building my code, which is primarily C++. Every search for this leads me to configuring Run Configuration(s) to output the console. I'm not trying to RUN my program, just want the additional detail from console-out when I build and get warnings, some of which I'm not getting filepath info in the "Problems" window. Thanks!
This might already be set up by default. It was for me, once I found the solution I realized this. Check if the following filename exists:
<workspace_name>/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log
If it's there, you might already be setup with build output saved to a file. It should be saved in this file. If you don't have this file, and/or you want to change the file location, do the following: click Window context menu->Preferences. Expand the triangle next to C/C++ on the left sidebar, then under that sub-menu, expand the triangle next to the Build menu, then click Logging. Inside the Logging window, ensure the checkbox next to Enable global build logging is checked, then click the Change... button next to the Log file location text box and select your log file. (In Linux, this part may not be so easy if you don't have a log file already touched. In this case, navigate to the directory in which you want to save your log file, then click the button in the top left that looks like a piece of paper with a pencil over it (when hovering over this button it says "Type a file name"), and then type the name of the log file you wish to use. Click Ok.) Then in the Preferences window, click Apply and/or Ok. Next time you build, this log file should be populated automatically with your Console output.

Eclipse open all files in project

How can I open all source code files in a eclipse project at once? It takes too long to open all files in large projects by expanding out the packages and clicking on all the files.
I would like to know how to do this so I can ctrl+e to classes quickly.
It is not a good way to keep open all source files in a project because a project may have hundreds of source files. There is NO direct way to open all source files in eclipse.
However you can do it in two ways:
Using open resource dialog:
Create a working set which includes your project. Refer this.
Press Ctrl+Shift+R and select the your working set(Click on the downward pointed triangle button)
Type *.java in the text box. Dialog will list all java files in your project. Press Ctrl+A to select all files. Click on open button.
Using search dialog:
Select your project in Package explorer/Navigator/Projects view.
Press Ctrl+H. Go to File search tab. Leave "Containing text:" as blank. In File name patterns text box enter *.java. In scope section choose Selected resource option. Press search button. All source files will be displayed in search view.
Change the view layout of Search view to Show as list(In search view toolbar click on the downward pointed triangle button)
Press Ctrl+A to select all results. Right click and select open option.

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.

Copy files from search tab in eclipse 3.4

I just want to copy list of files displayed in eclipse search tab,
When i try using right click copy and paste into some folder it does not work.It actually copies the file location rather than the file itself
There is no direct way to do this. What you can do is:
Double click on the entry in the search tab
F12 to switch to the editor
Ctrl+Alt+W to select the file in the navigator view
Drag the file from there to the place where you want it
Too tedious? Then open a command prompt or shell and use the file location there.
If you need file locations then use Eclipse search csv export plugin.
If want to copy the whole file(s) into a folder then refer #Aaron Digulla answer(Its applicable to single file). In case of multiple files. Press Ctrl + A to select all search results in search view. Right click on the selection. Choose Show In > Package Explorer. Drag file(s) to a folder in any file explorer.

Can't select Primary Output as target of shortcut in Visual Studio 2005 setup project

I've Added a setup project to my solution (didn't use the wizard) I then added the primary output of the Windows Application I have coded to the Applcation Folder node (Right click the setup project in Solution-Explorer and select View -> File System). I Right clicked the User's Desktop node and selected 'Create Shortcut to user's Desktop' in the context menu. Typed a name for the shortcut and then in the properties window clicked the ellipsis button for the Target property. A dialog is displayed but it won't expand the Application folder node and let me select the Primary Output as the target !!! WTF ???
I have done this on another project but I can't for the life of me figure out why I can't do it on this one. Hell! the projects are almost identical in every other way. Gah! going bald. Hoping someone out there is having a better day than me and has time to give me the probably screamingly obvious solution and make me feel lame.
You actually have to right-click on 'Primary Output From ' in your setup project, and create a shortcut to that. Then, you can move the shortcut over to the 'Users Desktop' location within your setup project.
I think you've created a shortcut to the desktop, on the desktop.
Try clicking on User's Desktop, then right-clicking in the right hand pane, and selecting "Create new shortcut" from there.