| org.eclipse.jdt.internal.core.JavaElement org.eclipse.jdt.internal.core.Openable
All known Subclasses: org.eclipse.jdt.internal.core.CompilationUnit, org.eclipse.jdt.internal.core.JavaProject, org.eclipse.jdt.internal.core.JavaModel, org.eclipse.jdt.internal.core.ClassFile, org.eclipse.jdt.internal.core.PackageFragment, org.eclipse.jdt.internal.core.PackageFragmentRoot,
Method Summary | |
public void | bufferChanged(BufferChangedEvent event) The buffer associated with this element has changed. | abstract protected boolean | buildStructure(OpenableElementInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) Builds this element's structure and properties in the given
info object, based on this element's current contents (reuse buffer
contents if this element has an open buffer, or resource contents
if this element does not have an open buffer). | public boolean | canBeRemovedFromCache() | public boolean | canBufferBeRemovedFromCache(IBuffer buffer) | protected void | closeBuffer() Close the buffer associated with this element, if any. | protected void | closing(Object info) This element is being closed. | protected void | codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, CompletionRequestor requestor, WorkingCopyOwner owner) | protected IJavaElement[] | codeSelect(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, int offset, int length, WorkingCopyOwner owner) | protected Object | createElementInfo() | public boolean | exists() | public String | findRecommendedLineSeparator() | protected void | generateInfos(Object info, HashMap newElements, IProgressMonitor monitor) | public IBuffer | getBuffer() Note: a buffer with no unsaved changes can be closed by the Java Model
since it has a finite number of buffers allowed open at one time. | public IBufferFactory | getBufferFactory() | protected BufferManager | getBufferManager() Returns the buffer manager for this element. | public IResource | getCorrespondingResource() Return my underlying resource. | public IOpenable | getOpenable() | public PackageFragmentRoot | getPackageFragmentRoot() | public IResource | getUnderlyingResource() | protected boolean | hasBuffer() Returns true if this element may have an associated source buffer,
otherwise false. | public boolean | hasUnsavedChanges() | public boolean | isConsistent() Subclasses must override as required. | public boolean | isOpen() | protected boolean | isSourceElement() Returns true if this represents a source element. | public boolean | isStructureKnown() | public void | makeConsistent(IProgressMonitor monitor) | public void | open(IProgressMonitor pm) | protected IBuffer | openBuffer(IProgressMonitor pm, Object info) Opens a buffer on the contents of this element, and returns
the buffer, or returns null if opening fails. | protected void | openParent(Object childInfo, HashMap newElements, IProgressMonitor pm) Open the parent element if necessary. | protected boolean | parentExists() | protected boolean | resourceExists() | public void | save(IProgressMonitor pm, boolean force) |
bufferChanged | public void bufferChanged(BufferChangedEvent event)(Code) | | The buffer associated with this element has changed. Registers
this element as being out of synch with its buffer's contents.
If the buffer has been closed, this element is set as NOT out of
synch with the contents.
See Also: IBufferChangedListener |
buildStructure | abstract protected boolean buildStructure(OpenableElementInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws JavaModelException(Code) | | Builds this element's structure and properties in the given
info object, based on this element's current contents (reuse buffer
contents if this element has an open buffer, or resource contents
if this element does not have an open buffer). Children
are placed in the given newElements table (note, this element
has already been placed in the newElements table). Returns true
if successful, or false if an error is encountered while determining
the structure of this element.
|
canBeRemovedFromCache | public boolean canBeRemovedFromCache()(Code) | | |
canBufferBeRemovedFromCache | public boolean canBufferBeRemovedFromCache(IBuffer buffer)(Code) | | |
closeBuffer | protected void closeBuffer()(Code) | | Close the buffer associated with this element, if any.
|
closing | protected void closing(Object info)(Code) | | This element is being closed. Do any necessary cleanup.
|
getBuffer | public IBuffer getBuffer() throws JavaModelException(Code) | | Note: a buffer with no unsaved changes can be closed by the Java Model
since it has a finite number of buffers allowed open at one time. If this
is the first time a request is being made for the buffer, an attempt is
made to create and fill this element's buffer. If the buffer has been
closed since it was first opened, the buffer is re-created.
See Also: IOpenable |
getBufferFactory | public IBufferFactory getBufferFactory()(Code) | | Answers the buffer factory to use for creating new buffers
|
getBufferManager | protected BufferManager getBufferManager()(Code) | | Returns the buffer manager for this element.
|
getCorrespondingResource | public IResource getCorrespondingResource() throws JavaModelException(Code) | | Return my underlying resource. Elements that may not have a
corresponding resource must override this method.
See Also: IJavaElement |
hasBuffer | protected boolean hasBuffer()(Code) | | Returns true if this element may have an associated source buffer,
otherwise false. Subclasses must override as required.
|
isConsistent | public boolean isConsistent()(Code) | | Subclasses must override as required.
See Also: IOpenable |
isSourceElement | protected boolean isSourceElement()(Code) | | Returns true if this represents a source element.
Openable source elements have an associated buffer created
when they are opened.
|
openBuffer | protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException(Code) | | Opens a buffer on the contents of this element, and returns
the buffer, or returns null if opening fails.
By default, do nothing - subclasses that have buffers
must override as required.
|
parentExists | protected boolean parentExists()(Code) | | Answers true if the parent exists (null parent is answering true)
|
resourceExists | protected boolean resourceExists()(Code) | | Returns whether the corresponding resource or associated file exists
|
Methods inherited from org.eclipse.jdt.internal.core.JavaElement | public void close() throws JavaModelException(Code)(Java Doc) abstract protected void closing(Object info) throws JavaModelException(Code)(Java Doc) abstract protected Object createElementInfo()(Code)(Java Doc) public boolean equals(Object o)(Code)(Java Doc) protected void escapeMementoName(StringBuffer buffer, String mementoName)(Code)(Java Doc) public boolean exists()(Code)(Java Doc) public ASTNode findNode(CompilationUnit ast)(Code)(Java Doc) abstract protected void generateInfos(Object info, HashMap newElements, IProgressMonitor pm) throws JavaModelException(Code)(Java Doc) public IJavaElement getAncestor(int ancestorType)(Code)(Java Doc) public String getAttachedJavadoc(IProgressMonitor monitor) throws JavaModelException(Code)(Java Doc) public IJavaElement[] getChildren() throws JavaModelException(Code)(Java Doc) public ArrayList getChildrenOfType(int type) throws JavaModelException(Code)(Java Doc) public IClassFile getClassFile()(Code)(Java Doc) public ICompilationUnit getCompilationUnit()(Code)(Java Doc) public Object getElementInfo() throws JavaModelException(Code)(Java Doc) public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException(Code)(Java Doc) public String getElementName()(Code)(Java Doc) abstract public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner owner)(Code)(Java Doc) public IJavaElement getHandleFromMemento(MementoTokenizer memento, WorkingCopyOwner owner)(Code)(Java Doc) public String getHandleIdentifier()(Code)(Java Doc) public String getHandleMemento()(Code)(Java Doc) protected void getHandleMemento(StringBuffer buff)(Code)(Java Doc) abstract protected char getHandleMementoDelimiter()(Code)(Java Doc) int getIndexOf(byte[] array, byte[] toBeFound, int start)(Code)(Java Doc) public IJavaModel getJavaModel()(Code)(Java Doc) public IJavaProject getJavaProject()(Code)(Java Doc) protected URL getJavadocBaseLocation() throws JavaModelException(Code)(Java Doc) protected static URL getLibraryJavadocLocation(IClasspathEntry entry) throws JavaModelException(Code)(Java Doc) public IOpenable getOpenable()(Code)(Java Doc) public IOpenable getOpenableParent()(Code)(Java Doc) public IJavaElement getParent()(Code)(Java Doc) public IJavaElement getPrimaryElement()(Code)(Java Doc) public IJavaElement getPrimaryElement(boolean checkOwner)(Code)(Java Doc) public ISchedulingRule getSchedulingRule()(Code)(Java Doc) protected IJavaElement getSourceElementAt(int position) throws JavaModelException(Code)(Java Doc) public SourceMapper getSourceMapper()(Code)(Java Doc) protected String getURLContents(String docUrlValue) throws JavaModelException(Code)(Java Doc) public boolean hasChildren() throws JavaModelException(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean isAncestorOf(IJavaElement e)(Code)(Java Doc) public boolean isReadOnly()(Code)(Java Doc) public JavaModelException newJavaModelException(IStatus status)(Code)(Java Doc) public JavaModelException newNotPresentException()(Code)(Java Doc) protected Object openWhenClosed(Object info, IProgressMonitor monitor) throws JavaModelException(Code)(Java Doc) public String readableName()(Code)(Java Doc) public JavaElement resolved(Binding binding)(Code)(Java Doc) protected String tabString(int tab)(Code)(Java Doc) public String toDebugString()(Code)(Java Doc) public String toString()(Code)(Java Doc) protected void toString(int tab, StringBuffer buffer)(Code)(Java Doc) protected void toStringAncestors(StringBuffer buffer)(Code)(Java Doc) protected void toStringChildren(int tab, StringBuffer buffer, Object info)(Code)(Java Doc) public Object toStringInfo(int tab, StringBuffer buffer)(Code)(Java Doc) protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo)(Code)(Java Doc) protected void toStringName(StringBuffer buffer)(Code)(Java Doc) public String toStringWithAncestors()(Code)(Java Doc) public String toStringWithAncestors(boolean showResolvedInfo)(Code)(Java Doc) public JavaElement unresolved()(Code)(Java Doc)
|
|
|