Examples of CloudFoundryServer


Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

  public Object execute(ExecutionEvent event) throws ExecutionException {
    initializeSelection(event);
    activePart = HandlerUtil.getActivePart(event);
   
    String error = null;
    CloudFoundryServer cloudServer = selectedServer != null ? (CloudFoundryServer) selectedServer.loadAdapter(
        CloudFoundryServer.class, null) : null;
    if (selectedServer == null) {
      error = "No Cloud Foundry server instance available to run the selected action."; //$NON-NLS-1$
    }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

  private IServer selectedServer;

  public void selectionChanged(IAction action, ISelection selection) {
    selectedServer = getSelectedServer(selection);
    CloudFoundryServer cloudServer = selectedServer != null ? (CloudFoundryServer) selectedServer.loadAdapter(
        CloudFoundryServer.class, null) : null;
    CloudFoundryApplicationModule appModule = cloudServer != null && selectedModule != null ? cloudServer
        .getExistingCloudModule(selectedModule) : null;
    serverSelectionChanged(cloudServer, appModule, action);
  }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

  public void run(IAction action) {

 
    String error = null;
    CloudFoundryServer cloudServer = selectedServer != null ? (CloudFoundryServer) selectedServer.loadAdapter(
        CloudFoundryServer.class, null) : null;
    CloudFoundryApplicationModule appModule = cloudServer != null && selectedModule != null ? cloudServer
        .getExistingCloudModule(selectedModule) : null;
    if (selectedServer == null) {
      error = "No Cloud Foundry server instance available to run the selected action."; //$NON-NLS-1$
    }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

public class ShowConsoleViewerCommand extends BaseCommandHandler {

  public Object execute(ExecutionEvent event) throws ExecutionException {
    initializeSelection(event);
    String error = null;
    CloudFoundryServer cloudServer = selectedServer != null ? (CloudFoundryServer) selectedServer.loadAdapter(
        CloudFoundryServer.class, null) : null;
    CloudFoundryApplicationModule appModule = cloudServer != null && selectedModule != null ? cloudServer
        .getExistingCloudModule(selectedModule) : null;
    if (selectedServer == null) {
      error = "No Cloud Foundry server instance available to run the selected action."; //$NON-NLS-1$
    }
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

  public Object execute(ExecutionEvent event) throws ExecutionException {
    // Always init first
    initializeSelection(event);
   
    final CloudFoundryServer cloudServer = (CloudFoundryServer) selectedServer.loadAdapter(CloudFoundryServer.class, null);
    Job connectJob = new Job(Messages.ConnectCommand_JOB_CONN_SERVER) {
      @Override
      protected IStatus run(IProgressMonitor monitor) {
        try {
          cloudServer.getBehaviour().connect(monitor);
        }
        catch (OperationCanceledException e) {
          return Status.CANCEL_STATUS;
        }
        catch (CoreException e) {
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

public class DisconnectCommand extends BaseCommandHandler {

  public Object execute(ExecutionEvent event) throws ExecutionException {
    initializeSelection(event);
    final CloudFoundryServer cloudServer = (CloudFoundryServer) selectedServer.loadAdapter(CloudFoundryServer.class, null);
    Job disconnectJob = new Job(Messages.DisconnectCommand_JOB_DISCONN_SERVER) {
      @Override
      protected IStatus run(IProgressMonitor monitor) {
        try {
          cloudServer.getBehaviour().disconnect(monitor);
        }
        catch (OperationCanceledException e) {
          return Status.CANCEL_STATUS;
        }
        catch (CoreException e) {
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

public class UpdatePasswordCommand extends BaseCommandHandler {

  public Object execute(ExecutionEvent event) throws ExecutionException {
    initializeSelection(event);
    IServerWorkingCopy wc = selectedServer.createWorkingCopy();
    final CloudFoundryServer cfServer = (CloudFoundryServer) wc.loadAdapter(CloudFoundryServer.class, null);
    final UpdatePasswordDialog dialog = new UpdatePasswordDialog(Display.getDefault().getActiveShell(), cfServer.getUsername());
   
    if (dialog.open() == IDialogConstants.OK_ID) {
      String errorMsg = CloudUiUtil.updatePassword(dialog.getPassword(), cfServer, wc);
      if (errorMsg != null) {
        MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.UpdatePasswordCommand_TEXT_PW_UPDATE, NLS.bind(Messages.UpdatePasswordCommand_ERROR_PW_UPDATE_BODY, errorMsg));
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

    // Reusing this property tester to test visibility and enablement of the 'migrated' popup menu commands/handlers.
    // The receiver can be a structured selection (TreeSelection) or a List.
   
    IServerModule serverModule = null;
    IServer server = null;
    CloudFoundryServer cloudFoundryServer = null;
    // Handle the TreeSelection
    if (receiver instanceof StructuredSelection) {
      Object obj = ((StructuredSelection)receiver).getFirstElement();
      if (obj instanceof IServer) {
         server = (IServer) obj;
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

    String prefix = "startModuleInvalidPassword";

    createWebApplicationProject();

    try {
      CloudFoundryServer cloudServer = (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class, null);

      String userName = cloudServer.getUsername();
      CloudCredentials credentials = new CloudCredentials(userName, "invalid-password");
      connectClient(credentials);

      assertDeployApplicationStartMode(prefix);
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.CloudFoundryServer

    public IServer createServer() throws CoreException {
      Assert.isTrue(server == null, "createServer() already invoked");

      server = handler.createServer(new NullProgressMonitor(), ServerHandler.ALWAYS_OVERWRITE);
      IServerWorkingCopy serverWC = server.createWorkingCopy();
      CloudFoundryServer cloudFoundryServer = (CloudFoundryServer) serverWC.loadAdapter(CloudFoundryServer.class,
          null);
      CredentialProperties credentials = getCredentials();
      cloudFoundryServer.setPassword(credentials.password);
      cloudFoundryServer.setUsername(credentials.userEmail);

      cloudFoundryServer.setUrl(getUrl());

      setDefaultCloudSpace(cloudFoundryServer, credentials.organization, credentials.space);

      serverWC.save(true, null);
      return server;
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.