本文整理匯總了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));
}
示例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);
}
示例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);
}
}
}