Community
Participate
Working Groups
*
* Contributors:
* IBM Corporation - initial API and implementation
* Michael Spector <spektom@gmail.com> - Bug 243886
*******************************************************************************/
package org.eclipse.wst.jsdt.internal.compiler.problem;
* to indicate that this problem is configurable through options
*/
public int computeSeverity(int problemID){
if (this.options.onlyReportSyntaxErrors && (problemID & IProblem.Syntax) == 0) {
return ProblemSeverities.Ignore;
}
switch (problemID) {
case IProblem.Task :
return ProblemSeverities.Warning;
public InferOptions inferOptions=new InferOptions();
public boolean onlyReportSyntaxErrors=false;
/**
* Initializing the compiler options with defaults
public CompilerOptions(){
// use default options
try {
this.onlyReportSyntaxErrors=JavaScriptCore.getPlugin().getPluginPreferences().getBoolean("onlySyntaxErrors");
} catch (Exception ex)
{this.onlyReportSyntaxErrors=false;}
public void set(Map optionsMap) {
Object optionValue;
if ((optionValue = optionsMap.get(OPTION_LocalVariableAttribute)) != null) {
if (GENERATE.equals(optionValue)) {
package org.eclipse.wst.jsdt.internal.compiler;
CompilationUnitDeclaration unit,
CompilationResult result) {
if (this.options.onlyReportSyntaxErrors)
return;
if ((result == null) && (unit != null)) {
result = unit.compilationResult; // current unit being processed ?