2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2009-03-20 14:57:12 +01:00
|
|
|
|
2009-03-16 11:08:07 +01:00
|
|
|
#include "genericprojectfileseditor.h"
|
|
|
|
|
#include "genericprojectconstants.h"
|
|
|
|
|
|
2023-02-17 23:21:31 +01:00
|
|
|
#include <coreplugin/coreplugintr.h>
|
2009-03-16 11:08:07 +01:00
|
|
|
#include <coreplugin/editormanager/editormanager.h>
|
2015-02-26 13:22:35 +01:00
|
|
|
#include <texteditor/textdocument.h>
|
2023-02-17 23:21:31 +01:00
|
|
|
#include <texteditor/texteditoractionhandler.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);
|
2023-02-17 23:21:31 +01:00
|
|
|
setDisplayName(::Core::Tr::tr(".files Editor"));
|
2016-02-04 13:08:13 +01:00
|
|
|
addMimeType("application/vnd.qtcreator.generic.files");
|
|
|
|
|
addMimeType("application/vnd.qtcreator.generic.includes");
|
|
|
|
|
addMimeType("application/vnd.qtcreator.generic.config");
|
2019-01-11 14:10:09 +01:00
|
|
|
addMimeType("application/vnd.qtcreator.generic.cxxflags");
|
|
|
|
|
addMimeType("application/vnd.qtcreator.generic.cflags");
|
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
|