how to set to open different files with different editor

After working with sourcesafe, I am a hard believer that it sucks.

I have all kinds of files checked in sourcesafe like xml, java, jsp, txt,pdfs and css.

Each time I double click the file it asks me how to open a file. i.e. with which editor.

(I know I can set the options using options to open/edit or check out).

I have set one editor as default. But if I have to open a different types of files, I have to choose editor from radio buttons. Isn't it a pain Software should allow us to define what type of file we want to open with which editor. i.e.

we should be able to define that after double clicking

Source safe should open the file with editor defined in options based on type of file.

So it should open doc,xls,ppt file with msoffice and css, html with textpad or other editor.

Does anyone has this problem Any solution

One more stupid thing about SourceSafe when I oepn the file just to view with editor other than the sourcesafe editor, it changes the file name to some temp name.

Why

It's dumb software trcik. Isn't it

Please help me with this studpid things.

Thanks,

techie_ns



Answer this question

how to set to open different files with different editor

  • Spider.Eg

    > I have set one editor as default. But if I have to open a different types of files, I have to choose editor from radio buttons. Isn't it a pain Software should allow us to define what type of file we want to open with which editor.

    I'm not sure how did you set an editor as default or what other settings you've made, but you're most likely not doing the right thing.

    By default VSS uses the viewers/editors setup in Windows to Open/Edit the files. So, if you have setup your computer to launch a specific program when you double click to open xml, java, jsp, txt,pdf or css files in Windows Explorer, the same program will be used by VSS to open the files. The settings are read from registry, e.g. for xml files from

    HKEY_CLASSES_ROOT\xmlfile\shell\open\command and HKEY_CLASSES_ROOT\xmlfile\shell\edit\command

    In addition, you can customize editors and viewers per each file extension, e.g. in your ss.ini

    ; Batch Processing
    .bat (Win) = notepad.exe

    Also, if you have VSS2005 you can use the Tools/Options/CustomEditors dialog to configure editors/viewers/diff/merge

    > we should be able to define that after double clicking

    By default, double click on a file is set to prompt what you want to do: Edit/View. You can change this behavior (and always do an Edit on double click) by changing the Tools/Options/General/Double_click_on_a_file option. So you can set that option to Edit.

    > One more stupid thing about SourceSafe when I oepn the file just to view with editor other than the sourcesafe editor, it changes the file name to some temp name. Why

    During View, the file in database is retrieved in the temporary folder, with a temporary name. I'm not sure how stupid is this, given that you can have multiple files with the same name in the database that you can attempt to view in the same time... If you really want to Edit the file instead, the file will be checked out in the working folder with the real name, and the custom editor will display the original name of the file.

    Alin


  • Steve DeBow

    Dear Alin,

    As you might know we can not have two files with same name in one folder. The simplest solution is to get path and the file name so VSS does not have to rename a file to avoid a filename confusion.


  • CyK

    If you'd be reading the other posts to this thread you'd see why VSS doesn't do that...

    SourceSafe CANNOT control what Microsoft Word is displaying in their titlebar. Word always display the filename that is open from disk. To cause something else to be displayed in Words's titlebar, SourceSafe would have to name the file on disk differently than sst8.doc.

    VSS cannot name a file on local disk "Vxxx - <the actual filename> <path if needed or set>". Slash ('/') that is part of the path in the VSS database is not a character allowed by the NTFS file system. So, you'd be restricted to use only the "Vxxx - <the actual filename>" part of your proposal. And with this, here come again the problems of opening files with similar name from different VSS projects, when you'd have name clashes in temp folder... It may be possible to name the files "Vxxx - OrigFilename [YYY].doc", but to implement that it will require changing the way VSS generates temporary file names.

    Feel free to open bug at http://lab.msdn.microsoft.com/productfeedback/ and attach files if you want... You can also call product support and request a QFE, but given that this is not a bug but instead a new feature request I doubt that such QFE will be approved...

    Alin


  • Batmannnn

    Hi Techie_ns,

    > As you might know we can not have two files with same name in one folder.

    In the example above I was talking about 2 files with same name in 2 different folders, like $/Folder1/MyFile.doc and $/Folder2/Myfile.doc.

    Btw, it's possible to view 2 files with the same name from the same folder, too: if you open the history dialog for a file $/Folder/file.doc, you can view for instance in the same time version 3 and version 5 of this file. VSS will have to get the $/Folder/file.doc;3 and $/Folder/file.doc;5 in a temporary folder and will have to rename them somehow to store both files in the temp folder. The editor launched will have to show these renamed names. I doubt there is a source control system that will do otherwise in this case...

    Note that you can have source control systems like Perforce, Clearcase, etc that can map on the local system a view of the scc database, and in this way you can double click the files from WindowsExplorer to view their latest version. (To view files from history they will still have to rename the files somehow). This is equivalent in SourceSafe with getting recursively a VSS project somewhere on the local disk (populate the enlistment), then double click the files from WindowsExplorer to view their content.

    Alin


  • dudot

    When you open Multiple file in VSS and leave the seat, and come back again and want to see a particlar file, you have click each file and check whats in it, wasting time.

    How about showing name as in left top corner

    Vxxx - <the actual filename> <path if needed or set>

    or

    Vxxx - <the actual filename> <path if needed or set> from VSS

    where x is the version number retreived

    instead of

    sst8 (read only) Microsoft Word

    It will save time as we can see the file name.

    I could not attach a sample screen for this.



  • brohans

    Dear Alin,

    Thanks for your response. I really appreciate your time and help.

    Let me explain more.

    " > we should be able to define that after double clicking "

    I have Jcreator to open JAVA Files, XMLPad to open XML Files. When I double click on xml files in VSS, I want VSS to open the file with XXMLPad without asking me. It's three more click each time I open the file to change the editor/viewer. I normally open 75-100 files a day. You can imagine how irritating it is to make those three clicks. VSS does not read the read the viewer/editor set up correctly. If it does then it should be able to open the file with default editor.

    When I change the Tools/Options/General/Double_click_on_a_file option to Edit,

    each time I double click , it checks out the file. Which I don't want. Thousand times I just need to look at some of the files to check codes or get some reference. I do not want to remember to undo check out for each file I just want to view.

    I work with VSS 24hrs/day !!. Each time I open a file, I need to know it's path and it's name. Many a times AFter I oepn a file I need to do some other task, and by the time I come back to File opened , I forgot which file I opened (Because, VSS make it a temp file and also a file path is temp). So I need to redo the whole exercise.

    In fact we are planning to replace VSS very soon. All developer team is frustated with this "intelligent" tool. Thanks for your inputs.

    Techie_ns


  • artzoop

    Hi Techie_ns,

    > When I change the Tools/Options/General/Double_click_on_a_file option to Edit, each time I double click , it checks out the file. Which I don't want. Thousand times I just need to look at some of the files to check codes or get some reference. I do not want to remember to undo check out for each file I just want to view.

    Unfortunately this is by design. When editing a file from the VSS database you have to check it out first in order to change it.

    It seems that what you want is to View the file on double click instead of Edit. As I said before, the editor in this case HAS to show a temporary file name like sst131.doc.

    The reason is that if you want to view *in the same time* the content of 2 files with the same name, e.g. $/MyFile.doc and $/Project/Myfile.doc, SourceSafe has to get the files in a temporary folder, and name them differently. The editor HAS TO be launched with the local file name (no editor will be able to read directly a file like $/MyFile.doc), so it will show in the caption the name of that temporary file (and it will have NO WAY of showing the path of the original file in the VSS database). At best, a source control system will try to preserve the name, too (like %TEMP%\MyFile.doc, %TEMP%\MyFile_1.doc, etc), but in no way the editor will be able to display the path in the VSS database. I doubt you'll find a source control management software that will do otherwise when viewing files from the database...

    As a workaround, I suggest you to do a Get recursive of the files from the VSS database into a local folder, and from Windows Explorer you can then double click the files and open them. This will preserve the name, and hopefully the editor will display the path, too...

    Alin


  • how to set to open different files with different editor