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


Java ViewpointPackage類代碼示例

本文整理匯總了Java中org.eclipse.sirius.viewpoint.ViewpointPackage的典型用法代碼示例。如果您正苦於以下問題:Java ViewpointPackage類的具體用法?Java ViewpointPackage怎麽用?Java ViewpointPackage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ViewpointPackage類屬於org.eclipse.sirius.viewpoint包,在下文中一共展示了ViewpointPackage類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showInstructions

import org.eclipse.sirius.viewpoint.ViewpointPackage; //導入依賴的package包/類
/**
 * Show the given {@link List} of {@link EObject instruction}.
 * 
 * @param editorPart
 *            the opened {@link DialectEditor}
 * @param instructions
 *            the {@link List} of {@link EObject instruction} to show
 */
public static void showInstructions(DialectEditor editorPart, List<EObject> instructions) {
	Set<DRepresentationElement> representationElements = new LinkedHashSet<DRepresentationElement>();
	for (EObject instruction : instructions) {
		for (EObject eObj : new EObjectQuery(instruction).getInverseReferences(ViewpointPackage.eINSTANCE
				.getDRepresentationElement_SemanticElements())) {
			if (eObj instanceof DRepresentationElement) {
				representationElements.add((DRepresentationElement)eObj);
			}
		}
		showInstruction(editorPart, instruction);
	}
	DialectUIManager.INSTANCE.setSelection(editorPart, new ArrayList<DRepresentationElement>(
			representationElements));
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:23,代碼來源:SiriusEditorUtils.java

示例2: getRepresentation

import org.eclipse.sirius.viewpoint.ViewpointPackage; //導入依賴的package包/類
/**
 * @param decorator
 * @return
 */
public DRepresentation getRepresentation(DSemanticDecorator decorator) {
  if (decorator instanceof DRepresentation) {
    return ((DRepresentation) decorator);
  }
  return (DRepresentation) EcoreUtil2.getFirstContainer(decorator, ViewpointPackage.Literals.DREPRESENTATION);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:11,代碼來源:DiagramHelper.java

示例3: removeObjectInDiagram

import org.eclipse.sirius.viewpoint.ViewpointPackage; //導入依賴的package包/類
protected void removeObjectInDiagram(EObject context, EObject eObject) {
	Collection<EObject> representations = new EObjectQuery(eObject)
			.getInverseReferences(ViewpointPackage.Literals.DSEMANTIC_DECORATOR__TARGET);
	for (EObject representation : representations) {
		if (representation.eContainer().equals(context)) {
			DiagramServices.getDiagramServices().removeContainerView(representation);
		}
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:10,代碼來源:ShowHideWizard.java


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