Context Menu - Open File - Seems Does Nothing

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
Arthur
Posts: 22
Joined: Fri Jan 13, 2012 3:50 am

Context Menu - Open File - Seems Does Nothing

Post by Arthur »

Not sure where to ask, anyways:
Editing a .BAT file.
Right clicking anywhere in the file body and choosing the topmost context menu item Open File does nothing.
What it purpose is and when would it work?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

What it purpose is and when would it work?
This menu tries to open the file name contained on the current line.

So in this case the current line did not contain a file name and hence the slightly funny menu (maybe it should be grayed out in this case).

To see it work just add a line to the batch file containing a valid file name and you will be able to open that file from within the batch file using this menu.

Cheers Jussi
Arthur
Posts: 22
Joined: Fri Jan 13, 2012 3:50 am

Post by Arthur »

Agree, and not terribly useful, if not dangerous being the top choice!
The name is also very "eloquent", sorry if I sound too harsh.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I think the fix is to change the code to put in the words Unknown when there is no filename found on the line. At least then it will be a bit more consistent.

But the feature is not overly dangerous since if no file is found all you get is a beep and a meassage saying as much.

This menu maps to the FileOpenInclude keyboard function.

I personally use this particular keyboard mapping all the time since it is a very fast way to load files.

But as a long time Brief user I use the keyboard version and hardly ever venture to the popup menu ;)

I suspect somewhere in the past a Zeus user would have asked for this to be added to the popup, as is the history of most of the many different Zeus popup menus ;)

Cheers Jussi
Arthur
Posts: 22
Joined: Fri Jan 13, 2012 3:50 am

Post by Arthur »

Dangerous is an overstatment then, agree, thing s I do not get any kind of notification if the file name is not in the file, well it actually should be the whole path, I guess this menu item is just not to often in use, perhaps should be possible to turn it off. I thought open means run, thus the menu item should be called edit file under cursor or so.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I do not get any kind of notification if the file name is not in the file
And that is why the words Unknown need to be shown in this case.

How this feature works is Zeus runs a regexp on the current line looking for a file name and then it tries to load any file found.

You will be seeing the default regep, but you can also provide your own file name regexp via the document type settings.
well it actually should be the whole path
In fact you only need the short file name for this function to work.

The behaviour is very smart as it will go looking for the file in many places including document type search paths, workspace search paths or just workspace project locations.

Cheers Jussi
Post Reply