InvalidElement Class

com.bea.ide.lang.java.element
InvalidElement Class

public class InvalidElement

    extends DefaultSourceElement

An InvalidElement object may be inserted into the structure tree if the compiler requests construction of an element type that is not recognized by the builders currently loaded by the IDE. This occurs most commonly when the a compiler language extension has been loaded without its corresponding IDE extension.


Hierarchy
Object
  DefaultElement
    DefaultTreeElement
      DefaultDocumentElement
        DefaultSourceElement
          InvalidElement
All Implemented Interfaces

IDocumentElement, IElement, ISourceElement, IStructureFeature.IStructureNode, ITreeElement

Nested Class Summary

 
Nested classes from  com.bea.ide.sourceeditor.element.DefaultSourceElement
DefaultSourceElement.CompilerPropertyDescriptor, DefaultSourceElement.DefaultAuthorElement, DefaultSourceElement.StaticCompilerPropertyDescriptor, DefaultSourceElement.StickyRange
 

Field Summary

   
Fields from  com.bea.ide.sourceeditor.element.DefaultSourceElement
_range, PROP_NAME, PROP_VALUE
 
Fields from  com.bea.ide.element.DefaultTreeElement
_parent, _vChildren
 
Fields from interface com.bea.ide.sourceeditor.element.ISourceElement
STATUS_IN_TREE, STATUS_NOT_IN_TREE, STATUS_REMOVED_FROM_TREE
 

Constructor Summary

InvalidElement(Object cookie, IStructureFeature.StructureCode structureCode)

Creates a new InvalidElement.
 

Method Summary

public DefaultSourceElement.CompilerPropertyDescriptor[]
getDefaultPropertyDescriptors()
InvalidElement objects have no properties.
public IStructureFeature.StructureCode
getTypeCode()
This method returns a code used by the compiler to identify the type of this element.
public void
setProperty(String sProp, Object value)
'setProperty' does nothing when called on an InvalidElement.
 
Methods from  com.bea.ide.sourceeditor.element.DefaultSourceElement
addChild, createAuthorNode, debugDump, equals, getChildrenByClass, getClassLoader, getCookie, getDiagnostics, getGroup, getInstanceName, getProperty, getPropertyCode, getPropertyDescriptors, getPropertySourceRange, getPropertySourceRanges, getPropertySourceText, getPropertySourceText, getRange, getRange, getRangePrefetchProperties, getStatus, initializeRange, initializeRange, insertChild, isAuthorProperty, markRemovedFromTree, mergeElements, mergeFrom, propertyModified, removeChild, removeChild, replaceChild, requestAddChild, requestAddChild, requestRemoveChild, requestSetProperty, setStatus
 
Methods from  com.bea.ide.document.DefaultDocumentElement
addChild, getDocument, setDocument
 
Methods from  com.bea.ide.element.DefaultTreeElement
addChild, children, getChild, getChildCount, getParent, removeChild
 
Methods from  com.bea.ide.element.DefaultElement
getProperty, getPropertyDescriptors, setProperty
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.document.IDocumentElement
getDocument
 
Methods from interface com.bea.ide.element.IElement
getProperty, getPropertyDescriptors, setProperty
 
Methods from interface com.bea.ide.sourceeditor.element.ISourceElement
createAuthorNode, getCookie, getDiagnostics, getPropertyCode, getRange, getStatus, mergeFrom, requestAddChild, requestAddChild, requestRemoveChild, requestSetProperty
 
Methods from interface com.bea.compiler.feature.IStructureFeature.IStructureNode
getCookie, getTypeCode
 
Methods from interface com.bea.ide.element.ITreeElement
children, getChild, getChildCount, getParent
 

Constructor Detail

InvalidElement

public InvalidElement(Object cookie, 
                      IStructureFeature.StructureCode structureCode)
Creates a new InvalidElement. This should generally only be done by a ILanguageBuilder implementation.
 

Method Detail

getDefaultPropertyDescriptors() Method

public DefaultSourceElement.CompilerPropertyDescriptor[] getDefaultPropertyDescriptors()
InvalidElement objects have no properties.

Overrides
DefaultSourceElement.getDefaultPropertyDescriptors()

Returns

an empty property descriptor array.

getTypeCode() Method

public IStructureFeature.StructureCode getTypeCode()
Description copied from DefaultSourceElement.getTypeCode()
This method returns a code used by the compiler to identify the type of this element. This method should not be called directly, since the return value isn't useful outside of the compiler.

Overrides
DefaultSourceElement.getTypeCode()

Returns

always returns null, since this typec ode wasn't recognized.

setProperty(String, Object) Method

public void setProperty(String sProp, 
                        Object value)
'setProperty' does nothing when called on an InvalidElement. Elements of this type cannot have properties.

Overrides
DefaultSourceElement.setProperty(String, Object)

Parameters

sProp
The property to set. This property must be defined in this element's property descriptors.
value
The new value of the property