MATLAB File Association in Visual Studio 2015 / TFS

I use TFS in Visual Studio 2015 and ask a question about MATLAB file associations. For files, there is no .mlink to MATLAB, as shown here:

Function

Confusingly, there is an association for files .figand .mat, therefore, VS must recognize that MATLAB "exists". If I double-click one of these file types, it will open it in MATLAB, as in a browser window. This is the behavior I want for files .m.

Drawing

At a minimum, I would like to have a MATLAB icon for files .mso that they are easy to find in a directory. As an ideal solution, these files will also open in MATLAB (rather than the VS text editor) from TFS.

I tried the File Extension option inside Options> Text Editor, but MATLAB is not an option in the Editor list for me.

Parameters

It is worth noting that my working network is quite strict when installing software, so the fewer external add-ons, the better (ideally not). Suggestions appreciated.

+4
source share
5 answers

So, after a long time, I found a reasonable solution for this.

"Open With" .m, , , MATLAB - ! SACn .


Visual Studio " ".

"" > " ", , . :

Title:     Your Title Here
Command:   cmd.exe
Arguments: /c "$(ItemPath)"

" ". /c ( ) , VS. Windows MATLAB , .


... , "", , .

/ .m . - MATLAB ( ), !

+1

, , MATLAB. associateFiles FEX.

, associateFiles('deleteadd','.m'), MatlabFileAssocFix.reg, (, MATLAB ):

Windows Registry Editor Version 5.00

;FIXES MATLAB FILE ASSOCIATIONS

;REMOVES M FILE ASSOCIATIONS

[-HKEY_CLASSES_ROOT\.m]

[-HKEY_CLASSES_ROOT\MATLAB.m.9.1.0]

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m]

;ADD SHELL OPEN

[HKEY_CLASSES_ROOT\Applications\MATLAB.exe\shell\open\command]
@="\"C:\\D\\Program Files\\MATLAB\\R2016b\\bin\\win64\\MATLAB.exe\" \"%1\""

;ADD M FILE ASSOCIATIONS

[HKEY_CLASSES_ROOT\.m]
@="MATLAB.m.9.1.0"
"Content Type"="text/plain"
"PerceivedType"="Text"

[HKEY_CLASSES_ROOT\.m\OpenWithProgids]
"MATLAB.m.9.1.0"=""

[HKEY_CLASSES_ROOT\.m\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\.m\Versions\MATLAB.m.9.1.0]
"FileVersionMS"=dword:00090001
"FileVersionLS"=dword:00000000

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0]
@="MATLAB Code"
"FriendlyTypeName"="@C:\\D\\Program Files\\MATLAB\\R2016b\\bin\\win64\\matlab.exe,-58"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\DefaultIcon]
@="C:\\D\\Program Files\\MATLAB\\R2016b\\bin\\win64\\m.ico,0"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Open]
@="Open"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Open\command]
@="\"C:\\D\\Program Files\\MATLAB\\R2016b\\bin\\win64\\matlab.exe\""

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Open\ddeexec]
@="uiopen('%1',1)"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Open\ddeexec\application]
@="ShellVerbs.Matlab.9.1.0"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Open\ddeexec\topic]
@="system"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Run]
@="Run"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Run\command]
@="\"C:\\D\\Program Files\\MATLAB\\R2016b\\bin\\win64\\matlab.exe\""

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Run\ddeexec]
@="run('%1')"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Run\ddeexec\application]
@="ShellVerbs.Matlab.9.1.0"

[HKEY_CLASSES_ROOT\MATLAB.m.9.1.0\Shell\Run\ddeexec\topic]
@="system"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m\OpenWithProgids]
"m_auto_file"=hex(0):
"MATLAB.m.9.1.0"=hex(0):

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m\OpenWithList]
"a"="MATLAB.exe"
"MRUList"="a"

.m MATLAB.

, , , .

+1

, MATLAB VS (, TFS).

Visual Studio, MatLab Visual Studio.

=============================================== ==========================

, , MATLAB, Team Foundation Version Control. , . MATLAB TFS MSSCCI.

- , :

https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/18325612-enable-integrated-use-of-team-foundation-version-c.

0

: MATLAB Java .NET Visual Studio, , MATLAB Editor , .

, .m, () .

MATLAB , Notepad ++, Sublime , .m.

0

, :

VS- , , , :

enter image description here

VS :

enter image description here

-1

Source: https://habr.com/ru/post/1669799/


All Articles