Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how to invoke propertysheetpage change according to Model's change
how to invoke propertysheetpage change according to Model's change [message #210059] Wed, 22 February 2006 08:59 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:how to add name to connection line?
Next Topic:grid and background image
Goto Forum:
  


Current Time: Tue Jul 16 10:01:35 GMT 2024

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

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

Back to the top