Ejemplo n.º 1
0
    private MethodInterface getMethodInterface() {
      AbstractNodeInterface nodeIf =
          NodeInterfaceFactory.getNodeInterface(getSelectedNodes().get(0), null, fFileInfoProvider);

      if (!(nodeIf instanceof MethodInterface)) {
        final String MSG = "Invalid type of node interface. Method node interface expected";
        ExceptionHelper.reportRuntimeException(MSG);
      }

      return (MethodInterface) nodeIf;
    }
Ejemplo n.º 2
0
    private TestCaseInterface getTestCaseInterface() {
      AbstractNodeInterface nodeInterface =
          NodeInterfaceFactory.getNodeInterface(getSelectedNodes().get(0), null, fFileInfoProvider);

      if (!(nodeInterface instanceof TestCaseInterface)) {
        final String MSG = "Invalid type of node interface. Test case interface expected";
        ExceptionHelper.reportRuntimeException(MSG);
      }

      return (TestCaseInterface) nodeInterface;
    }
Ejemplo n.º 3
0
    private void addActionsForTestCase(AbstractNode abstractNode) {

      if (!(abstractNode instanceof TestCaseNode)) {
        return;
      }

      TestCaseInterface testCaseInterface = getTestCaseInterface();

      AbstractNodeInterface nodeIf =
          NodeInterfaceFactory.getNodeInterface(
              testCaseInterface.getMethod(), null, fFileInfoProvider);

      MethodInterface methodInterface = (MethodInterface) nodeIf;

      if (!isActionExecutable(methodInterface)) {
        return;
      }

      ExecuteTestCaseAction action =
          new ExecuteTestCaseAction(ModelMasterSection.this, testCaseInterface);
      addMenuItem(action.getName(), action);

      new MenuItem(getMenu(), SWT.SEPARATOR);
    }