本文整理匯總了Java中org.eclipse.emf.ecore.util.EcoreUtil.delete方法的典型用法代碼示例。如果您正苦於以下問題:Java EcoreUtil.delete方法的具體用法?Java EcoreUtil.delete怎麽用?Java EcoreUtil.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.emf.ecore.util.EcoreUtil
的用法示例。
在下文中一共展示了EcoreUtil.delete方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: popStackFrameReply
import org.eclipse.emf.ecore.util.EcoreUtil; //導入方法依賴的package包/類
/**
* Notify popping the {@link Thread#getTopStackFrame() top stack frame} of the given {@link Thread}.
*
* @param thread
* the {@link Thread}
* @return the popped {@link StackFrame}
*/
public static StackFrame popStackFrameReply(Thread thread) {
final StackFrame res;
if (ThreadUtils.canPopFrame(thread)) {
final StackFrame topStackFrame = thread.getTopStackFrame();
thread.setTopStackFrame(topStackFrame.getParentFrame());
EcoreUtil.delete(topStackFrame); // TODO optimize with cross referencer
res = topStackFrame;
} else {
throw new IllegalStateException(
"can't pop a stack frame when the debug target is not connected or the thread is not suspended.");
}
return res;
}
示例2: deleteEObject
import org.eclipse.emf.ecore.util.EcoreUtil; //導入方法依賴的package包/類
public boolean deleteEObject(String sigType, String relativeObjectURI)
throws IOException, TraceException {
EObject eObject = findEObject(sigType, relativeObjectURI);
if (eObject != null) {
Resource eResource = eObject.eResource();
EcoreUtil.delete(eObject);
eResource.save(null);
return true;
}
return false;
}
示例3: deleteElement
import org.eclipse.emf.ecore.util.EcoreUtil; //導入方法依賴的package包/類
public void deleteElement(EObject eo) {
EcoreUtil.delete(eo);
}
示例4: deleteVariableReply
import org.eclipse.emf.ecore.util.EcoreUtil; //導入方法依賴的package包/類
/**
* Notify the deletion of the {@link Variable} with the given {@link Variable#getName() name} in the given
* {@link Thread}.
*
* @param thread
* the {@link Thread}
* @param name
* the {@link Variable#getName() variable name}
*/
public static void deleteVariableReply(Thread thread, String name) {
final Variable variable = getVariable(thread, name);
if (variable != null) {
EcoreUtil.delete(variable); // TODO optimize with a cross referencer
}
}