Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Talk:Editor生命周期

Editor被修改

平台调用Editor的isDirty方法获取editor的修改状态,当返回值为true,该editor被置为已修改.

创建boolean类型的实例变量dirty。 覆盖isDirty方法,如下:


在触发修改的时候调用以下代码:

dirty = true;		// 修改editor的状态为已修改
firePropertyChange(PROP_DIRTY);      // 通知平台编辑器dirty属性被修改

完成以上步骤,当对editor进行修改后,editor的标题栏会加上*标志。

Back to the top