package org.metaborg.meta.nabl2.scopegraph.esop;

import java.util.Optional;

import org.metaborg.meta.nabl2.scopegraph.ILabel;
import org.metaborg.meta.nabl2.scopegraph.INameResolution;
import org.metaborg.meta.nabl2.scopegraph.IOccurrence;
import org.metaborg.meta.nabl2.scopegraph.IResolutionParameters;
import org.metaborg.meta.nabl2.scopegraph.IScope;
import org.metaborg.meta.nabl2.scopegraph.IScopeGraph;
import org.metaborg.meta.nabl2.scopegraph.OpenCounter;
import org.metaborg.meta.nabl2.scopegraph.path.IDeclPath;
import org.metaborg.meta.nabl2.scopegraph.path.IResolutionPath;

import com.google.common.annotations.Beta;

import io.usethesource.capsule.Set;

@Beta
public interface IEsopNameResolution<S extends IScope, L extends ILabel, O extends IOccurrence>
		extends INameResolution<S, L, O> {

	static <S extends IScope, L extends ILabel, O extends IOccurrence> IEsopNameResolution<S, L, O> resolveFrom(
			IScopeGraph<S, L, O> scopeGraph, IResolutionParameters<L> params, OpenCounter<S, L> scopeCounter) {
		return new org.metaborg.meta.nabl2.scopegraph.esop.reference.EsopNameResolution<>(scopeGraph, params, scopeCounter);
	}

	Optional<Set.Immutable<IResolutionPath<S, L, O>>> tryResolve(O ref);

	Optional<Set.Immutable<IDeclPath<S, L, O>>> tryVisible(S scope);

	Optional<Set.Immutable<IDeclPath<S, L, O>>> tryReachable(S scope);

}

@@ -282,188 +282,13 @@
 ph.I
-ResolutionParameters;%0Aimport org.metaborg.meta.nabl2.scopegraph.IScope;%0Aimport org.metaborg.meta.nabl2.scopegraph.IScopeGraph;%0Aimport org.metaborg.meta.nabl2.scopegraph.OpenCounter
+Scope
 ;%0Aim
@@ -591,16 +591,16 @@
 rrence%3E%0A
+
 %09%09extend
@@ -633,344 +633,8 @@
  %7B%0A%0A
-%09static %3CS extends IScope, L extends ILabel, O extends IOccurrence%3E IEsopNameResolution%3CS, L, O%3E resolveFrom(%0A%09%09%09IScopeGraph%3CS, L, O%3E scopeGraph, IResolutionParameters%3CL%3E params, OpenCounter%3CS, L%3E scopeCounter) %7B%0A%09%09return new org.metaborg.meta.nabl2.scopegraph.esop.reference.EsopNameResolution%3C%3E(scopeGraph, params, scopeCounter);%0A%09%7D%0A%0A
 %09Opt

Remove obsolete factory method.