Examples of SubMonitor


Examples of org.eclipse.core.runtime.SubMonitor

  }

  @Override
  protected IStatus run(IProgressMonitor monitor) {
    IStatus ret = Status.OK_STATUS;
    SubMonitor subMonitor = SubMonitor.convert(monitor, 100);
    Injector injector = TargetPlatformActivator
        .getInstance()
        .getInjector(
            TargetPlatformActivator.FR_OBEO_RELENG_TARGETPLATFORM_TARGETPLATFORM);
    Converter converter = new Converter();
    injector.injectMembers(converter);
    Diagnostic diagnostic = null;
    final String path = selectedElement.getLocation().toFile().getAbsolutePath();
    URI targetplatformFileURI = URI.createFileURI(path);

    try {
      diagnostic = converter.generateTargetDefinitionFile(targetplatformFileURI, subMonitor.newChild(95));
    } catch (OperationCanceledException cancel) {
      ret = new Status(
          IStatus.CANCEL,
          TargetPlatformActivator.FR_OBEO_RELENG_TARGETPLATFORM_TARGETPLATFORM,
          cancel.getMessage(), cancel);
    } catch (Exception e) {
      ret = new Status(
          IStatus.ERROR,
          TargetPlatformActivator.FR_OBEO_RELENG_TARGETPLATFORM_TARGETPLATFORM,
          e.getMessage(), e);
    }
    IContainer container = selectedElement.getParent();
    if (container != null) {
      try {
        container.refreshLocal(IResource.DEPTH_ONE, subMonitor.newChild(5));
      } catch (CoreException e) {
        return new Status(IStatus.ERROR, TargetPlatformActivator
            .getInstance().getBundle().getSymbolicName(),
            e.getMessage(), e);
      }
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.