org.eclipse.jdt.internal.core.util.Util.getProblemArgumentsFromMarker()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(12.7k)|赞(0)|评价(0)|浏览(148)

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

Util.getProblemArgumentsFromMarker介绍

[英]Separate all the arguments of a String made by getProblemArgumentsForMarker
[中]

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Helper method for decoding problem marker attributes. Returns an array of String arguments
 * extracted from the problem marker "arguments" attribute, or <code>null</code> if the marker
 * "arguments" attribute is missing or ill-formed.
 *
 * @param problemMarker
 *         the problem marker to decode arguments from.
 * @return an array of String arguments, or <code>null</code> if unable to extract arguments
 * @since 2.1
 */
public static String[] getProblemArguments(IMarker problemMarker){
  String argumentsString = problemMarker.getAttribute(IJavaModelMarker.ARGUMENTS, null);
  return Util.getProblemArgumentsFromMarker(argumentsString);
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Helper method for decoding problem marker attributes. Returns an array of String arguments
 * extracted from the problem marker "arguments" attribute, or <code>null</code> if the marker
 * "arguments" attribute is missing or ill-formed.
 *
 * @param problemMarker
 *         the problem marker to decode arguments from.
 * @return an array of String arguments, or <code>null</code> if unable to extract arguments
 * @since 2.1
 */
public static String[] getProblemArguments(IMarker problemMarker){
  String argumentsString = problemMarker.getAttribute(IJavaModelMarker.ARGUMENTS, null);
  return Util.getProblemArgumentsFromMarker(argumentsString);
}

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * Helper method for decoding problem marker attributes. Returns an array of String arguments
 * extracted from the problem marker "arguments" attribute, or <code>null</code> if the marker
 * "arguments" attribute is missing or ill-formed.
 *
 * @param problemMarker
 *         the problem marker to decode arguments from.
 * @return an array of String arguments, or <code>null</code> if unable to extract arguments
 * @since 2.1
 */
public static String[] getProblemArguments(IMarker problemMarker){
  String argumentsString = problemMarker.getAttribute(IJavaModelMarker.ARGUMENTS, null);
  return Util.getProblemArgumentsFromMarker(argumentsString);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Helper method for decoding problem marker attributes. Returns an array of String arguments
 * extracted from the problem marker "arguments" attribute, or <code>null</code> if the marker
 * "arguments" attribute is missing or ill-formed.
 *
 * @param problemMarker
 *         the problem marker to decode arguments from.
 * @return an array of String arguments, or <code>null</code> if unable to extract arguments
 * @since 2.1
 */
public static String[] getProblemArguments(IMarker problemMarker){
  String argumentsString = problemMarker.getAttribute(IJavaModelMarker.ARGUMENTS, null);
  return Util.getProblemArgumentsFromMarker(argumentsString);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Helper method for decoding problem marker attributes. Returns an array of String arguments
 * extracted from the problem marker "arguments" attribute, or <code>null</code> if the marker
 * "arguments" attribute is missing or ill-formed.
 *
 * @param problemMarker
 *         the problem marker to decode arguments from.
 * @return an array of String arguments, or <code>null</code> if unable to extract arguments
 * @since 2.1
 */
public static String[] getProblemArguments(IMarker problemMarker){
  String argumentsString = problemMarker.getAttribute(IJavaModelMarker.ARGUMENTS, null);
  return Util.getProblemArgumentsFromMarker(argumentsString);
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Helper method for decoding problem marker attributes. Returns an array of String arguments
 * extracted from the problem marker "arguments" attribute, or <code>null</code> if the marker
 * "arguments" attribute is missing or ill-formed.
 *
 * @param problemMarker
 *         the problem marker to decode arguments from.
 * @return an array of String arguments, or <code>null</code> if unable to extract arguments
 * @since 2.1
 */
public static String[] getProblemArguments(IMarker problemMarker){
  String argumentsString = problemMarker.getAttribute(IJavaModelMarker.ARGUMENTS, null);
  return Util.getProblemArgumentsFromMarker(argumentsString);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Performs code correction for the given marker,
 * reporting results to the given correction requestor.
 *
 * Correction results are answered through a requestor.
 *
 * @param marker
 *         the marker which describe the problem to correct.
 * @param targetUnit
 *         replace the compilation unit given by the marker. Ignored if null.
 * @param positionOffset
 *         the offset of position given by the marker.
 * @param requestor
 *         the given correction requestor
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 * @exception JavaModelException currently this exception is never thrown, but the opportunity to thrown an exception
 *     when the correction failed is kept for later.
 * @since 2.0
 */
public void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor) throws JavaModelException {
  IJavaElement element = targetUnit == null ? JavaCore.create(marker.getResource()) : targetUnit;
  if(!(element instanceof ICompilationUnit))
    return;
  ICompilationUnit unit = (ICompilationUnit) element;
  int id = marker.getAttribute(IJavaModelMarker.ID, -1);
  String[] args = Util.getProblemArgumentsFromMarker(marker.getAttribute(IJavaModelMarker.ARGUMENTS, "")); //$NON-NLS-1$
  int start = marker.getAttribute(IMarker.CHAR_START, -1);
  int end = marker.getAttribute(IMarker.CHAR_END, -1);
  computeCorrections(unit, id, start + positionOffset, end + positionOffset, args, requestor);
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Performs code correction for the given marker,
 * reporting results to the given correction requestor.
 *
 * Correction results are answered through a requestor.
 *
 * @param marker
 *         the marker which describe the problem to correct.
 * @param targetUnit
 *         replace the compilation unit given by the marker. Ignored if null.
 * @param positionOffset
 *         the offset of position given by the marker.
 * @param requestor
 *         the given correction requestor
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 * @exception JavaModelException currently this exception is never thrown, but the opportunity to thrown an exception
 *     when the correction failed is kept for later.
 * @since 2.0
 */
public void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor) throws JavaModelException {
  IJavaElement element = targetUnit == null ? JavaCore.create(marker.getResource()) : targetUnit;
  if(!(element instanceof ICompilationUnit))
    return;
  ICompilationUnit unit = (ICompilationUnit) element;
  int id = marker.getAttribute(IJavaModelMarker.ID, -1);
  String[] args = Util.getProblemArgumentsFromMarker(marker.getAttribute(IJavaModelMarker.ARGUMENTS, "")); //$NON-NLS-1$
  int start = marker.getAttribute(IMarker.CHAR_START, -1);
  int end = marker.getAttribute(IMarker.CHAR_END, -1);
  computeCorrections(unit, id, start + positionOffset, end + positionOffset, args, requestor);
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Performs code correction for the given marker,
 * reporting results to the given correction requestor.
 *
 * Correction results are answered through a requestor.
 *
 * @param marker
 *         the marker which describe the problem to correct.
 * @param targetUnit
 *         replace the compilation unit given by the marker. Ignored if null.
 * @param positionOffset
 *         the offset of position given by the marker.
 * @param requestor
 *         the given correction requestor
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 * @exception JavaModelException currently this exception is never thrown, but the opportunity to thrown an exception
 *     when the correction failed is kept for later.
 * @since 2.0
 */
public void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor) throws JavaModelException {
  IJavaElement element = targetUnit == null ? JavaCore.create(marker.getResource()) : targetUnit;
  if(!(element instanceof ICompilationUnit))
    return;
  ICompilationUnit unit = (ICompilationUnit) element;
  int id = marker.getAttribute(IJavaModelMarker.ID, -1);
  String[] args = Util.getProblemArgumentsFromMarker(marker.getAttribute(IJavaModelMarker.ARGUMENTS, "")); //$NON-NLS-1$
  int start = marker.getAttribute(IMarker.CHAR_START, -1);
  int end = marker.getAttribute(IMarker.CHAR_END, -1);
  computeCorrections(unit, id, start + positionOffset, end + positionOffset, args, requestor);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Performs code correction for the given marker,
 * reporting results to the given correction requestor.
 *
 * Correction results are answered through a requestor.
 *
 * @param marker
 *         the marker which describe the problem to correct.
 * @param targetUnit
 *         replace the compilation unit given by the marker. Ignored if null.
 * @param positionOffset
 *         the offset of position given by the marker.
 * @param requestor
 *         the given correction requestor
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 * @exception JavaModelException currently this exception is never thrown, but the opportunity to thrown an exception
 *     when the correction failed is kept for later.
 * @since 2.0
 */
public void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor) throws JavaModelException {
  IJavaElement element = targetUnit == null ? JavaCore.create(marker.getResource()) : targetUnit;
  if(!(element instanceof ICompilationUnit))
    return;
  ICompilationUnit unit = (ICompilationUnit) element;
  int id = marker.getAttribute(IJavaModelMarker.ID, -1);
  String[] args = Util.getProblemArgumentsFromMarker(marker.getAttribute(IJavaModelMarker.ARGUMENTS, "")); //$NON-NLS-1$
  int start = marker.getAttribute(IMarker.CHAR_START, -1);
  int end = marker.getAttribute(IMarker.CHAR_END, -1);
  computeCorrections(unit, id, start + positionOffset, end + positionOffset, args, requestor);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Performs code correction for the given marker,
 * reporting results to the given correction requestor.
 *
 * Correction results are answered through a requestor.
 *
 * @param marker
 *         the marker which describe the problem to correct.
 * @param targetUnit
 *         replace the compilation unit given by the marker. Ignored if null.
 * @param positionOffset
 *         the offset of position given by the marker.
 * @param requestor
 *         the given correction requestor
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 * @exception JavaModelException currently this exception is never thrown, but the opportunity to thrown an exception
 *     when the correction failed is kept for later.
 * @since 2.0
 */
public void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor) throws JavaModelException {
  IJavaElement element = targetUnit == null ? JavaCore.create(marker.getResource()) : targetUnit;
  if(!(element instanceof ICompilationUnit))
    return;
  ICompilationUnit unit = (ICompilationUnit) element;
  int id = marker.getAttribute(IJavaModelMarker.ID, -1);
  String[] args = Util.getProblemArgumentsFromMarker(marker.getAttribute(IJavaModelMarker.ARGUMENTS, "")); //$NON-NLS-1$
  int start = marker.getAttribute(IMarker.CHAR_START, -1);
  int end = marker.getAttribute(IMarker.CHAR_END, -1);
  computeCorrections(unit, id, start + positionOffset, end + positionOffset, args, requestor);
}

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * Performs code correction for the given marker,
 * reporting results to the given correction requestor.
 *
 * Correction results are answered through a requestor.
 *
 * @param marker
 *         the marker which describe the problem to correct.
 * @param targetUnit
 *         replace the compilation unit given by the marker. Ignored if null.
 * @param positionOffset
 *         the offset of position given by the marker.
 * @param requestor
 *         the given correction requestor
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 * @exception JavaModelException currently this exception is never thrown, but the opportunity to thrown an exception
 *     when the correction failed is kept for later.
 * @since 2.0
 */
public void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor) throws JavaModelException {
  IJavaElement element = targetUnit == null ? JavaCore.create(marker.getResource()) : targetUnit;
  if(!(element instanceof ICompilationUnit))
    return;
  ICompilationUnit unit = (ICompilationUnit) element;
  int id = marker.getAttribute(IJavaModelMarker.ID, -1);
  String[] args = Util.getProblemArgumentsFromMarker(marker.getAttribute(IJavaModelMarker.ARGUMENTS, "")); //$NON-NLS-1$
  int start = marker.getAttribute(IMarker.CHAR_START, -1);
  int end = marker.getAttribute(IMarker.CHAR_END, -1);
  computeCorrections(unit, id, start + positionOffset, end + positionOffset, args, requestor);
}

相关文章

Util类方法