Extending Qt Creator Manual | Rewriter

Extending Qt Creator Manual 4.5.2

# Rewriter Class

(QmlJS::Rewriter)

- List of all members, including inherited members

## Public Types

enum | BindingType { ScriptBinding, ObjectBinding, ArrayBinding }
typedef | Range

## Public Functions

| Rewriter(const QString &originalText, Utils::ChangeSet *changeSet, const QStringList &propertyOrder)
Range | addBinding(AST::UiObjectInitializer *ast, const QString &propertyName, const QString &propertyValue, BindingType bindingType)
Range | addBinding(AST::UiObjectInitializer *ast, const QString &propertyName, const QString &propertyValue, BindingType bindingType, AST::UiObjectMemberList *insertAfter)
Range | addObject(AST::UiObjectInitializer *ast, const QString &content)
Range | addObject(AST::UiObjectInitializer *ast, const QString &content, AST::UiObjectMemberList *insertAfter)
Range | addObject(AST::UiArrayBinding *ast, const QString &content)
Range | addObject(AST::UiArrayBinding *ast, const QString &content, AST::UiArrayMemberList *insertAfter)
void | appendToArrayBinding(AST::UiArrayBinding *arrayBinding, const QString &content)
void | changeBinding(AST::UiObjectInitializer *ast, const QString &propertyName, const QString &newValue, BindingType binding)
void | removeBindingByName(AST::UiObjectInitializer *ast, const QString &propertyName)
void | removeObjectMember(AST::UiObjectMember *member, AST::UiObjectMember *parent)

## Static Public Members

void | includeEmptyGroupedProperty(AST::UiObjectDefinition *groupedProperty, AST::UiObjectMember *memberToBeRemoved, int &start, int &end)
void | includeLeadingEmptyLine(const QString &source, int &start)
bool | includeSurroundingWhitespace(const QString &source, int &start, int &end)
AST::UiObjectMemberList * | searchMemberToInsertAfter(AST::UiObjectMemberList *members, const QStringList &propertyOrder)
AST::UiArrayMemberList * | searchMemberToInsertAfter(AST::UiArrayMemberList *members, const QStringList &propertyOrder)
AST::UiObjectMemberList * | searchMemberToInsertAfter(AST::UiObjectMemberList *members, const QString &propertyName, const QStringList &propertyOrder)

## Member Type Documentation

### enum Rewriter::BindingType

### typedef Rewriter::Range

## Member Function Documentation

### Rewriter::Rewriter(const QString &originalText, Utils::ChangeSet *changeSet, const QStringList &propertyOrder)

Default constructs an instance of Rewriter.

### Range Rewriter::addBinding(AST::UiObjectInitializer *ast, const QString &propertyName, const QString &propertyValue, BindingType bindingType)

### Range Rewriter::addBinding(AST::UiObjectInitializer *ast, const QString &propertyName, const QString &propertyValue, BindingType bindingType, AST::UiObjectMemberList *insertAfter)

### Range Rewriter::addObject(AST::UiObjectInitializer *ast, const QString &content)

### Range Rewriter::addObject(AST::UiObjectInitializer *ast, const QString &content, AST::UiObjectMemberList *insertAfter)

### Range Rewriter::addObject(AST::UiArrayBinding *ast, const QString &content)

### Range Rewriter::addObject(AST::UiArrayBinding *ast, const QString &content, AST::UiArrayMemberList *insertAfter)

### void Rewriter::appendToArrayBinding(AST::UiArrayBinding *arrayBinding, const QString &content)

### void Rewriter::changeBinding(AST::UiObjectInitializer *ast, const QString &propertyName, const QString &newValue, BindingType binding)

### `[static]` void Rewriter::includeEmptyGroupedProperty(AST::UiObjectDefinition *groupedProperty, AST::UiObjectMember *memberToBeRemoved, int &start, int &end)

### `[static]` void Rewriter::includeLeadingEmptyLine(const QString &source, int &start)

### `[static]` bool Rewriter::includeSurroundingWhitespace(const QString &source, int &start, int &end)

### void Rewriter::removeBindingByName(AST::UiObjectInitializer *ast, const QString &propertyName)

### void Rewriter::removeObjectMember(AST::UiObjectMember *member, AST::UiObjectMember *parent)

### `[static]` AST::UiObjectMemberList *Rewriter::searchMemberToInsertAfter(AST::UiObjectMemberList *members, const QStringList &propertyOrder)

### `[static]` AST::UiArrayMemberList *Rewriter::searchMemberToInsertAfter(AST::UiArrayMemberList *members, const QStringList &propertyOrder)

### `[static]` AST::UiObjectMemberList *Rewriter::searchMemberToInsertAfter(AST::UiObjectMemberList *members, const QString &propertyName, const QStringList &propertyOrder)