コード例 #1
0
ファイル: RunTestView.java プロジェクト: JinxingLi/idecore
  /**
   * Get a ForceProject from an IProject.
   *
   * @param project
   * @return ForceProject
   */
  public ForceProject materializeForceProject(IProject project) {
    if (Utils.isEmpty(project) || !project.exists()) return null;

    ForceProject forceProject =
        ContainerDelegate.getInstance()
            .getServiceLocator()
            .getProjectService()
            .getForceProject(project);
    return forceProject;
  }
コード例 #2
0
ファイル: RunTestView.java プロジェクト: JinxingLi/idecore
  /**
   * Initialize Tooling connection.
   *
   * @param forceProject
   * @throws ForceConnectionException
   * @throws ForceRemoteException
   */
  private void initializeConnection(ForceProject forceProject)
      throws ForceConnectionException, ForceRemoteException {
    if (toolingRESTConnection != null && toolingStubExt != null) return;

    toolingRESTConnection = new HTTPConnection(forceProject, TOOLING_ENDPOINT);
    toolingRESTConnection.initialize();
    toolingStubExt =
        ContainerDelegate.getInstance()
            .getFactoryLocator()
            .getToolingFactory()
            .getToolingStubExt(forceProject);
  }
コード例 #3
0
  protected void prepareResultsViewComposite(
      DeploymentResultsComposite resultsComposite,
      DeploymentController deploymentWizardController) {

    DeploymentResult deploymentResult = deploymentWizardController.getDeploymentResult();
    if (deploymentResult == null) {
      logger.warn(
          DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.message"));
      Utils.openQuestion(
          DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.title"),
          DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.message"));
      return;
    }

    // set page description
    resultsComposite.setLblResult(deploymentResult.isSuccess());
    DeployResultExt result = deploymentResult.getDeployResultHandler();
    if (!deploymentResult.isSuccess()) {
      if (result != null && result.getMessageCount() == 0) {
        resultsComposite.setLblReason(result.getMessageHandler().getDisplayMessages()[0]);
      } else if (result != null && result.getMessageCount() > 1) {
        resultsComposite.setLblReason(
            DeploymentMessages.getString("DeploymentWizard.Results.MultipleProblems.message"));
      }
    } else {
      resultsComposite.setLblReason(
          DeploymentMessages.getString("DeploymentWizard.Results.Success.message"));
    }

    // create results tree
    DeployResultsViewAssembler assembler =
        new DeployResultsViewAssembler(
            result == null ? new EmptyDeployResultExt() : result,
            resultsComposite.getTreeResults(),
            deploymentWizardController.getProject(),
            ContainerDelegate.getInstance().getServiceLocator().getProjectService());
    assembler.assembleDeployResultsTree();

    LogViewShell logView =
        new LogViewShell(
            getShell(),
            deploymentResult.getDeployLog(),
            deploymentResult.getRemoteDeployLog(),
            deploymentWizardController.getDeploymentWizardModel().getProjectName());
    resultsComposite.setLogShellView(logView);
  }
コード例 #4
0
 public SalesforceEndpoints getSalesforceEndpoints() {
   return ContainerDelegate.getInstance()
       .getFactoryLocator()
       .getConnectionFactory()
       .getSalesforceEndpoints();
 }
コード例 #5
0
 protected IContainerDelegate getContainerInstance() throws ForceProjectException {
   return ContainerDelegate.getInstance();
 }