[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] isDirty & ModifyListener

Hi,

I am building a small eclipse plugin and have a small issue with the isDirty property.
Currently I am using an EditorPart with a CTabFolder and a few objects of a class that inherits from CTabItem.
In this class I have a few Text objects, witch a ModifyListener attached to them.


Now, when I use the followin piece of code, the modifyListener is fired when I the part is created, while no real text change is made.

ModifyListener modifyListener = new ModifyListener() {
	public void modifyText(ModifyEvent e) {
		dirty = true;
		myEditortPart.firePropertyDirtyChange();
	}
};

text = new Text(parent, SWT.NONE);
text.setText("");
text.addModifyListener(modifyListener);


Is there a way to solve this?

Kind regards,
Johannes