Tree Cell Modiier [message #465828] |
Mon, 09 April 2007 08:32 |
Swetha Messages: 68 Registered: July 2009 |
Member |
|
|
Hi,
I am facing some problem with modify method of Tree cell editor,
I have defined a cell modifier and added this to my tree viewer,
I want the tree item to be editable on click of toolbar button called
edit..
so i have made use of boolean varaiable in can Modify() method,it is fine..
When I click on toolbar button the following method is called in my
EditTreeOperation class,
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException
{
treeItem = tree.getTree().getSelection()[0];
undoText = treeItem.getText().trim();
// To make cell editor to be active
modifier.setEnabled(true);
tree.editElement(treeItem.getData(), 0);
redoText = modifiedString;
return Status.OK_STATUS;
}
Here is my problem,
undoText --for storing the text before editing just to support Undo
facility
redoText --for storing the text after editing just to support Redo
facility
the newly entered text is stored in modify() method, in the variable
modifiedString...
problem is, the statement redoText = modifiedString is executed before
the modify() method in TreeCellEditor is called. Because of this, redo is
not working for me..
How can I make sure modify method is called first and then calling
redoText = modifiedString; statement..
Pls help me , pretty urgent..
Thanks,
Swetha
|
|
|
Powered by
FUDForum. Page generated in 0.02543 seconds