Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Classpath of target VM

Thanks very much Rich.
The first way certainly works, and is certainly ok to be going on with.
I will however try and do it via classpath containers in the end.
I had found this IConfigurationContributor mechanism, but I thought you could only add things to the end of the classpath,
and I didn't spot the PREPEND_BOOTPATH flag!
 
The only other thing I would say is that I think it would be nice to be able to kick the proxy launchers off in debug mode so that
they appear in the debug perspective. I think this would be much easier to use than having to create another workspace with the same code,
and attaching remote debuggers. I don't know how difficult that would be to achieve, but at first glance, as it seems to be kicked off via
the same mechanism as other launchers, I would guess that it wasn't too difficult to make this possible. Do you have any thoughts on this?
 
 
 Darren Hurt
-----Original Message-----
From: ve-dev-bounces@xxxxxxxxxxx [mailto:ve-dev-bounces@xxxxxxxxxxx]On Behalf Of Rich Kulp
Sent: 20 April 2006 19:00
To: Discussions people developing code for the Visual Editor project
Subject: Re: [ve-dev] Classpath of target VM


Hi,

There are two different possibilities for you to force something to be at the front of the bootpath. One needs to be done by each user for each project, the other can be used if you are supplying extension code and a Classpath Container to the VE. The second one is best if you are supplying it because then your users won't need to do anything special.

For the user:

I haven't tried it specifically for what you want, but we do have an option to create a Launch Configuration for a project that will be used when the remote vm is launched.

To activate this you need to activate the "Proxy Tools".
  1. This is done through Window->Customize Perspective, select the "Commands" tab, search for "Proxy Tools" on the list on the left and select the check box and hit OK.
  2. This adds a new "Run" icon to the toolbar. Its tooltip will say "Proxy Launch Manager". Click on the little dropdown arrow and select Proxy...
  3. Select the "Local Proxy Application", and hit New to create a new one. You can then configure this for a particular project, and go to the "Classpath" tab and add your jar to the bootpath. Do Apply and close.
  4. Select the project, bring up popup menu, select "Configure Default Proxy Configuration..." and select the checkbox for the launch configuration and hit OK.

It will now use this launch configuration for this project.

For the Classpath Container:

You will need to have read  http://eclipse.org/articles/Article-VE-Custom-Widget/customwidget.html  to understand what I'm talking about. But if you now have a Classpath container for your customized jar(s), you can contribute a jem IConfigurationContributor to allow you to contribute to the classpath. This is contributed as an org.eclipse.jem.proxy.contributors extension point from your plugin.xml for the plugin that you are using to control your contribution with the VE.

The IConfigurationContributor will be called in the method contributeClasspaths. It is passed an IConfigurationContributionController instance. and this class is used to contribute to the classpath. You would call the contributeClasspath method with the location to use and with the flag PREPEND_BOOTPATH. This will pre-pend it to the boot classpath.

Thanks,
Rich

Back to the top