org.eclipse.equinox.internal.p2.core.helpers.Tracing类的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(191)

本文整理了Java中org.eclipse.equinox.internal.p2.core.helpers.Tracing类的一些代码示例,展示了Tracing类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tracing类的具体详情如下:
包路径:org.eclipse.equinox.internal.p2.core.helpers.Tracing
类名称:Tracing

Tracing介绍

[英]Manages debug tracing options and provides convenience methods for printing debug statements.
[中]管理调试跟踪选项,并为打印调试语句提供方便的方法。

代码示例

代码示例来源:origin: org.eclipse.equinox.p2/updatesite

private static void debug(String s) {
  Tracing.debug("DefaultSiteParser: " + s); //$NON-NLS-1$
}

代码示例来源:origin: org.eclipse.equinox.p2/repository

public void unexpectedAttribute(String element, String attribute, String value) {
  if (Tracing.DEBUG_PARSE_PROBLEMS)
    Tracing.debug("Unexpected attribute for element " + element + ": " + attribute + '=' + value); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.repository

public void unexpectedAttribute(String element, String attribute, String value) {
  if (Tracing.DEBUG_PARSE_PROBLEMS)
    Tracing.debug("Unexpected attribute for element " + element + ": " + attribute + '=' + value); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: org.eclipse.equinox.p2/updatechecker

void trace(String message) {
  if (Tracing.DEBUG_UPDATE_CHECK)
    Tracing.debug(message);
}

代码示例来源:origin: org.eclipse.equinox.p2.reconciler/dropins

public static void trace(Object message) {
  if (Tracing.DEBUG_RECONCILER)
    Tracing.debug(TRACING_PREFIX + message);
}

代码示例来源:origin: org.eclipse.equinox.p2/updatesite

private static void debug(String s) {
  Tracing.debug("CategoryParser: " + s); //$NON-NLS-1$
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.p2.director

private void printSolution(Collection<IInstallableUnit> state) {
  ArrayList<IInstallableUnit> l = new ArrayList<>(state);
  Collections.sort(l);
  Tracing.debug("Solution:"); //$NON-NLS-1$
  Tracing.debug("Numbers of IUs selected: " + l.size()); //$NON-NLS-1$
  for (IInstallableUnit s : l) {
    Tracing.debug(s.toString());
  }
}

代码示例来源:origin: org.eclipse.equinox.p2/repository

public void unexpectedCharacterData(AbstractHandler handler, String cdata) {
  if (Tracing.DEBUG_PARSE_PROBLEMS)
    Tracing.debug("Unexpected character data in element " + handler.getName() + ": " + cdata.trim()); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.repository

public void unexpectedCharacterData(AbstractHandler handler, String cdata) {
  if (Tracing.DEBUG_PARSE_PROBLEMS)
    Tracing.debug("Unexpected character data in element " + handler.getName() + ": " + cdata.trim()); //$NON-NLS-1$ //$NON-NLS-2$
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.p2.director

private void createMustHave(IInstallableUnit iu, IInstallableUnit[] alreadyExistingRoots) throws ContradictionException {
  processIU(iu, true);
  if (DEBUG) {
    Tracing.debug(iu + "=1"); //$NON-NLS-1$
  }
  // dependencyHelper.setTrue(variable, new Explanation.IUToInstall(iu));
  assumptions.add(iu);
}

代码示例来源:origin: org.eclipse.osgi/org.eclipse.equinox.p2.garbagecollector

public void run(IProgressMonitor monitor) {
    for (Iterator<IArtifactKey> iterator = inactive.iterator(); iterator.hasNext();) {
      IArtifactKey key = iterator.next();
      aRepository.removeDescriptor(key);
      if (debugMode) {
        Tracing.debug("Key removed:" + key); //$NON-NLS-1$
      }
    }
  }
}, new NullProgressMonitor());

代码示例来源:origin: org.eclipse.equinox.p2/garbagecollector

public void run(IProgressMonitor monitor) {
    for (Iterator<IArtifactKey> iterator = inactive.iterator(); iterator.hasNext();) {
      IArtifactKey key = iterator.next();
      aRepository.removeDescriptor(key);
      if (debugMode) {
        Tracing.debug("Key removed:" + key); //$NON-NLS-1$
      }
    }
  }
}, new NullProgressMonitor());

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.garbagecollector

public void run(IProgressMonitor monitor) {
    for (Iterator<IArtifactKey> iterator = inactive.iterator(); iterator.hasNext();) {
      IArtifactKey key = iterator.next();
      aRepository.removeDescriptor(key);
      if (debugMode) {
        Tracing.debug("Key removed:" + key); //$NON-NLS-1$
      }
    }
  }
}, new NullProgressMonitor());

