Core: Merge Find and Locator into Core plugin

Change-Id: I7053310272235d854c9f409670ff52a10a7add8b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
hjk
2014-01-13 16:17:34 +01:00
committed by Eike Ziller
parent 8b854270a6
commit 4d96fa7aba
239 changed files with 1625 additions and 1787 deletions

View File

@@ -36,7 +36,7 @@
#include <coreplugin/findplaceholder.h>
#include <utils/savedaction.h>
#include <aggregation/aggregate.h>
#include <find/treeviewfind.h>
#include <coreplugin/find/treeviewfind.h>
#include <QToolButton>
#include <QLabel>
@@ -95,7 +95,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate();
aggregate->add(m_consoleView);
aggregate->add(new Find::TreeViewFind(m_consoleView));
aggregate->add(new Core::TreeViewFind(m_consoleView));
vbox->addWidget(m_consoleView);
vbox->addWidget(new Core::FindToolBarPlaceHolder(m_consoleWidget));

View File

@@ -39,7 +39,7 @@ using namespace QmlJSTools::Internal;
Q_DECLARE_METATYPE(LocatorData::Entry)
FunctionFilter::FunctionFilter(LocatorData *data, QObject *parent)
: Locator::ILocatorFilter(parent)
: Core::ILocatorFilter(parent)
, m_data(data)
{
setId("Functions");
@@ -55,17 +55,17 @@ void FunctionFilter::refresh(QFutureInterface<void> &)
{
}
static bool compareLexigraphically(const Locator::FilterEntry &a,
const Locator::FilterEntry &b)
static bool compareLexigraphically(const Core::LocatorFilterEntry &a,
const Core::LocatorFilterEntry &b)
{
return a.displayName < b.displayName;
}
QList<Locator::FilterEntry> FunctionFilter::matchesFor(QFutureInterface<Locator::FilterEntry> &future, const QString &origEntry)
QList<Core::LocatorFilterEntry> FunctionFilter::matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &origEntry)
{
QString entry = trimWildcards(origEntry);
QList<Locator::FilterEntry> goodEntries;
QList<Locator::FilterEntry> betterEntries;
QList<Core::LocatorFilterEntry> goodEntries;
QList<Core::LocatorFilterEntry> betterEntries;
const QChar asterisk = QLatin1Char('*');
QStringMatcher matcher(entry, Qt::CaseInsensitive);
QRegExp regexp(asterisk + entry+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
@@ -89,7 +89,7 @@ QList<Locator::FilterEntry> FunctionFilter::matchesFor(QFutureInterface<Locator:
|| (!hasWildcard && matcher.indexIn(info.symbolName) != -1)) {
QVariant id = qVariantFromValue(info);
Locator::FilterEntry filterEntry(this, info.displayName, id/*, info.icon*/);
Core::LocatorFilterEntry filterEntry(this, info.displayName, id/*, info.icon*/);
filterEntry.extraInfo = info.extraInfo;
if (info.symbolName.startsWith(entry, caseSensitivityForPrefix))
@@ -109,7 +109,7 @@ QList<Locator::FilterEntry> FunctionFilter::matchesFor(QFutureInterface<Locator:
return betterEntries;
}
void FunctionFilter::accept(Locator::FilterEntry selection) const
void FunctionFilter::accept(Core::LocatorFilterEntry selection) const
{
const LocatorData::Entry entry = qvariant_cast<LocatorData::Entry>(selection.internalData);
Core::EditorManager::openEditorAt(entry.fileName, entry.line, entry.column);

View File

@@ -30,14 +30,14 @@
#ifndef QMLJSFUNCTIONFILTER_H
#define QMLJSFUNCTIONFILTER_H
#include <locator/ilocatorfilter.h>
#include <coreplugin/locator/ilocatorfilter.h>
namespace QmlJSTools {
namespace Internal {
class LocatorData;
class FunctionFilter : public Locator::ILocatorFilter
class FunctionFilter : public Core::ILocatorFilter
{
Q_OBJECT
@@ -45,8 +45,8 @@ public:
explicit FunctionFilter(LocatorData *data, QObject *parent = 0);
~FunctionFilter();
QList<Locator::FilterEntry> matchesFor(QFutureInterface<Locator::FilterEntry> &future, const QString &entry);
void accept(Locator::FilterEntry selection) const;
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
private:

View File

@@ -12,7 +12,6 @@ QtcPlugin {
Depends { name: "QmlJS" }
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
Depends { name: "Locator" }
Depends { name: "QmlDebug" }
Depends { name: "QtSupport" }

View File

@@ -5,8 +5,6 @@ QTC_LIB_DEPENDS += \
qmljs
QTC_PLUGIN_DEPENDS += \
coreplugin \
find \
locator \
projectexplorer \
qtsupport \
texteditor \