Search in sources :

Example 1 with WorkspacePluginModelBase

use of org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase in project dsl-devkit by dsldevkit.

the class CheckExtensionGenerator method createNewFile.

/**
 * Create a new plugin.xml file.
 *
 * @param catalog
 *          the built catalog
 * @param pluginxml
 *          the file (not existing)
 * @param monitor
 *          progress monitor
 * @throws CoreException
 *           if the plug-in extension could not be created
 * @see org.eclipse.pde.internal.ui.wizards.product.ProductIntroOperation
 */
private void createNewFile(final CheckCatalog catalog, final IFile pluginxml, final IProgressMonitor monitor) throws CoreException {
    WorkspacePluginModelBase pluginModel = (WorkspacePluginModelBase) getModel(pluginxml);
    IPluginBase base = pluginModel.getPluginBase();
    base.setSchemaVersion(TargetPlatformHelper.getSchemaVersion());
    manager.addExtensions(catalog, pluginModel, monitor);
    manager.sortAllExtensions(pluginModel, monitor);
    pluginModel.save();
}
Also used : WorkspacePluginModelBase(org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase) IPluginBase(org.eclipse.pde.core.plugin.IPluginBase)

Aggregations

IPluginBase (org.eclipse.pde.core.plugin.IPluginBase)1 WorkspacePluginModelBase (org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase)1