Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tm-dev] Opening a connection in TerminalView programatically

Hi Kris,

 

In short, the method to create a is the following

 

ITerminalViewControl terminal = TerminalViewControlFactory.makeControl(terminalListener, parent, new ITerminalConnector[] { connector }, true);

 

       terminal.setConnector(connector);

       terminal.connectTerminal();

 

You are right that all this is living in internal packages, but as a matter of fact, it is the terminal API. Creating a public API is tracked in bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=259271, but I doubt that this will ever happen, at least not without creating a “TM Terminal 4.0”.

 

If you need a closer look to the usage of the above methods, it is from o.e.tcf.te.ui.terminals.tabs.TabFolderManager. The Target Explorer is providing a tabbed terminal view on top of the TM terminal widget. And the Target Explorers “Remote Application” launch configuration type is using the Terminal for presenting the remote I/O of the application. So you might be able to get some ideas from there.

 

And any kind of contribution will be always welcome.

 

Best regards, Uwe J

 

 

 

From: tm-dev-bounces@xxxxxxxxxxx [mailto:tm-dev-bounces@xxxxxxxxxxx] On Behalf Of Kris De Volder
Sent: Freitag, 12. Oktober 2012 21:28
To: tm-dev@xxxxxxxxxxx
Subject: [tm-dev] Opening a connection in TerminalView programatically

 

Hi all, I'm trying to reuse the TerminalView in our Grails tooling (see https://github.com/SpringSource/grails-ide ).
We want to use this to launch and connect to an external grails process and display the output of this process (uses ANSI to make some colored text etc).

I was pretty quickly able to create a new GrailsTerminalConnector with its own 'settings page' to allow a user to connect to the grails process.
So I was pretty pleased with how nice and easy this was.

Unfortunately, this is not precisely what we want. What we want is a 'UI-less' connection that is programmatically instantiated by our tools whenever they execute a grails command. I'm really stuck. Looking around the code reading comments etc. it seems like there is clearly the intention for this to be possible. E.g
  - the 'hidden' attribute on the extension point
  - some comments on the 'org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector.makeSettingsPage()' method talk about 'UI-less' connectors.
 
However, as far as I've been able to figure out the methods of terminal view for opening connection programmatically are simple not available or private.

Maybe I'm missing something and/or not looking in the right place?

If it is possible, I would appreciate a pointer on how to work with 'UI-less' TerminalConnector  instances. (E.g. a pointer to some code doing this in one of the projects would help a lot).

If this is in fact not (yet) possible, I would be interested in making it possible by preparing a patch (but before jumping into that, I'd figure I'd at least ask here and get some input).

Thanks for your time,

Kris De Volder


Back to the top