Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Conditional setup task for empty workspaces
Conditional setup task for empty workspaces [message #1854880] Fri, 16 September 2022 06:42 Go to next message
Konrad Windszus is currently offline Konrad WindszusFriend
Messages: 40
Registered: July 2009
Member
Is it possible to execute a setup task only on new workspaces, but skip it on existing workspaces.
My use case is applying a custom Java Formatter for every new workspace, but allow users to override it afterwards (and keep that setting even after a restart).

Although https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Conditional_Tasks looks promising I haven't found a variable exposing the flag if a workspace is new or existing.
Re: Conditional setup task for empty workspaces [message #1854883 is a reply to message #1854880] Fri, 16 September 2022 08:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33252
Registered: July 2009
Senior Member
I can't think of a simple way. I thought maybe one use a file creation task for the file at <ws>/.metadata/.plugins/org.eclipse.core.runtime/.settings but that file is created to early already.

All I can think to make it simple is to define some new behavior where we create some file in the workspace metadata (or set some preference internally) if it doesn't already exist (or wasn't already set) and set some system property based on whether we created that file (set the preference) or not. Then that system property could be used as a filter. Of course that doesn't exist yet...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Conditional setup task for empty workspaces [message #1854907 is a reply to message #1854883] Sat, 17 September 2022 10:12 Go to previous message
Konrad Windszus is currently offline Konrad WindszusFriend
Messages: 40
Registered: July 2009
Member
Thanks for the reply. I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=580752 to track this.
Previous Topic:OPC UA
Next Topic:Validate Java runtime and product version on bootstrap and start
Goto Forum:
  


Current Time: Wed Nov 06 09:45:02 GMT 2024

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

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

Back to the top