Examples of CommandProxy


Examples of org.apache.felix.gogo.runtime.CommandProxy

                    Map<String, CommandProxy> proxyMap = new HashMap<String, CommandProxy>();
                    if (function.getClass().isArray())
                    {
                        for (Object f : ((Object[]) function))
                        {
                            CommandProxy target = new CommandProxy(context, reference, f.toString());
                            proxyMap.put(f.toString(), target);
                            processor.addCommand(scope.toString(), target, f.toString(), rank);
                            commands.add(target);
                        }
                    }
                    else
                    {
                        CommandProxy target = new CommandProxy(context, reference, function.toString());
                        proxyMap.put(function.toString(), target);
                        processor.addCommand(scope.toString(), target, function.toString(), rank);
                        commands.add(target);
                    }
                    proxies.put(reference, proxyMap);
View Full Code Here

Examples of org.apache.felix.gogo.runtime.CommandProxy

                {
                    if (function.getClass().isArray())
                    {
                        for (Object f : ((Object[]) function))
                        {
                            Function target = new CommandProxy(context, reference,
                                f.toString());
                            processor.addCommand(scope.toString(), target, f.toString());
                            commands.add(target);
                        }
                    }
                    else
                    {
                        Function target = new CommandProxy(context, reference,
                            function.toString());
                        processor.addCommand(scope.toString(), target, function.toString());
                        commands.add(target);
                    }
                    return commands;
View Full Code Here

Examples of org.apache.felix.gogo.runtime.CommandProxy

                List<Object> commands = new ArrayList<Object>();

                if (scope != null && function != null) {
                    if (function.getClass().isArray()) {
                        for (Object f : ((Object[]) function)) {
                            Function target = new CommandProxy(context, reference,
                                    f.toString());
                            addCommand(scope.toString(), target, f.toString());
                            commands.add(target);
                        }
                    } else {
                        Function target = new CommandProxy(context, reference,
                                function.toString());
                        addCommand(scope.toString(), target, function.toString());
                        commands.add(target);
                    }
                    return commands;
View Full Code Here

Examples of org.apache.felix.gogo.runtime.CommandProxy

                    Map<String, CommandProxy> proxyMap = new HashMap<String, CommandProxy>();
                    if (function.getClass().isArray())
                    {
                        for (Object f : ((Object[]) function))
                        {
                            CommandProxy target = new CommandProxy(context, reference, f.toString());
                            proxyMap.put(f.toString(), target);
                            addCommand(scope.toString(), target, f.toString(), rank);
                            commands.add(target);
                        }
                    }
                    else
                    {
                        CommandProxy target = new CommandProxy(context, reference, function.toString());
                        proxyMap.put(function.toString(), target);
                        addCommand(scope.toString(), target, function.toString(), rank);
                        commands.add(target);
                    }
                    proxies.put(reference, proxyMap);
View Full Code Here

Examples of org.apache.felix.gogo.runtime.CommandProxy

        return aliases;
    }

    protected Function unProxy(Function function) {
        if (function instanceof CommandProxy) {
            CommandProxy proxy = (CommandProxy) function;
            Object target = proxy.getTarget();
            Function result;
            if (target instanceof Function) {
                result = (Function) target;
            } else {
                result = function;
            }
            proxy.ungetTarget();
            return result;
        } else {
            return function;
        }
    }
View Full Code Here

Examples of org.apache.felix.gogo.runtime.CommandProxy

                List<Object> commands = new ArrayList<Object>();

                if (scope != null && function != null) {
                    if (function.getClass().isArray()) {
                        for (Object f : ((Object[]) function)) {
                            Function target = new CommandProxy(context, reference,
                                    f.toString());
                            addCommand(scope.toString(), target, f.toString());
                            commands.add(target);
                        }
                    } else {
                        Function target = new CommandProxy(context, reference,
                                function.toString());
                        addCommand(scope.toString(), target, function.toString());
                        commands.add(target);
                    }
                    return commands;
View Full Code Here

Examples of org.apache.felix.gogo.runtime.CommandProxy

    public static Function unProxy(Function function) {
        if (function == null || function.getClass() != CommandProxy.class) {
            return function;
        }
        CommandProxy proxy = (CommandProxy)function;
        Object target = proxy.getTarget();
        try {
            return target instanceof Function ? (Function)target : function;
        } finally {
            proxy.ungetTarget();
        }
    }
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy

    Command semanticCommand = getSemanticCommandSwitch(completedRequest);
    if (elementType != null) {
      if (semanticCommand != null) {
        ICommand command = semanticCommand instanceof ICommandProxy ? ((ICommandProxy) semanticCommand)
            .getICommand()
            : new CommandProxy(semanticCommand);
        completedRequest
            .setParameter(
                OntoUML.diagram.edit.helpers.OntoUMLBaseEditHelper.EDIT_POLICY_COMMAND,
                command);
      }
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy

        getEditingDomain(), getCommandLabel());
    while (editParts.hasNext()) {
      EditPart editPart = (EditPart) editParts.next();
      Command curCommand = editPart.getCommand(request);
      if (curCommand != null) {
        command.compose(new CommandProxy(curCommand));
      }
    }
    if (command.isEmpty() || command.size() != operationSet.size()) {
      return UnexecutableCommand.INSTANCE;
    }
View Full Code Here

Examples of org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy

  private Command getEditHelperCommand(IEditCommandRequest request,
      Command editPolicyCommand) {
    if (editPolicyCommand != null) {
      ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand)
          .getICommand()
          : new CommandProxy(editPolicyCommand);
      request
          .setParameter(
              eu.admire.visual.pmml.treemodel._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
              command);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.