org.jupe.source
Interface ISource

All Known Implementing Classes:
JavaSource

public interface ISource

Author:
Michael Pradel

Method Summary
 void checkType(java.lang.String absoluteName)
          Causes a propagation of a type from the source to the UML2 model (if it doesn't already exist there).
 org.eclipse.core.resources.IFile getClassifierFromSource(java.lang.String absoluteName)
          Checks if the given classifier exists in the source code.
 org.eclipse.core.resources.IFolder getPackageFromSource(java.lang.String absoluteName)
          Checks if the given package exists in the source code.
 boolean isStringType(java.lang.String absoluteName)
          Checks if the given absolute name of a type corresponds to the a String in this language (e.g. java.lang.String in Java).
 java.util.List<ITypeContentProposal> resolveType(java.lang.String contents, int position)
          Searches for possible resolutions of the given String to a type name that is in the projects classpath.
 boolean typeExists(java.lang.String absoluteName)
          Checks whether a type exists in the source code or included libraries.
 

Method Detail

getPackageFromSource

org.eclipse.core.resources.IFolder getPackageFromSource(java.lang.String absoluteName)
Checks if the given package exists in the source code.

Parameters:
absoluteName - The absolute name if the package..
Returns:
The folder that contains the package or null if it doesn't exist in the source.

getClassifierFromSource

org.eclipse.core.resources.IFile getClassifierFromSource(java.lang.String absoluteName)
Checks if the given classifier exists in the source code.

Parameters:
absoluteName - The absolute name if the classifier.
Returns:
The file that contains the classifier or null if it doesn't exist in the source.

checkType

void checkType(java.lang.String absoluteName)
Causes a propagation of a type from the source to the UML2 model (if it doesn't already exist there). After calling this method for any type in the source or included libraries, it will be included in the project's UML2 model.

Parameters:
absoluteName - The absolute name of the type that should be propagated to the UML2 model.

typeExists

boolean typeExists(java.lang.String absoluteName)
Checks whether a type exists in the source code or included libraries.

Parameters:
absoluteName - The type that should be tested.
Returns:
True, if the given type exists in the source code or included libraries, false otherwise.

resolveType

java.util.List<ITypeContentProposal> resolveType(java.lang.String contents,
                                                 int position)
Searches for possible resolutions of the given String to a type name that is in the projects classpath. Search is done in the source code and inlcuded libraries.

Parameters:
contents - The beginning of a type name.
position - The current cursor position in the String.
Returns:
List of proposals (absolute names) of types in the source and included libraries that match the given String.

isStringType

boolean isStringType(java.lang.String absoluteName)
Checks if the given absolute name of a type corresponds to the a String in this language (e.g. java.lang.String in Java).

Parameters:
absoluteName - Absolute name of a type.
Returns:
True if it's String, false otherwise.