List of usage examples for org.eclipse.jdt.core JavaCore getOptionForConfigurableSeverity
public static String getOptionForConfigurableSeverity(int problemID)
problemID
if any, null
otherwise. From source file:astview.ProblemNode.java
License:Open Source License
@Override public Object[] getChildren() { String[] arguments = fProblem.getArguments(); ArrayList<GeneralAttribute> children = new ArrayList<>(); children.add(new GeneralAttribute(this, "CONSTANT NAME", getConstantName())); children.add(new GeneralAttribute(this, "ID", getErrorLabel())); children.add(new GeneralAttribute(this, "OPTION FOR CONFIGURABLE SEVERITY", JavaCore.getOptionForConfigurableSeverity(fProblem.getID()))); if (fProblem instanceof CategorizedProblem) { children.add(new GeneralAttribute(this, "CATEGORY ID", getCategoryCode())); children.add(//from ww w. j a va 2 s. c o m new GeneralAttribute(this, "MARKER TYPE", ((CategorizedProblem) fProblem).getMarkerType())); } for (int i = 0; i < arguments.length; i++) { children.add(new GeneralAttribute(this, "ARGUMENT " + i, arguments[i])); } return children.toArray(); }
From source file:cideplus.ui.astview.ProblemNode.java
License:Open Source License
public Object[] getChildren() { String[] arguments = fProblem.getArguments(); ArrayList children = new ArrayList(); children.add(new GeneralAttribute(this, "CONSTANT NAME", getConstantName())); children.add(new GeneralAttribute(this, "ID", getErrorLabel())); children.add(new GeneralAttribute(this, "OPTION FOR CONFIGURABLE SEVERITY", JavaCore.getOptionForConfigurableSeverity(fProblem.getID()))); if (fProblem instanceof CategorizedProblem) { children.add(new GeneralAttribute(this, "CATEGORY ID", getCategoryCode())); children.add(/*from w ww. j av a2s . c om*/ new GeneralAttribute(this, "MARKER TYPE", ((CategorizedProblem) fProblem).getMarkerType())); } for (int i = 0; i < arguments.length; i++) { children.add(new GeneralAttribute(this, "ARGUMENT " + i, arguments[i])); } return children.toArray(); }
From source file:fromastview.ProblemNode.java
License:Open Source License
public Object[] getChildren() { String[] arguments = fProblem.getArguments(); ArrayList<GeneralAttribute> children = new ArrayList<GeneralAttribute>(); children.add(new GeneralAttribute(this, "CONSTANT NAME", getConstantName())); children.add(new GeneralAttribute(this, "ID", getErrorLabel())); children.add(new GeneralAttribute(this, "OPTION FOR CONFIGURABLE SEVERITY", JavaCore.getOptionForConfigurableSeverity(fProblem.getID()))); if (fProblem instanceof CategorizedProblem) { children.add(new GeneralAttribute(this, "CATEGORY ID", getCategoryCode())); children.add(/*from w w w . jav a 2s . c om*/ new GeneralAttribute(this, "MARKER TYPE", ((CategorizedProblem) fProblem).getMarkerType())); } for (int i = 0; i < arguments.length; i++) { children.add(new GeneralAttribute(this, "ARGUMENT " + i, arguments[i])); } return children.toArray(); }
From source file:org.eclipse.objectteams.otdt.internal.ui.text.correction.QuickAssistProcessor.java
License:Open Source License
private Errors matchErrorsAtLocation(IProblemLocation[] locations, int[] expectedProblemIds) { boolean hasMatch = false; if (locations != null) { locations: for (int i = 0; i < locations.length; i++) { IProblemLocation location = locations[i]; if (location.isError()) { int problemId = location.getProblemId(); if (expectedProblemIds != null) for (int j = 0; j < expectedProblemIds.length; j++) if (expectedProblemIds[j] == problemId) { hasMatch = true; continue locations; }// w w w .j a v a2 s . c om if (IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER.equals(location.getMarkerType()) && JavaCore.getOptionForConfigurableSeverity(problemId) != null) { // continue (only drop out for severe (non-optional) errors) } else { return Errors.UNEXPECTED; } } } } return hasMatch ? Errors.EXPECTED : Errors.NONE; }