Package org.waveprotocol.wave.model.document.util

Examples of org.waveprotocol.wave.model.document.util.AnnotationRegistry$Util


    //
    resourceSet
        .getResourceFactoryRegistry()
        .getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());

    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
        _40Package.eINSTANCE);
View Full Code Here


    // Register the appropriate resource factory to handle all file
    // extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());
   
   
    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
View Full Code Here

    // Register the appropriate resource factory to handle all file
    // extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());
   
   
    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
View Full Code Here

      LinkAttributeAugmenter augmenter) {
    PainterRegistry painterRegistry = registries.getPaintRegistry();
    LinkAnnotationHandler handler =
        new LinkAnnotationHandler(painterRegistry.getPainter());

    AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
    annotationRegistry.registerHandler(AnnotationConstants.LINK_PREFIX, handler);
    // Don't register behaviour on the link/auto key, since an external agent
    // puts it there resulting in surprising behaviour mid-typing (e.g. if
    // the text is bold, the bold will suddenly get ended because of the link)
    registerBehaviour(annotationRegistry, AnnotationConstants.LINK_PREFIX);
    registerBehaviour(annotationRegistry, AnnotationConstants.LINK_MANUAL);
View Full Code Here

     * Create a registry that has three types of behaviours:
     *   - style-like (no bias change, inherits inside)
     *   - link-like (bias away, with priority overriding containers).
     *   - spell-like (metadata, never inherits)
     */
    AnnotationRegistry registry = root.createExtension();
    registry.registerBehaviour(STYLE_KEY, new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT));
    registry.registerBehaviour(LINK_KEY, new AnnotationBehaviour() {
      public BiasDirection getBias(StringMap<Object> left, StringMap<Object> right,
          CursorDirection cursor) {
        assert left.containsKey(LINK_KEY) && right.containsKey(LINK_KEY);
        return left.get(LINK_KEY) == null ? BiasDirection.LEFT : BiasDirection.RIGHT; // away
      }
      public double getPriority() {
        return 10.0; // higher than default
      }
      public InheritDirection replace(StringMap<Object> inside, StringMap<Object> outside,
          ContentType type) {
        return InheritDirection.INSIDE;
      }
      public AnnotationFamily getAnnotationFamily() {
        return AnnotationFamily.CONTENT;
      }
    });
    registry.registerBehaviour(SPELL_KEY, AnnotationBehaviour.REPLACE_NEITHER);
    useCaretAnnotations();
    return registry;
  }
View Full Code Here

    editor.setEditing(true);
    return editor;
  }

  private static void registerHandlers(Registries registries) {
    AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
    PainterRegistry paintRegistry = registries.getPaintRegistry();
    ElementHandlerRegistry elementHandlerRegistry = registries.getElementHandlerRegistry();

    LineContainers.setTopLevelContainerTagname(Blips.BODY_TAGNAME);
    LineRendering.registerContainer(Blips.BODY_TAGNAME, elementHandlerRegistry);
View Full Code Here

    editor.init(Editor.ROOT_REGISTRIES, KeyBindingRegistry.NONE, EditorSettings.DEFAULT);
    return editor;
  }

  private static void registerHandlers(Registries registries) {
    AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
    PainterRegistry paintRegistry = registries.getPaintRegistry();
    ElementHandlerRegistry elementHandlerRegistry = registries.getElementHandlerRegistry();

    ImageThumbnail.register(elementHandlerRegistry,
        new FakeAttachmentsManager(), null);
View Full Code Here

      LinkAttributeAugmenter augmenter) {
    PainterRegistry painterRegistry = registries.getPaintRegistry();
    LinkAnnotationHandler handler =
        new LinkAnnotationHandler(painterRegistry.getPainter());

    AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
    annotationRegistry.registerHandler(PREFIX, handler);
    // Don't register behaviour on the link/auto key, since an external agent
    // puts it there resulting in surprising behaviour mid-typing (e.g. if
    // the text is bold, the bold will suddenly get ended because of the link)
    registerBehaviour(annotationRegistry, KEY);
    registerBehaviour(annotationRegistry, MANUAL_KEY);
View Full Code Here

    editor.init(Editor.ROOT_REGISTRIES, KeyBindingRegistry.NONE, EditorSettings.DEFAULT);
    return editor;
  }

  private static void registerHandlers(Registries registries) {
    AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
    PainterRegistry paintRegistry = registries.getPaintRegistry();
    ElementHandlerRegistry elementHandlerRegistry = registries.getElementHandlerRegistry();

    ImageThumbnail.register(elementHandlerRegistry,
        new FakeAttachmentsManager(), null);
View Full Code Here

    editor.setEditing(true);
    return editor;
  }

  private static void registerHandlers(Registries registries) {
    AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
    PainterRegistry paintRegistry = registries.getPaintRegistry();
    ElementHandlerRegistry elementHandlerRegistry = registries.getElementHandlerRegistry();

    LineContainers.setTopLevelContainerTagname(Blips.BODY_TAGNAME);
    LineRendering.registerContainer(Blips.BODY_TAGNAME, elementHandlerRegistry);
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.document.util.AnnotationRegistry$Util

Copyright © 2018 www.massapicom. 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.