Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 243886 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java (+6 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Michael Spector <spektom@gmail.com> -  Bug 243886
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.wst.jsdt.internal.compiler.problem;
12
package org.eclipse.wst.jsdt.internal.compiler.problem;
12
13
Lines 1115-1121 Link Here
1115
 * to indicate that this problem is configurable through options
1116
 * to indicate that this problem is configurable through options
1116
 */
1117
 */
1117
public int computeSeverity(int problemID){
1118
public int computeSeverity(int problemID){
1119
 	
1118
1120
1121
	if (this.options.onlyReportSyntaxErrors && (problemID & IProblem.Syntax) == 0) {
1122
		return ProblemSeverities.Ignore;
1123
	}
1124
	
1119
	switch (problemID) {
1125
	switch (problemID) {
1120
		case IProblem.Task :
1126
		case IProblem.Task :
1121
			return ProblemSeverities.Warning;
1127
			return ProblemSeverities.Warning;
(-)src/org/eclipse/wst/jsdt/internal/compiler/impl/CompilerOptions.java (+13 lines)
Lines 357-367 Link Here
357
	public InferOptions inferOptions=new InferOptions();
357
	public InferOptions inferOptions=new InferOptions();
358
358
359
359
360
    public boolean onlyReportSyntaxErrors=false;
361
	
362
360
	/**
363
	/**
361
	 * Initializing the compiler options with defaults
364
	 * Initializing the compiler options with defaults
362
	 */
365
	 */
363
	public CompilerOptions(){
366
	public CompilerOptions(){
364
		// use default options
367
		// use default options
368
		try {
369
			this.onlyReportSyntaxErrors=JavaScriptCore.getPlugin().getPluginPreferences().getBoolean("onlySyntaxErrors");
370
		} catch (Exception ex) 
371
		{this.onlyReportSyntaxErrors=false;}
372
365
	}
373
	}
366
374
367
	/**
375
	/**
Lines 685-690 Link Here
685
693
686
	public void set(Map optionsMap) {
694
	public void set(Map optionsMap) {
687
695
696
		try {
697
			this.onlyReportSyntaxErrors=JavaScriptCore.getPlugin().getPluginPreferences().getBoolean("onlySyntaxErrors");
698
		} catch (Exception ex) 
699
		{this.onlyReportSyntaxErrors=false;}
700
688
		Object optionValue;
701
		Object optionValue;
689
		if ((optionValue = optionsMap.get(OPTION_LocalVariableAttribute)) != null) {
702
		if ((optionValue = optionsMap.get(OPTION_LocalVariableAttribute)) != null) {
690
			if (GENERATE.equals(optionValue)) {
703
			if (GENERATE.equals(optionValue)) {
(-)src/org/eclipse/wst/jsdt/internal/compiler/Compiler.java (+4 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Michael Spector <spektom@gmail.com> -  Bug 243886
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.wst.jsdt.internal.compiler;
12
package org.eclipse.wst.jsdt.internal.compiler;
12
13
Lines 397-402 Link Here
397
		CompilationUnitDeclaration unit,
398
		CompilationUnitDeclaration unit,
398
		CompilationResult result) {
399
		CompilationResult result) {
399
400
401
		
402
		if (this.options.onlyReportSyntaxErrors)
403
			return;
400
		if ((result == null) && (unit != null)) {
404
		if ((result == null) && (unit != null)) {
401
			result = unit.compilationResult; // current unit being processed ?
405
			result = unit.compilationResult; // current unit being processed ?
402
		}
406
		}

Return to bug 243886