Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to quickly copy the current editing file name or full file path in Eclipse (Luna)?

This 'solution' doesn't look to work any longer in the Luna version: Copy path/file name in Eclipse to clipboard

This is actually a must have feature for a rich IDE!

like image 382
DrumM Avatar asked Nov 19 '14 16:11

DrumM


People also ask

How do I copy a file path in Eclipse?

Just select the file tab and hit Ctrl + C to copy file basename into clipboard. Hit Alt + Enter to bring up the file properties with absolute path and copy it manually.

How do you file in Eclipse?

Start Eclipse. Select File and then Import. From the pop up window expand the General option, select Existing Projects into Workspace and click the Next > button. In the next window select the Browse button and browse to the location of the project.


1 Answers

If using Eclipse 4.14 or later, from Dec 2019 or later, neither StartExplorer nor Path Tools nor Copy as Path works.

Instead, use EasyShell, which works great!

enter image description here


Additional note: as far as good Ecliplse plugins go in general, I also highly recommend the DevStyle plugin, set to "Dark Gray (Darkest Dark)" Workbench theme, with the DevStyle "Editor theme" (syntax highlighting) set to Sublime Text 3 (Monokai), by Jeremy Shepherd <-- Update Feb 2020: dead links. Instead, I've copied and pasted the contents of Jeremy Shepherd's .xml file at the bottom of this answer.

enter image description here

Sublime Text 3 (Monokai) - by Jeremy Shepherd--theme-25808.xml:

<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="25808" name="Sublime Text 3 (Monokai)" modified="2014-04-11 19:52:55" author="Jeremy Shepherd">
    <searchResultIndication color="#757575" />
    <filteredSearchResultIndication color="#757575" />
    <occurrenceIndication color="#000000" />
    <writeOccurrenceIndication color="#000000" />
    <findScope color="#111111" />
    <deletionIndication color="#D25252" />
    <sourceHoverBackground color="#000000" />
    <singleLineComment color="#75715E" italic="false" />
    <multiLineComment color="#75715E" italic="false" />
    <commentTaskTag color="#CCDF32" italic="false" underline="true" strikethrough="false" />
    <javadoc color="#76725E" italic="false" />
    <javadocLink color="#76725E" italic="false" underline="true" strikethrough="false" />
    <javadocTag color="#FD2971" italic="false" />
    <javadocKeyword color="#C2BFA6" italic="false" />
    <class color="#56D8F0" bold="false" underline="false" strikethrough="false" />
    <interface color="#D197D9" />
    <method color="#FFFFFF" />
    <methodDeclaration color="#7BE12A" />
    <bracket color="#D8D8D8" />
    <number color="#7FB347" />
    <string color="#E7DD6C" />
    <operator color="#D8D8D8" />
    <keyword color="#F12971" bold="false" />
    <annotation color="#FFFFFF" />
    <staticMethod color="#BED6FF" />
    <localVariable color="#E7F8F2" />
    <localVariableDeclaration color="#F12971" />
    <field color="#7BE12A" />
    <staticField color="#EFC090" />
    <staticFinalField color="#EFC090" />
    <deprecatedMember color="#D25252" underline="false" strikethrough="true" />
    <enum color="#7BE12A" />
    <inheritedMethod color="#BED6FF" />
    <abstractMethod color="#BED6FF" />
    <parameterVariable color="#79ABFF" />
    <typeArgument color="#BFA4A4" />
    <typeParameter color="#BFA4A4" />
    <constant color="#EFB571" />
    <background color="#272822" />
    <currentLine color="#3E3D32" />
    <foreground color="#F8F8F2" />
    <lineNumber color="#72736A" />
    <selectionBackground color="#757575" />
    <selectionForeground color="#D0D0D0" />
</colorTheme>

Sublime Text 3 (Monokai) - by Jeremy Shepherd--theme-25808.epf:

Too long to post here. See my dotfiles project to download it instead.

like image 139
Gabriel Staples Avatar answered Oct 21 '22 11:10

Gabriel Staples