问题:
1、使用CellEditor时出现org.eclipse.core.runtime.AssertionFailedException: assertion failed:
原因(使用TextCellEditor时CellModifier的getValue函数返回值必须为String类型的)
引用
you have either not set the CellModifier for the TableViewer (using the setCellModifier() function)
or, if you have, then the getValue() function of your ICellModifier descendant returns either null or not a String object.
The return value of getValue() is an object, but if you are using a TextCellEditor, it has to return a String.
引用自:
http://stackoverflow.com/questions/1390613/how-to-resolve-assertionfailedexception
教程列表:
使用TableViewer编辑数据貌似有两种方法,此外不用TableViewer时可以添加button等控件:
1、对整个table提供统一的编辑策略
例如(比较详细的教程,含按列排序、filter等功能,分在4篇博客里):
http://www.blogjava.net/dreamstone/archive/2007/08/05/134498.html
2、对每一列单独提供(感觉这种方法更清晰简洁,不需要各种字符串判断了)
http://study-swt.info/viewers/sample_editable_table.html
3、不使用TableViewer,添加button等控件
http://www.blogjava.net/Javawind/articles/131557.html
4、其他教程(详细,含高亮特定字段的功能):
http://www.vogella.de/articles/EclipseJFaceTableAdvanced/article.html
5、在表格中的不同位置弹出不同菜单(杂乱的教程,直接查看类:Snippet311)
http://hi.baidu.com/if1i/blog/item/29f057d1bb9a55dd572c8433.html
分享到:
相关推荐
Plugins-JFace-TableViewer.rar Plugins-JFace-TableViewer.rar Plugins-JFace-TableViewer.rar Plugins-JFace-TableViewer.rar Plugins-JFace-TableViewer.rar
NULL 博文链接:https://1299020954.iteye.com/blog/2231923
NULL 博文链接:https://marsvaadin.iteye.com/blog/1320182
SWT-JFace-3.4-API,SWT学习助手
SWT和Jface开发使用必使用jar包之:equinox包,配合其他jar包一起使用
Eclipse SWT/JFace SWT JFace 实例 Eclipse SWT/JFace 书中 全部实例
SWT JFACE 编程笔记 , 比较适合刚 解除 java swt jface 的开发人员
NULL 博文链接:https://arizona.iteye.com/blog/526298
swt jface jar swt jface jar swt jface jar
The.Definitive.Guide.to.SWT.and.JFace.eBook-LiB [SWT/JFace开发指南]
《Eclipse SWT/Jface核心应用》全面介绍了SWT、JFace和RCP的相关知识。全书共分5篇,第1篇介绍了SWT产生的背景以及SWT的一些基本概念和基础知识。第2篇介绍了SWT基本控件的使用,以及事件处理、布局等SWT基本知识的...
SWT/Jface API 3.4 SWT/Jface API 3.4 SWT/Jface API 3.4 SWT/Jface API 3.4
SWT和Jface开发使用必使用jar包之:commands包,配合其他jar包一起使用
swtjface api.chm org.eclipse.swt是学习swt/jface帮助文档2
swt,jface笔记
swtjface api.chm org.eclipse.swt是学习swt/jface帮助文档1
SWT JFACE in Action(中文)
swt/Jface用到的最基本的jar包
快速学习swt jface eclipse 开发
点击Enter键,对TableViewer的单元格进行逐个遍历的辅助类,推荐用于使用ViewerColumn.setEditingSupport的可编辑TableViewer。 Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport...