Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .lnk files for TeXworks #11065

Merged
merged 10 commits into from
Mar 22, 2024
Merged

Support .lnk files for TeXworks #11065

merged 10 commits into from
Mar 22, 2024

Conversation

InAnYan
Copy link
Member

@InAnYan InAnYan commented Mar 21, 2024

Closes #10977.

I added mslinks package as a dependency: implementation line in build.gradle file and requires line in module-info.java.

Then, I edited the detectProgramPath function in org.jabref.gui.desktop.os.Windows. to handle TeXworks as a special case. It checks whether the link is present, and then extracts the target from link by using mslinks package. In case if the link is not present or there was some error while reading the link file the function fallbacks to default behaviour.

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

That is my first Pull Request and I am sorry if I missed something. There is some cluttering with commits and branches, because I forgot to start a new branch and edit CHANGELOG.md, will that be a problem?

@InAnYan
Copy link
Member Author

InAnYan commented Mar 21, 2024

Hmm, I see there 3 failed checks. But, Fetcher Tests - is it my failure? And problems with JDK 23 - what's this?

@Siedlerchr
Copy link
Member

You can ingore the unrelated tests

@calixtus calixtus changed the title Fix for issue #10977 Support .lnk files for TeXworks Mar 21, 2024
@koppor
Copy link
Member

koppor commented Mar 21, 2024

Users need to reset their preferences to get this working. Reason:

applicationCommands.put(PushToApplications.TEXWORKS, get(PUSH_TEXWORKS_PATH));

returns "" once TeXworks was selected.

Therefore, I introduced a getEmptyReturnsDefault and added to this branch.


Tried out locally, works.

@InAnYan
Copy link
Member Author

InAnYan commented Mar 22, 2024

Hello! I've checked all the review comments and did this:

  • Updated the build.gradle.
  • Filled the empty catch clause with Logger.debug.

I probably should have mentioned it before, but I have MiKTeX on my computer, and yes JabRef couldn't find TeXworks. But my fix solved this issue.

Oh, there seems some conflict in branch. What does this exactly mean? The new code for MathSci is not in its own branch, can it be the reason of the conflict?

@InAnYan
Copy link
Member Author

InAnYan commented Mar 22, 2024

Added log line

Siedlerchr
Siedlerchr previously approved these changes Mar 22, 2024
@Siedlerchr
Copy link
Member

Thanks, please resolve the conflicts now (merge upstream/main in your branch)

# Conflicts:
#	build.gradle
#	src/main/java/module-info.java
@InAnYan
Copy link
Member Author

InAnYan commented Mar 22, 2024

Can you help me a little bit? I've merged upstream/main with my fix-for-issue10977. I've combined the changes in upstream with mine. What should happen know? (I just don't have much experience with conflicts in Git and pull requests in GitHub 😄). Should there be another commit?

UPDATE:
I guess, InteliJ IDEA just not pushed the results

@Siedlerchr
Copy link
Member

You fixed the merge conflicts, so the only commit is the adjusted merge commit with your resolved changes. So, all done.
If you want to have a better understanding of Git, I can recommend this free open book https://jwiegley.github.io/git-from-the-bottom-up/
and the comics https://wizardzines.com/comics/ about git

@Siedlerchr Siedlerchr enabled auto-merge March 22, 2024 16:22
@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 22, 2024
Merged via the queue into JabRef:main with commit 72454e0 Mar 22, 2024
@InAnYan InAnYan deleted the fix-for-issue10977 branch March 22, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for parsing .lnk files for TeXworks
3 participants