forked from qt-creator/qt-creator
QMakeProjectManager: Some code shuffling
In preparation of moving the .pro editor over to new editor construction scheme. Change-Id: I429683c523e22bf874e25528eb7d9c13c7989628 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -29,13 +29,18 @@
|
||||
|
||||
#include "profileeditor.h"
|
||||
|
||||
#include "profilehighlighter.h"
|
||||
#include "qmakeprojectmanagerconstants.h"
|
||||
#include "profileeditorfactory.h"
|
||||
#include "profilecompletionassist.h"
|
||||
#include "profilehighlighter.h"
|
||||
#include "qmakeprojectmanager.h"
|
||||
#include "qmakeprojectmanagerconstants.h"
|
||||
#include "qmakeprojectmanagerconstants.h"
|
||||
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <QTextBlock>
|
||||
@@ -191,5 +196,36 @@ QString ProFileDocument::suggestedFileName() const
|
||||
return fi.fileName();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ProFileEditorFactory
|
||||
//
|
||||
|
||||
ProFileEditorFactory::ProFileEditorFactory()
|
||||
{
|
||||
setId(QmakeProjectManager::Constants::PROFILE_EDITOR_ID);
|
||||
setDisplayName(qApp->translate("OpenWith::Editors", QmakeProjectManager::Constants::PROFILE_EDITOR_DISPLAY_NAME));
|
||||
addMimeType(QmakeProjectManager::Constants::PROFILE_MIMETYPE);
|
||||
addMimeType(QmakeProjectManager::Constants::PROINCLUDEFILE_MIMETYPE);
|
||||
addMimeType(QmakeProjectManager::Constants::PROFEATUREFILE_MIMETYPE);
|
||||
addMimeType(QmakeProjectManager::Constants::PROCONFIGURATIONFILE_MIMETYPE);
|
||||
addMimeType(QmakeProjectManager::Constants::PROCACHEFILE_MIMETYPE);
|
||||
addMimeType(QmakeProjectManager::Constants::PROSTASHFILE_MIMETYPE);
|
||||
new TextEditor::TextEditorActionHandler(this, Constants::C_PROFILEEDITOR,
|
||||
TextEditor::TextEditorActionHandler::UnCommentSelection
|
||||
| TextEditor::TextEditorActionHandler::JumpToFileUnderCursor);
|
||||
|
||||
Core::FileIconProvider::registerIconOverlayForSuffix(QtSupport::Constants::ICON_QT_PROJECT, "pro");
|
||||
Core::FileIconProvider::registerIconOverlayForSuffix(QtSupport::Constants::ICON_QT_PROJECT, "pri");
|
||||
Core::FileIconProvider::registerIconOverlayForSuffix(QtSupport::Constants::ICON_QT_PROJECT, "prf");
|
||||
}
|
||||
|
||||
Core::IEditor *ProFileEditorFactory::createEditor()
|
||||
{
|
||||
ProFileEditorWidget *editor = new ProFileEditorWidget;
|
||||
editor->setTextDocument(TextEditor::BaseTextDocumentPtr(new ProFileDocument));
|
||||
return editor->editor();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmakeProjectManager
|
||||
|
||||
Reference in New Issue
Block a user