Java Code Examples for org.eclipse.emf.ecore.util.EcoreUtil#delete()
The following examples show how to use
org.eclipse.emf.ecore.util.EcoreUtil#delete() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FoldOutgoingActionsRefactoring.java From statecharts with Eclipse Public License 1.0 | 6 votes |
private void removeFirstActions(EList<Transition> transitions, int number) { for (Transition transition : transitions) { List<Expression> actionsToRemove = getFirstActions(transition, number); Effect effect = transition.getEffect(); if (effect instanceof ReactionEffect && actionsToRemove.size() == ((ReactionEffect)effect).getActions().size()) { // we need to remove all actions, so just remove the effect recursively which avoids serializer exceptions EcoreUtil.delete(effect, true); } else { for (Expression action : actionsToRemove) { EcoreUtil.delete(action); } } } }
Example 2
Source File: FoldIncomingActionsRefactoring.java From statecharts with Eclipse Public License 1.0 | 6 votes |
private void removeLastActions(EList<Transition> transitions, int number) { for (Transition transition : transitions) { List<Expression> actionsToRemove = getLastActions(transition, number); Effect effect = transition.getEffect(); if (effect instanceof ReactionEffect && actionsToRemove.size() == ((ReactionEffect) effect).getActions().size()) { // we need to remove all actions, so just remove the effect // recursively which avoids serializer exceptions EcoreUtil.delete(effect, true); } else { for (Expression action : actionsToRemove) { EcoreUtil.delete(action); } } } }
Example 3
Source File: ElexisProcessor.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private void updateE4Views(){ for (String viewId : e4ViewIds) { List<MPart> foundParts = eModelService.findElements(mApplication, viewId, MPart.class, null); for (MPart mPart : foundParts) { // remove references to old CompatibilityView part if (mPart.getContributionURI() == null || mPart.getContributionURI().endsWith("CompatibilityView")) { EcoreUtil.delete((EObject) mPart); } } } }
Example 4
Source File: MetamodelImpl.java From bonita-studio with GNU General Public License v2.0 | 2 votes |
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public void delete(EModelElement metamodelElement) { EcoreUtil.delete(metamodelElement); }