Carbide.c++

com.nokia.carbide.cpp.epoc.engine.model.mmp
Interface IMMPView

All Superinterfaces:
IData<IMMPView>, IMMPData, IView

public interface IMMPView
extends IView, IMMPData

The view interface for MMP models.

This view provides generic accessors to high-level data types in order to hide some of the more onerous aspects of the syntax.

Note that APIs returning IPath return partially canonical data. If a relative path is returned which doesn't start with "+", this is guaranteed to be project-relative (or relative to IViewParserConfiguration#getProjectPath()).

Otherwise, absolute paths or paths starting with "+" are either actual filesystem paths or EPOCROOT-relative paths. Use the MMPViewPathHelper class in another plugin for this. Don't rely on getting real information from an "absolute" path. OTOH, note that this API will not change the form of such absolute(-like) paths so they are preserved on read and write.

When a view is committed, the high-level types are synchronized with the MMP DOM, attempting to maintain the invariant that changes to existing MMP statements are made in-place while new statements are added to new statements (outside #if blocks, if necessary).


Method Summary
 IMMPAIFInfo createMMPAIFInfo()
          create an empty, invalid AIF info instance (not set)
 IMMPBitmap createMMPBitmap()
          create a new, empty, invalid bitmap entry (not added)
 IMMPResource createMMPResource()
          create a new, empty, invalid MMP resource (not added).
 java.util.List<IMMPAIFInfo> getAifs()
          access/modify; may be null
 java.util.List<java.lang.String> getASSPLibraries()
          access/modify ASSP libraries; with case-insensitive membership tests Libraries are simple filenames with the .lib extension in all platforms.
 java.util.List<IMMPBitmap> getBitmaps()
          Access/modify bitmaps from the unified set of START BITMAP blocks.
 IMMPData getData()
          Get a copy of the current MMP data, to which any changes are ignored.
 java.util.List<java.lang.String> getDebugLibraries()
          access/modify debug libraries; with case-insensitive membership tests Libraries are simple filenames with the .lib extension in all platforms.
 IPath getDefFile()
          Get the DEFFILE path.
 java.util.List<IPath> getDocuments()
          Access/modify the paths to documents.
 IPath[] getEffectiveSourcePaths()
          Get the array of paths referenced in current sources, resources, and documents, which are likely to become SOURCEPATH statements.
 java.util.Set<EMMPStatement> getFlags()
          Access/modify flags set in MMP.
 java.util.List<EMMPLanguage> getLanguages()
          access/modify the old-style LANG statement.
 java.util.List<java.lang.String> getLibraries()
          access/modify libraries; with case-insensitive membership tests Libraries are simple filenames with the .lib extension in all platforms.
 java.util.Map<java.lang.String,java.lang.String> getLinkerOptions()
          Access/modify the LINKEROPTION options for given toolchains.
 java.util.Map<EMMPStatement,java.util.List<java.lang.String>> getListArgumentSettings()
          Access/modify list values for list argument statements in MMP; with case-insensitive membership tests.
 IMMPModel getMMPModel()
          get the owning MMP (convenience for IView#getModel())
 java.util.List<IMultiImageSource> getMultiImageSources()
           
 java.util.Map<java.lang.String,java.lang.String> getOptions()
          Access/modify the OPTION options for given toolchains.
 IPath[] getRealSourcePaths()
          Get the paths provided by SOURCEPATH statements during the last parse.
 java.util.Map<java.lang.String,java.lang.String> getReplaceOptions()
          Access/modify the OPTION_REPLACE options for given toolchains.
 java.util.List<IMMPResource> getResourceBlocks()
          access/modify the new-style resource blocks
 java.util.Map<EMMPStatement,java.lang.String> getSingleArgumentSettings()
          Access/modify values of single-argument statements in MMP.
 java.util.List<IPath> getSources()
          Access/modify the paths of sources.
 java.util.List<java.lang.String> getStaticLibraries()
          access/modify static libraries; with case-insensitive membership tests Libraries are simple filenames with the .lib extension in all platforms.
 java.util.List<IPath> getSystemIncludes()
          access/modify paths of system includes
 java.util.List<IPath> getSystemResources()
          access/modify the old-style SYSTEMRESOURCE statement.
 IPath getTargetFilePath()
          Get the combined TARGETPATH + TARGET path.
 java.lang.String getUid2()
          Get the UID2 value.
 java.lang.String getUid3()
          Get the UID3 value.
 java.util.List<IPath> getUserIncludes()
          access/modify paths of includes.
 java.util.List<IPath> getUserResources()
          access/modify the old-style RESOURCE statement.
 java.util.List<java.lang.String> getWin32Libraries()
          access/modify Win32 libraries; with case-insensitive membership tests Libraries are simple filenames with the .lib extension in all platforms.
 boolean isDefFileInFixedDirectory()
          Tell if the DEFFILE setting refers to a fixed directory, e.g., if it has a path and is not a bare filename.
 void setAifs(java.util.List<IMMPAIFInfo> aifs)
          set the AIF info; may be null
 void setBitmaps(java.util.List<IMMPBitmap> bitmaps)
          set the bitmap info
 void setDefFile(IPath path, boolean isFixedDirectory)
          Set the DEFFILE path.
 void setLinkerOptions(java.util.Map<java.lang.String,java.lang.String> options)
          Set the LINKEROPTION options for given toolchains.
 void setOptions(java.util.Map<java.lang.String,java.lang.String> options)
          Set the OPTION options for given toolchains.
 void setReplaceOptions(java.util.Map<java.lang.String,java.lang.String> options)
          Set the OPTION_REPLACE options for given toolchains.
 void setTargetFilePath(IPath path)
          Set the combined target path (TARGETPATH + TARGET)
 void setUid2(int value)
          Set the UID2 value.
 void setUid2(java.lang.String uid)
          Set the UID2 value.
 void setUid3(int value)
          Set the UID3 value.
 void setUid3(java.lang.String uid)
          Set the UID3 value.
 
Methods inherited from interface com.nokia.carbide.cpp.epoc.engine.model.IView
addListener, commit, convertModelToProjectPath, convertProjectToModelPath, dispose, forceSynchronized, getMessages, getModel, getProjectPath, getReferencedFiles, getViewConfiguration, markUnsynchronized, merge, needsSynchonize, removeListener, revert, setDebug
 
Methods inherited from interface com.nokia.carbide.cpp.epoc.engine.model.IData
getModelPath, getProjectPath, getReferencedFiles
 

Method Detail

getMMPModel

IMMPModel getMMPModel()
get the owning MMP (convenience for IView#getModel())


getTargetFilePath

IPath getTargetFilePath()
Get the combined TARGETPATH + TARGET path.

Specified by:
getTargetFilePath in interface IMMPData
Returns:
path to the file
See Also:
for individual TARGETPATH, TARGET settings

setTargetFilePath

void setTargetFilePath(IPath path)
Set the combined target path (TARGETPATH + TARGET)

See Also:
for individual TARGETPATH, TARGET settings

getSources

java.util.List<IPath> getSources()
Access/modify the paths of sources.

This list provides unified access to source files. SOURCEPATH and SOURCE statements are managed behind the scenes.

Specified by:
getSources in interface IMMPData
See Also:
MMPViewPathHelper

getRealSourcePaths

IPath[] getRealSourcePaths()
Get the paths provided by SOURCEPATH statements during the last parse.

This is not the same as all the directories actually referenced (e.g. 'SOURCE subdir\file.cpp' does not SOURCEPATH for 'subdir').

There is no need to explicitly manage source paths; they will be generated automatically based on the paths referenced in sources, resources, and documents.

Specified by:
getRealSourcePaths in interface IMMPData
See Also:
getEffectiveSourcePaths(), getSources(), getUserResources(), getSystemResources(), getDocuments()

getEffectiveSourcePaths

IPath[] getEffectiveSourcePaths()
Get the array of paths referenced in current sources, resources, and documents, which are likely to become SOURCEPATH statements.

This includes every distinct directory referenced (e.g. a 'SOURCE subdir\file.cpp' statement brings in a new effective directory for 'subdir').

This is a copy of information derived from the current sources at the time of the query.

There is no need to explicitly manage source paths; they will be generated automatically based on the paths referenced in sources, resources, and documents.

Specified by:
getEffectiveSourcePaths in interface IMMPData
See Also:
getRealSourcePaths(), getSources(), getUserResources(), getSystemResources(), getDocuments()

getUserIncludes

java.util.List<IPath> getUserIncludes()
access/modify paths of includes.

Specified by:
getUserIncludes in interface IMMPData

getSystemIncludes

java.util.List<IPath> getSystemIncludes()
access/modify paths of system includes

Specified by:
getSystemIncludes in interface IMMPData

getLibraries

java.util.List<java.lang.String> getLibraries()
access/modify libraries; with case-insensitive membership tests

Libraries are simple filenames with the .lib extension in all platforms. (Technically these may also be relative paths.)

In makmake, this list also contributes to the debug library list. This API does not represent that. This list is independent of the debug libraries list.

Specified by:
getLibraries in interface IMMPData
See Also:
getDebugLibraries()

getDebugLibraries

java.util.List<java.lang.String> getDebugLibraries()
access/modify debug libraries; with case-insensitive membership tests

Libraries are simple filenames with the .lib extension in all platforms. (Technically these may also be relative paths.)

Note, makmake treats the debug libraries as an addition to normal libraries. This API doesn't represent that. This is just the list of libraries in DEBUGLIBRARY statements.

Specified by:
getDebugLibraries in interface IMMPData

getStaticLibraries

java.util.List<java.lang.String> getStaticLibraries()
access/modify static libraries; with case-insensitive membership tests

Libraries are simple filenames with the .lib extension in all platforms. (Technically these may also be relative paths.)

Specified by:
getStaticLibraries in interface IMMPData

getWin32Libraries

java.util.List<java.lang.String> getWin32Libraries()
access/modify Win32 libraries; with case-insensitive membership tests

Libraries are simple filenames with the .lib extension in all platforms. (Technically these may also be relative paths.)

Specified by:
getWin32Libraries in interface IMMPData

getASSPLibraries

java.util.List<java.lang.String> getASSPLibraries()
access/modify ASSP libraries; with case-insensitive membership tests

Libraries are simple filenames with the .lib extension in all platforms. (Technically these may also be relative paths.)

Specified by:
getASSPLibraries in interface IMMPData

getResourceBlocks

java.util.List<IMMPResource> getResourceBlocks()
access/modify the new-style resource blocks

Specified by:
getResourceBlocks in interface IMMPData

createMMPResource

IMMPResource createMMPResource()
create a new, empty, invalid MMP resource (not added).

See Also:
IMMPResource.isValid()

getUserResources

java.util.List<IPath> getUserResources()
access/modify the old-style RESOURCE statement.

Specified by:
getUserResources in interface IMMPData

getSystemResources

java.util.List<IPath> getSystemResources()
access/modify the old-style SYSTEMRESOURCE statement.

Specified by:
getSystemResources in interface IMMPData

getLanguages

java.util.List<EMMPLanguage> getLanguages()
access/modify the old-style LANG statement.

NOTE: LANG as it appears inside START RESOURCE is contained in IMMPResource.

Specified by:
getLanguages in interface IMMPData

getMultiImageSources

java.util.List<IMultiImageSource> getMultiImageSources()
Specified by:
getMultiImageSources in interface IMMPData

getBitmaps

java.util.List<IMMPBitmap> getBitmaps()
Access/modify bitmaps from the unified set of START BITMAP blocks.

This aliases #getMultiImageSources().

IMMPBitmap is an extension of IMultiImageSource which specifically provides access to BMP files (rather than a set which may allow SVGs). IMMPBitmap instances cannot hold SVGs.

Specified by:
getBitmaps in interface IMMPData

setBitmaps

void setBitmaps(java.util.List<IMMPBitmap> bitmaps)
set the bitmap info


createMMPBitmap

IMMPBitmap createMMPBitmap()
create a new, empty, invalid bitmap entry (not added)

See Also:
IMultiImageSource.isValid()

getAifs

java.util.List<IMMPAIFInfo> getAifs()
access/modify; may be null

Specified by:
getAifs in interface IMMPData

setAifs

void setAifs(java.util.List<IMMPAIFInfo> aifs)
set the AIF info; may be null


createMMPAIFInfo

IMMPAIFInfo createMMPAIFInfo()
create an empty, invalid AIF info instance (not set)

See Also:
IMMPAIFInfo.isValid()

getFlags

java.util.Set<EMMPStatement> getFlags()
Access/modify flags set in MMP.

Keys for non-flag statements may not be added without an IAE.

Specified by:
getFlags in interface IMMPData

getSingleArgumentSettings

java.util.Map<EMMPStatement,java.lang.String> getSingleArgumentSettings()
Access/modify values of single-argument statements in MMP.

Anything exposed through other API is not in this map (e.g. SOURCEPATH, DEFFILE).

To delete a statement, either set its value to null or delete the key from the map.

Keys for non-single-argument statements may not be added without an IAE.

Specified by:
getSingleArgumentSettings in interface IMMPData

getListArgumentSettings

java.util.Map<EMMPStatement,java.util.List<java.lang.String>> getListArgumentSettings()
Access/modify list values for list argument statements in MMP; with case-insensitive membership tests.

This also allows access to the libraries lists (which are provided as separate API for convenience). Sources and includes must be accessed with their own API since they return lists of IPaths.

An entry may not exist with a null or empty value; instead, delete the key from the map.

Keys for non-list-argument statements may not be added without an IAE.

Specified by:
getListArgumentSettings in interface IMMPData

getUid2

java.lang.String getUid2()
Get the UID2 value. May be null.

Specified by:
getUid2 in interface IMMPData

setUid2

void setUid2(java.lang.String uid)
Set the UID2 value. May be null.


setUid2

void setUid2(int value)
Set the UID2 value. May be null.


getUid3

java.lang.String getUid3()
Get the UID3 value. May be null.

Specified by:
getUid3 in interface IMMPData

setUid3

void setUid3(java.lang.String uid)
Set the UID3 value. May be null.


setUid3

void setUid3(int value)
Set the UID3 value. May be null.


getOptions

java.util.Map<java.lang.String,java.lang.String> getOptions()
Access/modify the OPTION options for given toolchains.

Specified by:
getOptions in interface IMMPData
Returns:
map of toolchain name to option string

getLinkerOptions

java.util.Map<java.lang.String,java.lang.String> getLinkerOptions()
Access/modify the LINKEROPTION options for given toolchains.

Specified by:
getLinkerOptions in interface IMMPData
Returns:
map of toolchain name to option string

getReplaceOptions

java.util.Map<java.lang.String,java.lang.String> getReplaceOptions()
Access/modify the OPTION_REPLACE options for given toolchains.

Specified by:
getReplaceOptions in interface IMMPData
Returns:
map of toolchain name to option string

setOptions

void setOptions(java.util.Map<java.lang.String,java.lang.String> options)
Set the OPTION options for given toolchains.

Parameters:
options - map of toolchain name to option string

setLinkerOptions

void setLinkerOptions(java.util.Map<java.lang.String,java.lang.String> options)
Set the LINKEROPTION options for given toolchains.

Parameters:
options - map of toolchain name to option string

setReplaceOptions

void setReplaceOptions(java.util.Map<java.lang.String,java.lang.String> options)
Set the OPTION_REPLACE options for given toolchains.

Parameters:
options - map of toolchain name to option string

getDocuments

java.util.List<IPath> getDocuments()
Access/modify the paths to documents. Like sources and resources, these are either project-relative or absolute in some way.

Specified by:
getDocuments in interface IMMPData

getDefFile

IPath getDefFile()
Get the DEFFILE path. May return null if no DEFFILE specified and the target does not require a .def file.

Specified by:
getDefFile in interface IMMPData
Returns:
project-relative or full path to .def file, or null
See Also:
getSingleArgumentSettings(), EMMPStatement.DEFFILE

isDefFileInFixedDirectory

boolean isDefFileInFixedDirectory()
Tell if the DEFFILE setting refers to a fixed directory, e.g., if it has a path and is not a bare filename.

We maintain this as a distinct datum because IPath does not always cleanly represent the conversion of a string to a path (e.g. it may be canonicalized and/or lack a leading "./" due to workarounds).

Specified by:
isDefFileInFixedDirectory in interface IMMPData
Returns:
true: the DEFFILE statement has a directory embedded in it and will not be automatically moved to a platform-specific location
See Also:
getSingleArgumentSettings(), EMMPStatement.DEFFILE

setDefFile

void setDefFile(IPath path,
                boolean isFixedDirectory)
Set the DEFFILE path. May be null to disable DEFFILE (thus using the default for the platform and build type).

The path, minus any Unicode suffix or target platform (unless it is a fixed directory) is reflected in the single-argument settings (EMMPStatement.DEFFILE).

Parameters:
path - project-relative or full path (or null).
isFixedDirectory - true if the directory of the path is fixed and should not be made platform-dependent (e.g. setting BWINS/fooU.def will be reduced to foo.def if false, else it will remain ../BWINS/foo.def).
See Also:
getSingleArgumentSettings(), EMMPStatement.DEFFILE

getData

IMMPData getData()
Get a copy of the current MMP data, to which any changes are ignored.

Specified by:
getData in interface IView
Returns:
instance of IData containing current data in the view, or null if such data cannot be created

Carbide.c++