Class SModel

    • Method Detail

      • generateUniqueId

        public static SNodeId generateUniqueId()
      • waitUpdateModeIsOver

        protected final void waitUpdateModeIsOver()
      • isDisposed

        public boolean isDisposed()
      • getModelDescriptor

        public final SModel getModelDescriptor()
      • setModelDescriptor

        public void setModelDescriptor​(@Nullable
                                       SModel modelDescriptor,
                                       @Nullable
                                       ModelEventDispatch eventDispatch)
        Tells this model data implementation is bound to specific model descriptor and uses a supplied mechanism to dispatch events. This method is intended for use by model descriptor implementations only.
        Parameters:
        modelDescriptor -
        eventDispatch - generally, non-null value makes sense only when modelDescriptor is not null as well.
      • enforceFullLoad

        protected void enforceFullLoad()
      • performUndoableAction

        protected void performUndoableAction​(@NotNull
                                             SNodeUndoableAction action)
        Name clash with SNodeOwner.performUndoableAction(org.jetbrains.mps.openapi.model.SNode, SNodeUndoableAction) is unfortunate. This one is rather 'registerActionWithUndo'.
      • canFireEvent

        public boolean canFireEvent()
      • canFireReadEvent

        public boolean canFireReadEvent()
      • dispose

        public void dispose()
        Make this SModelData unusable, free references to nodes hold to get them available to GC. Doesn't dispatch any event (it's responsibility of openapi.SModel impl). Disconnects from openapi.SModel descriptor, if any. XXX At the moment, doesn't change owner of nodes to DetachedNodeOwner, though it seems it should. The only objection is that doing so would trigger a lot of unregister events we don't really care to get.
      • getLanguageImportVersion

        public int getLanguageImportVersion​(SLanguage lang)
      • setLanguageImportVersion

        public void setLanguageImportVersion​(SLanguage language,
                                             int version)
      • getImplicitImportsSupport

        @NotNull
        public ImplicitImportsLegacyHolder getImplicitImportsSupport()
        This is compatibility method with legacy persistence mechanism, unless used, no implicit imports are tracked. Drop once we no longer need to support serialization of old persistence formats (there's no reason to track implicit imports if we aren't going to serialize them afterwards)

        It looks that there's no longer consumer of implicit imports. There's code to update them, but no code to read values, except for clients of #getAllImportElements()

      • engagedOnGenerationLanguages

        @Deprecated
        public List<SModuleReference> engagedOnGenerationLanguages()
        Deprecated.
        though it's our internal API, there's 1 use in mbeddr of this exact method we need to fix first. Once mbeddr use and 2 uses in our model persistence gone, remove the method
      • getLanguagesEngagedOnGeneration

        public Collection<SLanguage> getLanguagesEngagedOnGeneration()
      • addEngagedOnGenerationLanguage

        public void addEngagedOnGenerationLanguage​(SLanguage ref)
      • removeEngagedOnGenerationLanguage

        public void removeEngagedOnGenerationLanguage​(SLanguage ref)
      • isUpdateMode

        public boolean isUpdateMode()
        update mode means we are attaching newly loaded children
      • getRepository

        protected SRepository getRepository()
      • updateExternalReferences

        public boolean updateExternalReferences​(@NotNull
                                                SRepository repository)
      • changeModelReference

        public void changeModelReference​(SModelReference newModelReference)
      • createEmptyCopy

        public SModel createEmptyCopy()
      • copyPropertiesTo

        public void copyPropertiesTo​(SModel to)