Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » OleControlSite.isDirty() returns true even after is called
OleControlSite.isDirty() returns true even after is called [message #780962] Thu, 19 January 2012 06:52
Suraj Varghese is currently offline Suraj VargheseFriend
Messages: 4
Registered: November 2011
Junior Member
Hi All,

I am developing a multi-page editor (extending MultiPageEditorPart) having 2 pages.
For editing the source code, a text editor and an excel sheet is provided in the 2 pages.
I have managed to embed the excel sheet and all synchronization with the other page has also been taken care of.
Now, if I am on the text editor and I click on the "save" button then the source code gets saved successfully and the "save" button gets disabled as well.
However, If I am on the excel sheet page of the editor and I click on "save" then the source code gets saved successfully but the "save" button remains enabled.

See the below code.

//Components are created
OleFrame excelFrame = new OleFrame(composite, SWT.NONE);

File excelFile = new File("D:\\ExcelSheet1.xls");

OleControlSite excelControlSite = new OleControlSite(excelFrame, SWT.NONE, excelFile);

//Added an OLE Listener to identify a change in the excel file
excelControlSite.addEventListener(automation, eventSinkId, eventID, listener);

//Excel file is saved
boolean isSaved =, true);
boolean isDirty = excelControlSite.isDirty();

Now, variable isSaved holds value as true which is as expected and the Excel File has also been saved successfully.
However, excelControlSite.isDirty() still returns true which should have returned false since the file has been saved.

Due to this the save button remains enabled.

Has anyone come across a similar problem?
Any idea how to tackle this issue?

Thanks and Regards,
Previous Topic:OleControlSite.isDirty() returns true even after is called
Next Topic:Accessibility for combo's and checkbox
Goto Forum:

Current Time: Fri Jun 22 00:13:42 GMT 2018

Powered by FUDForum. Page generated in 0.02278 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top