/** assumes number and differen genus exist and number genus has ediitabel lable */ protected void automateNegationInsertion(Workspace workspace) { TypeBlockManager typeBlockManager = workspace.getTypeBlockManager(); if (!typeBlockManager.isEnabled()) { System.err.println("AutoMateNegationInsertion invoked but typeBlockManager is disabled."); return; } // ====================>>>>>>>>>>>>>>>>>>>>>>>>> // ====================focus coming in>>>>>>>>>> TODO // ====================>>>>>>>>>>>>>>>>>>>>>>>>> // get focus block Long parentBlockID = typeBlockManager.focusManager.getFocusBlockID(); if (isNullBlockInstance(parentBlockID)) { // focus on canvas automateBlockInsertion(workspace, "number", "-"); } else { Block parentBlock = workspace.getEnv().getBlock(parentBlockID); if (parentBlock.isDataBlock()) { // focus on a data block automateBlockInsertion(workspace, "difference", null); } else { // focus on a non-data block automateBlockInsertion(workspace, "number", "-"); } } }