Announcement Announcement Module
No announcement yet.
Problems converting PDE projects to STS style Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems converting PDE projects to STS style

    Hi, I'm trying to convert some of our plug-ins created with PDE to STS style bundles. When a plugin is converted I ultimately end up with an unusable bundle where the bundle classpath container is missing due to a NPE.

    So here's what I do in detail:
    - I start with a PDE plugin (I created an empty plug-in project in a standard eclipse 3.5.1 install)
    - Open the same workspace with STS 2.3.2
    - In the context menu of the project select Spring Tools / Add Spring Project Nature and Add OSGi Bundle Project Nature.
    - In the project properties, Java Build Path, add the root of the project as source folder, including only "META-INF/". This is necessary so that STS can find the manifest.
    - Still in Java Build Path, in the Libraries tab, remove Plug-In Dependencies (which is the PDE container) and Add Library... "Bundle Classpath Container".

    The last step already throws a NPE (silently).

    Editing the manifest (in the STS manifest editor) and saving triggers the following NPE:

    at com.springsource.server.ide.manifest.core.BundleMa nifestUtils.locateManifestFolder(BundleManifestUti
    at com.springsource.server.ide.jdt.internal.core.clas spath.ServerClasspathContainer.addWorkspaceBundle(
    at com.springsource.server.ide.jdt.internal.core.clas spath.ServerClasspathContainer.createDependencyLoc ator(
    at com.springsource.server.ide.jdt.internal.core.clas spath.ServerClasspathContainer.refreshClasspathEnt ries(
    at com.springsource.server.ide.jdt.internal.core.util .ClasspathUtils.updateClasspathContainer(Classpath
    at com.springsource.server.ide.jdt.internal.core.clas spath.ServerClasspathContainerUpdateJob.runInWorks pace(
    at org.eclipse.core.internal.resources.InternalWorksp
    at ava:55)

    I have debugged it and came so far as to note that the location field in ProjectDescription is null, therefore getRawLocation() returns null. I have no idea why this happens and would be grateful for any help.