Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Importing Linked Ressources with Windows Batch script(Linked resources. Script)
Importing Linked Ressources with Windows Batch script [message #1860133] Wed, 19 July 2023 08:37 Go to next message
Mike Gust is currently offline Mike GustFriend
Messages: 2
Registered: July 2023
Junior Member
Hello,

I have written a Windows Batch script that basically generates a new file "org.eclipse.core.resources.prefs" in which I add "pathvariable.PROJROOT=[PATH]". This does not work properly, as I have to do additional steps.

When I start eclipse and select "Linked Resources" under "Windows>Preferences" I get the warning " Path does not exist.". Then, if I click on the variable and on "Apply and Close", eclipse recognizes the path and everything is fine.

If I do that via the text file, I just open "org.eclipse.core.resources.prefs" and add the line "pathvariable.PROJROOT=[PATH]", eclipse recognizes the path and everything is fine.

Does anyone have the same problems? I worked with Beyond and Compare to see any meaningful differences between both approaches in ".metadata", but there is non.

I got the workspace already and just want to automatically set the linked resource variable with a script. Eclipse should recognize the path and without additionally opening the window and clicking on "Apply and close". Setting the variable in the file works perfectly fine with the script.

Best regards
Re: Importing Linked Ressources with Windows Batch script [message #1860154 is a reply to message #1860133] Thu, 20 July 2023 05:58 Go to previous messageGo to next message
Mike Gust is currently offline Mike GustFriend
Messages: 2
Registered: July 2023
Junior Member
Problem is solved. When using Windows bash scripts to write, (eg. %variable% >> %file%), it will add an whitespace at the end. This whitespace somehow hinders Eclipse to recognize the path. Using Windows PS it is possible to replace the whitespace by nothing. Then Eclipse will recognize the path from the get-go.
Re: Importing Linked Ressources with Windows Batch script [message #1860489 is a reply to message #1860154] Wed, 09 August 2023 20:55 Go to previous message
Zachary Price is currently offline Zachary PriceFriend
Messages: 5
Registered: August 2023
Junior Member
Hey! That's an interesting issue. It seems like Eclipse might need a refresh or trigger to recognize the changes made by your script. Maybe try restarting Eclipse programmatically after making changes to the file. You could use the Eclipse command line options like "-refresh" or "-clean" in your script after editing the prefs file. This might help Eclipse pick up the changes without manually clicking. Give it a shot!
Previous Topic:Unable to open Eclipse.app
Next Topic:I want to contribute via GSoC 2023
Goto Forum:
  


Current Time: Thu Oct 10 01:47:57 GMT 2024

Powered by FUDForum. Page generated in 0.10063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top