コード例 #1
0
  /* (non-Javadoc)
   * @see org.eclipse.gmf.runtime.common.core.internal.service.IProvider#provides(org.eclipse.gmf.runtime.common.core.service.IOperation)
   */
  public boolean provides(IOperation operation) {
    Assert.isNotNull(operation);

    if (!(operation instanceof CreateDecoratorsOperation)) return false;

    IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
    return NodeDecorator.getDecoratorTargetNode(decoratorTarget) != null;
  }
コード例 #2
0
 public void createDecorators(IDecoratorTarget decoratorTarget) {
   Node node = NodeDecorator.getDecoratorTargetNode(decoratorTarget);
   if (node != null) {
     decoratorTarget.installDecorator(NODE_DECORATOR, new NodeDecorator(decoratorTarget));
   }
 }