Java Code Examples for org.eclipse.jdt.internal.compiler.impl.CompilerOptions#ERROR
The following examples show how to use
org.eclipse.jdt.internal.compiler.impl.CompilerOptions#ERROR .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Main.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
protected void enableAll(int severity) { String newValue = null; switch(severity) { case ProblemSeverities.Error : newValue = CompilerOptions.ERROR; break; case ProblemSeverities.Warning : newValue = CompilerOptions.WARNING; break; } Object[] entries = this.options.entrySet().toArray(); for (int i = 0, max = entries.length; i < max; i++) { Map.Entry entry = (Map.Entry) entries[i]; if (!(entry.getKey() instanceof String)) continue; if (!(entry.getValue() instanceof String)) continue; if (((String) entry.getValue()).equals(CompilerOptions.IGNORE)) { this.options.put(entry.getKey(), newValue); } } this.options.put(CompilerOptions.OPTION_TaskTags, Util.EMPTY_STRING); }
Example 2
Source File: Main.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
protected void disableAll(int severity) { String checkedValue = null; switch(severity) { case ProblemSeverities.Error : checkedValue = CompilerOptions.ERROR; break; case ProblemSeverities.Warning : checkedValue = CompilerOptions.WARNING; break; } Object[] entries = this.options.entrySet().toArray(); for (int i = 0, max = entries.length; i < max; i++) { Map.Entry entry = (Map.Entry) entries[i]; if (!(entry.getKey() instanceof String)) continue; if (!(entry.getValue() instanceof String)) continue; if (((String) entry.getValue()).equals(checkedValue)) { this.options.put(entry.getKey(), CompilerOptions.IGNORE); } } }