SimpleBPMNCreateShortcutDecorationsCommand.java 文件源码

java
阅读 14 收藏 0 点赞 0 评论 0

项目:simplified-bpmn-example 作者:
/**
 * @generated
 */
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
        IAdaptable info) throws ExecutionException {
    for (Iterator it = myDescriptors.iterator(); it.hasNext();) {
        CreateViewRequest.ViewDescriptor nextDescriptor = (CreateViewRequest.ViewDescriptor) it
                .next();
        View view = (View) nextDescriptor.getAdapter(View.class);
        if (view != null && view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
            EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE
                    .createEAnnotation();
            shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
            shortcutAnnotation
                    .getDetails()
                    .put("modelID", SimpleBPMN.diagram.edit.parts.BusinessProcessDiagramEditPart.MODEL_ID); //$NON-NLS-1$
            view.getEAnnotations().add(shortcutAnnotation);
        }
    }
    return CommandResult.newOKCommandResult();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号