EGF Engine
Release 0.1.0

org.eclipse.egf.pde.pattern.reader
Class WorkspacePatternExtensionReader

java.lang.Object
  extended by org.eclipse.egf.pde.reader.PdeAbstractReader
      extended by org.eclipse.egf.pde.pattern.reader.WorkspacePatternExtensionReader
All Implemented Interfaces:
IPatternExtensionReader

public class WorkspacePatternExtensionReader
extends PdeAbstractReader
implements IPatternExtensionReader

Read pattern extensions from workspace projects.


Nested Class Summary
protected  class WorkspacePatternExtensionReader.CreatePatternExtensionDescriptorOperation
          Pattern condition descriptor provider.
 
Constructor Summary
WorkspacePatternExtensionReader()
           
 
Method Summary
 IDescriptor getPatternLibraries()
          Get all root library descriptors.
 IDescriptor getPatternLibraries(IProject project_p)
          Get pattern root libraries for given project.
 IDescriptor getPatternLibraries(String fcId_p)
          Get all root library descriptors for given factory component id.
 IDescriptor getPatternLibrary(String libraryFullId_p)
          Get library descriptor from its full id.
 IDescriptor readPatternExtension(IProject project_p, String libraryFullId_p)
          Read pattern condition extensions
 
Methods inherited from class org.eclipse.egf.pde.reader.PdeAbstractReader
readDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspacePatternExtensionReader

public WorkspacePatternExtensionReader()
Method Detail

getPatternLibrary

public IDescriptor getPatternLibrary(String libraryFullId_p)
Description copied from interface: IPatternExtensionReader
Get library descriptor from its full id.
Must be a root library, that is not one contained in another one.
So as to get such libraries, user should be giving the root containing library id and then parse resulting descriptor to reach expected one.
If so, the use of PatternSeeker from pattern plug-in is always recommended.

Specified by:
getPatternLibrary in interface IPatternExtensionReader
Parameters:
libraryFullId_p - Can't be null.
Returns:
Null if no root library with given id could be found.
See Also:
IPatternExtensionReader.getPatternLibrary(java.lang.String)

getPatternLibraries

public IDescriptor getPatternLibraries()
Description copied from interface: IPatternExtensionReader
Get all root library descriptors.
See IPatternExtensionReader.getPatternLibrary(String) for description of a root library.

Specified by:
getPatternLibraries in interface IPatternExtensionReader
Returns:
A descriptor that contains an arbitrary number of container descriptors before reaching root library descriptors.
So as to use this result properly, users should test the descriptor type by calling IDescriptor.getValue(String) with parameter IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_TYPE.
If returned value is different from IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_LIBRARY then a library descriptor is not reached yet.
The first descriptor that returns a correct type is indeed a root library descriptor.
It does not have any children, if none could be found.
See Also:
IPatternExtensionReader.getPatternLibraries()

getPatternLibraries

public IDescriptor getPatternLibraries(String fcId_p)
Description copied from interface: IPatternExtensionReader
Get all root library descriptors for given factory component id.
See IPatternExtensionReader.getPatternLibrary(String) for description of a root library.

Specified by:
getPatternLibraries in interface IPatternExtensionReader
Parameters:
fcId_p - The factory component id.
Returns:
A descriptor that contains an arbitrary number of container descriptors before reaching root library descriptors.
So as to use this result properly, users should test the descriptor type by calling IDescriptor.getValue(String) with parameter IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_TYPE.
If returned value is different from IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_LIBRARY then a library descriptor is not reached yet.
The first descriptor that returns a correct type is indeed a root library descriptor.
It does not have any children, if none could be found.
See Also:
IPatternExtensionReader.getPatternLibraries(java.lang.String)

getPatternLibraries

public IDescriptor getPatternLibraries(IProject project_p)
Get pattern root libraries for given project.
Read IPatternExtensionReader.getPatternLibraries() for details.

Specified by:
getPatternLibraries in interface IPatternExtensionReader
Parameters:
project_p -
Returns:
A not null, but possibly empty, IDescriptor.

readPatternExtension

public IDescriptor readPatternExtension(IProject project_p,
                                        String libraryFullId_p)
Read pattern condition extensions

Parameters:
project_p -
Returns:

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.