Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse编辑器的只读属性视图_Eclipse_Plugins_Properties - Fatal编程技术网

Eclipse编辑器的只读属性视图

Eclipse编辑器的只读属性视图,eclipse,plugins,properties,Eclipse,Plugins,Properties,我正在创建一个编辑器,它在文本编辑器中具有树视图。我有一个属性视图附加到它,以便在选择每个树项目时,显示项目的属性。为此,每个树项都是一个实现IPropertySource的类。因此,属性值是通过重写IPropertySource类的方法(如getPropertyDescriptors、getPropertyValue、setPropertyValue等)获得的。 属性值将正确显示。但是,我要求properties视图中的值为只读。目前,名称是不可编辑的。但在选择属性视图的一行时,该属性的值是可

我正在创建一个编辑器,它在文本编辑器中具有树视图。我有一个属性视图附加到它,以便在选择每个树项目时,显示项目的属性。为此,每个树项都是一个实现IPropertySource的类。因此,属性值是通过重写IPropertySource类的方法(如getPropertyDescriptors、getPropertyValue、setPropertyValue等)获得的。 属性值将正确显示。但是,我要求properties视图中的值为只读。目前,名称是不可编辑的。但在选择属性视图的一行时,该属性的值是可编辑的。如何使properties视图的所有属性值均为只读(不可编辑)


谢谢

如果您使用的是Eclipse中的标准属性页,则它取决于
IPropertySource.GetPropertyScript
返回的
iPropertyScript实现是否以及如何在视图中编辑您的属性

如果查看
IPropertyDescriptor
的JavaDoc,您可以看到以下内容:

Clients may implement this interface to provide specialized property
descriptors; however, there are standard implementations declared in this 
package that take care of the most common cases:

* PropertyDescriptor - read-only property
* TextPropertyDescriptor - edits with a TextCellEditor
* CheckboxPropertyDescriptor - edits with a CheckboxCellEditor
* ComboBoxPropertyDescriptor - edits with a ComboBoxCellEditor
* ColorPropertyDescriptor - edits with a ColorCellEditor

因此,对于您的情况,返回
PropertyDescriptor
应该可以做到这一点

你对物业的看法如何?这是一张桌子吗?