Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Tree Cell Modiier
Tree Cell Modiier [message #465828] Mon, 09 April 2007 08:32
Swetha is currently offline SwethaFriend
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
Previous Topic:I need someone to help me
Next Topic:help! can open swith perspective with toolbar actions?
Goto Forum:
  


Current Time: Thu Apr 25 17:08:37 GMT 2024

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

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

Back to the top