Restart HippoEDIT option

Started by Stefan, October 30, 2009, 12:08:07 PM

Previous topic - Next topic

Stefan

You know that HE didn't reload config files on the fly right now. We have to restart HE to see the changes.
For testing on different PCs, with a lot of other apps open, it is not always that nice to search for HE.exe to launch HE again.
(yes, i have shortcuts and QuickLaunch and launchers.... but ;-) ... often it is a bit of hassle )

So i may ask, ONLY if it not that much work!!!, if we can have an option like "File > Restart HE"

I know you don't want to add such stuff to keep HE clean.... so how about
an trick like holding CTRL+Shift-key while clicking on "File > Exit" to restart HE?
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Alain

Hello

good idea when you are working on "syntax file"
I vote for CTRL+ALT with click on "File>Exit"    as "alternative exit"

But a new option as
"Edit>Refresh all"
"View>Refresh all"  can also do the job

Alain

alex

Hi,

the correct way, of course, if we talk about reloading of the syntax files, would be to reload internal representation of syntaxes every time as syntax schema changes. And this I am planning to add some when.

But adding of the restart option is also not problem. So I would add hidden option to restart:
if you close HE in any way (File-Exit, Close of main window) and keep Ctrl+Alt HippoEDIT would restart.

Would be added new beta 1.47. As usual, I have uploaded 738, but because I got some more bug reports I would like to postpone official publication of the new beta, an probably today tomorrow you would get 1.47.739 with this feature.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Thanks, but use of ALT-key would not work nicely since ALT is an menu trigger-key.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

#4
I have added both cases ;)

const BOOL bCtrl  = (GetKeyState(VK_CONTROL) & 0x8000);
const BOOL bShift = (GetKeyState(VK_SHIFT) & 0x8000);
const BOOL bAlt   = (GetKeyState(VK_MENU) & 0x8000);

// check for restart request
// hope now already everything is saved
if (bAlt && (bCtrl || bShift))
{
TCHAR path[_MAX_PATH + 2];
GetModuleFileName(NULL, path, MAX_PATH + 1);
::ShellExecute(NULL, NULL, path, m_lpCmdLine, NULL, m_nCmdShow);
}


Just paste and found a bug ;), new beta is once more delayed :))
And you are right... Probably I would remove Alt case...
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Take it easy ;)
Very nice to see how the code of such an idea looks about. Interesting and good to know in case of malfunction.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Alain

With new version 1.47.739

we have a alternative click "File>Exit" and press CTRL+SHIFT :  shut HE and reload HE
I think that idea behind is for working with a text file and test extension file (.xml) or ?

BUT
if you have a modification, HE normaly ask for "Save" "Don't save" or "Cancel"
if you click "Save" .... 
HE shutdown definitively.

I think the expected behavior is to reload HE with all (saved) files
What about ?

Have a good day
Alain

alex

Hi Alain,

generally check is done later, when already everything is closed and application is on the last step to exit. Because in this moment I am sure that most of stuff (configuration) is already saved, and when I start new instance it would overtake previous settings.

So, if you keep pressing Ctr+Shift after "Save dialog" HE would restart.

But from your post I got another idea... that I can save automatically, if Shift+Ctrl pressed, and do not bring dialog.
In this case you would not see a difference. Will be done next beta.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

A> that I can save automatically, if Shift+Ctrl pressed, and do not bring dialog.

You mean: i modify my document, change the syntax, restart HE, and my modifications on the docs are saved without any notice?

Now that would be an unexpected behavior and could mess up documents.


Then i think it's better if the auto restart simple not work, if i have to save files first.
Best of course would be if the restart continues after prompted for-and saving files.

I have not the time to test this really right now, but i think i would close or save open files first before i would do an AR (auto restart)
If HE automatically would save modified files for me, i could take care for this too and close files i don't want to save before AR,... but
i could may forget this and messed up my files this way.

SO i think we all should think some more about the right behavior first.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Alain

Hello Alex

I agree with Sephan
I think that the "expected" behavior is restart continues AFTER prompted saving dialog.
Have a good day

Alain

alex

Ok, I would remove code for automatic save ;)
And you just need to keep Ctrl+Shift pressed after selecting files and selecting something in Save Changes dialog. Because the check for restart is done AFTER this (after all user actions).

I do not want to spend more efforts to change/check this in all possible exit cases, so I would leave it like it is.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

QuoteVersion 739:
New. Restart HippoEDIT function.
Now if you close HE in any way, keeping buttons Ctrl+Shift pressed,
application would be restarted with same parameters were used for start initial instance

Works fine. Thank you Alex.

Usage:
hold Ctrl+Shift while f.ex. click on "File > Exit"
If you are prompted with an "save modified documents" dialog, just hold Ctrl+Shift again while clicking on an button.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-