Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ltk.internal.ui.refactoring
Class PseudoJavaChangeElement  view PseudoJavaChangeElement download PseudoJavaChangeElement.java

java.lang.Object
  extended byorg.eclipse.ltk.internal.ui.refactoring.ChangeElement
      extended byorg.eclipse.ltk.internal.ui.refactoring.PseudoJavaChangeElement

class PseudoJavaChangeElement
extends ChangeElement

TODO should remove dependency to JDT/Core (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=61312)


Field Summary
protected static int[][] ACTIVATION_TABLE
           
static int ACTIVE
          Flage indicating that the change element is active
protected static ChangeElement[] EMPTY_CHILDREN
           
private  java.util.List fChildren
           
private  org.eclipse.jdt.core.IJavaElement fJavaElement
           
static int INACTIVE
          Flag indicating that the change element isn't active
static int PARTLY_ACTIVE
          Flag indicating that the change element is partly active (some children are inactive)
 
Constructor Summary
PseudoJavaChangeElement(ChangeElement parent, org.eclipse.jdt.core.IJavaElement element)
           
 
Method Summary
 void addChild(PseudoJavaChangeElement child)
          Adds the given PseudoJavaChangeElement as a child to this PseudoJavaChangeElement
 void addChild(TextEditChangeElement child)
          Adds the given TextEditChangeElement as a child to this PseudoJavaChangeElement
private  java.util.List collectTextEditChanges()
           
private  void doAddChild(ChangeElement child)
           
 void feedInput(org.eclipse.ltk.ui.refactoring.IChangePreviewViewer viewer)
           
 int getActive()
          Returns the activation status of this ChangeElement.
 org.eclipse.ltk.core.refactoring.Change getChange()
          Returns the change directly associated with this change element or if the element isn't associated with a change.
 ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor()
          Returns the viewer descriptor used to present a preview of this change element
 ChangeElement[] getChildren()
          Returns the change element's children.
private  DefaultChangeElement getDefaultChangeElement()
           
 org.eclipse.jdt.core.IJavaElement getJavaElement()
          Returns the Java element.
 ChangeElement getParent()
          Returns the change element's parent.
 org.eclipse.jface.text.IRegion getTextRange()
           
 void setActive(boolean active)
          Sets the activation status for this ChangeElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fJavaElement

private org.eclipse.jdt.core.IJavaElement fJavaElement

fChildren

private java.util.List fChildren

INACTIVE

public static final int INACTIVE
Flag indicating that the change element isn't active

See Also:
Constant Field Values

PARTLY_ACTIVE

public static final int PARTLY_ACTIVE
Flag indicating that the change element is partly active (some children are inactive)

See Also:
Constant Field Values

ACTIVE

public static final int ACTIVE
Flage indicating that the change element is active

See Also:
Constant Field Values

ACTIVATION_TABLE

protected static final int[][] ACTIVATION_TABLE

EMPTY_CHILDREN

protected static final ChangeElement[] EMPTY_CHILDREN
Constructor Detail

PseudoJavaChangeElement

public PseudoJavaChangeElement(ChangeElement parent,
                               org.eclipse.jdt.core.IJavaElement element)
Method Detail

getJavaElement

public org.eclipse.jdt.core.IJavaElement getJavaElement()
Returns the Java element.


getChange

public org.eclipse.ltk.core.refactoring.Change getChange()
Description copied from class: ChangeElement
Returns the change directly associated with this change element or if the element isn't associated with a change.

Specified by:
getChange in class ChangeElement

getChangePreviewViewerDescriptor

public ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor()
                                                               throws org.eclipse.core.runtime.CoreException
Description copied from class: ChangeElement
Returns the viewer descriptor used to present a preview of this change element

Specified by:
getChangePreviewViewerDescriptor in class ChangeElement

feedInput

public void feedInput(org.eclipse.ltk.ui.refactoring.IChangePreviewViewer viewer)
               throws org.eclipse.core.runtime.CoreException
Specified by:
feedInput in class ChangeElement

setActive

public void setActive(boolean active)
Description copied from class: ChangeElement
Sets the activation status for this ChangeElement. When a change element is not active, then executing it is expected to do nothing.

Specified by:
setActive in class ChangeElement

getActive

public int getActive()
Description copied from class: ChangeElement
Returns the activation status of this ChangeElement. Returns one of the following values: IChange.ACTIVE if the node and all its children are active, IChange.INACTIVE if all children and the node itself is inactive, and IChange.PARTLy_ACTIVE otherwise.

Specified by:
getActive in class ChangeElement

getChildren

public ChangeElement[] getChildren()
Description copied from class: ChangeElement
Returns the change element's children.

Specified by:
getChildren in class ChangeElement

addChild

public void addChild(TextEditChangeElement child)
Adds the given TextEditChangeElement as a child to this PseudoJavaChangeElement


addChild

public void addChild(PseudoJavaChangeElement child)
Adds the given PseudoJavaChangeElement as a child to this PseudoJavaChangeElement


doAddChild

private void doAddChild(ChangeElement child)

getDefaultChangeElement

private DefaultChangeElement getDefaultChangeElement()

collectTextEditChanges

private java.util.List collectTextEditChanges()

getTextRange

public org.eclipse.jface.text.IRegion getTextRange()
                                            throws org.eclipse.core.runtime.CoreException

getParent

public ChangeElement getParent()
Returns the change element's parent.