Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Network Connections Active Provider selection preference(Oomph doesn't want to record it normally)
Network Connections Active Provider selection preference [message #1753083] Wed, 01 February 2017 17:40 Go to next message
Daniel Wilson is currently offline Daniel WilsonFriend
Messages: 11
Registered: February 2017
Junior Member
Does there exist an org.eclipse.wst.internet node other than cache and ssh2 that'll record the preference for Active Provider under General=>Network Connections?

I'm trying to get my unit upgrade from Mars.1 to Neon.2, and since my organization's firewall blocks the marketplace, it'd be nice to ensure the active provider was set to Direct in any given new workspace so no one gets an annoying auth challenge from the firewall. Oddly, this didn't even happen in Mars, but the fix is easy enough if I can get it to stick.

I dealt with a similar Oomph issue in Mars, actually -- PHP=>Editor=>Save Actions=>Remove trailing whitespaces=>Ignore empty lines wouldn't record normally, so I had to manually edit the setup file.
Re: Network Connections Active Provider selection preference [message #1753120 is a reply to message #1753083] Thu, 02 February 2017 03:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Certainly the marketplace has made changes in Neon how it does authentication, so perhaps that support still isn't quite right...

I don't know specifically how WST stores any of its preferences. I do know that the General -> Network Connections are stored as configuration scoped preferences, not instance scoped, so they are stored in the installation's configuratiaon/.settings/*.prefs. The preference recorder only records instance-scoped preferences, so that makes capturing the changes trickier. The installer itself supports settings the network connection preferences and if you set them there, those preferences will be copied to each installation created by the installer, so that's one approach to use. Another approach is to resource copy task that copies the file containing the network preferences into each installation. Preference tasks could accomplish this as well, but direct recording isn't so easy.

You can use Navigate -> Open Setup -> User to open the user.setup, and then the toolbar button for Capture Preferences can be used to record any preference as it's current set in the preference store. I tried this for the org.eclipse.core.net node, but it captures them as instance scoped preference and I'm not sure that the core.net plugin will respect those. You could change /instance to /configuration in the key...

With regard to your other problem, we noticed that some preference dialogs defer changing the preference values to happen after the the OK processing, so we changed the recorder to also defer (post event to display thread) to process the recorded changes, so maybe that problem is fixed. If not, we could look into fixing that if there is a bugzilla describing how to reproduce the problem.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Network Connections Active Provider selection preference [message #1753215 is a reply to message #1753120] Thu, 02 February 2017 17:51 Go to previous messageGo to next message
Daniel Wilson is currently offline Daniel WilsonFriend
Messages: 11
Registered: February 2017
Junior Member
I see. Stupidly, I'm not actually making use of the installer functionality -- I'm just using Oomph to make an installation.setup that'll carry some default preferences into any new workspace, and otherwise using a batch script to xcopy a pre-installed application folder into Windows' Program Files directory. As such, it seems like my problem's a bit illusory -- I had a look in or.clipse.core.net.prefs, found proxiesEnabled and systemProxiesEnabled set to false, and realized my testing had been with copies of a clean (other than having the Subversive plugin installed) application folder, rather than one that'd had the Active Provider changed. A brief test even confirmed that a new workspace in a copy of the test folder I'd been working with didn't exhibit the issue. So that resolves that.

My other problem? If you're refering to the PHP save action not recording properly, I can confirm that's been fixed in Neon. In fact, I think it may've been fixed in Mars.2.

Thanks for accidentally pointing out my unwitting folly; it proved extremely helpful!

[edit] Or not...copying the thing out and firing up that version in a new workspace actually sees Active Provider go right back to Native. Drat. I'll try that capture preferences button.

[edit 2] And after further investigation, I've found why it's doing that -- Program Files is being troublesome by not letting it write to its own preferences, so it's making new ones off in %userprofile%\.eclipse\org.eclipse.platform_4.6.2_578509193_win32_win32_x86_64. I'm guessing they start as defaults, and since Oomph doesn't record the two settings I'm having trouble with, default they stay. I understand better what you meant by instance vs config scope. I guess I'll see if I can't get away with having the install script copy core.net.prefs into said userprofile folder, creating it, before first running eclipse.

[Updated on: Sat, 04 February 2017 00:17]

Report message to a moderator

Re: Network Connections Active Provider selection preference [message #1753459 is a reply to message #1753215] Mon, 06 February 2017 17:39 Go to previous messageGo to next message
Daniel Wilson is currently offline Daniel WilsonFriend
Messages: 11
Registered: February 2017
Junior Member
Update: further investigation has revealed that if I pull org.eclipse.core.net into installation.setup, change the key to configuration as suggested, and also shove installation.setup into the crazy userprofile directory, this almost works. It does re-write the prefs file, but only after it's already attempted to make the proxy connection, such that the solution works after the second application start, but not on the first run. Is there a setup directive to make it write the preference changes before they get read?
Re: Network Connections Active Provider selection preference [message #1753485 is a reply to message #1753459] Tue, 07 February 2017 02:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
No, we can't write the network preferences before they're read because performing setup tasks is inherently something that happens late, and even if we tried to change that to make it happen early, Oomph itself relies on accessing the network so the core.net bundle will get activated before any Oomph bundle can be activated and the network will generally be accessed to gather the tasks to be performed...

Given you're creating an installation that you just copy, have you tried just changing the network proxy settings in the installation you're copying before you copy it? I.e., setting the contents of <installation/configuration/.settings/org.eclipse.core.net.prefs to the values you want in the installation that you're copying? You mention this "userprofile" directory, so I assume you're creating a read-only installation, but even in that case, I believe it should still use the preferences in the installation's configuration until the user changes them to be different for their use of the read-only installation.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Network Connections Active Provider selection preference [message #1753558 is a reply to message #1753485] Tue, 07 February 2017 17:27 Go to previous messageGo to next message
Daniel Wilson is currently offline Daniel WilsonFriend
Messages: 11
Registered: February 2017
Junior Member
Oh heck, hence that whole defference thing you mentioned. Darn, that was a dumb question.

Indeed I have, however, Windows does not like things writing to the otherwise-logical Program Files directory, so it runs off and generates a whole new configuration folder in \Users\%name%\.eclipse\org.eclipse.platform_4.6.2_578509193_win32_win32_x86_64\ when one first launches it, and the core.net.prefs file it shoves in configuration\.settings defaults to native. Why it doesn't base this thing off the one in the application's actual location is beyond me.

I can copy org.eclipse.core.net.prefs into %userprofile%\.eclipse\org.eclipse.platform_4.6.2_578509193_win32_win32_x86_64\ configuration\.settings, creating most of that tree in doing so, and it does work, but only for the user that runs the script that does the copies; thus kinda violating the whole installation settings premise.
Re: Network Connections Active Provider selection preference [message #1753595 is a reply to message #1753558] Wed, 08 February 2017 04:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
I see. That kind of sucks and also seems kind of wrong/inconsistent. It certainly implies there's no way to create a read-only installation that has anything but default values for configuration scoped preferences. There are ways to set instance preferences for an installation http://blog.vogella.com/2012/08/07/eclipse-papercut-9-default-preference-settings-via-plugin_customization-ini-type-filter-example/ but I don't think this could set configuration scoped preferences. It's possible that core.net looks in both instance and configuration scoped preferences when reading, but I'm not sure.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Network Connections Active Provider selection preference [message #1753845 is a reply to message #1753595] Fri, 10 February 2017 16:09 Go to previous message
Daniel Wilson is currently offline Daniel WilsonFriend
Messages: 11
Registered: February 2017
Junior Member
Yup, no joy there. I guess I'll just go with a hybrid approach: capture the preferences, change their keys to config-scope, sorting it for all future launches, and having the install batch just lazilly go
xcopy /eq eclipsePHP\configuration\.settings %userprofile%\.eclipse\org.eclipse.platform_4.6.2_578509193_win32_win32_x86_64\configuration\.settings\
to prevent it from turning up on the first launch. First launch for other users will exhibit the problem, but there's admittedly little chance of a workstation changing hands before moving to Oxygen.
Thanks again for the help!
Previous Topic:Minimal API to install arbitrary product from udpate site
Next Topic:Conflicting Dependency
Goto Forum:
  


Current Time: Fri Apr 26 14:31:52 GMT 2024

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

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

Back to the top