Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Preference not taking effect?(Default perspective not changing)
Preference not taking effect? [message #1822840] Sun, 15 March 2020 13:38 Go to next message
Sina MadaniFriend
Messages: 156
Registered: November 2015
Location: York, UK
Senior Member

I am trying to change the default perspective on an automated Eclipse install using Oomph, but no matter what I try it doesn't seem to work. I have tried placing the preference both inside and/or outside the "Product Version" element(s), tried with various keys and still it doesn't work. Am I doing something wrong or misunderstanding how Preferences work in Oomph? (see also attached image)

Re: Preference not taking effect? [message #1822846 is a reply to message #1822840] Sun, 15 March 2020 15:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
I think that's a tricky one. After all, by the time the preference task runs in the IDE, the default perspective will already have been created. So it's kind of an odd preference to store in instance scope; after all when is it used?

The value is stored in <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs. So if you had a Resource Creation task you could create this resource and that could work if you're defining a project setup that configures a workspace. But it sounds like you want a Product setup and there the workspace location of course is not known (and there can be multiple). Even if you had a resource creation task in the product setup, it too would run after the IDE is already open on a workspace at which point the default perspective too would already be created.

It seems a bit tricky looking at this:

But you don't want to change the actual plugin_customization.ini of the product bundle because that's shared across installations...

There is this alternative approach:

Such an argument could be added with an Eclipse Ini task and the resource could be created with a Resource Creation task perhaps similar to this one that creates the resource in the installation's configuration folder:
<?xml version="1.0" encoding="UTF-8"?>

Probably best that you figure out what you'd need to change manually in a given installation's folder such that when it opens a new workspace it opens the perspective you want, and then use setup tasks to automate that.

Ed Merks
Professional Support:
Re: Preference not taking effect? [message #1822920 is a reply to message #1822846] Mon, 16 March 2020 19:57 Go to previous message
Sina MadaniFriend
Messages: 156
Registered: November 2015
Location: York, UK
Senior Member
Thank you for your suggestion. I also found this article to be useful. I added a .properties file with the correct key-value preference, and I refer to this file in the eclipse.ini (with and it worked! I also added defaultPerspectiveId=org.eclipse.epsilon.perspective.EpsilonPerspectiveFactory to <eclipse>/configuration/.settings/org.eclipse.ui.ide.prefs, although this file has to be created as part of the install (it isn't there until Eclipse is launched for the first time).
Previous Topic:Complete reference for all concepts in Oomph?
Next Topic:Filter on Java version >= 11
Goto Forum:

Current Time: Mon Dec 06 20:15:11 GMT 2021

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

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

Back to the top