Examples of Block


Examples of com.google.dart.engine.ast.Block

        if (body.isGenerator()) {
          element.setGenerator(true);
        }

        if (inFunction) {
          Block enclosingBlock = node.getAncestor(Block.class);
          if (enclosingBlock != null) {
            int functionEnd = node.getOffset() + node.getLength();
            int blockEnd = enclosingBlock.getOffset() + enclosingBlock.getLength();
            element.setVisibleRange(functionEnd, blockEnd - functionEnd - 1);
          }
        }

        currentHolder.addFunction(element);
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.block.Block

        // Buffer pool?
       
        // Nodes can be writtern during reads.
        // Make sure this operation is sync'ed.
        int maxSize = nodec.maxSize(node) ;
        Block block = file.allocWrite(maxSize) ;
        try {
            int len = nodec.encode(node, block.getByteBuffer(), null) ;
            file.completeWrite(block) ;
            return block.getId() ;
        } catch (TDBException ex)
        {
            file.abortWrite(block) ;
            throw ex ;
        }
View Full Code Here

Examples of com.intellij.formatting.Block

    final String text = editor != null ? editor.getDocument().getText() : "";
    final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(project).getCurrentSettings();
    MathematicaFormattingModelBuilder modelBuilder = new MathematicaFormattingModelBuilder();
    final PsiFile file = PsiFileFactory.getInstance(project).createFileFromText("a.m", MathematicaLanguage.INSTANCE, text);
    final FormattingModel model = modelBuilder.createModel(file.getNode().getPsi(), settings);
    final Block rootBlock = model.getRootBlock();
    final String blockText = printBlock((AbstractBlock) rootBlock, text);

    JTextArea textArea = new JTextArea(blockText);
    final JScrollPane pane = new JScrollPane(textArea);
    dialogBuilder.setCenterPanel(pane);
View Full Code Here

Examples of com.jcraft.jorbis.Block

        oggPage_ = new Page();
        oggPacket_ = new Packet();
        vorbisInfo = new Info();
        vorbisComment = new Comment();
        vorbisDspState = new DspState();
        vorbisBlock = new Block(vorbisDspState);
        buffer = null;
        bytes = 0;
        currentBytes = 0L;
        oggSyncState_.init();
    }
View Full Code Here

Examples of com.laamella.javamodel.Block

        file.write(outputStreamFactory);
    }

    private void createMethodsForElement(Element element, ClassBody clas) {
        if (element.complex) {
            final Block closeTagMethod = clas.method("public void %s()", element.closeTagMethodName);
            for (Element child : element.children) {
                createMethodsForElement(child, clas);
                if (!child.complex) {
                    closeTagMethod.add("%s = null;", child.valueHandlerMethodName);
                }
            }
            for (Element child : element.attributes) {
                createMethodsForElement(child, clas);
                closeTagMethod.add("%s = null;", child.valueHandlerMethodName);
            }
        } else {
            clas.fields.add("protected %s %s = null;", element.javaType.name, element.valueHandlerMethodName);
            final Block valueHandlerMethod = clas.method("public void %s(%s %s)", element.valueHandlerMethodName, element.javaType.name, element.shortName);
            valueHandlerMethod.add("this.%s = %s;", element.valueHandlerMethodName, element.shortName);
        }
    }
View Full Code Here

