package jetbrains.mps.ide.httpsupport.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.nodeEditor.cells.EditorCell_Collection;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
import jetbrains.mps.nodeEditor.MPSFonts;
/*package*/ class RequestHandlerDescription_ComponentBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public RequestHandlerDescription_ComponentBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
@NotNull
@Override
public SNode getNode() {
return myNode;
}
/*package*/ EditorCell createCell() {
return createCollection_viba1c_a();
}
private EditorCell createCollection_viba1c_a() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical());
editorCell.setCellId("Collection_viba1c_a");
Style style = new StyleImpl();
style.set(StyleAttributes.SELECTABLE, false);
editorCell.getStyle().putAll(style);
editorCell.addEditorCell(createConstant_viba1c_a0());
editorCell.addEditorCell(createConstant_viba1c_b0());
editorCell.addEditorCell(createConstant_viba1c_c0());
editorCell.addEditorCell(createConstant_viba1c_d0());
editorCell.addEditorCell(createConstant_viba1c_e0());
return editorCell;
}
private EditorCell createConstant_viba1c_a0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Handles Incoming HTTP Requests. Workflow:");
editorCell.setCellId("Constant_viba1c_a0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_viba1c_b0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "1. Checks that 'query prefix' is a prefix of query path; ");
editorCell.setCellId("Constant_viba1c_b0");
Style style = new StyleImpl();
style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_viba1c_c0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "2. Checks that all required parameters is in query;");
editorCell.setCellId("Constant_viba1c_c0");
Style style = new StyleImpl();
style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_viba1c_d0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "3. Invokes canHandle() method and checks that it returns true;");
editorCell.setCellId("Constant_viba1c_d0");
Style style = new StyleImpl();
style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createConstant_viba1c_e0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "4. If all criteria are satisfied invokes handle() method.");
editorCell.setCellId("Constant_viba1c_e0");
Style style = new StyleImpl();
style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
}