Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.MultiStatus


     */
    @Override
    public IStatus validate()
    {
        final String id = ResourceIdentifierValidationNamespace;
        final MultiStatus status = new MultiStatus(id, 0,
                "Resource identifier problems", null); //$NON-NLS-1$

        if (getResourceName() == null)
        {
            status.add(new Status(IStatus.ERROR, id,
                    RESOURCE_NAME_MUST_NOT_BE_EMPTY,
                    Messages.ResourceIdentifier_0, null));
        }

        return status;
View Full Code Here


            synchronized (TLDTagRegistry.this)
            {
                _rescheduleTime = -1;

                LibraryOperation operation = null;
                final MultiStatus multiStatus = new MultiStatus(
                        JSFCorePlugin.PLUGIN_ID, 0, "Result of change job", //$NON-NLS-1$
                        new Throwable());
                while ((operation = _changeOperations.poll()) != null)
                {
                    _rescheduleTime = 10000; // ms

                    operation.run();
                    multiStatus.add(operation.getResult());
                }

                if (_rescheduleTime >= 0 && !monitor.isCanceled())
                {
                    // if any operations were found on this run, reschedule
View Full Code Here

                    exception = status.getException();
                    break;
                }
            }

            MultiStatus multiStatus = new MultiStatus( ConnectionCorePlugin.PLUGIN_ID, IStatus.ERROR, message,
                exception );

            for ( Iterator<Status> it = errorStatusList.iterator(); it.hasNext(); )
            {
                Status status = it.next();
                multiStatus.add( new Status( status.getSeverity(), status.getPlugin(), status.getCode(), status
                    .getMessage(), null ) );
            }

            return multiStatus;
View Full Code Here

                    exception = status.getException();
                    break;
                }
            }

            MultiStatus multiStatus = new MultiStatus( BrowserCorePlugin.PLUGIN_ID, IStatus.ERROR, message, exception );

            for ( Iterator it = this.errorStatusList.iterator(); it.hasNext(); )
            {
                Status status = ( Status ) it.next();
                multiStatus.add( new Status( status.getSeverity(), status.getPlugin(), status.getCode(), status
                    .getMessage(), null ) );
            }

            return multiStatus;
View Full Code Here

                    exception = status.getException();
                    break;
                }
            }

            MultiStatus multiStatus = new MultiStatus( ConnectionCorePlugin.PLUGIN_ID, IStatus.ERROR, message,
                exception );

            for ( Iterator<Status> it = errorStatusList.iterator(); it.hasNext(); )
            {
                Status status = it.next();
                multiStatus.add( new Status( status.getSeverity(), status.getPlugin(), status.getCode(), status
                    .getMessage(), null ) );
            }

            return multiStatus;
View Full Code Here

                    exception = status.getException();
                    break;
                }
            }

            MultiStatus multiStatus = new MultiStatus( ConnectionCorePlugin.PLUGIN_ID, IStatus.ERROR, message,
                exception );

            for ( Iterator<Status> it = errorStatusList.iterator(); it.hasNext(); )
            {
                Status status = it.next();
                multiStatus.add( new Status( status.getSeverity(), status.getPlugin(), status.getCode(), status
                    .getMessage(), null ) );
            }

            return multiStatus;
View Full Code Here

        "Folder Selection",
        "Choose the folder to add to list",
        filters
    );

    MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, IJavaDebugUIConstants.INTERNAL_ERROR,
        "One or more exceptions occurred while adding projects.", null)//$NON-NLS-1$

    if (dialog.open() == Window.OK) {
      Object[] selections = dialog.getResult();

      List<IFolder> additions = new ArrayList<IFolder>(selections.length);
      for (int i = 0; i < selections.length; i++) {
        IFolder jp = (IFolder)selections[i];
        additions.add(jp);
      }

      List<IRuntimeClasspathEntry> runtimeEntries = new ArrayList<IRuntimeClasspathEntry>(additions.size());
      Iterator<IFolder> iter = additions.iterator();
      while (iter.hasNext()) {
        IFolder jp = (IFolder)iter.next();
        runtimeEntries.add(JavaRuntime.newArchiveRuntimeClasspathEntry(jp));
      }
      IRuntimeClasspathEntry[] entries = (IRuntimeClasspathEntry[])runtimeEntries.toArray(new IRuntimeClasspathEntry[0]);
      getViewer().addEntries(entries);

    }

    if (!status.isOK()) {
      Plugin.statusDialog(status);
    }
  }
