[bug] Hydra tabs
-
OK, next attempt:
- HISE will remove all tabs in the code editor tabs on app close.
- HISE will add editors to this tab if needed. So if you goto a script processor workspace and the code tabs doesn't have a HiseScript code editor, it will add one. If you select a SNEX node to be edited and the code tabs doesn't have a SNEX editor, it will add one. If you select a Faust file to be edited and the code tabs doesn't have a Faust editor, it will add one. I think this is the solution with the best UX and the days of having to add code editors of any type manually should be finally gone.
- The only exception to Rule 1 is that HISE will not remove tabs which are a container. So if you have any tab that you don't want to be closed by HISE on shutdown (eg. a server controller or OSC logger), you have to put it in a container (vertical or horizontal tile) so that it survives the tab massacre when the sun sets on the HISE app and the hydra tabs starts crawling out of the darkness.
I've also changed the X1/X2 buttons to work with goto undo / redo, fixed the Ctrl+Backspace shortcut not working on Windows and other minor things related to code navigation.
-
@Christoph-Hart Sounds promising, I will rebuild now :)
-
Little typo I think
../../../../../HISE/hi_scripting/scripting/api/ScriptingApi.cpp:1643:9: error: expected ‘,’ or ‘;’ before ‘auto’ 1643 | auto s = dynamic_cast<GlobalSettingManager*>(getScriptProcessor()->getMainController_())->getSettingsObject().getSetting(Identifier(defName)).toString(); | ^~~~ ../../../../../HISE/hi_scripting/scripting/api/ScriptingApi.cpp:1647:13: error: ‘s’ was not declared in this scope 1647 | if (s.contains(","))
-
@d-healey haha this is maybe one of 12 lines in the entire codebase that is not covered by my CI script and I managed to mess this up...
-
@Christoph-Hart said in [bug] Hydra tabs:
- HISE will remove all tabs in the code editor tabs on app close.
Is it possible to determine a default number of editor tabs to have available when a project is opened (either as a run time property or in the HISE source)? I pretty much never just want one editor tab I just don't want HISE to add additional ones.
-
@d-healey But they will all default to
onInit
and there is no way I can make this work as you can see from my desperate attempts in the last month. -
@Christoph-Hart I'm fine with them all being on init. I just don't want to have to re-add editor tabs each time I reopen HISE.
-
Does the information that you can double click on script files in the File Browser to open them in a tab make you stop requesting this :) ?
Also if you press F12 it will jump to the definition of the currently selected text token which is my preferred way of navigating (aside from the Find all occurences window).
-
@Christoph-Hart said in [bug] Hydra tabs:
Does the information that you can double click on script files in the File Browser to open them in a tab make you stop requesting this :) ?
I rarely use the file browser, I almost always have either the project tree or the api browser visible. Also I just noticed that when I have an expansion loaded the file browser shows the expansion's files rather than the project's. Just give me 5 editors by default and I'll leave you alone :)
Also if you press F12 it will jump to the definition of the currently selected text token which is my preferred way of navigating (aside from the Find all occurences window).
This is useful!
-
Just give me 5 editors by default
NEVER!
I'm still trying to convince you that there is a better workflow (because you would have to select each tab, click on the drop down and select the file you want to edit each time you load HISE which is annoying).
Next idea: if the text cursor is in the string of an include statement, it will open the included file in a new tab when you press F12 (that's actually how VisualStudio and XCode work).
// onInit include("SomeFile.js"); include("PathsWorkToo/SomeOtherFile.js"); // ^ // just click here and press F12
-
Next idea: if the text cursor is in the string of an include statement, it will open the included file in a new tab when you press F12 (that's actually how VisualStudio and XCode work).
I like that idea but... I would have to keep one tab always set to on init and go back to that tab each time I wanted to open an include (I think this is a little more effort than selecting from a dropdown). I'd still have to manually add a tab and select from the drop down when I want to go to one of the built in callbacks.
What about a goto project file popup like in Sublime Text or Atom, and probably VS (I think it's CTRL+P in Sublime)?
Oh and a shortcut key to add a new editor tab.
-
and go back to that tab each time I wanted to open an include
@d-healey Use Ctrl+Backspace to navigate back. HISE => VIM
I'd still have to manually add a tab and select from the drop down when I want to go to one of the built in callbacks.
Yes that's a valid point, I just don't use them too much :)
What about a goto project file popup like in Sublime Text or Atom, and probably VS (I think it's CTRL+P in Sublime)?
the Find all occurences window does exactly that (if you use the
f
prefix). -
Use Ctrl+Backspace to navigate back. HISE => VIM
No worky on my superior OS :) Neither does CTRL+SHIFT+F either or a bunch of the other shortcuts.
I will give the new system a fair trial before passing judgment, but an add new script editor tab shortcut key would be mighty helpful.
the Find all occurences window does exactly that (if you use the f prefix).
How do I use the prefix, just add f in the search box?
-
How do I use the prefix, just add f in the search box?
Yes. If the search term has a
f
prefix, it will limit the displayed results to files only. This also works with symbolss
, functions (fn
) and variables (v
). -
@Christoph-Hart What am I doing wrong here?
The F12 thing for included files is great, except it doesn't work if the script is in the global scripts folder.
-
@d-healey you need a space between f and the filename
-
@Christoph-Hart Ah ok that makes sense!
-
Now I get the best of both
for (int i = 0; i < tabs->getNumTabs() - 5; i++)
-