Skip to main content



      Home
Home » Eclipse Projects » Oomph » Conditional setup task for empty workspaces
Conditional setup task for empty workspaces [message #1854880] Fri, 16 September 2022 02:42 Go to next message
Eclipse UserFriend
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 04:41 Go to previous messageGo to next message
Eclipse UserFriend
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...
Re: Conditional setup task for empty workspaces [message #1854907 is a reply to message #1854883] Sat, 17 September 2022 06:12 Go to previous message
Eclipse UserFriend
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: Mon Jun 16 04:10:40 EDT 2025

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

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

Back to the top