Interface CompatibilityTextUnit

  • All Superinterfaces:
    TextUnit
    All Known Implementing Classes:
    JavaTextUnit, RegularTextUnit

    public interface CompatibilityTextUnit
    extends TextUnit
    Transition interface to give access to TextGen outcome through new TextUnit API. Added just to ensure transition from old TextGen API to the new one, and shall cease afterwards. Used to return TextGenerationResult directly, however, there are troubles compiling generator module due to package name clash (jetbrains.mps.textgen.trace and j.m.textGen) Once we introduce new mechanism to keep data associated with textual generation (e.g. TextUnit.getAssociatedData(Class)), AND generate new textgen that fill this associated data instead of TextGenBuffer (or better yet, update TextGenBuffer to put the data into TextUnit) we shall refactor TextFacility to use the new mechanism. Perhaps, this class shall survive up to 3.3 release to deal with TextGen classes generated in 3.2 (unless I manage to refactor TextGenBuffer to use TextUnit!) FIXME Consider RegularTextUnit.addContextObject(String, Object) - could we use same mechanism?