Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do I add a new file extension in RTC and share it with the team?

I'm using RTC version 5.0.2.
I need to add a new file type based upon the extension.  I see how to do this in the preferences but I don't see how to share those settings with the team.

What I need is for .utf8 files to be TEXT and utf8 encoded.  I'd rather not do that one file at a time... new files will be created and need the same settings.

Any help appreciated

1

0 votes

Comments

In Eclipse you can export your preferences from [File] > [Export] > [General] > [Preferences] and check [Export All] in the dialog that opens. It exports all non-default settings. In the file that is exported you should be able to find the file encoding setting you added. Then if you import that preference file into other Eclipse work spaces, in theory, you will get that setting as well. I think it works best when imported into a new workspace, but it is something to try.

  Thanks Ian.


I am hoping there is a way to check in the result or a server setting so we don't have to rely upon people importing a configuration file.  Kinda like you can do with Project Explorer and file properties.  I know I can set the properties one at a time, but that doesn't work so well when new files are created... somebody will forget to set the properties!

If not, there must be a way to configure this on the server... where else would that long list of pre-configured file extensions come from :-)

I can you get confused. "File type" information never comes from the server. It's always a workspace/client configuration.

Enterprise preference management is a huge gap in Eclipse and a host of other IDE's. I think there are companies that provide solutions for Eclipse, but I don't think there s anything you could remotely call a standard across tools. It is a shame.....

Client or server doesn't matter to me too much.


What I want is for me to be able to specify the encoding of a file based upon it's extension.  I know I can specify based upon the fullpath because when I set the encoding, the .settings/org.eclipse.core.resources.prefs file is updated.  I then deliver that and everyone picks it up.

What I don't like about this approach is the setting is file specific... it's only good for one file.

If I could wildcard based upon file extension, that'd be fine.


Maybe I'm asking the wrong question...

What file extensions expect the file encoding to be utf-8?  Pretty sure .xml * .js are... 

Per Donald, this is set on the client somewhere... where is this setting stored?  

You're looking at the right file, and it should contains a line "encoding=UTF-8". It means that all text files are encoded in UTF-8. I don't quite understand why you said it's only good for one file. For your existing files, you need to convert them manually though.

 That file has several lines... one for each file I have specifically set the encoding for:

encoding//mydir/myfile.utf8=UTF-8


Is there one entry I can add that will set the encoding for all .utf8 files?  Something like this:
encoding//mydir/*.utf8=UTF-8

Note that I do NOT want to force the encoding to UTF8 for ALL text files, just those with the .utf8 extension.

How about adding the .utf8 suffix to the existing XML content type? That's equivalent to adding "content-types/org.eclipse.core.runtime.xml/file-extensions=utf8" to the file org.eclipse.core.runtime.prefs. Basically, the XML content type is by default encoded in UTF-8, and you tell Eclipse that all .utf8 files are XML files as well.

showing 5 of 8 show 3 more comments


One answer

Permanent link
Hi,
Please check this Enhancement Request, seems to be similar to what you are asking for:
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=214702

0 votes

Comments

I agree this is similar to what I'm asking for.  Given this enhancement was created in June of 2012 and is still open, does this mean I can NOT do what I'm asking about? 


Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,033

Question asked: Mar 31 '16, 11:45 a.m.

Question was seen: 2,884 times

Last updated: Apr 11 '16, 3:39 a.m.

Confirmation Cancel Confirm