QmlJS: Add 'reformat' action which regenerates the whole file.

Change-Id: I0aed6c6e197e122200d720eb9291a083095a6299
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2011-11-07 15:14:43 +01:00
parent fa7c7c4eca
commit a5b26a32b3
13 changed files with 1603 additions and 16 deletions

View File

@@ -67,9 +67,11 @@ OTHER_FILES += \
contains(QT, gui) {
SOURCES += \
$$PWD/qmljsindenter.cpp \
$$PWD/qmljscodeformatter.cpp
$$PWD/qmljscodeformatter.cpp \
$$PWD/qmljsreformatter.cpp
HEADERS += \
$$PWD/qmljsindenter.h \
$$PWD/qmljscodeformatter.h
$$PWD/qmljscodeformatter.h \
$$PWD/qmljsreformatter.h
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#ifndef QMLJSREFORMATTER_H
#define QMLJSREFORMATTER_H
#include "qmljs_global.h"
#include "qmljsdocument.h"
namespace QmlJS {
QMLJS_EXPORT QString reformat(const Document::Ptr &doc);
}
#endif // QMLJSREFORMATTER_H