Examples of FuzzyXMLNode


Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

      return new Object[0];
    }
   
    public Object getParent(Object element) {
      if(element instanceof FuzzyXMLNode){
        FuzzyXMLNode parent = ((FuzzyXMLNode)element).getParentNode();
        if(parent==null){
          return root.getChildren()[0];
        }
        return parent;
      }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

   */
  public void outlineNodeCollapsed(String target) {
    if (!_collapsedIDs.contains(target)) {
      _collapsedIDs.add(target);

      FuzzyXMLNode selectedNode = _idToNodeMap.get(target);
      ProjectionAnnotationModel model = ((ProjectionViewer) _editor.getViewer()).getProjectionAnnotationModel();
      ProjectionAnnotation lastAnnotation = getAnnotationForNode(selectedNode, model);
      if (lastAnnotation != null) {
        model.collapse(lastAnnotation);
      }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

   */
  public void outlineNodeExpanded(String target) {
    if (_collapsedIDs.contains(target)) {
      _collapsedIDs.remove(target);

      FuzzyXMLNode selectedNode = _idToNodeMap.get(target);
      ProjectionAnnotationModel model = ((ProjectionViewer) _editor.getViewer()).getProjectionAnnotationModel();
      ProjectionAnnotation lastAnnotation = getAnnotationForNode(selectedNode, model);
      if (lastAnnotation != null) {
        model.expand(lastAnnotation);
      }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

   * Called when the user clicks on an outline node.
   *
   * @param target the id of the target node
   */
  public void outlineNodeSelected(String target) {
    FuzzyXMLNode selectedNode = _idToNodeMap.get(target);
    _selection = new StructuredSelection(selectedNode);
    SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, _selection);
    for (ISelectionChangedListener listener : _selectionChangedListeners) {
      listener.selectionChanged(selectionChangedEvent);
    }
    _editor.selectAndReveal(selectedNode.getOffset(), selectedNode.getLength());
    _editor.getViewer().getTextWidget().setFocus();
  }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

      if (annotations != null) {
        for (Annotation annotation : annotations) {
          if (annotation instanceof ProjectionAnnotation) {
            ProjectionAnnotation projectionAnnotation = (ProjectionAnnotation) annotation;
            Position annotationPosition = model.getPosition(annotation);
            FuzzyXMLNode node = _doc.getElementByOffset(annotationPosition.getOffset());
            String nodeID = _nodeToIDMap.get(node);
            if (nodeID != null) {
              if (projectionAnnotation.isCollapsed()) {
                _browser.execute("collapse('" + nodeID + "');");
              }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

      return new Object[0];
    }

    public Object getParent(Object element) {
      if (element instanceof FuzzyXMLNode) {
        FuzzyXMLNode parent = ((FuzzyXMLNode) element).getParentNode();
        if (parent == null) {
          return root.getChildren()[0];
        }
        return parent;
      }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

  }
 
  /** Utility methods **/
 
  public static boolean isNonBreaking(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLFormat && ((FuzzyXMLFormat)_node).isNonBreaking());
  }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

  public static boolean isBreaking(FuzzyXMLNode node) {
    return !isNonBreaking(node);
  }
   
  public static boolean isHidden(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLFormat && ((FuzzyXMLFormat)_node).isHidden());
  }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

  public static boolean isText(FuzzyXMLNode node) {
    return unwrap(node) instanceof FuzzyXMLText;
  }
 
  public static boolean hasCloseTag(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    return (_node instanceof FuzzyXMLElement && ((FuzzyXMLElement)_node).hasCloseTag());
  }
View Full Code Here

Examples of jp.aonir.fuzzyxml.FuzzyXMLNode

  public static boolean isMultiLine(FuzzyXMLNode node) {
    return getValue(node).contains("\n");
  }
 
  public static boolean hasLineBreaks(FuzzyXMLNode node) {
    FuzzyXMLNode _node = unwrap(node);
    if (_node instanceof FuzzyXMLText) {
      return ((FuzzyXMLText)_node).hasLineBreaks();
    }
    return getValue(_node).contains("\n");
  }
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.