编写eclipse插件报错,求大神来帮看看
eclipse吧
全部回复
仅看楼主
level 1
小弟这两天在写一个插件,需要获取当前选中的代码块,就照网上写了下边的代码
ISelectionService selectionService =Workbench.getInstance().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
TextSelection text = (TextSelection) selection;
可是运行就会报类型转换错误
org.eclipse.jface.text.TextSelection cannot be cast to org.eclipse.jface.text.TextSelection
这是什么原因,求大神帮我分析下
2018年02月08日 02点02分 1
level 1
[委屈]
2018年02月08日 04点02分 2
1