View Full Code Here

   */
  public void run() {
    List<IJavaProject> projects = getPossibleAdditions();
    ProjectSelectionDialog dialog= new ProjectSelectionDialog(getShell(),projects);
    dialog.setTitle("Project Selection");
    MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, IJavaDebugUIConstants.INTERNAL_ERROR,
        "One or more exceptions occurred while adding projects.", null)//$NON-NLS-1$

    if (dialog.open() == Window.OK) {
      Object[] selections = dialog.getResult();

      List<IJavaProject> additions = new ArrayList<IJavaProject>(selections.length);
      for (int i = 0; i < selections.length; i++) {
        IJavaProject jp = (IJavaProject)selections[i];
          additions.add(jp);
      }

      List<IRuntimeClasspathEntry> runtimeEntries = new ArrayList<IRuntimeClasspathEntry>(additions.size());
      Iterator<IJavaProject> iter = additions.iterator();
      while (iter.hasNext()) {
        IJavaProject jp = (IJavaProject)iter.next();
        runtimeEntries.add(JavaRuntime.newProjectRuntimeClasspathEntry(jp));
      }
      IRuntimeClasspathEntry[] entries = (IRuntimeClasspathEntry[])runtimeEntries.toArray(new IRuntimeClasspathEntry[runtimeEntries.size()]);
      getViewer().addEntries(entries);

    }

    if (!status.isOK()) {
      Plugin.statusDialog(status);
    }
  }
View Full Code Here

        "Classes folder Selection",
        "Choose the class-folder to add to list ",
        filters
    );

    MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, IJavaDebugUIConstants.INTERNAL_ERROR,
        "One or more exceptions occurred while adding projects.", null)//$NON-NLS-1$

    if (dialog.open() == Window.OK) {
      Object[] selections = dialog.getResult();

      List<IFolder> additions = new ArrayList<IFolder>(selections.length);
      for (int i = 0; i < selections.length; i++) {
        IFolder jp = (IFolder)selections[i];
        additions.add(jp);
      }

      List<IRuntimeClasspathEntry> runtimeEntries = new ArrayList<IRuntimeClasspathEntry>(additions.size());
      Iterator<IFolder> iter = additions.iterator();
      while (iter.hasNext()) {
        IFolder jp = (IFolder)iter.next();
        runtimeEntries.add(JavaRuntime.newArchiveRuntimeClasspathEntry(jp));
      }
      IRuntimeClasspathEntry[] entries = (IRuntimeClasspathEntry[])runtimeEntries.toArray(new IRuntimeClasspathEntry[0]);
      getViewer().addEntries(entries);

    }

    if (!status.isOK()) {
      Plugin.statusDialog(status);
    }
  }
View Full Code Here

         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
         */
        public void widgetSelected(SelectionEvent event) {
          IContentType contentType = getSelectedContentType();
          Spec[] specs = getSelectedSpecs();
          MultiStatus result = new MultiStatus(PlatformUI.PLUGIN_ID,
              0, new IStatus[0],
              WorkbenchMessages.ContentTypes_errorDialogMessage,
              null);
          for (int i = 0; i < specs.length; i++) {
            Spec spec = specs[i];
            try {
              if (spec.name != null) {
                contentType.removeFileSpec(spec.name,
                    IContentType.FILE_NAME_SPEC);
              } else if (spec.ext != null) {
                contentType.removeFileSpec(spec.ext,
                    IContentType.FILE_EXTENSION_SPEC);
              }
            } catch (CoreException e) {
              result.add(e.getStatus());
            }
          }
          if (!result.isOK()) {
            StatusUtil.handleStatus(result, StatusManager.SHOW,
                composite.getShell());
          }
          fileAssociationViewer.setInput(contentType);
        }
View Full Code Here

TOP

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

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.