@@ -35,7 +35,7 @@ define(function (require, exports, module) {
3535 PerfUtils = brackets . getModule ( "utils/PerfUtils" ) ,
3636 StringUtils = brackets . getModule ( "utils/StringUtils" ) ,
3737 Dialogs = brackets . getModule ( "widgets/Dialogs" ) ,
38- DefaultDialogs = brackets . getModule ( "widgets/DefaultDialogs " ) ,
38+ DragAndDrop = brackets . getModule ( "utils/DragAndDrop " ) ,
3939 Strings = brackets . getModule ( "strings" ) ,
4040 PreferencesManager = brackets . getModule ( "preferences/PreferencesManager" ) ,
4141 LocalizationUtils = brackets . getModule ( "utils/LocalizationUtils" ) ,
@@ -53,7 +53,8 @@ define(function (require, exports, module) {
5353
5454 const KeyboardPrefs = JSON . parse ( require ( "text!keyboard.json" ) ) ;
5555
56- const DIAGNOSTICS_SUBMENU = "debug-diagnostics-sub-menu" ;
56+ const DIAGNOSTICS_SUBMENU = "debug-diagnostics-sub-menu" ,
57+ EXPERIMENTAL_FEATURES_SUB_MENU = "debug-experimental-features" ;
5758
5859 // default preferences file name
5960 const DEFAULT_PREFERENCES_FILENAME = "defaultPreferences.json" ,
@@ -81,7 +82,8 @@ define(function (require, exports, module) {
8182 DEBUG_OPEN_VFS = "debug.openVFS" ,
8283 DEBUG_OPEN_EXTENSION_FOLDER = "debug.openExtensionFolders" ,
8384 DEBUG_OPEN_VIRTUAL_SERVER = "debug.openVirtualServer" ,
84- DEBUG_OPEN_PREFERENCES_IN_SPLIT_VIEW = "debug.openPrefsInSplitView" ;
85+ DEBUG_OPEN_PREFERENCES_IN_SPLIT_VIEW = "debug.openPrefsInSplitView" ,
86+ DEBUG_DRAG_AND_DROP = "debug.dragAndDrop" ;
8587
8688 const LOG_TO_CONSOLE_KEY = logger . loggingOptions . LOCAL_STORAGE_KEYS . LOG_TO_CONSOLE_KEY ,
8789 LOG_LIVE_PREVIEW_KEY = logger . loggingOptions . LOCAL_STORAGE_KEYS . LOG_LIVE_PREVIEW ;
@@ -824,6 +826,19 @@ define(function (require, exports, module) {
824826 hideWhenCommandDisabled : true
825827 } ) ;
826828
829+ if ( Phoenix . isNativeApp && Phoenix . platform === "linux" ) {
830+ // there is only one experimental feature- drag and drop available in native linux apps only.
831+ const experimentalSubmenu = debugMenu . addSubMenu ( Strings . CMD_EXPERIMENTAL_FEATURES , EXPERIMENTAL_FEATURES_SUB_MENU ) ;
832+ CommandManager . register ( Strings . CMD_ENABLE_DRAG_AND_DROP , DEBUG_DRAG_AND_DROP , ( ) => {
833+ PreferencesManager . set ( DragAndDrop . _PREF_DRAG_AND_DROP ,
834+ ! PreferencesManager . get ( DragAndDrop . _PREF_DRAG_AND_DROP ) ) ;
835+ } ) ;
836+ PreferencesManager . on ( "change" , DragAndDrop . _PREF_DRAG_AND_DROP , function ( ) {
837+ CommandManager . get ( DEBUG_DRAG_AND_DROP ) . setChecked ( PreferencesManager . get ( DragAndDrop . _PREF_DRAG_AND_DROP ) ) ;
838+ } ) ;
839+ experimentalSubmenu . addMenuItem ( DEBUG_DRAG_AND_DROP ) ;
840+ }
841+
827842 CommandManager . get ( DEBUG_UNLOAD_CURRENT_EXTENSION )
828843 . setEnabled ( extensionDevelopment . isProjectLoadedAsExtension ( ) ) ;
829844 CommandManager . get ( DEBUG_OPEN_EXTENSION_FOLDER )
0 commit comments