Commit 342c7831 authored by Alexander Dymo's avatar Alexander Dymo

Merged sublime-integration branch with trunk!

The branch was started just to use the new UI for KDevelop4
but transformed to large restructuring, reworking and cleaning effort.
In short, now we have:
- sublime-based UI
- interfaces for platform objects
- extension interfaces for platform plugins
parent a62fd898
......@@ -23,8 +23,8 @@ add_subdirectory(cmake)
add_subdirectory(lib)
add_subdirectory(pics)
add_subdirectory(src)
add_subdirectory(languages)
#add_subdirectory(languages)
add_subdirectory(plugins)
add_subdirectory(buildtools)
#add_subdirectory(buildtools)
add_subdirectory(doc)
......@@ -6,8 +6,10 @@ Comment[el]=Εισαγωγή και επεξεργασία έργων qmake
Comment[fr]=Importe et modifie des projets qmake
Comment[x-test]=xxImports and edits qmake projectsxx
Icon=gear
ServiceTypes=KDevelop/FileManager
ServiceTypes=KDevelop/Plugin
X-KDE-Library=kdevqmakeimporter
X-KDE-PluginInfo-Name=KDevQMakeImporter
X-KDevelop-FileManager=None
X-KDevelop-FileManager=QMake
X-KDevelop-Version=4
X-KDevelop-Interfaces=IBuildManager;IFileManager
X-KDevelop-Required=IProjectBuilder
add_subdirectory(sublime)
add_subdirectory(util)
add_subdirectory(widgets)
add_subdirectory(debugger)
add_subdirectory(projectmanager)
add_subdirectory(settings)
add_subdirectory(interfaces)
add_subdirectory(project)
add_subdirectory(shell)
add_subdirectory(persistenthash)
#add_subdirectory(util)
#add_subdirectory(widgets)
#add_subdirectory(debugger)
add_subdirectory(plugins)
#add_subdirectory(settings)
include_directories(
${CMAKE_SOURCE_DIR}/lib/util
......@@ -23,64 +27,64 @@ endif (BERKELEY_DB_FOUND)
########### next target ###############
set(kdevplatform_LIB_SRCS
kdevlanguagesupport.cpp
kdevmainwindow.cpp
kdevcodemodel.cpp
kdevdocumentcontroller.cpp
kdevcoderepository.cpp
kdevcore.cpp
kdevpcsimporter.cpp
kdevplugincontroller.cpp
kdevplugin.cpp
domutil.cpp
kdevitemmodel.cpp
filetemplate.cpp
kdevcodedelegate.cpp
kdevcodeproxy.cpp
kdevcodeaggregate.cpp
kdevdocument.cpp
kdevfilemanager.cpp
kdevbuildmanager.cpp
kdevprofile.cpp
kdevprofileengine.cpp
kdevcmodule.cpp
kdevconfigskeleton.cpp
kdevenvironment.cpp
kdevconfig.cpp
kdevpartcontroller.cpp
kdevlanguagecontroller.cpp
kdevstatusbar.cpp
shellextension.cpp
kdevcontext.cpp
kdevast.cpp
kdevbackgroundparser.cpp
kdevparsejob.cpp
kdevpersistenthash.cpp
kdevcodehighlighting.cpp
tag.cpp
editor/kdeveditorintegrator.cpp
editor/kdevdocumentrangeobject.cpp
editor/kdevdocumentcursorobject.cpp
editor/kdevdocumentcursor.cpp
editor/kdevdocumentrange.cpp
backgroundparser/kdevparserdependencypolicy.cpp
interfaces/kdevapplicationinterface.cpp
interfaces/kdevdiffinterface.cpp
interfaces/kdevmakeinterface.cpp
project/kdevprojectbuilder.cpp
project/kdevproject.cpp
project/kdevprojectmodel.cpp
project/kdevprojectcontroller.cpp
project/importprojectjob.cpp
)
# set(kdevplatform_LIB_SRCS
# kdevlanguagesupport.cpp
# kdevmainwindow.cpp
# kdevcodemodel.cpp
# kdevdocumentcontroller.cpp
# kdevcoderepository.cpp
# kdevcore.cpp
# kdevpcsimporter.cpp
# kdevplugincontroller.cpp
# kdevplugin.cpp
# domutil.cpp
# kdevitemmodel.cpp
# filetemplate.cpp
# kdevcodedelegate.cpp
# kdevcodeproxy.cpp
# kdevcodeaggregate.cpp
# kdevdocument.cpp
# kdevfilemanager.cpp
# kdevbuildmanager.cpp
# kdevprofile.cpp
# kdevprofileengine.cpp
# kdevcmodule.cpp
# kdevconfigskeleton.cpp
# kdevenvironment.cpp
# kdevconfig.cpp
# kdevpartcontroller.cpp
# kdevlanguagecontroller.cpp
# kdevstatusbar.cpp
# shellextension.cpp
# kdevcontext.cpp
# kdevast.cpp
# kdevbackgroundparser.cpp
# kdevparsejob.cpp
# kdevpersistenthash.cpp
# kdevcodehighlighting.cpp
# tag.cpp
# editor/kdeveditorintegrator.cpp
# editor/kdevdocumentrangeobject.cpp
# editor/kdevdocumentcursorobject.cpp
# editor/kdevdocumentcursor.cpp
# editor/kdevdocumentrange.cpp
# backgroundparser/kdevparserdependencypolicy.cpp
# interfaces/kdevapplicationinterface.cpp
# interfaces/kdevdiffinterface.cpp
# interfaces/kdevmakeinterface.cpp
# project/kdevprojectbuilder.cpp
# project/kdevproject.cpp
# project/kdevprojectmodel.cpp
# project/kdevprojectcontroller.cpp
# project/importprojectjob.cpp
# )
if (BERKELEY_DB_FOUND)
set(kdevplatform_LIB_SRCS
${kdevplatform_LIB_SRCS}
kdevbdbcatalogbackend.cpp
)
endif (BERKELEY_DB_FOUND)
# if (BERKELEY_DB_FOUND)
# set(kdevplatform_LIB_SRCS
# ${kdevplatform_LIB_SRCS}
# kdevbdbcatalogbackend.cpp
# )
# endif (BERKELEY_DB_FOUND)
#if (TDB_FOUND)
# set(kdevplatform_LIB_SRCS
......@@ -89,86 +93,86 @@ endif (BERKELEY_DB_FOUND)
# )
#endif (TDB_FOUND)
set(kdevplatform_UI
mimewarningdialog.ui
)
kde4_automoc(${kdevplatform_LIB_SRCS})
# set(kdevplatform_UI
# mimewarningdialog.ui
# )
kde4_add_ui_files(kdevplatform_LIB_SRCS ${kdevplatform_UI})
kde4_add_library(kdevplatform SHARED ${kdevplatform_LIB_SRCS})
target_link_libraries(kdevplatform ${KDE4_KIO_LIBS} ${KDE4_KUTILS_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KNOTIFYCONFIG_LIBS} ktexteditor ${KDE4_THREADWEAVER_LIBRARIES} ${BERKELEY_DB_LIBRARIES} )
set_target_properties(kdevplatform PROPERTIES VERSION 4.0.0 SOVERSION 4)
install(TARGETS kdevplatform DESTINATION ${LIB_INSTALL_DIR} )
# kde4_automoc(${kdevplatform_LIB_SRCS})
#
# kde4_add_ui_files(kdevplatform_LIB_SRCS ${kdevplatform_UI})
# kde4_add_library(kdevplatform SHARED ${kdevplatform_LIB_SRCS})
# target_link_libraries(kdevplatform ${KDE4_KIO_LIBS} ${KDE4_KUTILS_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KNOTIFYCONFIG_LIBS} ktexteditor ${KDE4_THREADWEAVER_LIBRARIES} ${BERKELEY_DB_LIBRARIES} )
# set_target_properties(kdevplatform PROPERTIES VERSION 4.0.0 SOVERSION 4)
# install(TARGETS kdevplatform DESTINATION ${LIB_INSTALL_DIR} )
########### install files ###############
install(FILES
kdevdocument.h
kdevdocumentcontroller.h
kdevpcsimporter.h
kdevplugincontroller.h
kdevcodemodel.h
kdevplugin.h
kdevcoderepository.h
kdevcore.h
kdevcreatefile.h
domutil.h
kdevlanguagesupport.h
kdevmainwindow.h
kdevitemmodel.h
filetemplate.h
kdevcodedelegate.h
kdevcodeproxy.h
kdevfilemanager.h
kdevbuildmanager.h
kdevprofile.h
kdevprofileengine.h
kdevcmodule.h
kdevconfigskeleton.h
kdevenvironment.h
kdevconfig.h
kdevsharedptr.h
kdevpartcontroller.h
kdevlanguagecontroller.h
kdevstatusbar.h
shellextension.h
kdevcontext.h
kdevast.h
kdevbackgroundparser.h
kdevparsejob.h
kdevpersistenthash.h
kdevcodehighlighting.h
editor/kdeveditorintegrator.h
editor/kdevdocumentrangeobject.h
editor/kdevdocumentcursorobject.h
editor/kdevdocumentcursor.h
editor/kdevdocumentrange.h
interfaces/kdevapplicationinterface.h
interfaces/kdevdiffinterface.h
interfaces/kdevmakeinterface.h
project/kdevprojectbuilder.h
project/kdevproject.h
project/kdevprojectmodel.h
project/kdevprojectcontroller.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/
)
# install(FILES
# kdevdocument.h
# kdevdocumentcontroller.h
# kdevpcsimporter.h
# kdevplugincontroller.h
# kdevcodemodel.h
# kdevplugin.h
# kdevcoderepository.h
# kdevcore.h
# kdevcreatefile.h
# domutil.h
# kdevlanguagesupport.h
# kdevmainwindow.h
# kdevitemmodel.h
# filetemplate.h
# kdevcodedelegate.h
# kdevcodeproxy.h
# kdevfilemanager.h
# kdevbuildmanager.h
# kdevprofile.h
# kdevprofileengine.h
# kdevcmodule.h
# kdevconfigskeleton.h
# kdevenvironment.h
# kdevconfig.h
# kdevsharedptr.h
# kdevpartcontroller.h
# kdevlanguagecontroller.h
# kdevstatusbar.h
# shellextension.h
# kdevcontext.h
# kdevast.h
# kdevbackgroundparser.h
# kdevparsejob.h
# kdevpersistenthash.h
# kdevcodehighlighting.h
# editor/kdeveditorintegrator.h
# editor/kdevdocumentrangeobject.h
# editor/kdevdocumentcursorobject.h
# editor/kdevdocumentcursor.h
# editor/kdevdocumentrange.h
# interfaces/kdevapplicationinterface.h
# interfaces/kdevdiffinterface.h
# interfaces/kdevmakeinterface.h
# project/kdevprojectbuilder.h
# project/kdevproject.h
# project/kdevprojectmodel.h
# project/kdevprojectcontroller.h
# DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/
# )
install(FILES
kdeveloppcsimporter.desktop
kdevelopcreatefile.desktop
kdevelopplugin.desktop
kdevelopprojectbuilder.desktop
kdeveloplanguagesupport.desktop
kdevelopproject.desktop
kdevelopprojectfilemanager.desktop
kdevelop_part.desktop
kdevelop_rwpart.desktop
interfaces/kdevapplicationinterface.desktop
interfaces/kdevdiffinterface.desktop
interfaces/kdevmakeinterface.desktop
DESTINATION ${SERVICETYPES_INSTALL_DIR}
)
# install(FILES
# kdeveloppcsimporter.desktop
# kdevelopcreatefile.desktop
# kdevelopplugin.desktop
# kdevelopprojectbuilder.desktop
# kdeveloplanguagesupport.desktop
# kdevelopproject.desktop
# kdevelopprojectfilemanager.desktop
# kdevelop_part.desktop
# kdevelop_rwpart.desktop
# interfaces/kdevapplicationinterface.desktop
# interfaces/kdevdiffinterface.desktop
# interfaces/kdevmakeinterface.desktop
# DESTINATION ${SERVICETYPES_INSTALL_DIR}
# )
install( FILES kdevexport.h DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/)
# install( FILES kdevexport.h DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/)
include_directories(
${CMAKE_SOURCE_DIR}/lib/
${CMAKE_SOURCE_DIR}/lib/interfaces
)
set(koncreteinterfaces_LIB_SRCS
iplugin.cpp
icore.cpp
iuicontroller.cpp
iplugincontroller.cpp
iprojectcontroller.cpp
iproject.cpp
)
kde4_automoc(${koncreteinterfaces_LIB_SRCS})
kde4_add_library(koncreteinterfaces SHARED ${koncreteinterfaces_LIB_SRCS})
target_link_libraries(koncreteinterfaces ${KDE4_KIO_LIBS} ${KDE4_KUTILS_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KNOTIFYCONFIG_LIBS} ktexteditor ${KDE4_THREADWEAVER_LIBRARIES} ${BERKELEY_DB_LIBRARIES} )
set_target_properties(koncreteinterfaces PROPERTIES VERSION 4.0.0 SOVERSION 4)
install(TARGETS koncreteinterfaces DESTINATION ${LIB_INSTALL_DIR} )
install(FILES
kdevelopplugin.desktop
DESTINATION ${SERVICETYPES_INSTALL_DIR}
)
......@@ -65,7 +65,7 @@ public:
dialog, etc. Plugin does not take ownership on info object, also its lifetime should
be equal to the lifetime of the plugin.
@param parent The parent object for the plugin. */
AppFrontend(const KComponentData &instance, QObject *parent=0)
AppFrontend(KInstance* instance, QObject *parent=0)
:Plugin(instance, parent) {}
/**@return Whether the application is currently running.*/
......
......@@ -23,7 +23,7 @@
namespace Koncrete
{
DiffFrontend::DiffFrontend(const KComponentData &instance, QObject *parent)
DiffFrontend::DiffFrontend(KInstance *instance, QObject *parent)
: Plugin(instance, parent)
{
}
......
......@@ -54,7 +54,7 @@ public:
dialog, etc. Plugin does not take ownership on info object, also its lifetime should
be equal to the lifetime of the plugin.
@param parent The parent object for the plugin. */
DiffFrontend( const KComponentData &instance, QObject *parent = 0);
DiffFrontend( KInstance *instance, QObject *parent = 0);
virtual ~DiffFrontend();
/**Displays the patch.
......
/* This file is part of KDevelop
Copyright (C) 2007 Alexander Dymo <adymo@kdevelop.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "icore.h"
namespace Koncrete {
ICore::~ICore()
{
}
}
/* This file is part of KDevelop
Copyright (C) 2007 Alexander Dymo <adymo@kdevelop.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEVCORE_H
#define KDEVCORE_H
#include <QObject>
#include "kdevexport.h"
class KMainWindow;
namespace Koncrete
{
class IUiController;
class IPluginController;
class IProjectController;
/**
* ICore is the container class for all the various objects in use by
* KDevelop. If access is needed to a particular controller, then this class
* should be used.
*
* ICore can provide the user with instances of the following things:
* <li>the mainwindow
* <li>the plugin controller
*
* When an object is provided to ICore so it can be used later, ICore
* will take ownership of the object and upon application shutdown will take
* responsibility for deleting the objects stored by ICore.
*/
class KDEVPLATFORM_EXPORT ICore: public QObject {
public:
virtual ~ICore();
/** @return ui controller.*/
virtual IUiController *uiController() = 0;
/** @return plugin controller.*/
virtual IPluginController *pluginController() = 0;
virtual IProjectController *projectController() = 0;
protected:
ICore(QObject *parent = 0) { Q_UNUSED(parent) };
};
}
#endif
/****************************************************************************
**
** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
**
** This file is part of the Qt Designer of the Qt Toolkit.
**
** This file may be used under the terms of the GNU General Public
** License version 2.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file. Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
** http://www.trolltech.com/products/qt/opensource.html
**
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://www.trolltech.com/products/qt/licensing.html or contact the
** sales department at sales@trolltech.com.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#ifndef IEXTENSION_H
#define IEXTENSION_H
/**
* This macro can be used to declare an extension interface for interface classes
* contained in a Namespace.
* For Interfaces without a surrounding namespace use Q_DECLARE_EXTENSION_INTERFACE(IFace, IId)
* The base code is from Qt's designer code
*/
#define KDEV_DECLARE_EXTENSION_INTERFACE(Namespace, IFace, IId) \
namespace Namespace { \
const char * const IFace##_iid = IId; \
} \
template <> inline Namespace::IFace *qt_extension<Namespace::IFace *>( \
QAbstractExtensionManager *manager, QObject *object) \
{ QObject *extension = manager->extension(object, Q_TYPEID(Namespace::IFace)); \
return extension ? static_cast<Namespace::IFace *>(extension->qt_metacast( \
Namespace::IFace##_iid)) : static_cast<Namespace::IFace *>(0); }
#endif
// kate: space-indent on; indent-width 4; tab-width: 4; replace-tabs on; auto-insert-doxygen on
......@@ -7,8 +7,9 @@
Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
Copyright (C) 2003 Jens Dagerbo <jens.dagerbo@swipnet.se>
Copyright (C) 2003 Mario Scalas <mario.scalas@libero.it>
Copyright (C) 2003-2004 Alexander Dymo <adymo@kdevelop.org>
Copyright (C) 2003-2004,2007 Alexander Dymo <adymo@kdevelop.org>
Copyright (C) 2006 Adam Treat <treat@kde.org>
Copyright (C) 2007 Andreas Pakulat <apaku@gmx.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -25,21 +26,22 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "kdevplugin.h"
#include <kaction.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <kcomponentdata.h>
#include <kiconloader.h>
#include "kdevcore.h"
#include "kdevmainwindow.h"
#include "kdevplugincontroller.h"
#include <kdebug.h>
#include "iplugin.h"
#include "icore.h"
#include "iplugincontroller.h"
// #include "kdevmainwindow.h"
// #include "kdevIPlugincontroller.h"
namespace Koncrete
{
class Plugin::Private
class IPlugin::Private
{
public:
Private()
......@@ -51,43 +53,39 @@ public:
delete iconLoader;
}
ICore *core;
KIconLoader* iconLoader;
};
Plugin::Plugin( const KComponentData &instance, QObject *parent )
IPlugin::IPlugin( const KComponentData &instance, QObject *parent )
: QObject( parent ),
KXMLGUIClient()
{
d = new Private;
d->core = static_cast<Koncrete::ICore*>(parent);
setComponentData( instance );
}
Plugin::~Plugin()
{
}
QWidget *Plugin::pluginView() const
IPlugin::~IPlugin()
{
return 0;
}
Qt::DockWidgetArea Plugin::dockWidgetAreaHint() const
Qt::DockWidgetArea IPlugin::dockWidgetAreaHint() const
{
return Qt::NoDockWidgetArea;
}
bool Plugin::isCentralPlugin() const
bool IPlugin::isCentralPlugin() const
{
return false;
}
void Plugin::prepareForUnload()
void IPlugin::prepareForUnload()
{
Core::mainWindow()->removePlugin( this );
emit readyToUnload( this );
}
KIconLoader *Plugin::iconLoader() const
KIconLoader *IPlugin::iconLoader() const
{
if ( d->iconLoader == 0 ) {
d->iconLoader = new KIconLoader( componentData().componentName(), componentData().dirs() );
......@@ -99,12 +97,25 @@ KIconLoader *Plugin::iconLoader() const
return d->iconLoader;
}
void Plugin::newIconLoader() const
void IPlugin::newIconLoader() const
{
if (d->iconLoader) {
d->iconLoader->reconfigure( componentData().componentName(), componentData().dirs() );
}
}
ICore *IPlugin::core() const
{
return d->core;
}
QExtensionManager* IPlugin::extensionManager()
{
return core()->pluginController()->extensionManager();
}
}
#include "kdevplugin.moc"
#include "iplugin.moc"
// kate: space-indent on; indent-width 4; tab-width: 4; replace-tabs on; auto-insert-doxygen on
/* This file is part of the KDE project
Copyright (C) 1999-2001 Bernd Gehrmann <bernd@kdevelop.org>
Copyright (C) 2004 Alexander Dymo <adymo@kdevelop.org>
Copyright (C) 2004,2007 Alexander Dymo <adymo@kdevelop.org>
Copyright (C) 2006 Adam Treat <treat@kde.org>
Copyright (C) 2007 Andreas Pakulat <apaku@gmx.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -18,21 +19,22 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEVPLUGIN_H
#define KDEVPLUGIN_H
#ifndef IPLUGIN_H
#define IPLUGIN_H
#include <QObject>
#include <kxmlguiclient.h>
#include <QList>
#include <QPointer>
#include <QtDesigner/QExtensionManager>
#include "kdevexport.h"
class QWidget;
class KComponentData;
class KInstance;
class KIconLoader;
/**
* Current KDevelop plugin interface version. Interfaces declare plugin version
* to make sure old source (or binary) incompatible plugins are not loaded.
......@@ -40,14 +42,82 @@ class KIconLoader;
*/
#define KDEVELOP_PLUGIN_VERSION 4