Skip to content

Commit

Permalink
Ensure existing IdKeeperAdapters are found
Browse files Browse the repository at this point in the history
This is crucial to make sure that IDs are stable with UUIDIdGenerator
within one session.

Fixes eclipse-glsp/glsp#897
  • Loading branch information
planger committed Feb 1, 2023
1 parent 6d5bb5a commit 82c0ec6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;

public class IdKeeperAdapter extends AdapterImpl {
Expand All @@ -39,7 +38,7 @@ protected String createId() {

@Override
public boolean isAdapterForType(final Object type) {
return type instanceof EObject;
return type == IdKeeperAdapter.class;
}

public static IdKeeperAdapter getOrCreate(final Notifier notifier) {
Expand Down

0 comments on commit 82c0ec6

Please sign in to comment.