Examples of Code


Examples of org.eclipse.xtext.xdoc.xdoc.Code

    this.testLangDef = XdocFactory.eINSTANCE.createLangDef();
    testLangDef.getKeywords().addAll(Arrays.asList(testKeyWords));

    this.testCodeBlock = XdocFactory.eINSTANCE.createCodeBlock();
    Code testCode = XdocFactory.eINSTANCE.createCode();
    testCode.setContents(testCodeString);
    testCodeBlock.getContents().add(testCode);
  }
View Full Code Here

Examples of org.elevenbits.westvleteren.model.item.Code

    protected void tearDown() throws Exception {
      manager = null;
    }

    public void testAddAndRemoveCode() throws Exception {
      Code code = new Code("Code", "description");
      code = manager.saveCode(code);
      assertNotNull(code.getId());
      if (log.isDebugEnabled()) {
        log.debug("Code created: " + code);
      }     
      Integer id = code.getId();
      manager.removeCode(code);
      try {
        code = manager.getCode(id);
            fail("'badcodename' found in database, failing test...");       
      } catch (ObjectRetrievalFailureException orfe) {
View Full Code Here

Examples of org.infinispan.schematic.document.Code

        assertSame(expected, actual);
    }

    @Test
    public void shouldCorrectlyWriteCode() {
        Code code = new Code("name");
        String expected = "{ \"$code\" : \"name\" }";
        String actual = writer.write(code);
        assertSame(expected, actual);
    }
View Full Code Here

Examples of org.jboss.as.console.client.widgets.Code

        basicsPanel.add(basicsForm);

        // operations
        VerticalPanel operationsPanel = new VerticalPanel();
        operationsPanel.setStyleName("fill-layout-width");
        final Code code = new Code(Code.Language.JAVASCRIPT, false);
        operationsPanel.add(code);

        // form tabs
        TabPanel forms = new TabPanel();
        forms.setStyleName("default-tabpanel");
        forms.add(basicsPanel, Console.CONSTANTS.common_label_attributes());
        forms.add(operationsPanel, Console.CONSTANTS.common_label_operations());
        forms.selectTab(0);

        // update operations upon selection
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(final SelectionChangeEvent event) {
                code.clear();
                AuditLogItem item = selectionModel.getSelectedObject();
                if (item != null) {
                    JSONArray jsonArray = JSONParser.parseStrict(item.getOperations().getPayload()).isArray();
                    if (jsonArray != null) {
                        String stringify = stringify(jsonArray.getJavaScriptObject());
                        code.setValue(SafeHtmlUtils.fromString(stringify));
                    }
                }
            }
        });
View Full Code Here

Examples of org.mifosplatform.infrastructure.codes.domain.Code

            this.context.authenticatedUser();

            this.fromApiJsonDeserializer.validateForCreate(command.json());

            final Long codeId = command.entityId();
            final Code code = this.codeRepository.findOne(codeId);
            if (code == null) {
                throw new CodeNotFoundException(codeId);
            }
            final CodeValue codeValue = CodeValue.fromJson(code, command);
            this.codeValueRepository.save(codeValue);

            return new CommandProcessingResultBuilder() //
                    .withCommandId(command.commandId()) //
                    .withEntityId(code.getId()) //
                    .withSubEntityId(codeValue.getId())//
                    .build();
        } catch (final DataIntegrityViolationException dve) {
            handleCodeValueDataIntegrityIssues(command, dve);
            return new CommandProcessingResultBuilder() //
View Full Code Here

Examples of org.tautua.markdownpapers.ast.Code

        }
      }

      CodeText codeText = new CodeText(ParserTreeConstants.JJTCODETEXT);
      codeText.append(contents);
      Code code = new Code(ParserTreeConstants.JJTCODE);
      code.jjtAddChild(codeText, 0);
      visit(code);
    }
View Full Code Here

Examples of serp.bytecode.Code

        }
        c = p.loadClass(new ByteArrayInputStream(b));
        c.getDeclaredFields();
        BCMethod[] methods = c.getDeclaredMethods();
        for (int i = 0; i < methods.length; ++i) {
            Code code = methods[i].getCode(false);
            if (code != null) {
                while (code.hasNext()) {
                    code.next();
                }
                if (compute) {
                    code.calculateMaxStack();
                    code.calculateMaxLocals();
                }
            }
        }
        c.toByteArray();
        return c;
View Full Code Here

Examples of uk.nhs.interoperability.payloads.Code

    return null;
  }
 
  @Override
  public boolean preProcessSerialise(XMLNamespaceContext namespaces, Object itemObject, String xpath, Element parent, Document xmldoc, Field field, Payload payload) {
    Code item = (Code)itemObject;
    Logger.trace("  Serialising FHIR coded item - code = " + item.getCode());
    boolean suppressCodeSystem = field.isSuppressCodeSystem();
    // First create the @code node: 
    Field stringValueField = new Field();
    stringValueField.setType("String");
    stringValueField.setName("Coded Item Value");
   
    PayloadSerialiser.createNode(namespaces, xpath + "/x:value/@value", parent, xmldoc, item.getCode(), new StringHandler(), stringValueField, payload);
    String displayName = item.getDisplayName();
    //String reference = item.getReference();
    if (displayName != null) {
      PayloadSerialiser.createNode(namespaces, xpath + "/x:label/@value", parent, xmldoc, displayName, new StringHandler(), stringValueField, payload);
    }
    //if (reference != null) {
    //  PayloadSerialiser.createNode(namespaces, xpath + "/x:originalText/x:reference/@value", parent, xmldoc, reference, new StringHandler(), stringValueField, payload);
    //}
   
    String oid = item.getOID();
    if (oid != null) {
      // Add oid prefix
      oid = FHIRUtils.addOIDPrefix(oid);
      if (!suppressCodeSystem) {
        PayloadSerialiser.createNode(namespaces, xpath + "/x:system/@value", parent, xmldoc, oid, new StringHandler(), stringValueField, payload);
View Full Code Here

Examples of wycs.core.Code

     * @param code the tuple load code to simplify.
     * @return the (if possible) simplified code.
     */
    private Code simplify(Code.Load code) {
        // Recurse into the operand first
        Code operand = simplify(code.operands[0]);

        // Simplify known tuples
        if (operand.opcode == Code.Op.TUPLE) {
            operand = operand.operands[code.index];
        }
View Full Code Here

Examples of wyil.lang.Code

  }

  @Override
  public Env propagate(int index, Entry entry, Env environment) {
    rewrites.put(index,null);
    Code code = entry.code;
    boolean isLive = true;
    environment = (Env) environment.clone();

    if (code instanceof Code.AbstractAssignable) {
      Code.AbstractAssignable aa = (Code.AbstractAssignable) code;
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.