Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IParent


* Returns the anchor used for positioning in the destination for
* the element being renamed. For renaming, if no anchor has
* explicitly been provided, the element is anchored in the same position.
*/
private IJavaElement resolveRenameAnchor(IJavaElement element) throws JavaModelException {
  IParent parent = (IParent) element.getParent();
  IJavaElement[] children = parent.getChildren();
  for (int i = 0; i < children.length; i++) {
    IJavaElement child = children[i];
    if (child.equals(element)) {
      return child;
    }
View Full Code Here


* Returns the anchor used for positioning in the destination for
* the element being renamed. For renaming, if no anchor has
* explicitly been provided, the element is anchored in the same position.
*/
private IJavaElement resolveRenameAnchor(IJavaElement element) throws JavaModelException {
  IParent parent = (IParent) element.getParent();
  IJavaElement[] children = parent.getChildren();
  for (int i = 0; i < children.length; i++) {
    IJavaElement child = children[i];
    if (child.equals(element)) {
      return child;
    }
View Full Code Here

    ctx.fScanner.setSource(null);
  }

  private void computeFoldingStructure(FoldingStructureComputationContext ctx) {
    IParent parent = (IParent) fInput;
    try {
      if (!(fInput instanceof ISourceReference))
        return;
      String source = ((ISourceReference) fInput).getSource();
      if (source == null)
        return;

      ctx.getScanner().setSource(source.toCharArray());
      computeFoldingStructure(parent.getChildren(), ctx);
    }
    catch (JavaModelException x) {
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.IParent

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.