EGF Engine
Release 0.1.0

org.eclipse.egf.pattern.refactoring.internal.move.change
Class RefactoringPatternHandler

java.lang.Object
  extended by org.eclipse.egf.pattern.ecore.PatternHandler
      extended by org.eclipse.egf.pattern.refactoring.internal.move.change.RefactoringPatternHandler

public class RefactoringPatternHandler
extends PatternHandler

Enhance the PatternHandler with refactoring specific functions.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.egf.pattern.ecore.PatternHandler
PatternHandler.PatternData, PatternHandler.ProductionOptionsHandler
 
Constructor Summary
RefactoringPatternHandler()
           
 
Method Summary
protected  boolean recomputeOperationsPaths(String previousFcId_p, String newFcId_p)
          Recompute operations paths for current pattern, swapping from previous factory component id to new one.
 void refactorContainingFactoryComponent(String previousFcId_p, String destinationFcId_p)
          Refactor pattern containing factory component (from id).
 void refactorFullId(String newPatternFullId_p, boolean updateExtensions_p)
          Refactor pattern full id.
protected  void updatePatternModel(PatternModel patternModel_p, PatternHandler.PatternData patternData_p)
          Update pattern model with new pattern name, path and id.
 
Methods inherited from class org.eclipse.egf.pattern.ecore.PatternHandler
cleanGeneratedStructures, createPattern, delete, ensurePluginDependencies, getAllParameters, getCallParameters, getGenerateOperation, getPatternData, handleSaveProductionOptions, isEditable, load, postSave, readProductionContext, recomputeAllParameters, recomputeCallParameters, recomputeConditionStructures, reloadPatternAndUpdateModel, save, save, setFileRelativePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefactoringPatternHandler

public RefactoringPatternHandler()
Method Detail

refactorFullId

public void refactorFullId(String newPatternFullId_p,
                           boolean updateExtensions_p)
                    throws Exception
Refactor pattern full id.
The new full id must point to the same pattern file, that is the short id must be identical.
If not an IllegalArgumentException is thrown.

Parameters:
newPatternFullId_p -
updateExtensions_p - true to update the associated extensions, false otherwise. If an update is required, then it is assumed that the containing factory component (and thus its plug-in) has not changed.
Throws:
IllegalArgumentException - if given new full id is not compliant with the pattern deployment.
Exception

refactorContainingFactoryComponent

public void refactorContainingFactoryComponent(String previousFcId_p,
                                               String destinationFcId_p)
                                        throws Exception
Refactor pattern containing factory component (from id).
List of refactored items :

Parameters:
previousFcId_p -
destinationFcId_p -
Throws:
Exception

recomputeOperationsPaths

protected boolean recomputeOperationsPaths(String previousFcId_p,
                                           String newFcId_p)
Recompute operations paths for current pattern, swapping from previous factory component id to new one.

Parameters:
previousFcId_p -
newFcId_p -
Returns:

updatePatternModel

protected void updatePatternModel(PatternModel patternModel_p,
                                  PatternHandler.PatternData patternData_p)
Description copied from class: PatternHandler
Update pattern model with new pattern name, path and id.

Overrides:
updatePatternModel in class PatternHandler
See Also:
PatternHandler.updatePatternModel(org.eclipse.egf.model.PatternModel, org.eclipse.egf.pattern.ecore.PatternHandler.PatternData)

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.