package jetbrains.mps.lang.core.editor;
/*Generated by MPS */
import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.openapi.editor.cells.EditorCell;
import jetbrains.mps.internal.collections.runtime.Sequence;
import java.util.List;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
/*package*/ class NodeAttribute_comment_InspectorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public NodeAttribute_comment_InspectorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createNextEditor_fqq7dl_a_0();
}
private EditorCell createNextEditor_fqq7dl_a_0() {
try {
getCellFactory().pushCellContext();
getCellFactory().removeCellContextHints(Sequence.fromIterable(getEditorHints_fqq7dl_a0_0()).toGenericArray(String.class));
{
EditorCell editorCell = getCellFactory().createEditorCell(myNode, true, NodeAttribute_comment_Editor.class);
editorCell.setBig(true);
editorCell.setCellContext(getCellFactory().getCellContext());
return editorCell;
}
} finally {
getCellFactory().popCellContext();
}
}
private Iterable<String> getEditorHints_fqq7dl_a0_0() {
List<String> result = ListSequence.fromList(new ArrayList<String>());
if (check_fqq7dl_a1a0a_0(myNode.getContainmentLink())) {
ListSequence.fromList(result).addElement("jetbrains.mps.lang.core.editor.BaseEditorContextHints.comment");
}
return result;
}
private static boolean check_fqq7dl_a1a0a_0(SContainmentLink checkedDotOperand) {
if (null != checkedDotOperand) {
return checkedDotOperand.equals(MetaAdapterFactory.getContainmentLink(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL, 0x47bf8397520e5942L, "smodelAttribute"));
}
return false;
}
}