- This topic has 14 replies, 3 voices, and was last updated 10 years, 10 months ago by sdc-support.
-
AuthorPosts
-
ken.linck@crowncastle.comParticipantFor a few years now, we have had limited success in sharing Validation settings and code formatter settings. I tried the same thing with SDC with the same result as I got from pulse.
My goals as follows:
1) For Validation – I want to disable all(not suspend) though I would be willing to go suspend route too if that works equally.
2) I defined a new code formatter profile with all my code formatting preferences
3) I defined save actions and organize imports preferences.What I tried
1) Setup a workspace and then export the preferences file from it(Clicked disable all on validation pref, defined code formatting,save actions, then exported preferences, etc..)
2) Went into SDC and adding the preference file as the workspace tasks section as part of the package(not via Environmental policy).Testing:
1) I committed and promoted all my changes.
2) I built the installer.
3) I installed on another machine via the SDC portal
4) When eclipse finished installing, I started a new workspace
5) None of the preferences showsNotes:
In pulse, I just shared all the preferences I wanted but even then, depending on the order of what happens when a workspace is created, I would have partial success as to whether the validation settings would show up. Never did figure out why it was flaky. Just was hoping that flakiness would go away with SDC.Any help would be appreciated.
Thanks
norbertMemberIt is possible to force SDC to deliver such setting properly, from my experience:
– wrkspc task can be used to save files directly in a workspace – .metadata\.plugins\org.eclipse.core.runtime\.settings, this approach however does not work for Java Code Style settings since from some reason those settings are overridden by old values when a workspace is saved during a restart procedure just after an update.
– epf file that can be exported from Eclipse or manually created by converting prefs file does work, however SDC uses Workspace Mechanic plugin internally so that the file must be tuned a little bit:# @task_type LASTMOD
file_export_version=3.0
/instance/org.eclipse.jdt.ui/cleanup_profile=MY_PROFILE
…You can get more details by analyzing com.google.eclipse.mechanic.prefs file.
sdc-supportMemberHello Ken.
It’s possible to achieve what you are trying to do with SDC, it’s an easy task and it’s as you described: You need to export the eclipse preferences and add them to the package as a Workspace Task. If the package installation is not prompting you to setup your workspace task it could be because the preference file you added is invalid.
Can you please attach the preference file you are using, at the same time can you please check the error view on the package installation to see if any error is logged?
Best Regards.
Héctor – SDC Support
ken.linck@crowncastle.comParticipantWhen I get to work on Monday, I will attach the preferences file I gave to SDC.
FWIW, I do see the message about applying workspace settings after creating a new workspace. After I do that though, I immediately go into windows/preferences and, some times, none of my preferences from my exported file show up.
Any chances something like this is happening(only explanation I can think of):
1) Workspace settings are applied to the hard drive but not loaded into memory or the original preferences are cached in memory and somehow ignoring the changes applied to file?
2) Once closing eclipse, the cached settings are written back and thus my preferences that I wanted to begin with are lost besides never loaded?Sometimes it does work and it makes me think that the preferences are not cached somehow and thus loaded from the files where they are stored. It just completely odd.
Anyway, I cannot come up with anything else. I swear it’s something to do with timing of how/when preferences are loaded/changed/saved but I cannot put my finger on it not being a developer of eclipse, etc..
I can’t believe no one else notices this. It has been happening to us for years(via pulse previously) in different versions.
Anyway, will attach Monday.
Thanks for all your responses.
Ken
ken.linck@crowncastle.comParticipantIs there any chance, that with a slower machine, plugins are still initializing/configuring settings on a new workspace after the workspace tasks are being executed by SDC? If that is possible, maybe that is why I don’t always see my settings(preferences or other plugin files) being applied?
I assume the architecture handles it but thought I would ask anyway.
I don’t see a way to attach my preferences file here. Please advise.
Thanks
sdc-supportMemberHello Ken.
Yes, it’s possible that Eclipse is overwriting your preferences. We had a similar issue before, you can see the thread with the solution here http://www.genuitec.com/support-genuitec/viewtopic.php?f=18&t=3424
The problem on that case was that they configured the Workbench layout but eclipse was overwriting it when they restarted eclipse, so our fix was to force Eclipse to write the settings to disk right after we applied them. Not sure if this is similar to your case.What kind of preferences are you configuring, when you have a chance attaching the preferences file, will be awesome.
Best Regards.
Héctor – SDC Support
ken.linck@crowncastle.comParticipantI have no idea how to attach preference file here. I tried copying the content of the preference file but, get a 404 when i submit probably due to some encoding issues or special characters in the pref file.
Please advise.
sdc-supportMemberKen,
just below the captcha you have to complete before you submit your response, there is an upload attachment section, you could use that. In case you does not have access to it, feel free to send us an email referring to this forum thread, pulse [at] genuitec.com
Best Regards
Ignacio
SDC Support
ken.linck@crowncastle.comParticipantNot getting email updates from ticket I have from you. Thought I would try this route.
When I update the myeclipse package in SDC such as adding a preference, you mentioned having to force eclipse to restart for the preference to take effect. How do I do that once the changes applied?
Also, I looked at your restore workspace layout thread. If that is what is potentially happening to my preferences, I assume I will need a .class file for that since it is not workbench layout related right?
Ken
sdc-supportMemberKen,
My Apologies for the delay of the response, the ticket system is misbehaving for this particular ticket. To enable the “Require restart after all package updates” feature, please open your SDC Admin console and under the security policies on the “Updates” tab at bottom right there is a check box you need to enable, please be sure that the security policy that you select is the one that is used by your ME package. After this commit and promote, both your package and your security policy. Here is a link to SDC documentation on security policies: http://gosecure.genuitec.com/help/sdc_admin.html#configuring_a_security_policy
Best Regards
Ignacio
SDC Support
ken.linck@crowncastle.comParticipantThank you. Got it.
Did you get my question regarding defaulting all the items in the list box as unchecked in addition to suspending the validator? I sort of see the list when i export the preferences. I am thinking maybe it’s the same issue as suspend and forcing the restart.
The only question I have is can you tell me all the lines I should include in the epf to ensure the validation line items are unchecked? It was a little confusing. Many of the lines i saw were one to one for each item in the validation list but there were a few extras i think that i did not know if i need to carry it over.
Thanks
ken.linck@crowncastle.comParticipantI did not get even get “suspend’ to work. I sent an email about that because I could not do attachments in this forum(I don’t appear to have the permissions). I included screenshots(showing it not set and a screenshot showing how I set it up in SDC) and an attachment of the epf file(had one line it in to set suspend based on feedback I got). I created a new workspace, it told me it applied the changes and eventually told me to restart as suggested here as well. I restarted and when I went to view the preferences, suspend was not checked).
Also, as far as the validation line items, I did try the whole compare two workspaces with my changes. Unless I am doing it wrong, there still seemed a bit of noise in terms of other things that changed beyond the changes I made so I still had to guess which line items to extrat the changes from. That did not work but I think it probably did not work because of the same issue that suspend did not work.
If you are going to ask, I did commit/promote. The fact that it told me to restart after supposedly applying my changes means I must have promoted it properly from SDC.
Ken
sdc-supportMemberKen,
Thanks for the information you sent to us over the support system, we are following your request over the support system.
Best Regards
Ignacio
SDC Support
ken.linck@crowncastle.comParticipantJust wanted to thank everyone for their help. I am moving along well and hopefully nearing my journey on getting this setup for our team.
I have another general approach type question. Is there anything in SDC where, once a workspace is created, the developer can choose a package that just contains project sets and preference settings designed for that package set? I don’t think it makes sense to make different myeclipse installer packages for each one(This is on-demand delivery right?) Can that be used for MyEclipse?
So basically, a new workspace is created, SDC delivers the across the board workspace settings/preferences. Then developer decides they want to get the development branch for Application A. Rather than do all those steps to import and define working sets for Application A, can SDC be configured to do that configuration for them?
Also, some of our plugins are environment specific. Meaning, developer has to give their server name and port number which is used to deploy software or they provide a number and we can get the server and port number. We have a plugin for JRebel that requires the specific server port number but I don’t know what it is until developer provides it after the workspace is created. I assume I need a special custom task to prompt them for that info and then I could setup the preferences or plugin files and do what i want correct?
Thanks again for advice, recommended practices, etc..
sdc-supportMemberKen,
Unfortunately an SDC package is tied to a set of workspace tasks, you can not choose to use different set of workspace tasks like preferences or project sets from one package to another. You will need to create a package and its installer for each set of workspace tasks you need.
Regarding your question about specific deployment settings you can always create a custom workspace tasks, for more information about how to create those please take a look at http://www.genuitec.com/sdc/docs/sdc_admin.html#appendix_d
Best Regards
Ignacio
SDC Support -
AuthorPosts