Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Created make targets not saved to .cproject

Hi everybody,
I'll answer this myself after I found the reason for my problems (after hours...). Maybe it causes all of you to laugh, but the only thing I missed was to change the version number of my plugin. The code and plugin.xml etc. was all correct. But obviously Eclipse did not pick up the new information of the dependencies from the plugin.xml because I kept the old version number :-(

So the workaround for the initial problem  is finally running, I get the .cproject saved to disk after my changes if I run the code shown below.

Cheers,
  Achim

Achim Bursian wrote:
One more plea for help ;-)
I tried to implement a workaround now, to force a rewriting of the .cproject after my modifications. This code compiles fine:
        monitor.setTaskName("saving changes");
        for (IProject project : changedProjects) {
            ICProjectDescription des = CCorePlugin.getDefault().getProjectDescription(project, true);
            System.out.println("SAVE " + project.getName());
            if (des != null) {
                System.out.println("  ++" + project.getName());
                CCorePlugin.getDefault().setProjectDescription(project, des, true, monitor);
            }
        }
        monitor.done();
When running in the PDE runtime workbench, all is fine (well, it still does not save, but the code is running fine).
But when I export the plugin and install it into my regular Eclipse installation, I get this exception:

java.lang.NoClassDefFoundError: org/eclipse/cdt/core/CCorePlugin
at com.siemens.cropet.maketargets.Maketargetbuilder.updateMakeTargets(Maketargetbuilder.java:254)
at com.siemens.cropet.maketargets.Maketargetbuilder.access$3(Maketargetbuilder.java:232)
at com.siemens.cropet.maketargets.Maketargetbuilder$2.run(Maketargetbuilder.java:70)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I guess this is some very basic handling error on my side, but I encounter that for the first time. Any idea what's missing?


Back to the top