QML Observer: Refresh debug id's when new objects are created

Previously, the user had to navigate to the context of a qml item in
order to edit its source code in Live Preview mode. This change tells
the client to update when new objects are created on server-side, and
makes the editing possible without having to manually trigger updates.
This commit is contained in:
Lasse Holmstedt
2010-08-06 14:03:13 +02:00
parent d00045bdab
commit 85bafac50e
12 changed files with 134 additions and 8 deletions

View File

@@ -40,6 +40,8 @@
#include <qmljs/qmljsdelta.h>
#include <qmljs/parser/qmljsast_p.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/ieditor.h>
@@ -532,6 +534,12 @@ void QmlJSLiveTextPreview::documentChanged(QmlJS::Document::Ptr doc)
if (!core->hasContext(dbgcontext))
return;
if (ProjectExplorer::Project *debugProject = Inspector::instance()->debugProject()) {
QStringList files = debugProject->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
if (!files.contains(doc->fileName()))
return;
}
bool experimentalWarningShown = false;
if (m_applyChangesToQmlObserver) {