當前位置: 首頁>>代碼示例>>Java>>正文


Java EcoreUtil.delete方法代碼示例

本文整理匯總了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;
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:21,代碼來源:ThreadUtils.java

示例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;
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:12,代碼來源:TraceManager.java

示例3: deleteElement

import org.eclipse.emf.ecore.util.EcoreUtil; //導入方法依賴的package包/類
public void deleteElement(EObject eo) {
	EcoreUtil.delete(eo);
}
 
開發者ID:occiware,項目名稱:OCCI-Studio,代碼行數:4,代碼來源:DesignServices.java

示例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
	}
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:16,代碼來源:ThreadUtils.java


注:本文中的org.eclipse.emf.ecore.util.EcoreUtil.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。