EditorCell cell = ... // get a reference to the cell SubstituteInfo substituteInfo = cell.getSubstituteInfo(); int width = substituteInfo.getWidth(); int height = substituteInfo.getHeight();
EditorCell cell = ... // get a reference to the cell SubstituteInfo substituteInfo = cell.getSubstituteInfo(); boolean hasSubstitute = substituteInfo.getSubstitute() != null;In this example, we get a reference to a cell and then use the getSubstituteInfo method to retrieve its substitute information. We then check if the cell has a substitute or not by checking if the Substitute object returned by the getSubstitute method is null. These examples belong to the jetbrains.mps.openapi.editor.cells package, which is a part of the MPS OpenAPI library.