[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] RE: New Dynamic Web Project Wizard, How to add a runtime?



Yes, there are more extension points that you need to utilize before this will work. A good example to follow is the Tomcat runtime, which is defined in org.eclipse.jst.server.tomcat.core plugin.


- Konstantin


From: robert.stryker@xxxxxxxxx [mailto:robert.stryker@xxxxxxxxx] On Behalf Of Robert Stryker
Sent: Monday, August 21, 2006 12:13 PM
To: General discussion of project-wide or architectural issues.
Cc: Konstantin Komissarchik
Subject: New Dynamic Web Project Wizard, How to add a runtime?


Hello all:

   I've been trying to create a runtime type to be added to the new Dynamic Web Project wizard, but am having problems ensuring that not only is the runtime properly created, but that it then shows up on the list of possible runtimes in the wizard.

My use is pretty much to act as just a classpath provider, similar to the GenericRuntimeWizardFragment, but with support for more than just one directory.

I'm having problems discovering all the extension points needed for this.

So far:
  I've used the org.eclipse.wst.server.core.runtimeTypes extension to create my runtime.
  I've used the org.eclipse.wst.server.ui.wizardFragments extension to create teh wizard fragment.

At this point, I can create a new instance of the runtime, but it does not show up on the list in the wizard. So I continued:

  I tried to use the org.eclipse.jst.server.core.runtimeFacetMappings extension to ensure that org.eclipse.jst.server.core.internal.RuntimeBridge would add my runtime during its static initialization phase.

An exception is generated during the following code:
        try {
            mappings.put(id, RuntimeManager.getRuntimeComponentType(id2).getVersion(version));
        } catch (Exception e) {
            // ignore

The call to RuntimeManager.getRuntimeComponentType("my.runtime.type.id") executes the following:
        final IRuntimeComponentType rc
            = (IRuntimeComponentType) runtimeComponentTypes.get( id );

... and promptly throws an exception because rc is null.

This is about where I get lost. I cant figure out if another extension point is needed to ensure that the runtime bridge can add my runtime.

Any help that can be provided is greatly appreciated.

Thanks, all.

- Rob Stryker

Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.