@@ -37,34 +37,36 @@ define(function (require, exports, module) {
37
37
* @private
38
38
* @type {string } fullPath of the OpenWithExternalEditor Domain implementation
39
39
*/
40
- var _domainPath = ExtensionUtils . getModulePath ( module , "node/OpenWithExternalEditorDomain " ) ;
40
+ var _domainPath = ExtensionUtils . getModulePath ( module , "node/OpenWithExternalApplicationDomain " ) ;
41
41
42
42
/**
43
43
* @private
44
44
* @type {NodeDomain }
45
45
*/
46
- var _nodeDomain = new NodeDomain ( "OpenWithExternalEditor " , _domainPath ) ;
46
+ var _nodeDomain = new NodeDomain ( "OpenWithExternalApplication " , _domainPath ) ;
47
47
48
- var extensionToExternalEditorMap = { } ;
48
+ var extensionToExtApplicationMap = { } ;
49
49
50
- function _openInExternalEdior ( event , path ) {
50
+ function _openWithExternalApplication ( event , path ) {
51
51
_nodeDomain . exec ( "open" , {
52
52
path : path ,
53
- app : extensionToExternalEditorMap [ FileUtils . getFileExtension ( path ) . toLowerCase ( ) ]
53
+ app : extensionToExtApplicationMap [ FileUtils . getFileExtension ( path ) . toLowerCase ( ) ]
54
54
} ) ;
55
55
}
56
56
57
- PreferencesManager . definePreference ( "externalEditor " , "object" , { } , {
58
- description : Strings . DESCRIPTION_EXTERNAL_EDITOR
57
+ PreferencesManager . definePreference ( "externalApplications " , "object" , { } , {
58
+ description : Strings . DESCRIPTION_EXTERNAL_APPLICATION_ASSOCIATE
59
59
} ) ;
60
60
61
- PreferencesManager . on ( "change" , "externalEditor" , function ( ) {
62
- extensionToExternalEditorMap = PreferencesManager . get ( "externalEditor" ) ;
61
+ PreferencesManager . on ( "change" , "externalApplications" , function ( ) {
62
+ extensionToExtApplicationMap = PreferencesManager . get ( "externalApplications" ) ;
63
+ FileUtils . addExtensionToExternalAppList ( Object . keys ( extensionToExtApplicationMap ) ) ;
63
64
} ) ;
64
65
65
- FileViewController . on ( "openInExternalEditor " , _openInExternalEdior ) ;
66
+ FileViewController . on ( "openWithExternalApplication " , _openWithExternalApplication ) ;
66
67
67
68
AppInit . appReady ( function ( ) {
68
- FileUtils . addExtensionToExternalAppList ( Object . keys ( extensionToExternalEditorMap ) ) ;
69
+ extensionToExtApplicationMap = PreferencesManager . get ( "externalApplications" ) ;
70
+ FileUtils . addExtensionToExternalAppList ( Object . keys ( extensionToExtApplicationMap ) ) ;
69
71
} ) ;
70
72
} ) ;
0 commit comments