代码示例来源:origin: org.eclipse.equinox.p2.reconciler/dropins

private void debugRepository(IMetadataRepository repository) {
  if (!Tracing.DEBUG_RECONCILER)
    return;
  Tracing.debug(PREFIX + "Repository created " + repository.getLocation()); //$NON-NLS-1$
  // Print out a list of all the IUs in the repository
  IQueryResult<IInstallableUnit> result = repository.query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor());
  for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();)
    Tracing.debug(PREFIX + "\t" + iter.next()); //$NON-NLS-1$
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.p2.director

private void createObjectiveFunction(List<WeightedObject<? extends Object>> weightedObjects) {
  if (weightedObjects == null)
    return;
  if (DEBUG) {
    StringBuffer b = new StringBuffer();
    for (WeightedObject<? extends Object> object : weightedObjects) {
      if (b.length() > 0)
        b.append(", "); //$NON-NLS-1$
      b.append(object.getWeight());
      b.append(' ');
      b.append(object.thing);
    }
    Tracing.debug("objective function: " + b); //$NON-NLS-1$
  }
  @SuppressWarnings("unchecked")
  WeightedObject<Object>[] array = (WeightedObject<Object>[]) weightedObjects.toArray(new WeightedObject<?>[weightedObjects.size()]);
  dependencyHelper.setObjectiveFunction(array);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.p2.director

private void createAtMostOne(IInstallableUnit[] ius) throws ContradictionException {
  if (DEBUG) {
    StringBuffer b = new StringBuffer();
    for (IInstallableUnit iu : ius) {
      b.append(iu.toString());
    }
    Tracing.debug("At most 1 of " + b); //$NON-NLS-1$
  }
  dependencyHelper.atMost(1, (Object[]) ius).named(new Explanation.Singleton(ius));
}

代码示例来源:origin: org.eclipse.equinox.p2.reconciler/dropins

public boolean changed(File file) {
  if (super.changed(file)) {
    if (Tracing.DEBUG_RECONCILER)
      Tracing.debug(PREFIX + "Interesting feature or bundle changed: " + file); //$NON-NLS-1$			
    return true;
  }
  addRepository(file);
  return true;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.artifact.repository

/**
 * Returns an equivalent location for the given artifact location in the base 
 * repository.  Always falls back to the given input location in case of failure
 * to compute mirrors. Never returns null.
 */
public synchronized URI getMirrorLocation(URI inputLocation, IProgressMonitor monitor) {
  Assert.isNotNull(inputLocation);
  if (baseURI == null)
    return inputLocation;
  URI relativeLocation = baseURI.relativize(inputLocation);
  //if we failed to relativize the location, we can't select a mirror
  if (relativeLocation == null || relativeLocation.isAbsolute())
    return inputLocation;
  MirrorInfo selectedMirror = selectMirror(monitor);
  if (selectedMirror == null)
    return inputLocation;
  if (Tracing.DEBUG_MIRRORS)
    Tracing.debug("Selected mirror for artifact " + inputLocation + ": " + selectedMirror); //$NON-NLS-1$ //$NON-NLS-2$
  try {
    return new URI(selectedMirror.locationString + relativeLocation.getPath());
  } catch (URISyntaxException e) {
    log("Unable to make location " + inputLocation + " relative to mirror " + selectedMirror.locationString, e); //$NON-NLS-1$ //$NON-NLS-2$
  }
  return inputLocation;
}

代码示例来源:origin: org.eclipse.equinox.p2.reconciler/dropins

public boolean added(File file) {
  if (super.added(file)) {
    if (Tracing.DEBUG_RECONCILER)
      Tracing.debug(PREFIX + "Interesting feature or bundle added: " + file); //$NON-NLS-1$
    return true;
  }
  addRepository(file);
  return true;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.p2.director

private void createNegation(IInstallableUnit iu, IRequirement req) throws ContradictionException {
  if (DEBUG) {
    Tracing.debug(iu + "=0"); //$NON-NLS-1$
  }
  dependencyHelper.setFalse(iu, new Explanation.MissingIU(iu, req, iu == this.entryPoint));
}

相关文章

Tracing类方法