Funny, that was one of the first things I thought about adding to it, and Slava told me not to, since we can create multiple separate floating instances. But that's not the same, really?
Then I thought, oh wait, mydoggy lets you share tabs between dockables. What if you create "new floating instances" and bring them togehter in tabs, can achieve the same thing?
But it seems MyDoggy does not allow "new floating instances".
If MyDoggy allowed "new floating instance" then you could get multiple console tabs for any shell.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To whoever volunteers to do this:
please don't use the built-in JTabbedPane though, it wastes vertical space.
It might be better to just add a "+" button that creates another shell switcher combobox (perhaps in a small panel) all in the same horizontal layout that has the current shell switcher combobox.
Then the comboboxes can be used as the tab buttons.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First draft is checked in at revision 24398. It's not quite done, I need to put some strings into the properties file, but I think the rest is working pretty well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've checked in a new version at revision 24401. This removes the dependency on the latest version of jEdit code, but now has a dependency on the latest CommonControls 1.7.5 code. This seems to be working well, but there is still some code clean up to be done before it can be released.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For 1, the existing drop down seems sufficient. For 2, those are the only two that i know the code to create. Service manager does not expose the details of shells provided by other plugins. Some adjustment to service manager would allow discovery of those other shells like ssh
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have my default shell set to System. I have no user shells at all. And yet, the shell keeps switching to Beanshell now, when it did not before your recent changes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems to happen at least once after each jEdit startup. I open a new Console window and it indicates System is active.
The first command I enter is parsed by Beanshell, and then it switches to beanshell right after that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I see that. A question, though, there are two properties, one for the default shell as set in the options, and one for the last used shell. When Console starts, I'm assuming the dropdown should be set to the last used shell if it is set in the property, the default shell otherwise. Does that sound right?
Also, about ServiceManager, to register a service, ServiceManager needs a class name, a name for the service, and the beanshell code that creates the service, in other words, all the info provided in the services.xml file. For Console to create a new service of an existing shell type, like ssh, for example, then Console also needs that info to pass to ServiceManger. The classname and service name are not a problem, but I don't know where to get the beanshell code. ServiceManager has it, but doesn't provide any way to share it outside of itself. Any ideas? I could use a crappy hack like the Beauty plugin does to reset the indent rules in Mode.java, but I'm always a little hesitant to do that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I see that. A question, though, there are two properties, one for
the default shell as set in the options, and one for the last used shell.
When Console starts, I'm assuming the dropdown should be set to the last
used shell if it is set in the property, the default shell otherwise. Does
that sound right?
Yes.
Also, about ServiceManager, to register a service, ServiceManager needs a
class name, a name for the service, and the beanshell code that creates the
service, in other words, all the info provided in the services.xml file.
For Console to create a new service of an existing shell type, like ssh,
for example, then Console also needs that info to pass to ServiceManger.
The classname and service name are not a problem, but I don't know where to
get the beanshell code. ServiceManager has it, but doesn't provide any way
to share it outside of itself. Any ideas? I could use a crappy hack like
the Beauty plugin does to reset the indent rules in Mode.java, but I'm
always a little hesitant to do that.
Do you need the code, or the service object? why not just call
"ServiceManager.getService()" which returns the object. Then you don't need
the code.
public static Object getService(String clazz, String name)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, the code is necessary. The getService method doesn't return a new shell, it returns an existing shell, so if I call getService("console.Shell", "System", I get the already existing System shell. To create a new system shell (or BeanShell shell or whatever), it's necessary to have the code and call registerService("console.Shell", name, "new console.SystemShell(name)", null); This creates a new System shell with a different name, then it can run different commands.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Let me qualify the answer to your first question:
In plugin options Console General - "Default Shell", you can select default shell, and in that combo, you can choose "last selected".
"Last Used" shell property is only used if last selected is chosen in that plugin options combobox.
Last edit: Alan Ezust 2016-06-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Funny, that was one of the first things I thought about adding to it, and Slava told me not to, since we can create multiple separate floating instances. But that's not the same, really?
Then I thought, oh wait, mydoggy lets you share tabs between dockables. What if you create "new floating instances" and bring them togehter in tabs, can achieve the same thing?
But it seems MyDoggy does not allow "new floating instances".
If MyDoggy allowed "new floating instance" then you could get multiple console tabs for any shell.
To whoever volunteers to do this:
please don't use the built-in JTabbedPane though, it wastes vertical space.
It might be better to just add a "+" button that creates another shell switcher combobox (perhaps in a small panel) all in the same horizontal layout that has the current shell switcher combobox.
Then the comboboxes can be used as the tab buttons.
First draft is checked in at revision 24398. It's not quite done, I need to put some strings into the properties file, but I think the rest is working pretty well.
I've checked in a new version at revision 24401. This removes the dependency on the latest version of jEdit code, but now has a dependency on the latest CommonControls 1.7.5 code. This seems to be working well, but there is still some code clean up to be done before it can be released.
A couple of comments.
additional buttons to represent the tabs to the right of the combobox? I don't see anything resembling tabs now.
why only system and beanshell and not the other plugin-provided shells?
Last edit: Alan Ezust 2016-06-05
For 1, the existing drop down seems sufficient. For 2, those are the only two that i know the code to create. Service manager does not expose the details of shells provided by other plugins. Some adjustment to service manager would allow discovery of those other shells like ssh
I have my default shell set to System. I have no user shells at all. And yet, the shell keeps switching to Beanshell now, when it did not before your recent changes.
I'm back in town tomorrow I'll ake look then.
It seems to happen at least once after each jEdit startup. I open a new Console window and it indicates System is active.
The first command I enter is parsed by Beanshell, and then it switches to beanshell right after that.
Okay, I see that. A question, though, there are two properties, one for the default shell as set in the options, and one for the last used shell. When Console starts, I'm assuming the dropdown should be set to the last used shell if it is set in the property, the default shell otherwise. Does that sound right?
Also, about ServiceManager, to register a service, ServiceManager needs a class name, a name for the service, and the beanshell code that creates the service, in other words, all the info provided in the services.xml file. For Console to create a new service of an existing shell type, like ssh, for example, then Console also needs that info to pass to ServiceManger. The classname and service name are not a problem, but I don't know where to get the beanshell code. ServiceManager has it, but doesn't provide any way to share it outside of itself. Any ideas? I could use a crappy hack like the Beauty plugin does to reset the indent rules in Mode.java, but I'm always a little hesitant to do that.
On Tue, Jun 7, 2016 at 4:13 PM, Dale Anson daleanson@users.sf.net wrote:
Yes.
Do you need the code, or the service object? why not just call
"ServiceManager.getService()" which returns the object. Then you don't need
the code.
No, the code is necessary. The getService method doesn't return a new shell, it returns an existing shell, so if I call getService("console.Shell", "System", I get the already existing System shell. To create a new system shell (or BeanShell shell or whatever), it's necessary to have the code and call registerService("console.Shell", name, "new console.SystemShell(name)", null); This creates a new System shell with a different name, then it can run different commands.
Let me qualify the answer to your first question:
In plugin options Console General - "Default Shell", you can select default shell, and in that combo, you can choose "last selected".
"Last Used" shell property is only used if last selected is chosen in that plugin options combobox.
Last edit: Alan Ezust 2016-06-08