Examples of com.mime.minefront.level.Block

    Level level = game.level;
    int size = 100;
    for (int xBlock = -size; xBlock <= size; xBlock++) {
      for (int zBlock = -size; zBlock <= size; zBlock++) {
        Block block = level.create(xBlock, zBlock);
        Block east = level.create(xBlock + 1, zBlock);
        Block south = level.create(xBlock, zBlock + 1);

        if (block.solid) {
          if (!east.solid) {
            renderWall(xBlock + 1, xBlock + 1, zBlock, zBlock + 1, 0);
            renderWall(xBlock + 1, xBlock + 1, zBlock, zBlock + 1, 1);
          }
          if (!south.solid) {
            renderWall(xBlock + 1, xBlock, zBlock + 1, zBlock + 1, 0);
            renderWall(xBlock + 1, xBlock, zBlock + 1, zBlock + 1, 1);
          }
        } else {
          if (east.solid) {
            renderWall(xBlock + 1, xBlock + 1, zBlock + 1, zBlock, 0);
            renderWall(xBlock + 1, xBlock + 1, zBlock + 1, zBlock, 1);
          }
          if (south.solid) {
            renderWall(xBlock, xBlock + 1, zBlock + 1, zBlock + 1, 0);
            renderWall(xBlock, xBlock + 1, zBlock + 1, zBlock + 1, 1);
          }
        }

      }
    }
    for (int xBlock = -size; xBlock <= size; xBlock++) {
      for (int zBlock = -size; zBlock <= size; zBlock++) {
        Block block = level.create(xBlock, zBlock);
        for (int s = 0; s < block.sprites.size(); s++) {
          Sprite sprite = block.sprites.get(s);
          renderSprite(xBlock + sprite.x, sprite.y, zBlock + sprite.z);
        }
      }
View Full Code Here

Examples of com.mojang.escape.level.block.Block

        }
      } else {
        viewport.render(game);
        viewport.postProcess(game.level);

        Block block = game.level.getBlock((int) (game.player.x + 0.5), (int) (game.player.z + 0.5));
        if (block.messages != null && hasFocus) {
          for (int y = 0; y < block.messages.length; y++) {
            viewport.draw(block.messages[y], (width - block.messages[y].length() * 6) / 2, (viewport.height - block.messages.length * 8) / 2 + y * 8 + 1, 0x111111);
            viewport.draw(block.messages[y], (width - block.messages[y].length() * 6) / 2, (viewport.height - block.messages.length * 8) / 2 + y * 8, 0x555544);
          }
View Full Code Here

Examples of com.mojang.minecraft.level.tile.Block

  public static void initModels()
  {
    for(int unknown0 = 0; unknown0 < 256; unknown0++)
    {
      Block var1 = Block.blocks[unknown0];

      if(var1 != null)
      {
        models[unknown0] = new ItemModel(var1.textureId);
      }
View Full Code Here

Examples of com.positive.charts.block.Block

      final LegendItemCollection legendItems = this.sources[s]
          .getLegendItems();
      if (legendItems != null) {
        for (int i = 0; i < legendItems.getItemCount(); i++) {
          final LegendItem item = legendItems.get(i);
          final Block block = this.createLegendItemBlock(item);
          this.items.add(block);
        }
      }
    }
  }
View Full Code Here

Examples of com.strobel.decompiler.ast.Block

        final DecompilerContext context = new DecompilerContext();

        context.setCurrentMethod(method);
        context.setCurrentType(method.getDeclaringType());

        final Block methodAst = new Block();

        output.writeLine(" {");
        output.indent();

        try {
            methodAst.getBody().addAll(AstBuilder.build(body, _inlineVariables, context));

            if (_abortBeforeStep != null) {
                AstOptimizer.optimize(context, methodAst, _abortBeforeStep);
            }

            final Set<Variable> allVariables = new LinkedHashSet<>();

            for (final Expression e : methodAst.getSelfAndChildrenRecursive(Expression.class)) {
                final Object operand = e.getOperand();

                if (operand instanceof Variable && !((Variable) operand).isParameter()) {
                    allVariables.add((Variable) operand);
                }
            }

            if (!allVariables.isEmpty()) {
                for (final Variable variable : allVariables) {
                    output.writeDefinition(variable.getName(), variable);

                    final TypeReference type = variable.getType();

                    if (type != null) {
                        output.write(" : ");
                        DecompilerHelpers.writeType(output, type, NameSyntax.SHORT_TYPE_NAME);
                    }

                    if (variable.isGenerated()) {
                        output.write(" [generated]");
                    }

                    output.writeLine();
                }

                output.writeLine();
            }

            methodAst.writeTo(output);
        }
        catch (Throwable t) {
            writeError(output, t);
        }
        finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.