@@ -48,8 +48,9 @@ const {
4848 SIGNAL_ZOOM_OUT ,
4949 SIGNAL_LOAD_FROM_TEXT ,
5050} = require ( './events' ) ;
51- const { icons} = require ( './consts' ) ;
51+ const { icons, models , inDevMode } = require ( './consts' ) ;
5252const { isMac} = require ( './os-checker' ) ;
53+ const path = require ( 'path' ) ;
5354
5455const readFile = promisify ( fs . readFile ) ;
5556
@@ -115,19 +116,21 @@ const fileSubmenu = [
115116 id : 'LOAD_DEFAULT_EXAMPLE' ,
116117 label : 'SimpleAspect.ttl' ,
117118 icon : getIcon ( icons . LOAD_DEFAULT_EXAMPLE . enabled ) ,
118- click : ( menuItem , browserWindow , _ ) =>
119- getFileInfo ( './apps/ame/src/assets/aspect- models/org.eclipse.examples/1.0.0/ SimpleAspect.ttl')
119+ click : ( menuItem , browserWindow , _ ) => {
120+ return getFileInfo ( path . join ( models , ' SimpleAspect.ttl') )
120121 . then ( fileInfo => browserWindow . webContents . send ( SIGNAL_LOAD_SPECIFIC_FILE , fileInfo ) )
121- . catch ( error => console . error ( error ) ) ,
122+ . catch ( error => console . error ( error ) ) ;
123+ } ,
122124 } ,
123125 {
124126 id : 'LOAD_MOVEMENT_EXAMPLE' ,
125127 label : 'Movement.ttl' ,
126128 icon : getIcon ( icons . LOAD_MOVEMENT_EXAMPLE . enabled ) ,
127- click : ( menuItem , browserWindow , _ ) =>
128- getFileInfo ( './apps/ame/src/assets/aspect- models/org.eclipse.examples/1.0.0/ Movement.ttl')
129+ click : ( menuItem , browserWindow , _ ) => {
130+ return getFileInfo ( path . join ( models , ' Movement.ttl') )
129131 . then ( fileInfo => browserWindow . webContents . send ( SIGNAL_LOAD_SPECIFIC_FILE , fileInfo ) )
130- . catch ( error => console . error ( error ) ) ,
132+ . catch ( error => console . error ( error ) ) ;
133+ } ,
131134 } ,
132135 ] ,
133136 } ,
0 commit comments