2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2009-03-20 14:57:12 +01:00
|
|
|
|
2009-03-16 11:08:07 +01:00
|
|
|
#include "genericprojectfileseditor.h"
|
|
|
|
|
#include "genericprojectmanager.h"
|
|
|
|
|
#include "genericprojectconstants.h"
|
|
|
|
|
|
|
|
|
|
#include <coreplugin/editormanager/editormanager.h>
|
2009-03-16 16:14:34 +01:00
|
|
|
#include <texteditor/texteditoractionhandler.h>
|
2015-02-26 13:22:35 +01:00
|
|
|
#include <texteditor/textdocument.h>
|
2009-03-16 11:08:07 +01:00
|
|
|
|
2012-05-06 12:30:23 +04:00
|
|
|
#include <QCoreApplication>
|
|
|
|
|
|
2012-08-14 15:37:38 +02:00
|
|
|
using namespace TextEditor;
|
2009-03-16 11:08:07 +01:00
|
|
|
|
2012-08-14 15:37:38 +02:00
|
|
|
namespace GenericProjectManager {
|
|
|
|
|
namespace Internal {
|
2009-03-16 11:08:07 +01:00
|
|
|
|
2012-08-14 15:37:38 +02:00
|
|
|
//
|
2009-03-16 16:14:34 +01:00
|
|
|
// ProjectFilesFactory
|
2012-08-14 15:37:38 +02:00
|
|
|
//
|
2009-03-16 15:14:13 +01:00
|
|
|
|
2014-08-20 00:58:38 +02:00
|
|
|
ProjectFilesFactory::ProjectFilesFactory()
|
2009-03-16 11:08:07 +01:00
|
|
|
{
|
2013-05-31 19:35:37 +02:00
|
|
|
setId(Constants::FILES_EDITOR_ID);
|
|
|
|
|
setDisplayName(QCoreApplication::translate("OpenWith::Editors", ".files Editor"));
|
|
|
|
|
addMimeType(Constants::FILES_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::INCLUDES_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::CONFIG_MIMETYPE);
|
2009-03-16 11:08:07 +01:00
|
|
|
|
2014-09-22 18:43:31 +02:00
|
|
|
setDocumentCreator([]() { return new TextDocument(Constants::FILES_EDITOR_ID); });
|
2014-09-02 12:25:20 +02:00
|
|
|
setEditorActionHandlers(TextEditorActionHandler::None);
|
2009-03-16 15:14:13 +01:00
|
|
|
}
|
2012-08-14 15:37:38 +02:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace GenericProjectManager
|