Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Programmatically Setting Environment Variables for TcServer(Programmatically Setting Environment Variables for TcServer)
Programmatically Setting Environment Variables for TcServer [message #1083280] Fri, 09 August 2013 18:50 Go to next message
Wendy Haley is currently offline Wendy Haley
Messages: 10
Registered: July 2013
Junior Member
I am writing a plugin to automatically setup TcServer (Tomcat) server instances in Eclipse. I have a requirement to add Environment variables programatically. It looks like the Environment variables are stored in launch files which I can edit through the DebugPlugin if they already exist. My problem is that the .launch files are not created until I double click on the server. Is there a way to programmatically do the same thing that the double click on the server does so I can generate that .launch file creation.

Any suggestions are appreciated.
Re: Programmatically Setting Environment Variables for TcServer [message #1085045 is a reply to message #1083280] Mon, 12 August 2013 11:29 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 8/9/2013 2:50 PM, Wendy Haley wrote:
> I am writing a plugin to automatically setup TcServer (Tomcat) server
> instances in Eclipse. I have a requirement to add Environment variables
> programatically. It looks like the Environment variables are stored in
> launch files which I can edit through the DebugPlugin if they already
> exist. My problem is that the .launch files are not created until I
> double click on the server. Is there a way to programmatically do the
> same thing that the double click on the server does so I can generate
> that .launch file creation.
>
> Any suggestions are appreciated.

The code behind the Open Launch Configuration link on the server editor
page is able to programmatically create one if it doesn't already exist.

Cheers,
Larry
Re: Programmatically Setting Environment Variables for TcServer [message #1085942 is a reply to message #1085045] Tue, 13 August 2013 15:11 Go to previous messageGo to next message
Wendy Haley is currently offline Wendy Haley
Messages: 10
Registered: July 2013
Junior Member
Thanks Larry.

Do you know where I can find the code that opens the launch configuration page?
Re: Programmatically Setting Environment Variables for TcServer [message #1086600 is a reply to message #1085942] Wed, 14 August 2013 12:09 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 8/13/2013 11:11 AM, Wendy Haley wrote:
> Thanks Larry.
>
> Do you know where I can find the code that opens the launch
> configuration page?

It's probably in the org.eclipse.wst.server.ui plug-in. You could try
searching for the string "Open launch configuration" and start following
the trail from there.

Cheers,
Larry
Re: Programmatically Setting Environment Variables for TcServer [message #1086751 is a reply to message #1086600] Wed, 14 August 2013 17:12 Go to previous message
Wendy Haley is currently offline Wendy Haley
Messages: 10
Registered: July 2013
Junior Member
I found the API I am looking for.
IServer.getLaunchConfiguration(true, null)

Thanks to everyone for suggestions.

[Updated on: Thu, 15 August 2013 12:40]

Report message to a moderator

Previous Topic:Weblogic Server Tool Installation
Next Topic:system_catalog.xml type errors
Goto Forum:
  


Current Time: Sun Sep 21 16:19:50 GMT 2014

Powered by FUDForum. Page generated in 0.01745 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software