Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] ChangeChildPropertyValueRequest

Hello, do somebody know how to use the ChangeChildPropertyValueRequest ?

It tried the following but the command I get is null…

 

 

public static void setCompartmentColor(GraphicalEditPart GEP, Color color,  String propertyID){

           

            ChangeChildPropertyValueRequest req = new ChangeChildPropertyValueRequest(

                    null, propertyID,

                FigureUtilities.colorToInteger(color),xxxVisualIDRegistry

                  .getType(xxxCompartmentEditPart.VISUAL_ID));

            final Command cmd = GEP.getParent().getCommand(req);

            AbstractEMFOperation operation = new AbstractEMFOperation(((GraphicalEditPart)GEP.getParent()).getEditingDomain(),

                        StringStatics.BLANK, null){

                        protected IStatus doExecute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {

                             cmd.execute();

                            

                             return null;

                        }

                  };

 

                  try {

                        operation.execute(new NullProgressMonitor(), null);

                  } catch (ExecutionException e) {

                       

                  }

      }

 

Thanks a lot !!!


Back to the top