TransactionalEditingDomainImpl editingDomain = (TransactionalEditingDomainImpl) diagramEditor.getEditingDomain();
editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
@Override
protected void doExecute() {
  //do something
}
});

EMF中模型不能直接编辑,需要有事务,支持undo redo。

Cannot modify resource set without a write transaction 问题的更多相关文章

  1. GMF常见问题

    1.问题:连接线旁边没有文字标签和箭头 文字标签:在gmfmap里的Connection Mappping下增加Label Mapping元素:箭头:在gmfgraph里为Polyline Conne ...

  2. Parallelized coherent read and writeback transaction processing system for use in a packet switched cache coherent multiprocessor system

    A multiprocessor computer system is provided having a multiplicity of sub-systems and a main memory ...

  3. 存储过程和transaction

    https://stackoverflow.com/questions/11531352/how-to-rollback-a-transaction-in-a-stored-procedure BEG ...

  4. Understanding JTS--reference

    Part I-An introduction to transactions If you look at any introductory article or book on J2EE, you' ...

  5. Oracle Locks之DML锁

    Oracle通过锁来实现数据库的并发控制 Oracle Database automatically locks a resource on behalf of a transaction to pr ...

  6. oracle_hc.sql

    select event,count(1) from gv$session group by event order by 2;exec dbms_workload_repository.create ...

  7. IBM DB2 SQL error code list

    SQL return codes that are preceded by a minus sign (-) indicate that the SQL statement execution was ...

  8. COM Error Code(HRESULT)部分摘录

    Return value/code Description 0x00030200 STG_S_CONVERTED The underlying file was converted to compou ...

  9. SIHA环境修改主机名实施步骤

    目 录 1 实施需求 2 修改主机名 2.1 停止HAS服务 2.2 修改主机名 3 重新配置服务 3.1 使用root用户重新配置CSS & OHAS服务 3.2 设置cssd自动启动属性 ...

随机推荐

  1. Java程序的编写与执行、Java新手常见问题及解决方法|乐字节Java学习

    今天,我们来写一段Java程序.然后看看Java程序是如何执行的,以及Java新手小白遇到的问题和解决办法.   一.HelloWorld的编写 ① 新建一个XXX.java (文件的扩展名显示出来) ...

  2. java模拟from表单提交,上传图片

    /** * java上传表单,有图片 * @param urlStr 上传地址 * @param textMap 表单参数 * @param fileMap 文件参数 key:文件名称 value:文 ...

  3. Python基础 第5章 条件、循环及其他语句(1)

    1. print和import 1.1 打印多个参数 可用 + 连接多个字符串,可保证被连接字符串前无空格: 可用sep=“_”,自定义各种分隔符: print("I"," ...

  4. apache - storm - Setting Up a Development Environment

    Installing a Storm release locally If you want to be able to submit topologies to a remote cluster f ...

  5. PHP传引用赋值底层的变化

    $a = 3;$b = &$a;//传引用,即地址赋值 使用xdebug_debug_zval('a');使用xdebug_debug_zval('b');运行结果为:a:(refcount= ...

  6. 部署java应用的几种方式

    J2EE应用 该应用根目录下有好多文件夹和以jsp结尾的文件 部署时,需要在tomcat的conf目录下的server.xml文件中添加上<Context path="/" ...

  7. Angular 惰性路由

    根路由上的一个 loadChildren 属性,设置为一个字符串.这样就是惰性路由了. angular6 这样写:loadChildren: './background-check/backgroun ...

  8. spingboot启动报驱动Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of th

    原因: springboot应用了最新的驱动com.mysql.cj.jdbc.Driver,这个驱动需要用mysql-connector-java包的6.x版本才可以, 而mysql-connect ...

  9. js中prototype与__proto__的关系详解

    一.构造函数: 构造函数:通过new关键字可以用来创建特定类型的对象的函数.比如像Object和Array,两者属于内置的原生的构造函数,在运行时会自动的出现在执行环境中,可以直接使用.如下: var ...

  10. windows的一些常用指令

    持续更新中..... 1.清除系统内 DNS 的缓冲  :  nslookup baidu.com 2.修改hosts文件  :  位置 运行  ->  C:/windows/system32/ ...