« Return to Thread: palette tool for creating object from a template

palette tool for creating object from a template

by Gregory Jansen :: Rate this Message:

| View in Thread

I'm trying to put tools on the palette that will create objects that are
copies of template objects. The palette runtime is straight forward and
this kind of request seems to fit within a local subclass of GMF
CreateViewAndElementRequest, for instance:

     public TemplateObjectCreateRequest(IElementType type, final EObject
templateObject, PreferencesHint preferencesHint) {
         super(
                 new ViewAndElementDescriptor(
                     new CreateElementRequestAdapter(
                         new CreateElementRequest(type)), preferencesHint));
         this.templateObject = templateObject;
     }

Does this sound like a good approach? I'm now at the stage of
implementing the create policy for this request and have gotten stuck there.

I'm off to read the runtime docs but any advice would be great, thanks.
Greg Jansen
_______________________________________________
gmf-dev mailing list
gmf-dev@...
https://dev.eclipse.org/mailman/listinfo/gmf-dev

 « Return to Thread: palette tool for creating object from a template