Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Carbide.c++
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nokia.carbide.cpp.epoc.engine.model.makefile
Interface IMakefileViewBase

All Known Subinterfaces:
  IImageMakefileView, IMakefileView

    public interface IMakefileViewBase

This is the interface to reading and modifying the Makefile contents.

This is radically simplified and stupid. CDT's IMakefile doesn't provide write access, so instead of implementing a parallel layer, we expose only operations that query the model or make simple text-based operations. Changes are made to the backing text and the model is reparsed. Obviously, this is meant only for occasional operations.

Method Summary
`void` | `appendText(java.lang.String text)` Append new text to the file.
`void` | `deleteDirective(IDirective directive)` Delete a directive and any children.
`java.lang.String` | `expandAllMacrosInRuleString(java.lang.String target, ITargetRule rule)` Expand macro definition references in string.
`java.lang.String` | `expandAllMacrosInString(java.lang.String text)` Expand macro definition references in string.
`ICommand[]` | `findCommandsInvoking(java.lang.String program)` Get commands in any rule that run this program (either literal filename or $(var))
`ITargetRule` | `findRuleForTarget(java.lang.String target, boolean exactMatch)` Get (last) rule with the given target
`IMacroDefinition[]` | `getAllMacroDefinitions()` Find all the macro definitions, recursively.
`IMacroDefinition[]` | `getAllMacroDefinitions(java.lang.String name)` Find all the macro definitions for the given name, recursively.
`java.lang.String` | `getEOL()` Get end-of-line terminator used in the makefile.
`IMakefile` | `getMakefile()` Get CDT representation of makefile, with read-only access.
`void` | `insertText(IDirective directive, java.lang.String text)` Insert a new line after the given directive.
`void` | `insertTextBefore(java.lang.String text, IDirective directive)` Insert a new line before the given directive.
`void` | `replaceDirective(IDirective directive, java.lang.String text)` Replace a directive with alternate text.
`java.lang.String` | `unexpandMacros(java.lang.String text, boolean exhaustive)` Try to replace literal text in the given string with macros.
`java.lang.String` | `unexpandMacros(java.lang.String text, java.lang.String[] macroNames)` Try to replace literal text in the given string with the given macros.

Method Detail

### getMakefile

    IMakefile getMakefile()

  Get CDT representation of makefile, with read-only access.

### getAllMacroDefinitions

    IMacroDefinition[] getAllMacroDefinitions()

  Find all the macro definitions, recursively.

### getAllMacroDefinitions

    IMacroDefinition[] getAllMacroDefinitions(java.lang.String name)

  Find all the macro definitions for the given name, recursively.

### expandAllMacrosInString

    java.lang.String expandAllMacrosInString(java.lang.String text)

  Expand macro definition references in string. This searches for any applicable macro, even those in conditionals.

  Parameters:
    `text` -
  Returns:
    string with macros expanded -- other shell commands will be left

### expandAllMacrosInRuleString

    java.lang.String expandAllMacrosInRuleString(java.lang.String target,
                                                 ITargetRule rule)

  Expand macro definition references in string. This searches for any applicable macro, even those in conditionals. Additionally, it replaces references to "$<" with the target and "$^" and "$@" with the appropriate sources.

  Parameters:
    `target` -
    `rule` -
  Returns:

### unexpandMacros

    java.lang.String unexpandMacros(java.lang.String text,
                                    boolean exhaustive)

  Try to replace literal text in the given string with macros.

  If exhaustive is true, then conditionalized macros in the Makefile are replaced too.

### findRuleForTarget

    ITargetRule findRuleForTarget(java.lang.String target,
                                  boolean exactMatch)

  Get (last) rule with the given target

  Parameters:
    `target` - filename or filepath
    `exactMatch` - if true, verify same filepath; else, just check filename
  Returns:
    last matching rule, or null

### findCommandsInvoking

    ICommand[] findCommandsInvoking(java.lang.String program)

  Get commands in any rule that run this program (either literal filename or $(var))

  Parameters:
    `program` -
  Returns:

### getEOL

    java.lang.String getEOL()

  Get end-of-line terminator used in the makefile.

### appendText

    void appendText(java.lang.String text)

  Append new text to the file.

  Note: this invalidates any directives read from the model.

  Parameters:
    `text` - text to add (add #getEOL() if a full line)

### insertText

    void insertText(IDirective directive,
                    java.lang.String text)

  Insert a new line after the given directive.

  Note: this invalidates any directives read from the model.

  Parameters:
    `directive` - directive, or null for start of file
    `text` - text to add (add #getEOL() if a full line)

### insertTextBefore

    void insertTextBefore(java.lang.String text,
                          IDirective directive)

  Insert a new line before the given directive.

  Note: this invalidates any directives read from the model.

  Parameters:
    `text` - text to add (add #getEOL() if a full line)
    `directive` - directive, or null for end of file

### deleteDirective

    void deleteDirective(IDirective directive)

  Delete a directive and any children.

  Note: this invalidates any directives read from the model. directives read from the model.

### replaceDirective

    void replaceDirective(IDirective directive,
                          java.lang.String text)

  Replace a directive with alternate text.

  Note: this invalidates any directives read from the model.

### unexpandMacros

    java.lang.String unexpandMacros(java.lang.String text,
                                    java.lang.String[] macroNames)

  Try to replace literal text in the given string with the given macros.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Carbide.c++
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD