@Override
protected void initialize(IAcceptor<PreferenceKey> acceptor) {
acceptor.accept(create(INVALID_ACTION_USAGE,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(EMPTY_ENUM_LIteraL,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(EMPTY_KEYWORD,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(SPACES_IN_KEYWORD,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(INVALID_HIDDEN_TOKEN,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(INVALID_HIDDEN_TOKEN_FRAGMENT,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(INVALID_PACKAGE_REFERENCE_INHERITED,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(CROSS_REFERENCE_IN_ALTERNATIVES,SeverityConverter.SEVERITY_ERROR));
acceptor.accept(create(INVALID_metamodel_NAME,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(INVALID_PACKAGE_REFERENCE_EXTERNAL,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(INVALID_PACKAGE_REFERENCE_NOT_ON_CLAsspATH,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(INVALID_TERMINALRULE_NAME,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(DUPLICATE_ENUM_LIteraL,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(BIDIRECTIONAL_REFERENCE,SeverityConverter.SEVERITY_WARNING));
acceptor.accept(create(disCOURAGED_RULE_NAME,SeverityConverter.SEVERITY_WARNING));
}
项目:xtext-extras
文件:XbaseSeverityConverter.java
/**
* Returns decoded delegation key or <code>null</code> if encodedValue can not be parsed.
* @return {@link Pair} where getFirst() is delegationKey and getSecond() is the defaultSeverity.
* @see XbaseSeverityConverter#encodeDefaultSeverity(String,String)
*/
public static Pair<String,String> decodeDelegationKey(String encodedValue) {
List<String> split = Strings.split(encodedValue,DEFAULT_SEVERITY_SEParaTOR);
if (split.size() == 2) {
return Tuples.create(split.get(0),split.get(1));
} else if (split.size() == 1) {
return Tuples.create(split.get(0),SeverityConverter.SEVERITY_WARNING);
} else {
return null;
}
}
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
iAcceptor.accept(create(IssueCodes.NULL_SAFE_FEATURE_CALL_OF_PRIMITIVE_VALUED_FEATURE,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(createDelegate(IssueCodes.INSTANCE_ACCESS_TO_STATIC_MEMBER,COMPILER_PB_STATIC_ACCESS_RECEIVER));
iAcceptor.accept(create(IssueCodes.UNHANDLED_EXCEPTION,SeverityConverter.SEVERITY_IGnorE));
iAcceptor.accept(create(IssueCodes.EQUALS_WITH_NULL,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(createDelegate(IssueCodes.FORBIDDEN_REFERENCE,COMPILER_PB_FORBIDDEN_REFERENCE));
iAcceptor.accept(createDelegate(IssueCodes.disCOURAGED_REFERENCE,COMPILER_PB_disCOURAGED_REFERENCE));
iAcceptor.accept(create(IssueCodes.IMPORT_WILDCARD_DEPRECATED,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(createDelegate(IssueCodes.OBSOLETE_INSTANCEOF,COMPILER_PB_UNNECESSARY_TYPE_CHECK));
iAcceptor.accept(createDelegate(IssueCodes.OBSOLETE_CAST,COMPILER_PB_UNNECESSARY_TYPE_CHECK));
iAcceptor.accept(createDelegate(IssueCodes.IMPORT_UNUSED,COMPILER_PB_UNUSED_IMPORT));
iAcceptor.accept(createDelegate(IssueCodes.UNUSED_LOCAL_VARIABLE,COMPILER_PB_UNUSED_LOCAL));
iAcceptor.accept(create(IssueCodes.IMPORT_DUPLICATE,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(create(IssueCodes.VARIABLE_NAME_disCOURAGED,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(create(IssueCodes.IMPORT_UNRESOLVED,SeverityConverter.SEVERITY_ERROR));
iAcceptor.accept(create(IssueCodes.JAVA_STYLE_TYPE_CAST,SeverityConverter.SEVERITY_ERROR));
iAcceptor.accept(create(IssueCodes.SUSPICIoUSLY_OVERLOADED_FEATURE,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(create(IssueCodes.CONSTANT_BOOLEAN_CONDITION,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(create(IssueCodes.UNREACHABLE_CASE,SeverityConverter.SEVERITY_ERROR));
iAcceptor.accept(create(IssueCodes.UNREACHABLE_IF_BLOCK,SeverityConverter.SEVERITY_ERROR));
iAcceptor.accept(create(IssueCodes.INCOMPLETE_CASES_ON_ENUM,SeverityConverter.SEVERITY_WARNING));
iAcceptor.accept(create(IssueCodes.OPERATION_WITHOUT_PARENTHESES,SeverityConverter.SEVERITY_IGnorE));
iAcceptor.accept(create(IssueCodes.copY_JAVA_PROBLEMS,SeverityConverter.SEVERITY_IGnorE));
iAcceptor.accept(createDelegate(IssueCodes.DEPRECATED_MEMBER_REFERENCE,COMPILER_PB_DEPRECATION));
iAcceptor.accept(create(IssueCodes.DUPLICATE_TYPE,SeverityConverter.SEVERITY_ERROR));
iAcceptor.accept(create(IssueCodes.UNQUALIFIED_SUPER_CALL,getUnqualifiedSuperCallSeverity()));
iAcceptor.accept(create(IssueCodes.ABSTRACT_METHOD_INVOCATION,getAbstractMethodInvocationSeverity()));
}
项目:n4js
文件:N4JSIssueSeverities.java
项目:n4js
文件:N4MFIssueSeverities.java
protected String getUnqualifiedSuperCallSeverity() {
return SeverityConverter.SEVERITY_IGnorE;
}
protected String getAbstractMethodInvocationSeverity() {
return SeverityConverter.SEVERITY_IGnorE;
}
protected PreferenceKey createDelegate(String id,String delegationKey) {
return createDelegate(id,delegationKey,SeverityConverter.SEVERITY_WARNING);
}
项目:xtext-extras
文件:DefaultXbaseRuntimeModule.java
public Class<? extends SeverityConverter> bindSeverityConverter() {
return XbaseSeverityConverter.class;
}
项目:xtext-extras
文件:XbaseInjectorProvider.java
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
super.initialize(iAcceptor);
iAcceptor.accept(create(IssueCodes.SUSPICIoUSLY_OVERLOADED_FEATURE,SeverityConverter.SEVERITY_ERROR));
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。