Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Jul 19, 2024
1 parent f3ccffa commit 7a815f2
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,32 +108,33 @@
import com.google.common.collect.ListMultimap;
import com.google.common.collect.MultimapBuilder;
import com.google.common.collect.Multimaps;
import com.google.common.collect.Sets;
import com.google.inject.Inject;

/**
*/
@SuppressWarnings("javadoc")
@SuppressWarnings("all")
public class N4JSDeclaredNameValidator extends AbstractN4JSDeclarativeValidator {

@Inject
ValidatorMessageHelper messageHelper;
private ValidatorMessageHelper messageHelper;

@Inject
WorkspaceAccess workspaceAccess;
private WorkspaceAccess workspaceAccess;

@Inject
SourceElementExtensions sourceElementExtensions;
private SourceElementExtensions sourceElementExtensions;

@Inject
JavaScriptVariantHelper jsVariantHelper;
private JavaScriptVariantHelper jsVariantHelper;

@Inject
OperationCanceledManager operationCanceledManager;
private OperationCanceledManager operationCanceledManager;

public static final HashSet<String> BASE_JS_TYPES = Sets.<String> newHashSet(
new String[] { "Object", "Function", "Array", "String", "Boolean", "Number", "Math", "Date", "RegExp",
"Error", "JSON" });

public static Set<String> BASE_JS_TYPES = Set.of("Object", "Function", "Array", "String", "Boolean", "Number",
"Math", "Date", "RegExp", "Error", "JSON");
public static Set<String> BASE_GLOBAL_NAMES = Set.of("number", "string", "boolean", "any", "pathSelector",
"i18nKey", "typeName", "N4Object", "N4Class", "N4Enum");
public static final HashSet<String> BASE_GLOBAL_NAMES = Sets.<String> newHashSet(
new String[] { "number", "string", "boolean", "any", "pathSelector", "i18nKey", "typeName", "N4Object",
"N4Class", "N4Enum" });

/**
* NEEEDED
Expand All @@ -142,8 +143,7 @@ public class N4JSDeclaredNameValidator extends AbstractN4JSDeclarativeValidator
* AbstractDeclarativeN4JSValidator
*/
@Override
public void register(EValidatorRegistrar registrar) {
// nop
public void register(final EValidatorRegistrar registrar) {
}

/**
Expand Down Expand Up @@ -641,10 +641,10 @@ private ListMultimap<String, EObject> getLocalNames(VariableEnvironmentElement s
* Returns nested scopes of 'scope'. Only direct sub-scopes of 'scope' are returned, no sub-sub-scopes, i.e.
* sub-scopes of sub-scopes.
*/
private Iterator<VariableEnvironmentElement> getNestedScopes(VariableEnvironmentElement scope) {
return filter(EcoreUtilN4.getAllContentsFiltered(scope,
it -> !(createsScope(it.eContainer()) && it.eContainer() != scope)
&& createsScope(it)),
private Iterator<VariableEnvironmentElement> getNestedScopes(final VariableEnvironmentElement scope) {
return filter(filter(EcoreUtilN4.getAllContentsFiltered(scope,
it -> !(createsScope(it.eContainer()) && it.eContainer() != scope)),
it -> createsScope(it)),
VariableEnvironmentElement.class);
}

Expand Down

0 comments on commit 7a815f2

Please sign in to comment.