Package org.eclipse.wst.sse.ui

Examples of org.eclipse.wst.sse.ui.StructuredTextEditor$TimeOutExpired


  private void setCursorPositionToClassAttribute(MultiPageEditorPart xmlEditor, ElementImpl newBeanElement) {
    IEditorPart[] editorParts = xmlEditor.findEditors(xmlEditor.getEditorInput());

    for (IEditorPart currEditorPart : editorParts) {
      if (currEditorPart instanceof StructuredTextEditor) {
        StructuredTextEditor structuredTextEditor = (StructuredTextEditor) currEditorPart;
        int beanElementStartOffset = newBeanElement.getStartOffset();
        String newBeanTextContent = newBeanElement.getFirstStructuredDocumentRegion().getFullText();
        String classAttributeStartString = "class=\"";
        int classAttributeStartIndex = newBeanTextContent.indexOf(classAttributeStartString)
            + classAttributeStartString.length();
        if (classAttributeStartIndex > 0) {
          int documentOffset = beanElementStartOffset + classAttributeStartIndex;
          structuredTextEditor.selectAndReveal(documentOffset, 0);
          currEditorPart.setFocus();
        }
      }
    }
  }
View Full Code Here


  private void setCursorPositionToPropertyValue(XMLMultiPageEditorPart xmlEditor, ElementImpl propertyElement) {
    IEditorPart[] editorParts = xmlEditor.findEditors(xmlEditor.getEditorInput());

    for (IEditorPart currEditorPart : editorParts) {
      if (currEditorPart instanceof StructuredTextEditor) {
        StructuredTextEditor structuredTextEditor = (StructuredTextEditor) currEditorPart;
        int propertyElementStartOffset = propertyElement.getStartOffset();
        String propertyElementTextContent = propertyElement.getStartStructuredDocumentRegion().getFullText();
        String valueAttributeStartString = "value=\"";
        int valueAttributeStartIndex = propertyElementTextContent.indexOf(valueAttributeStartString)
            + valueAttributeStartString.length();
        if (valueAttributeStartIndex > 0) {
          int documentOffset = propertyElementStartOffset + valueAttributeStartIndex;
          structuredTextEditor.selectAndReveal(documentOffset, 0);
          currEditorPart.setFocus();
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.ui.StructuredTextEditor$TimeOutExpired

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.