Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Status


      getLog().log(new Status(Status.ERROR, PLUGIN_ID, message));
  }

  public void logInfo(String message, Throwable e) {
    if (e != null)
      getLog().log(new Status(Status.INFO, PLUGIN_ID, message, e));
    else
      getLog().log(new Status(Status.INFO, PLUGIN_ID, message));
  }
View Full Code Here


      getLog().log(new Status(Status.INFO, PLUGIN_ID, message));
  }

  public void logWarning(String message, Throwable e) {
    if (e != null)
      getLog().log(new Status(Status.WARNING, PLUGIN_ID, message, e));
    else
      getLog().log(new Status(Status.WARNING, PLUGIN_ID, message));
  }
View Full Code Here

  protected void computeResult() {   
     WGADesignStructureHelper.changeDirLink(_selectedFolder, _target);
  }

  protected void updateOKStatus() {
    updateStatus(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Please select a Design or Plugin"));
    if (_treeViewer.getTree().getSelection().length>0 && _treeViewer.getTree().getSelection()[0] != null) {
      IContainer treeSelection = (IContainer) _treeViewer.getTree().getSelection()[0].getData();
      if (WGADesignStructureHelper.isDesignFolder(treeSelection)) {
        _target = treeSelection;
        updateStatus(new Status(Status.OK, WGADesignerPlugin.PLUGIN_ID, ""));
      }
    }
  }
View Full Code Here

            monitor.beginTask("Starting WGA runtime '" + temp.getName() + "'.", 2);
            TomcatUtils.getInstance().stop(new SubProgressMonitor(monitor, 1));
            TomcatUtils.getInstance().start(temp, new SubProgressMonitor(monitor, 1));
            return Status.OK_STATUS;
          } catch (Exception e) {
            return new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Unable to start WGA runtime '" + temp.getName() + "'.", e);
          } finally {
            monitor.done();
          }
        }
View Full Code Here

  @Override
  public List<IStatus> validate() {
    List<IStatus> messages = new ArrayList<IStatus>();
   
    if (_txtRemoteLocation != null && _txtRemoteLocation.getText().trim().length() <= 0) {
      messages.add(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Please specify the WGA server url."));
    } else {
      try {
        new URL(_txtRemoteLocation.getText());
      } catch (MalformedURLException e) {
        messages.add(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Invalid URL. '" + e.getMessage() + "'."));
      }
    }
    if (_txtUser.getText().trim().length() <= 0) {
      messages.add(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "No user specified."));
    }
    if (_txtPassword.getText().trim().length() <= 0) {
      messages.add(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "No password specified."));
    }
   
    return messages;
  }
View Full Code Here

      }

      _linkNameText.setText(treeSelection.getProject().getName());

    }else{
      updateStatus(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Please select a Design or Plugin"));
    }
  }
View Full Code Here

    }
  }

  protected void textModified() {
    TreeItem[] selections = _treeViewer.getTree().getSelection();
    updateStatus(new Status(Status.OK, WGADesignerPlugin.PLUGIN_ID, ""));
    if (selections.length>0 && selections != null ) {
      Object selection = selections[0].getData();
      if (selection instanceof IContainer) {
        IContainer selectedContainer = (IContainer) selection;
        if (WGADesignStructureHelper.isDesignFolder(selectedContainer)) {

          String target = "designs";

          if (_combo.getText().equals("design")) {
            target = "designs";
          }

          if (_combo.getText().equals("plugin")) {
            target = "plugins";
          }

          IFolder folder = _selectedProject.getFolder(target);

          if (folder.getFolder(_linkNameText.getText()).exists()) {
            updateStatus(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, _combo.getText() + " already exists."));
          }
        } else {
          updateStatus(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Please select a Design or Plugin"));
        }

      }

    }
View Full Code Here

  @Override
  public List<IStatus> validate() {
    List<IStatus> messages = new ArrayList<IStatus>();
   
    if (_lstRuntimes.getSelectionCount() <= 0) {
      messages.add(new Status(Status.WARNING, WGADesignerPlugin.PLUGIN_ID, _invalidMessage));
    }
   
    return messages;
  }
View Full Code Here

        IProject project = (IProject) projectDelta.getResource();
        if (isWGAPublisherProject(project)) {
          try {
            WorkbenchUtils.addBuilder(project, WGADesignerPlugin.BUILDER_WGA_DEPLOYMENTS);
          } catch (Exception e) {
            WGADesignerPlugin.getDefault().getLog().log(new Status(Status.ERROR, WGADesignerPlugin.PLUGIN_ID, "Unable to add wga deployment builder to project '" + project.getName() + "'.", e));
          }       
        }
      }
    } else if (event.getType() == IResourceChangeEvent.PRE_DELETE) {
      IProject project = (IProject) event.getResource();
View Full Code Here

   * @param e The occuring Exception to log.
   */
  public void logError(String msg, Throwable e) {
    if (msg == null)
      msg = ""; //$NON-NLS-1$
    getLog().log(new Status(IStatus.ERROR, getBundle().getSymbolicName(), IStatus.ERROR, msg, e));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.Status

Copyright © 2018 www.massapicom. 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.