[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] 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