Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Problem with certain setup elements not having an effect
Problem with certain setup elements not having an effect [message #1777366] Tue, 28 November 2017 22:28 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 662
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I'm using the Eclipse Installer for setting up Eclipse for an introductory programming course, and in general it has made things a lot easier! However, this year I try to add a custom perspective and have a couple of issues:

- The custom perspective is made by saving the Java perspective as "TDT4100" and modifying it, then saving and importing the preferences. The perspective removes lots of things that aren't relevant for the course. The perspective is available and I set it as default with the following preference /instance/org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaPerspective.TDT4100
When opening the list of available perspectives in the newly installed Eclipse this perspective is appears and it is marked as default, but it is not activated when starting up!

- I found a tip that you need to set an option in the ini file to select perspective, so I add an Eclipse Ini task: -perspective=org.eclipse.jdt.ui.JavaPerspective.TDT4100
But this seemingly has no effect, the Resource perspective still opens on startup. Is this perhaps because the perspective is a custom one?

- My custom perspective includes the various views used during debugging, hence I set the preference for switching perspective when a launch suspends to never: /instance/org.eclipse.debug.ui/org.eclipse.debug.ui.switch_perspective_on_suspend=never
However, this doesn't seem to have an effect, when I open the Run/Debug > Perspective preference, this preference is still set to Always

Any suggestions for how to solve these problems?
Re: Problem with certain setup elements not having an effect [message #1777400 is a reply to message #1777366] Wed, 29 November 2017 08:12 Go to previous messageGo to next message
Anders  Jönsson is currently offline Anders JönssonFriend
Messages: 48
Registered: January 2012
Member
Are you working on the same installation expecting the preferences to update after a restart?
Or do you have all these issues even after a clean install of the entire IDE?

///Anders
Re: Problem with certain setup elements not having an effect [message #1777403 is a reply to message #1777400] Wed, 29 November 2017 08:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29539
Registered: July 2009
Senior Member
I know I Eike did some internal work investigating how perspectives might be better supported....

Just from your description I expect that the preference isn't applied until the IDE is running and at that point, there is already a perspective open. You can't even choose the default in the eclipse.ini because again, the perspective won't be present until after the IDE is started and runs the task. I expect the only way this is going to work (open with initial specialized perspective) is if you can ensure that the right information is in place in before the IDE starts.

I'm not sure why the perspective switching preference wouldn't properly apply. Given the value you show is "never", is the value really supposed to be "Always", or should it be "always"?
Re: Problem with certain setup elements not having an effect [message #1777406 is a reply to message #1777400] Wed, 29 November 2017 09:21 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 662
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I do a clean install and the perspective is Resource, not the custom TDT4100
Re: Problem with certain setup elements not having an effect [message #1777411 is a reply to message #1777403] Wed, 29 November 2017 09:37 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 662
Registered: July 2009
Location: Trondheim, Norway
Senior Member
Concerning the perspective: I guess the problem can be that the custom perspective becomes available too late to be used initially. What about creating a setup Task that explicitly switches the perspective?

Concerning the perspective switching preference: I exported the preference from another Eclipse and imported this setting into the setup editor, so the value should be correct. Just to check, I changed the value from "never" to "Never" and it made no difference.
Re: Problem with certain setup elements not having an effect [message #1777415 is a reply to message #1777403] Wed, 29 November 2017 10:15 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 662
Registered: July 2009
Location: Trondheim, Norway
Senior Member
BTW, I took a look in the org.eclipse.debug.ui.prefs file in .metadata/.plugins/org.eclipse.core.runtime/.settings and the value for switch_perspective_on_suspend is REMOVE_PREFERENCE_MARKER

Doesn't that look strange?
Re: Problem with certain setup elements not having an effect [message #1777416 is a reply to message #1777415] Wed, 29 November 2017 10:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29539
Registered: July 2009
Senior Member
Yes, I think that's exactly the comment from https://bugs.eclipse.org/bugs/show_bug.cgi?id=516566#c2 and in fact I noticed that indeed when the value set to "never" the preference isn't present, rather it is removed. So I assume this bug needs to be fixed ASAP to address your problem.
Re: Problem with certain setup elements not having an effect [message #1777427 is a reply to message #1777416] Wed, 29 November 2017 10:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29539
Registered: July 2009
Senior Member
Looking at fixing this code, I wonder what's actually going on in your scenario. Are you perhaps synchronizing your preference with Eclipse.org? I ask, because I don't see how the ill behaved code that inserts REMOVE_PREFERENCE_MARKER literally (rather than removing the preference) would kick in a scenario where you are purely applying values from a preference task in a setup...
Re: Problem with certain setup elements not having an effect [message #1777429 is a reply to message #1777427] Wed, 29 November 2017 10:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29539
Registered: July 2009
Senior Member
Ah, you probably have this preference in your user.setup and it has this bogus value and that overrides the value in any Product or Project setup you might be authoring. So removing this from your user.setup should allow you to test, and fixing the value should make it work properly, without needing the Oomph fix for the underlying recording problem.
Re: Problem with certain setup elements not having an effect [message #1777433 is a reply to message #1777415] Wed, 29 November 2017 11:07 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 662
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I tried on a different machine, which was previously untouched by oomph, and now the switch_perspective_on_suspend preference was set correctly. I believe the problem was that this setting was overwritten by a global one on my own machin, by oomph's sync preferences across workspaces feature. I think I'll need to turn it off...

The problem with the TDT4100 perspective not being opened, although it's the default, is still there, though...
Re: Problem with certain setup elements not having an effect [message #1777499 is a reply to message #1777433] Wed, 29 November 2017 17:33 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6394
Registered: July 2009
Senior Member
It's a while ago that I found a solution a similar problem. In the "CDO Explorer" product (you can find it in your Eclipse Installer) I added the following two tasks:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
  <setup:ResourceCreationTask
      id="plugin.customization.ini"
      excludedTriggers="STARTUP MANUAL"
      content="org.eclipse.ui/defaultPerspectiveId=org.eclipse.emf.cdo.explorer.ui.CDOExplorerPerspective&#xA;"
      targetURL="${installation.location|uri}/${installation.relativeProductFolder}/plugin_customization.ini"/>
  <setup:EclipseIniTask
      excludedTriggers="STARTUP MANUAL"
      option="-pluginCustomization"
      value="${plugin.customization.ini.targetURL|file}"/>
</xmi:XMI>


I don't remember exactly why I solved it this way, but probably because I didn't want the perspective to switch back to the default after the user had manually changed it.
Previous Topic:Preferences not updated on restart
Next Topic:CDT include paths with Oomph?
Goto Forum:
  


Current Time: Thu Sep 20 15:33:51 GMT 2018

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

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

Back to the top