Skip to content

#1788: Created a commandlet to simulate the behaviour of ln -s#1847

Merged
hohwille merged 36 commits into
devonfw:mainfrom
KarimALotfy:feature/1788-add-ln-commandlet-to-create-links
May 26, 2026
Merged

#1788: Created a commandlet to simulate the behaviour of ln -s#1847
hohwille merged 36 commits into
devonfw:mainfrom
KarimALotfy:feature/1788-add-ln-commandlet-to-create-links

Conversation

@KarimALotfy
Copy link
Copy Markdown
Contributor

@KarimALotfy KarimALotfy commented Apr 23, 2026

This PR fixes #1788

Implemented changes:

Added ide ln -s commandlet to create file links.


Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Apr 23, 2026
@KarimALotfy KarimALotfy self-assigned this Apr 23, 2026
@KarimALotfy KarimALotfy moved this from 🆕 New to Team Review in IDEasy board Apr 23, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 23, 2026

Coverage Report for CI Build 26474880870

Warning

No base build found for commit d0a33aa on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 71.114%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15609
Covered Lines: 11576
Line Coverage: 74.16%
Relevant Branches: 6952
Covered Branches: 4468
Branch Coverage: 64.27%
Branches in Coverage %: Yes
Coverage Strength: 3.14 hits per line

💛 - Coveralls

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 23, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@jakozian jakozian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice approach! But i requested changes because most things regarding the issue can be done with FileAccess/FileAccessImpl.

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
@jakozian jakozian self-requested a review April 24, 2026 12:22
@jakozian jakozian moved this from Team Review to 👀 In review in IDEasy board Apr 28, 2026
@KarimALotfy KarimALotfy moved this from 👀 In review to Team Review in IDEasy board Apr 28, 2026
@KarimALotfy KarimALotfy moved this from Team Review to 🏗 In progress in IDEasy board Apr 28, 2026
@KarimALotfy KarimALotfy added commandlet ide sub-command CLI IDEasy command-line-interface (parsing args, etc.) labels Apr 28, 2026
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
@jakozian jakozian moved this from 🏗 In progress to Team Review in IDEasy board Apr 29, 2026
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java
Comment thread cli/src/main/resources/nls/Help_de.properties
Comment thread cli/src/main/resources/nls/Help.properties
@KarimALotfy KarimALotfy moved this from Team Review to 🏗 In progress in IDEasy board Apr 30, 2026
@jakozian jakozian moved this from 🏗 In progress to Team Review in IDEasy board Apr 30, 2026
@KarimALotfy KarimALotfy moved this from Team Review to 🏗 In progress in IDEasy board Apr 30, 2026
…t to symlinks, since existing symlinks or junctions will be overwritten anyway
@KarimALotfy
Copy link
Copy Markdown
Contributor Author

@hohwille the build now is successful after removing the failing test. It was not failing on my local since it is enabled only on Linux and Mac , and was actually unnecessary, since the -f flag doesn't have an effect on the link method, to keep existing functionality

Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarimALotfy thanks for your improvements. 👍
Sorry, if I still was not clear enough but my vision is that we make the boolean parameters override and relative configurable via flags.
You did this but only partially and I would love to have it consistent.

Comment thread cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/LnCommandlet.java Outdated
KarimALotfy and others added 7 commits May 22, 2026 14:27
- Remove override parameter and force flag  from link method and ln commandlet
- Modified deleteLinkIfExists to handle all types of links
- Modified LnCommandletTest to handle all OS's in the same tests, instead of separating them by EnabledOnOs
@hohwille hohwille merged commit 89db070 into devonfw:main May 26, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in IDEasy board May 26, 2026
@hohwille
Copy link
Copy Markdown
Member

@KarimALotfy I have already rested this PR on Windows and found but #1982 but that is not a bug of your implementation but a bug that was already there before.
Could you test and confirm the features on Linux (in WSL) and then set QA approved label?

@hohwille
Copy link
Copy Markdown
Member

rested also on Ubuntu: works like a charm.

@hohwille hohwille added the QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented. label May 28, 2026
laert-ll pushed a commit to laert-ll/IDEasy that referenced this pull request May 29, 2026
…devonfw#1847)

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI IDEasy command-line-interface (parsing args, etc.) commandlet ide sub-command QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Add ln commandlet to create links

5 participants