DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3
  • Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL
  • Understanding and Learning NoSQL Databases With Java: Three Key Benefits
  • Achieving Inheritance in NoSQL Databases With Java Using Eclipse JNoSQL

Trending

  • Dropwizard vs. Micronaut: Unpacking the Best Framework for Microservices
  • Scaling DevOps With NGINX Caching: Reducing Latency and Backend Load
  • Building an AI/ML Data Lake With Apache Iceberg
  • Driving DevOps With Smart, Scalable Testing
  1. DZone
  2. Coding
  3. Frameworks
  4. Link to Files and Folders in Eclipse

Link to Files and Folders in Eclipse

By 
Erich Styger user avatar
Erich Styger
·
Sep. 18, 14 · Interview
Likes (0)
Comment
Save
Tweet
Share
13.5K Views

Join the DZone community and get the full member experience.

Join For Free

eclipse projects have the nice features that they can link to files and folders: so instead of having the physical file, it is just a pointer to a file. this is very cool as that way i can point to shared files, or keep files in a common place referenced from projects, and so on.

linked folder and file in eclipse

linked folder and file in eclipse

as with most things in eclipse, there is not a single way how to do things. so i’m showing in this post several ways how to link to files and folders.

creating a new link

select the folder/project where to create a link to a file. use the context menu with n ew > file (or the menu file > new > other > general > file ):

new file

new file

that opens a dialog to create a new file. i can select which project/folder i want to use for this:

new file dialog

new file dialog

next, click on ‘advanced’, enable ‘link to file in the file system’ and browse to the file you want to link to:

link to file

link to file

this will set the link to the file:

specified link to file

specified link to file

as an absolute path (c:\….) is probably not really what you want, there are eclipse path variables you can use:

path variables

path variables

:idea: note that these are eclipse path variables (not eclipse build variables), see “ eclipse build variables “.

to use the path variable for the link, use the ‘extend…’ button and then select the file, then press ok:

extending path variable

extending path variable

this now uses a path variable for that link. note that it shows as well to which file it resolves:

resolved path variable for linked file

resolved path variable for linked file

press finish, and the link will be created. note the small ‘arrow’ in the icon (see “ icon and label decorators in eclipse “) to show a linked file:

linked file

linked file

modifying a link

if you right-click on that linked file and select ‘properties’ of it, you can see that it is really a linked file, with the link information, and you can change/edit that link any time:

linked file properties

linked file properties

linked folder

as for link to files, its possible to create ‘link to folders’. it works the same way: select the folder, then use file > new > folder:

creating new folder

creating new folder

  • use default location : this creates a normal folder.
  • virtual folder : this does not create a physical folder, but a virtual ‘container’ where i can place links or other virtual folders. this is useful to organize links and virtual folders, without the need for a physical folder.
  • linked folder : like linked files, this links to a folder.

:idea: the cool thing about linked (source) folders is: when i add new files to that folder where it links to, the projects with that linked folder to it will ‘see’ the extra files too, and that way new files are automatically added to the project. i do this many times, and it is like a ‘library’ folder for me: i can add a new source file to that ‘library’ folder, and every project linking to that folder will automatically have it added. :-)

deleting links

linked files and linked folders can be deleted from the project too. in that case, the destination of the link is *not* deleted, only the link:

deleting a link to a folder

deleting a link to a folder

using drag & drop

as mentioned at the beginning: there are multiple ways to do the same thing in eclipse. instead using the top menu, or using the context menu, i can use drag & drop. to create links, i need to hold the ctrl key:

drag and drop with ctrl pressed to create a link

drag and drop with ctrl pressed to create a link

:idea: notice that during the drag&drop with ctrl key pressed the icon gets a ‘+’ to show copy/linking mode.

when i drop the file: i get the usual choices how i want to create the link:

link to files and folders dialog

link to files and folders dialog

drag&drop of files and folders do not work inside eclipse. what works as well under windows is to drag&drop a file or folder from the windows explorer :-).

summary

links to files and folders are a cool thing in eclipse, and they can be created with menus or even simpler with drag&drop. this is not limited to inside eclipse: i can drag&drop from outside with the windows explorer and that way can link to files and folders everywhere :-)

happy linking :-)

Links Eclipse

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3
  • Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL
  • Understanding and Learning NoSQL Databases With Java: Three Key Benefits
  • Achieving Inheritance in NoSQL Databases With Java Using Eclipse JNoSQL

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!