Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.debug.core.sourcelookup
Interface ISourceContainer

All Superinterfaces:
IAdaptable
All Known Implementing Classes:
AbstractSourceContainer, ArchiveSourceContainer, CompositeSourceContainer, ContainerSourceContainer, DefaultSourceContainer, DirectorySourceContainer, ExternalArchiveSourceContainer, FolderSourceContainer, ProjectSourceContainer, WorkingSetSourceContainer, WorkspaceSourceContainer

public interface ISourceContainer
extends IAdaptable

A source container is a container of source code. A source container is capable of searching for source elements by name. For example, a source container may be a project or a directory capable of searching for files by name. A source container may be a composite container - i.e. contain other source containers.

When a source container is created and added to a source director, the source container's dispose() method is called when the source director is disposed. Clients creating source containers for other purposes must dispose of containers themselves.

Clients may implement this interface.

Since:
3.0
See Also:
ISourceLookupParticipant, ISourceContainerType

Method Summary
 void dispose ()
          Disposes this source container.
  Object[] findSourceElements ( String name)
          Returns a collection of source elements in this container corresponding to the given name.
  String getName ()
          The name of this source container that can be used for presentation purposes.
  ISourceContainer[] getSourceContainers ()
          Returns the source containers this container is composed of.
  ISourceContainerType getType ()
          Returns this container's type.
 void init ( ISourceLookupDirector director)
          Notification this source container has been added to the given source lookup director.
 boolean isComposite ()
          Returns whether this container is a composite container.
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 

Method Detail

init

void init(
ISourceLookupDirector director)
Notification this source container has been added to the given source lookup director.

Parameters:
director - the director this container has been added to

findSourceElements

Object[] findSourceElements(
String name)
                            throws 
CoreException
Returns a collection of source elements in this container corresponding to the given name. Returns an empty collection if no source elements are found. This source container's source lookup director specifies if duplicate source elements should be searched for, via isFindDuplicates(). When false the returned collection should contain at most one source element. If this is a composite container, the containers contained by this container are also searched.

The format of the given name is implementation specific but generally conforms to the format of a file name. If a source container does not recognize the name format provided, an empty collection should be returned. A source container may or may not require names to be fully qualified (i.e. be qualified with directory names).

Parameters:
name - the name of the source element to search for
Returns:
a collection of source elements corresponding to the given name
Throws:
CoreException - if an exception occurs while searching for source elements

getName

String getName()
The name of this source container that can be used for presentation purposes. For example, the name of a project.

Returns:
the name of this source container

getSourceContainers

ISourceContainer[] getSourceContainers()
                                       throws 
CoreException
Returns the source containers this container is composed of. An empty collection is returned if this container is not a composite container. For example, a workspace source container may be composed of project source containers.

Returns:
the source containers this container is composed of, possibly an empty collection
Throws:
CoreException - if unable to retrieve source containers

isComposite

boolean isComposite()
Returns whether this container is a composite container. A composite container is composed of other source containers. For example, a workspace source container may be composed of project source containers.

Returns:
whether this container is a composite container

getType

ISourceContainerType getType()
Returns this container's type.

Returns:
this container's type

dispose

void dispose()
Disposes this source container. This method is called when the source director associated with this source container is disposed.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire