Store team preferences for file type associations in SCM?
On my development project, we have a component that's implemented in Groovy. Groovy files are simply text files that use the Groovy language and end with file extension .groovy.
Because Groovy is not very common, the default Jazz SCM file association is "application/unknown" and since people don't know any better to associate .groovy with "text/plain", we have many Groovy files in SCM with "application/unknown" which causes some problems, as you can imagine.
We have sent a note to the team explaining how to configure the filename extension to MIME type mapping, but this relies on everyone doing it and breaks down as people set up new development environments and forget this step or as new team members join the project.
It made me think that Eclipse already has a solution for this with the .settings folder and the prefs files (e.g. .settings/org.eclipse.core.resources.prefs). Is there a way to specify the file extension to MIME type mapping using something like a file so that we can put in source control and share it across teams? As I think about it the .settings approach probably won't work because that's scoped to a project and the MIME type mappings is scoped to the workbench (I think).
Because Groovy is not very common, the default Jazz SCM file association is "application/unknown" and since people don't know any better to associate .groovy with "text/plain", we have many Groovy files in SCM with "application/unknown" which causes some problems, as you can imagine.
We have sent a note to the team explaining how to configure the filename extension to MIME type mapping, but this relies on everyone doing it and breaks down as people set up new development environments and forget this step or as new team members join the project.
It made me think that Eclipse already has a solution for this with the .settings folder and the prefs files (e.g. .settings/org.eclipse.core.resources.prefs). Is there a way to specify the file extension to MIME type mapping using something like a file so that we can put in source control and share it across teams? As I think about it the .settings approach probably won't work because that's scoped to a project and the MIME type mappings is scoped to the workbench (I think).
2 answers
We are looking at ways to share settings in a team-first friendly way.
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/187730
Until then, the recommendation is to share eclipse preferences by setting up a base eclipse installation that has the preferences set up properly and either exporting the settings for others to import, or copying the eclipse zip around as a starting point for users to create their Eclipse installation from.
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/187730
Until then, the recommendation is to share eclipse preferences by setting up a base eclipse installation that has the preferences set up properly and either exporting the settings for others to import, or copying the eclipse zip around as a starting point for users to create their Eclipse installation from.
You will want to associate the *.groovey extension with the text type in Eclipse. This means all the new files will be considered text.
Window > Preferences > General > Content Types.
Select "Text" in the upper pane of Content types. In the bottom pane containing File associations, add the additional pattern.
Eclipse allows export/import of preferences File > Export > General > Preferences. This could be put under Source Control, but yes, it means that everyone needs to know to import it unless you do as John suggests and make a customized install available.
Window > Preferences > General > Content Types.
Select "Text" in the upper pane of Content types. In the bottom pane containing File associations, add the additional pattern.
Eclipse allows export/import of preferences File > Export > General > Preferences. This could be put under Source Control, but yes, it means that everyone needs to know to import it unless you do as John suggests and make a customized install available.