Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-ui-dev] Programmatically added dependencies to plugin.xml don't seem to work


Hi,

I am using the PDE mechanism where code can be generated using templates (similar to the HelloWorld plugin). As part of this, in the 'updateModel' method, I am adding dependencies to the plugin.xml. Here is the code snippet:


IPluginBase plugin = model.getPluginBase();
IPluginModelFactory factory = model.getFactory();                
IPluginImport importEntries = factory.createImport();
importEntries.setId("org.eclipse.emf.ecore");
plugin.add(importEntries);

However, I notice that the entry does get added, but its not taking effect. In the sense that the corresponding .classpath is NOT updated and also in my java code if I add the above import, it complains as if the dependency does not exist. Whats weird is that if I manually delete this dependency (Dependencies tab, right click, Delete) and add it back (Dependencies tab, Add button) and then save the plugin.xml, then the .classpath gets updated and the dependency seems to take effect

Any idea whats going on? Is there any additional step that I need to do after programmatically adding the dependency so that it takes effect?

Thanks
Rajeev

Back to the top