Examples of Block


Examples of org.eclipse.jdt.internal.compiler.ast.Block

        this.bracketBalance = 1; // pretend the brace was already there
    }
  }
  // might be an initializer
  if (this.bracketBalance == 1){
    Block block = new Block(0);
    Parser parser = parser();
    block.sourceStart = parser.scanner.startPosition;
    Initializer init;
    if (parser.recoveredStaticInitializerStart == 0){
      init = new Initializer(block, ClassFileConstants.AccDefault);
View Full Code Here

Examples of org.eclipse.papyrus.sysml.blocks.Block

  @Override
  protected T doSwitch(int classifierID, EObject theEObject) {
    switch(classifierID) {
    case BlocksPackage.BLOCK:
    {
      Block block = (Block)theEObject;
      T result = caseBlock(block);
      if(result == null)
        result = defaultCase(theEObject);
      return result;
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.Block

    anotherChange.addTextEditGroup(inlineReplacementEdit);
    anotherChange.addTextEditGroup(additionalInlineReplacementEdit);
   
    AST ast = fProgram.getAST();
    MethodDeclaration method = ast.newMethodDeclaration();
    Block extractedMethodBody = ast.newBlock();
       
    FunctionDeclaration functionDec = ast.newFunctionDeclaration(ast.newIdentifier(fMethodName), computeArguments(ast), extractedMethodBody, false);
    method.setModifier(fModifierAccessFlag);
    method.setFunction(functionDec);
   
    ASTRewrite rewriter = ASTRewrite.create(ast);
   
    ListRewrite classListRewrite = rewriter.getListRewrite( fCoveringDeclarationFinder.getCoveringClassDeclaration().getBody(), Block.STATEMENTS_PROPERTY);
    VariableBase dispatcher = ast.newVariable(THIS_VARIABLE_NAME);
    FunctionInvocation calledExtractedMethod = ast.newFunctionInvocation(ast.newFunctionName(ast.newIdentifier(fMethodName)), computeParameters(ast));
    MethodInvocation inlineMethodCall = ast.newMethodInvocation(dispatcher, calledExtractedMethod);

    List<List<ASTNode>> Occurences = new ArrayList<List<ASTNode>>();
   
    if(fReplaceDuplicates) {
      for(Match replace : fDuplicates) {
        Occurences.add(Arrays.asList(replace.getNodes()));
      }
    } else {
      Occurences.add(fSelectedNodesFinder.getNodes());
    }
   
    boolean createdMethodBody = false;
   
    TextEditGroup inlineReplacementEditGroup = inlineReplacementEdit;
   
    for(List<ASTNode> selectedNodeOccurence : Occurences) {
   
      // this is also an indicator, whether this loop was already gone through
      if(createdMethodBody) {
        inlineReplacementEditGroup = additionalInlineReplacementEdit;
      }
     
      ASTNode parent = selectedNodeOccurence.get(0).getParent();
     
      inlineMethodCall = ASTNode.copySubtree(ast, inlineMethodCall);
     
      ListRewrite lrw;
           
      if(parent instanceof Block) {
       
        if(!createdMethodBody) {
          extractedMethodBody.statements().addAll(ASTNode.copySubtrees(ast, selectedNodeOccurence));
          addReturnStatement(ast, extractedMethodBody, fReturnStatement);
          createdMethodBody = true;
        }
       
        lrw = rewriter.getListRewrite(parent, Block.STATEMENTS_PROPERTY);
View Full Code Here

Examples of org.ethereum.core.Block

  public MinerThread(String name,  MineSwarm mineSwarm, byte[] coinbase) {
        this.name = name;
        this.mineSwarm = mineSwarm;
        this.coinbase = coinbase;

        Block genesis = Genesis.getInstance();
        mainChain.add(genesis);

  }
View Full Code Here

Examples of org.foray.fotree.fo.obj.Block

                "fo/font-family-001.fo");
        final Flow flow = this.getFlow(foTree);

        FObj node = flow.getChildAt(0);
        assertTrue(node instanceof Block);
        Block block = (Block) node;
        String[] fontFamilies = block.traitFontFamily(null);
        assertEquals(1, fontFamilies.length);
        /* The default font-family is "serif". */
        assertEquals("serif", fontFamilies[0]);

        node = flow.getChildAt(1);
        assertTrue(node instanceof Block);
        block = (Block) node;
        fontFamilies = block.traitFontFamily(null);
        assertEquals(1, fontFamilies.length);
        assertEquals("Base14-Courier", fontFamilies[0]);

        final Font font = block.getPrimaryFont(null).getFont();
        assertEquals("Courier", font.getFontName());
    }
View Full Code Here

Examples of org.getspout.spoutapi.material.Block

    if (modifiedData.size() > 0) {
      ByteBuffer rawData = ByteBuffer.allocate(modifiedData.size() * (15));

      Iterator<Block> i = modifiedData.iterator();
      while (i.hasNext()) {
        Block next = i.next();

        rawData.put((byte) next.getRawId());
        rawData.put((byte) next.getRawData());
        rawData.putFloat(next.getHardness());
        rawData.putInt(next.getLightLevel());
        rawData.putFloat(next.getFriction());
        rawData.put((byte) (next.isOpaque() ? 1 : 0));
      }

      data = rawData.array();
    }
  }
View Full Code Here

Examples of org.infinitest.toolkit.Block

        new OptionalArgumentOptionSpec<Void>( "max" ).ofType( Object.class );
    }

    @Test
    public void requiredArgOfValueTypeBasedOnValueOf() {
        assertNoException( new Block() {
            public void execute() {
                new RequiredArgumentOptionSpec<Void>( "threshold" ).ofType( ValueOfHaver.class );
            }
        } );
    }
View Full Code Here

Examples of org.iq80.leveldb.table.Block

    }

    private BlockIterator getNextBlock()
    {
        Slice blockHandle = blockIterator.next().getValue();
        Block dataBlock = table.openBlock(blockHandle);
        return dataBlock.iterator();
    }
View Full Code Here

Examples of org.jbehave.core.Block

        resetOriginalHeadlessMode();
    }

    private void ensureDoesNotThrowExceptionWhenNotHeadless(final HeadlessChecker headlessChecker) throws Exception {
        System.getProperties().remove("java.awt.headless");
        Exception exception = runAndCatch(Exception.class, new Block() {
            public void run() throws Exception {
                headlessChecker.check();
            }
        });
        ensureThat(exception, isNull());
View Full Code Here

Examples of org.jcoredb.fs.Block

   
    BlockId blockId = new BlockId(containerId, segmentId, id);
   
    try
    {
      Block block = fs.read(blockId);
     
      JSONNode root = JSONHelper.createSuccessNode();
      JSONAttribute containerId = new JSONAttribute("containerId", ""+blockId.getContainerId(), AttrType.Number);
      JSONAttribute segmentId = new JSONAttribute("segmentId", ""+blockId.getSegmentId(), AttrType.Number);
      JSONAttribute id = new JSONAttribute("blockId", ""+blockId.getId(), AttrType.Number);
      JSONAttribute data = new JSONAttribute("data", Base64.encodeBase64String(block.getBytes()),AttrType.String);
      root.add(containerId);
      root.add(segmentId);
      root.add(id);
      root.add(data);
     
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.