Examples of ChildDocument


Examples of interop.wsifservice.ChildDocument

        adt[0] = new SimpleDocument_Type("petra");
        adt[1] = new SimpleDocument_Type("ant");
        asd.setSimpleDocument(adt);
        cdt.setSimpleDoc(asd);
       
        ChildDocument cd = new ChildDocument();
        asd = new ArrayOfSimpleDocument();
        adt = new SimpleDocument_Type[1];
        adt[0] = new SimpleDocument_Type("sue");
        asd.setSimpleDocument(adt);
        cd.setChildSimpleDoc(asd);
        cdt.setChild(cd);
       
        cdt.setAnAttribute("together");   

      return cdt;
View Full Code Here

Examples of interop.wsifservice.ChildDocument

        assertTrue("adt is null!!!", adt != null);
        assertTrue("adt length not 2, is: " + adt.length, adt.length == 2);
        assertTrue("child adt[0] not 'petra', is: " + adt[0], "petra".equals(adt[0].getValue()));
        assertTrue("child adt[1] not 'ant', is: " + adt[0], "ant".equals(adt[1].getValue()));
       
        ChildDocument cd = cdt.getChild();
        asd = cd.getChildSimpleDoc();
        assertTrue("child asd is null!!!", asd != null);
        adt = asd.getSimpleDocument();
        assertTrue("child adt is null!!!", adt != null);
        assertTrue("child adt length not 1, is: " + adt.length, adt.length == 1);
        assertTrue("child adt[0] not 'sue', is: " + adt[0], "sue".equals(adt[0].getValue()));
View Full Code Here

Examples of interop.wsifserviceWrapped.ChildDocument

        adt[0] = new SimpleDocument_Type("petra");
        adt[1] = new SimpleDocument_Type("ant");
        asd.setSimpleDocument(adt);
        cdt.setSimpleDoc(asd);
       
        ChildDocument cd = new ChildDocument();
        asd = new ArrayOfSimpleDocument();
        adt = new SimpleDocument_Type[1];
        adt[0] = new SimpleDocument_Type("sue");
        asd.setSimpleDocument(adt);
        cd.setChildSimpleDoc(asd);
        cdt.setChild(cd);
       
        cdt.setAnAttribute("together");   

      return cdt;
View Full Code Here

Examples of interop.wsifserviceWrapped.ChildDocument

        assertTrue("adt is null!!!", adt != null);
        assertTrue("adt length not 2, is: " + adt.length, adt.length == 2);
        assertTrue("child adt[0] not 'petra', is: " + adt[0], "petra".equals(adt[0].getValue()));
        assertTrue("child adt[1] not 'ant', is: " + adt[0], "ant".equals(adt[1].getValue()));
       
        ChildDocument cd = cdt.getChild();
        asd = cd.getChildSimpleDoc();
        assertTrue("child asd is null!!!", asd != null);
        adt = asd.getSimpleDocument();
        assertTrue("child adt is null!!!", adt != null);
        assertTrue("child adt length not 1, is: " + adt.length, adt.length == 1);
        assertTrue("child adt[0] not 'sue', is: " + adt[0], "sue".equals(adt[0].getValue()));
View Full Code Here

Examples of org.eclipse.jface.text.projection.ChildDocument

   * @since 2.1
    * @deprecated use <code>updateSlaveDocument</code> instead
   */
  protected boolean updateVisibleDocument(IDocument visibleDocument, int visibleRegionOffset, int visibleRegionLength) throws BadLocationException {
    if (visibleDocument instanceof ChildDocument) {
      ChildDocument childDocument= (ChildDocument) visibleDocument;

      IDocument document= childDocument.getParentDocument();
      int line= document.getLineOfOffset(visibleRegionOffset);
      int offset= document.getLineOffset(line);
      int length= (visibleRegionOffset - offset) + visibleRegionLength;

      Position parentRange= childDocument.getParentDocumentRange();
      if (offset != parentRange.getOffset() || length != parentRange.getLength()) {
        childDocument.setParentDocumentRange(offset, length);
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jface.text.projection.ChildDocument

   */
  protected int _getVisibleRegionOffset() {

    IDocument document= getVisibleDocument();
    if (document instanceof ChildDocument) {
      ChildDocument cdoc= (ChildDocument) document;
      return cdoc.getParentDocumentRange().getOffset();
    }

    return 0;
  }
View Full Code Here

Examples of org.eclipse.jface.text.projection.ChildDocument

   * @see ITextViewer#overlapsWithVisibleRegion(int, int)
   */
  public boolean overlapsWithVisibleRegion(int start, int length) {
    IDocument document= getVisibleDocument();
    if (document instanceof ChildDocument) {
      ChildDocument cdoc= (ChildDocument) document;
      return cdoc.getParentDocumentRange().overlapsWith(start, length);
    } else if (document != null) {
      int size= document.getLength();
      return (start >= 0 && length >= 0 && start + length <= size);
    }
    return false;
View Full Code Here

Examples of org.eclipse.jface.text.projection.ChildDocument

      ISlaveDocumentManagerExtension extension= (ISlaveDocumentManagerExtension) manager;
      IDocument[] slaves= extension.getSlaveDocuments(masterDocument);
      if (slaves != null) {
        for (int i= 0; i < slaves.length; i++) {
          if (slaves[i] instanceof ChildDocument) {
            ChildDocument child= (ChildDocument) slaves[i];
            Position p= child.getParentDocumentRange();
            try {

              if (!updateSlaveDocument(child, p.getOffset(), p.getLength()))
                child.repairLineInformation();

            } catch (BadLocationException e) {
              // ignore
            }
          }
View Full Code Here

Examples of org.eclipse.jface.text.projection.ChildDocument

   * @since 2.1
    * @deprecated use <code>updateSlaveDocument</code> instead
   */
  protected boolean updateVisibleDocument(IDocument visibleDocument, int visibleRegionOffset, int visibleRegionLength) throws BadLocationException {
    if (visibleDocument instanceof ChildDocument) {
      ChildDocument childDocument= (ChildDocument) visibleDocument;

      IDocument document= childDocument.getParentDocument();
      int line= document.getLineOfOffset(visibleRegionOffset);
      int offset= document.getLineOffset(line);
      int length= (visibleRegionOffset - offset) + visibleRegionLength;

      Position parentRange= childDocument.getParentDocumentRange();
      if (offset != parentRange.getOffset() || length != parentRange.getLength()) {
        childDocument.setParentDocumentRange(offset, length);
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jface.text.projection.ChildDocument

   */
  protected int _getVisibleRegionOffset() {

    IDocument document= getVisibleDocument();
    if (document instanceof ChildDocument) {
      ChildDocument cdoc= (ChildDocument) document;
      return cdoc.getParentDocumentRange().getOffset();
    }

    return 0;
  }
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.