how to invoke propertysheetpage change according to Model's change [message #210059] |
Wed, 22 February 2006 08:59 |
Eclipse User |
|
|
|
Originally posted by: tmxk2008.gmail.com
code in editpart is in below:
public void performRequest(Request req){
if(req.getType()==RequestConstants.REQ_OPEN){//when doubleClick will
invoke it
Column column = (Column) getModel();
column.setName("ColumnName");
}
}
Column is GEF's Model , and Column had added IPropertySource Correctly .
when I double-click the Model's figure will change correctly ,but the
propertySheetPage will not change ,and the eclipse's save-button will not
be usable.
welcome anyone's suggestion.
|
|
|
Re: how to invoke propertysheetpage change according to Model's change [message #210091 is a reply to message #210059] |
Wed, 22 February 2006 16:10 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The propertysheet should update any time the commandstack fires
notification. So, you need to modify your model within the context of a
command.
"heima" <tmxk2008@gmail.com> wrote in message
news:8874e8ccc0d544246271815a738bfc20$1@www.eclipse.org...
> code in editpart is in below:
>
>
> public void performRequest(Request req){
>
> if(req.getType()==RequestConstants.REQ_OPEN){//when doubleClick will
> invoke it
>
> Column column = (Column) getModel();
> column.setName("ColumnName");
> }
> }
>
> Column is GEF's Model , and Column had added IPropertySource Correctly .
>
> when I double-click the Model's figure will change correctly ,but the
> propertySheetPage will not change ,and the eclipse's save-button will not
> be usable.
>
> welcome anyone's suggestion.
>
>
|
|
|
Re: how to invoke propertysheetpage change according to Model's change [message #210181 is a reply to message #210091] |
Thu, 23 February 2006 06:52 |
Eclipse User |
|
|
|
Originally posted by: tmxk2008.gmail.com
thanks for Randy Hudson's reply.
I have try what you said ,to change my model within command .
but still the same . Does me misuse it ? looking forward to your reply .
code like below:
protected Command getDirectEditCommand(DirectEditRequest request) {
RenameNodeCommand cmd = new RenameNodeCommand();
cmd.setNode((Node) getHost().getModel());
cmd.setName("nodeName");
//cmd.setName((String) request.getCellEditor().getValue());
return cmd;
}
besides,the editpolicy had been installed correctly.
|
|
|
Re: how to invoke propertysheetpage change according to Model's change [message #210291 is a reply to message #210181] |
Thu, 23 February 2006 16:26 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Are you using the UndoablePropertySheetEntry? Look for references to that
class in the logic example
"heima" <tmxk2008@gmail.com> wrote in message
news:56482f51d47c908771a432bad4c09be7$1@www.eclipse.org...
>
> thanks for Randy Hudson's reply.
> I have try what you said ,to change my model within command .
> but still the same . Does me misuse it ? looking forward to your reply .
> code like below:
>
> protected Command getDirectEditCommand(DirectEditRequest request) {
> RenameNodeCommand cmd = new RenameNodeCommand();
> cmd.setNode((Node) getHost().getModel());
> cmd.setName("nodeName"); //cmd.setName((String)
> request.getCellEditor().getValue());
> return cmd;
> }
>
> besides,the editpolicy had been installed correctly.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04428 seconds