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
Answertopia.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.containers
Class ContainerSourceContainer


java.lang.Object
  extended by 

org.eclipse.core.runtime.PlatformObject
      extended by 

org.eclipse.debug.core.sourcelookup.containers.AbstractSourceContainer
          extended by 

org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer
              extended by 
org.eclipse.debug.core.sourcelookup.containers.ContainerSourceContainer
All Implemented Interfaces:
IAdaptable, ISourceContainer
Direct Known Subclasses:
FolderSourceContainer, ProjectSourceContainer

public abstract class ContainerSourceContainer
extends CompositeSourceContainer

A source container for a container in the workspace. Source elements are searched for within this container and optionally nested containers.

Names specified in findSourceElements method can be simple or qualified. When a name is qualified, a file will be searched for relative to this container, and optionally nested containers.

Since:
3.2
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
 
Fields inherited from class org.eclipse.debug.core.sourcelookup.containers. AbstractSourceContainer
EMPTY
 
Constructor Summary
ContainerSourceContainer ( IContainer container, boolean subfolders)
          Constructs a source container on the given workspace container.
 
Method Summary
protected   ISourceContainer[] createSourceContainers ()
          Creates the source containers in this composite container.
 boolean equals ( Object obj)
           
  Object[] findSourceElements ( String name)
          Returns a collection of source elements in this container corresponding to the given name.
  IContainer getContainer ()
          Returns the workspace container this source container is rooted at.
  String getName ()
          The name of this source container that can be used for presentation purposes.
 int hashCode ()
           
 boolean isComposite ()
          Returns whether this container is a composite container.
 
Methods inherited from class org.eclipse.debug.core.sourcelookup.containers. CompositeSourceContainer
dispose, findSourceElements, getSourceContainers
 
Methods inherited from class org.eclipse.debug.core.sourcelookup.containers. AbstractSourceContainer
abort, getDirector, getSourceContainerType, init, isFindDuplicates, warn
 
Methods inherited from class org.eclipse.core.runtime. PlatformObject
getAdapter
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.debug.core.sourcelookup. ISourceContainer
getType
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 

Constructor Detail

ContainerSourceContainer

public ContainerSourceContainer(
IContainer container,
                                boolean subfolders)
Constructs a source container on the given workspace container.

Parameters:
container - the container to search for source in
subfolders - whether nested folders should be searched for source elements
Method Detail

getContainer

public 
IContainer getContainer()
Returns the workspace container this source container is rooted at.

Returns:
the workspace container this source container is rooted at

findSourceElements

public 
Object[] findSourceElements(
String name)
                            throws 
CoreException
Description copied from interface: ISourceContainer
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).

Specified by:
findSourceElements in interface ISourceContainer
Overrides:
findSourceElements in class CompositeSourceContainer
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

public 
String getName()
Description copied from interface: ISourceContainer
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

equals

public boolean equals(
Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isComposite

public boolean isComposite()
Description copied from interface: ISourceContainer
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.

Specified by:
isComposite in interface ISourceContainer
Overrides:
isComposite in class CompositeSourceContainer
Returns:
whether this container is a composite container

createSourceContainers

protected 
ISourceContainer[] createSourceContainers()
                                             throws 
CoreException
Description copied from class: CompositeSourceContainer
Creates the source containers in this composite container. Subclasses should override this methods.

Specified by:
createSourceContainers in class CompositeSourceContainer
Throws:
CoreException - if unable to create the containers

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