Class BlocklyToJava

java.lang.Object
net.mcreator.blockly.BlocklyToCode
net.mcreator.blockly.java.BlocklyToJava
All Implemented Interfaces:
IGeneratorProvider, IWorkspaceProvider
Direct Known Subclasses:
BlocklyToFeature, BlocklyToProcedure

public class BlocklyToJava extends BlocklyToCode
  • Field Details

    • LOG

      protected final org.apache.logging.log4j.Logger LOG
    • variableGenerator

      protected final BlocklyVariables variableGenerator
  • Constructor Details

  • Method Details

    • preBlocksPlacement

      protected void preBlocksPlacement(Document doc, Element startBlock) throws TemplateGeneratorException

      This method contains the code needing to be executed before blocks are placed.

      Parameters:
      doc - Blockly XML document
      startBlock - The basic block of the editor used to get other blocks.
      Throws:
      TemplateGeneratorException
    • postBlocksPlacement

      protected void postBlocksPlacement(Document doc, Element startBlock, List<Element> baseBlocks)

      This method contains the code needing to be executed after blocks are placed.

      Parameters:
      doc - Blockly XML document
      startBlock - The basic block of the editor used to get other blocks.
      baseBlocks - A list of all blocks placed under start block.
    • preInitialization

      protected void preInitialization()

      This method is executed after the constructor is called, before the code is executed.