Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: use injection ahead of time #1051

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.Map;
import java.util.Set;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
Expand All @@ -37,7 +37,6 @@
import com.avaloq.tools.ddk.xtext.scoping.ImplicitReferencesAdapter;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;


Expand All @@ -59,7 +58,7 @@ public class InferredModelAssociator implements IInferredModelAssociations, IInf
private IReferableElementsUnloader.GenericUnloader unloader;

@Inject
private Provider<IModelInferrer> inferrerProvider;
private IModelInferrer inferrer;

/**
* An adapter that holds the mapping between source- and inferred-model elements.
Expand Down Expand Up @@ -224,7 +223,6 @@ public final void installDerivedState(final DerivedStateAwareResource resource,
* designates the current phase
*/
protected void inferTargetModel(final EObject eObject, final IAcceptor<EObject> acceptor, final boolean isPreLinkingPhase) {
IModelInferrer inferrer = inferrerProvider.get();
inferrer.inferTargetModel(eObject, acceptor, isPreLinkingPhase);
}

Expand Down