EGF Engine
Release 0.1.0

org.eclipse.egf.pde.internal.ui.util
Class ModelModification

java.lang.Object
  extended by org.eclipse.egf.pde.internal.ui.util.ModelModification
Direct Known Subclasses:
CreateDescriptorOperation

public abstract class ModelModification
extends Object

ModelModification class used my the PDEModelUtility Subclass me to create changes to your models.


Constructor Summary
ModelModification(IFile modelFile)
          Create a single model modification - used for modifying single AbstractEditingModels
ModelModification(IFile bundleFile, IFile xmlFile)
          Create a full IBundlePluginModelBase modification
ModelModification(IProject project)
          Create a ModelModification based on the contents of the project ie. if the project contains a MANIFEST.MF this will be tagged as a fullBundleModification, otherwise (this project is an old-style plugin) this will be a PluginModel/FragmentModel modification.
 
Method Summary
protected  IFile getFile()
           
protected  IFile getManifestFile()
           
protected  IFile getPropertiesFile()
           
protected  IFile getXMLFile()
           
protected  boolean isFullBundleModification()
           
protected abstract  void modifyModel(IBaseModel model, IProgressMonitor monitor)
          Invoke this using PDEModelUtility.modifyModel(ModelModification modification) Clients / subclasses should not invoke this method.
 boolean saveOpenEditor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelModification

public ModelModification(IFile modelFile)
Create a single model modification - used for modifying single AbstractEditingModels

Parameters:
modelFile - the basic underlying file for the model you wish to modify.

ModelModification

public ModelModification(IFile bundleFile,
                         IFile xmlFile)
Create a full IBundlePluginModelBase modification

Parameters:
bundleFile - the MANIFEST.MF file
xmlFile - the plugin.xml/fragment.xml file for this modification (optional - can be null)

ModelModification

public ModelModification(IProject project)
Create a ModelModification based on the contents of the project ie. if the project contains a MANIFEST.MF this will be tagged as a fullBundleModification, otherwise (this project is an old-style plugin) this will be a PluginModel/FragmentModel modification.

Parameters:
project -
Method Detail

modifyModel

protected abstract void modifyModel(IBaseModel model,
                                    IProgressMonitor monitor)
                             throws CoreException
Invoke this using PDEModelUtility.modifyModel(ModelModification modification) Clients / subclasses should not invoke this method.

Parameters:
model -
monitor -
Throws:
CoreException

getFile

protected final IFile getFile()

getManifestFile

protected final IFile getManifestFile()

getXMLFile

protected final IFile getXMLFile()

getPropertiesFile

protected final IFile getPropertiesFile()

isFullBundleModification

protected final boolean isFullBundleModification()

saveOpenEditor

public boolean saveOpenEditor()

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.