Examples of addMapping()


Examples of com.ctc.wstx.util.BijectiveNsMap.addMapping()

    }

    public void testMaskingForGetBoundPrefixes() throws Exception
    {
        BijectiveNsMap nsMap = BijectiveNsMap.createEmpty();
        nsMap.addMapping("ns", "abc");
        List<?> l = nsMap.getPrefixesBoundToUri("abc", null);
        assertEquals(1, l.size());
        assertEquals("ns", l.iterator().next());

        // and then let's mask it
View Full Code Here

Examples of com.ctc.wstx.util.BijectiveNsMap.addMapping()

        assertEquals(1, l.size());
        assertEquals("ns", l.iterator().next());

        // and then let's mask it
        nsMap = nsMap.createChild();
        nsMap.addMapping("ns", "xyz");
        assertEquals(0, nsMap.getPrefixesBoundToUri("abc", new ArrayList<String>()).size());

        // and finally, let's re-bind it
        nsMap = nsMap.createChild();
        nsMap.addMapping("ns", "abc");
View Full Code Here

Examples of com.ctc.wstx.util.BijectiveNsMap.addMapping()

        nsMap.addMapping("ns", "xyz");
        assertEquals(0, nsMap.getPrefixesBoundToUri("abc", new ArrayList<String>()).size());

        // and finally, let's re-bind it
        nsMap = nsMap.createChild();
        nsMap.addMapping("ns", "abc");
        assertEquals(1, nsMap.getPrefixesBoundToUri("abc", null).size());

        // and add another similar binding
        nsMap.addMapping("ns2", "abc");
        assertEquals(2, nsMap.getPrefixesBoundToUri("abc", null).size());
View Full Code Here

Examples of com.ctc.wstx.util.BijectiveNsMap.addMapping()

        nsMap = nsMap.createChild();
        nsMap.addMapping("ns", "abc");
        assertEquals(1, nsMap.getPrefixesBoundToUri("abc", null).size());

        // and add another similar binding
        nsMap.addMapping("ns2", "abc");
        assertEquals(2, nsMap.getPrefixesBoundToUri("abc", null).size());
    }
}
View Full Code Here

Examples of com.github.sommeri.sourcemap.SourceMapGenerator.addMapping()

public class SourceMapBuilderTest {

  @Test
  public void unknownFilenamesSameContent() throws Exception {
    SourceMapGenerator generator = SourceMapGeneratorFactory.getInstance(SourceMapFormat.V3);
    generator.addMapping(null, "content", "ahoj", new FilePosition(1, 1), new FilePosition(1, 1), new FilePosition(1, 5));
    generator.addMapping(null, "content", "nazdar", new FilePosition(2, 1), new FilePosition(2, 1), new FilePosition(2, 5));
    generator.addMapping(null, "content", "hello", new FilePosition(3, 1), new FilePosition(3, 1), new FilePosition(3, 5));
   
    String map = generateMap(generator);
    assertEquals("{\n\"version\":3,\n\"file\":\"name\",\n\"lineCount\":4,\n\"mappings\":\"A;CACCA,I;CACAC,I;CACAC;\",\n\"sources\":[null],\n\"sourcesContent\":[\"content\"],\n\"names\":[\"ahoj\",\"nazdar\",\"hello\"]\n}\n", map);
View Full Code Here

Examples of com.google.debugging.sourcemap.SourceMapGeneratorV3.addMapping()

  }

  private SourceMapInput sourcemap(String sourceMapPath, String originalSource,
      FilePosition originalSourcePosition) throws Exception {
    SourceMapGeneratorV3 sourceMap = new SourceMapGeneratorV3();
    sourceMap.addMapping(originalSource, null, originalSourcePosition,
        new FilePosition(1, 1), new FilePosition(100, 1));
    StringBuilder output = new StringBuilder();
    sourceMap.appendTo(output, "unused.js");

    return new SourceMapInput(
View Full Code Here

Examples of com.google.debugging.sourcemap.SourceMapGeneratorV3.addMapping()

    assertEquals("[testcode]", msg.getSourceName());
  }

  public void testJsMessagesWithSrcMap() throws Exception {
    SourceMapGeneratorV3 sourceMap = new SourceMapGeneratorV3();
    sourceMap.addMapping("source1.html", null, new FilePosition(10, 0),
        new FilePosition(0, 0), new FilePosition(0, 100));
    sourceMap.addMapping("source2.html", null, new FilePosition(10, 0),
        new FilePosition(1, 0), new FilePosition(1, 100));
    StringBuilder output = new StringBuilder();
    sourceMap.appendTo(output, "unused.js");
View Full Code Here

Examples of com.google.debugging.sourcemap.SourceMapGeneratorV3.addMapping()

  public void testJsMessagesWithSrcMap() throws Exception {
    SourceMapGeneratorV3 sourceMap = new SourceMapGeneratorV3();
    sourceMap.addMapping("source1.html", null, new FilePosition(10, 0),
        new FilePosition(0, 0), new FilePosition(0, 100));
    sourceMap.addMapping("source2.html", null, new FilePosition(10, 0),
        new FilePosition(1, 0), new FilePosition(1, 100));
    StringBuilder output = new StringBuilder();
    sourceMap.appendTo(output, "unused.js");

    compilerOptions = new CompilerOptions();
View Full Code Here

Examples of com.jfinal.plugin.activerecord.ActiveRecordPlugin.addMapping()

    me.add(c3p0Plugin);
   
    // 配置ActiveRecord插件
    ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);
    me.add(arp);
    arp.addMapping("blog", Blog.class)// 映射blog 表到 Blog模型
  }
 
  /**
   * 配置全局拦截器
   */
 
View Full Code Here

Examples of com.jme3.input.InputManager.addMapping()

    @Override
    public void initialize(AppStateManager stateManager, Application app) {
        if (!super.isInitialized()){
            InputManager inputManager = app.getInputManager();
            inputManager.addMapping("ScreenShot", new KeyTrigger(KeyInput.KEY_SYSRQ));
            inputManager.addListener(this, "ScreenShot");

            List<ViewPort> vps = app.getRenderManager().getPostViews();
            ViewPort last = vps.get(vps.size()-1);
            last.addProcessor(this);
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.