2016-01-15 14:57:40 +01:00
|
|
|
/****************************************************************************
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-04-18 20:30:57 +03: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.
|
2012-04-18 20:30:57 +03: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.
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-04-18 20:30:57 +03:00
|
|
|
|
|
|
|
#include "androidplugin.h"
|
|
|
|
|
|
|
|
#include "androidconstants.h"
|
|
|
|
#include "androidconfigurations.h"
|
2013-09-17 18:24:57 +02:00
|
|
|
#include "androiddeployqtstep.h"
|
2012-07-03 16:57:44 +03:00
|
|
|
#include "androiddevice.h"
|
2012-06-23 12:24:44 +03:00
|
|
|
#include "androiddevicefactory.h"
|
2012-04-24 15:49:09 +02:00
|
|
|
#include "androidmanager.h"
|
2012-04-18 20:30:57 +03:00
|
|
|
#include "androidrunfactories.h"
|
|
|
|
#include "androidsettingspage.h"
|
|
|
|
#include "androidtoolchain.h"
|
|
|
|
#include "androidqtversionfactory.h"
|
|
|
|
#include "androiddeployconfiguration.h"
|
2013-01-25 16:49:22 +01:00
|
|
|
#include "androidgdbserverkitinformation.h"
|
2013-05-08 17:52:01 +02:00
|
|
|
#include "androidmanifesteditorfactory.h"
|
2013-09-30 15:24:18 +02:00
|
|
|
#include "androidpotentialkit.h"
|
2014-01-15 16:58:52 +01:00
|
|
|
#include "javacompletionassistprovider.h"
|
2014-08-20 16:29:26 +02:00
|
|
|
#include "javaeditor.h"
|
2013-08-21 13:28:03 +02:00
|
|
|
#ifdef HAVE_QBS
|
|
|
|
# include "androidqbspropertyprovider.h"
|
|
|
|
#endif
|
2013-05-08 17:52:01 +02:00
|
|
|
|
|
|
|
#include <coreplugin/icore.h>
|
2016-04-29 23:06:26 +02:00
|
|
|
|
|
|
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
2013-02-25 13:25:32 +01:00
|
|
|
#include <projectexplorer/kitmanager.h>
|
2016-04-29 23:06:26 +02:00
|
|
|
|
2013-02-14 15:51:59 +01:00
|
|
|
#include <qtsupport/qtversionmanager.h>
|
2016-04-29 23:06:26 +02:00
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
#include <QtPlugin>
|
|
|
|
|
2016-04-29 23:06:26 +02:00
|
|
|
using namespace ProjectExplorer;
|
2012-07-03 16:57:44 +03:00
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
namespace Android {
|
2012-04-18 20:30:57 +03:00
|
|
|
|
|
|
|
AndroidPlugin::AndroidPlugin()
|
2012-04-24 15:49:09 +02:00
|
|
|
{ }
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2012-08-09 01:56:51 +02:00
|
|
|
bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
2012-04-18 20:30:57 +03:00
|
|
|
{
|
2012-04-24 15:49:09 +02:00
|
|
|
Q_UNUSED(arguments);
|
2012-08-09 01:56:51 +02:00
|
|
|
Q_UNUSED(errorMessage);
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2014-06-25 15:42:11 +02:00
|
|
|
new AndroidConfigurations(this);
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
addAutoReleasedObject(new Internal::AndroidRunControlFactory);
|
2013-09-17 18:24:57 +02:00
|
|
|
addAutoReleasedObject(new Internal::AndroidDeployQtStepFactory);
|
2012-04-24 15:49:09 +02:00
|
|
|
addAutoReleasedObject(new Internal::AndroidSettingsPage);
|
|
|
|
addAutoReleasedObject(new Internal::AndroidQtVersionFactory);
|
|
|
|
addAutoReleasedObject(new Internal::AndroidToolChainFactory);
|
|
|
|
addAutoReleasedObject(new Internal::AndroidDeployConfigurationFactory);
|
2012-06-23 12:24:44 +03:00
|
|
|
addAutoReleasedObject(new Internal::AndroidDeviceFactory);
|
2013-09-30 15:24:18 +02:00
|
|
|
addAutoReleasedObject(new Internal::AndroidPotentialKit);
|
2014-01-15 16:58:52 +01:00
|
|
|
addAutoReleasedObject(new Internal::JavaEditorFactory);
|
2016-04-29 23:06:26 +02:00
|
|
|
KitManager::registerKitInformation(new Internal::AndroidGdbServerKitInformation);
|
2013-02-28 14:06:17 +01:00
|
|
|
|
2015-02-04 09:32:46 +01:00
|
|
|
addAutoReleasedObject(new Internal::AndroidManifestEditorFactory);
|
2014-01-15 16:58:52 +01:00
|
|
|
|
2016-04-29 23:06:26 +02:00
|
|
|
connect(KitManager::instance(), &KitManager::kitsLoaded,
|
|
|
|
this, &AndroidPlugin::kitsRestored);
|
2013-02-28 15:07:01 +01:00
|
|
|
|
2016-04-29 23:06:26 +02:00
|
|
|
connect(DeviceManager::instance(), &DeviceManager::devicesLoaded,
|
|
|
|
this, &AndroidPlugin::updateDevice);
|
2013-02-28 15:07:01 +01:00
|
|
|
return true;
|
2013-02-25 13:25:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void AndroidPlugin::kitsRestored()
|
|
|
|
{
|
2014-06-25 15:42:11 +02:00
|
|
|
AndroidConfigurations::updateAutomaticKitList();
|
2016-04-29 23:06:26 +02:00
|
|
|
connect(QtSupport::QtVersionManager::instance(), &QtSupport::QtVersionManager::qtVersionsChanged,
|
|
|
|
AndroidConfigurations::instance(), &AndroidConfigurations::updateAutomaticKitList);
|
|
|
|
disconnect(KitManager::instance(), &KitManager::kitsChanged,
|
|
|
|
this, &AndroidPlugin::kitsRestored);
|
2012-09-06 12:07:29 +02:00
|
|
|
}
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2013-04-10 12:40:35 +02:00
|
|
|
void AndroidPlugin::updateDevice()
|
|
|
|
{
|
2014-06-25 15:42:11 +02:00
|
|
|
AndroidConfigurations::updateAndroidDevice();
|
2013-04-10 12:40:35 +02:00
|
|
|
}
|
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
} // namespace Android
|