Author |
Topic |
|
MobyDX
New Member
Norway
2 Posts |
Posted - Mar 08 2008 : 06:00:24 AM
|
Use PathCompactPath() on the text-strings in column "Path" of the "Open File in Solution" dialog. (Unfortunately) I store all my projects in "My Documents\\Visual Studio Projects", which means that what I see in this column is "C:\\Documents and Settings\\Arild\\My Documents\\Visual Studio Projects\\" followed by the first few letters of the project-folder, i.e. it's useless...
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Mar 08 2008 : 09:00:03 AM
|
This page:
http://msdn2.microsoft.com/en-us/library/bb773575(VS.85).aspx
Contains the following example of what this function does:
The un-truncated path is C:\\path1\\path2\\sample.txt The truncated path at 125 pixels is : C:\\path1\\...\\sample.txt The truncated path at 120 pixels is : C:\\pat...\\sample.txt The truncated path at 110 pixels is : C:\\p...\\sample.txt The truncated path at 25 pixels is : ...\\sample.txt
So it is going to remove the useful path information, and just leave you with the drive name and the file name. The file name is already given in the first column of this dialog. If you hover the mouse over one of the items the full file name is shown in the tooltip.
Also you can resize the dialog and the columns to show more text. |
zen is the art of being at one with the two'ness |
|
|
MobyDX
New Member
Norway
2 Posts |
Posted - Mar 10 2008 : 10:48:11 AM
|
I actually thought this function was more "intelligent" :-) (I haven't used it myself, I only knew of its existence) My expectations was that it would try to retain the "rightmost" part of the path as long as possible (i.e. the first truncation would be "C:\\...\\path2\\sample.txt"), which would be more useful to me. I frequently have a file shared by multiple projects in the same solution, so even if I enter the full file-name I still have a long list of files to go through to find the correct one. Making the dialog and column bigger, and sorting by Path helps, though. |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Mar 10 2008 : 11:27:49 AM
|
The idea is reasonable, but how do we define the "interesting" part of the path? If you throw away the part at the front first then you may find you loose which "project" the files live in.
In your situation the paths all have the same beginning, but I have often dealt with code where the difference in the path is near the front, or sometimes in the middle.
It is tempting to say that the best solution is to have shorter paths, but that is a lot easier said than done. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|