本文整理匯總了Java中org.eclipse.jdt.core.compiler.IProblem.getArguments方法的典型用法代碼示例。如果您正苦於以下問題:Java IProblem.getArguments方法的具體用法?Java IProblem.getArguments怎麽用?Java IProblem.getArguments使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jdt.core.compiler.IProblem
的用法示例。
在下文中一共展示了IProblem.getArguments方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ProcessFileParseMessagesRequest
import org.eclipse.jdt.core.compiler.IProblem; //導入方法依賴的package包/類
public List<Problem> ProcessFileParseMessagesRequest(Integer fileId)
{
List<FileParseMessagesResponse.Problem> ret = new ArrayList<FileParseMessagesResponse.Problem>();
if (ActiveUnits.containsKey(fileId))
{
CompilationUnit cu = ActiveUnits.get(fileId);
IProblem[] problems = cu.getProblems();
for(IProblem problem: problems)
{
System.out.println(problem.toString());
FileParseMessagesResponse.Problem.Builder retProblem = FileParseMessagesResponse.Problem.newBuilder()
.setId(problem.getID())
.setMessage(problem.getMessage())
.setFileName(new String(problem.getOriginatingFileName()))
.setScopeStart(problem.getSourceStart())
.setScopeEnd(problem.getSourceEnd() + 1)
.setLineNumber(problem.getSourceLineNumber())
.setProblemType(GetProblemType(problem));
for(String arg: problem.getArguments())
retProblem.addArguments(arg);
ret.add(retProblem.build());
}
}
return ret;
}
示例2: ProblemLocation
import org.eclipse.jdt.core.compiler.IProblem; //導入方法依賴的package包/類
public ProblemLocation(IProblem problem) {
fId = problem.getID();
fArguments = problem.getArguments();
fOffset = problem.getSourceStart();
fLength = problem.getSourceEnd() - fOffset + 1;
fIsError = problem.isError();
fMarkerType =
problem instanceof CategorizedProblem
? ((CategorizedProblem) problem).getMarkerType()
: IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER;
}