package jetbrains.mps.build.mps.editor;

/*Generated by MPS */

import jetbrains.mps.smodel.action.IReferentPresentationProvider;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SProperty;

public class PresentationProviders {
  public static final IReferentPresentationProvider PRESENTATION_37ht8c_a0a0a = ((IReferentPresentationProvider) (sourceNode, targetNode) -> {
    if (SNodeOperations.getContainingRoot(targetNode) != SNodeOperations.getContainingRoot(sourceNode)) {
      SNode proj = SNodeOperations.as(SNodeOperations.getContainingRoot(targetNode), CONCEPTS.BuildProject$ae);
      if (proj != null) {
        return SPropertyOperations.getString(proj, PROPS.name$MnvL) + "/" + SPropertyOperations.getString(targetNode, PROPS.name$MnvL);
      }
    }
    return SPropertyOperations.getString(targetNode, PROPS.name$MnvL);
  });
  public static final IReferentPresentationProvider PRESENTATION_ulfewq_a0a0a = ((IReferentPresentationProvider) (sourceNode, targetNode) -> {
    if (SNodeOperations.getContainingRoot(targetNode) != SNodeOperations.getContainingRoot(sourceNode)) {
      SNode proj = SNodeOperations.as(SNodeOperations.getContainingRoot(targetNode), CONCEPTS.BuildProject$ae);
      if (proj != null) {
        return SPropertyOperations.getString(proj, PROPS.name$MnvL) + "/" + SPropertyOperations.getString(targetNode, PROPS.name$MnvL);
      }
    }
    return SPropertyOperations.getString(targetNode, PROPS.name$MnvL);
  });

  private static final class CONCEPTS {
    /*package*/ static final SConcept BuildProject$ae = MetaAdapterFactory.getConcept(0x798100da4f0a421aL, 0xb99171f8c50ce5d2L, 0x4df58c6f18f84a13L, "jetbrains.mps.build.structure.BuildProject");
  }

  private static final class PROPS {
    /*package*/ static final SProperty name$MnvL = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name");
  }
}
