It has no model attached so is doing nothing and called later again.
Change-Id: Ide36ba5640ff18e29d5be2ad5911ed448f37c92b
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Moved the code to AbstractView::contextHelpId so it can be shared.
Change-Id: I0a95b5ee079cbc26c87d53587f7766f1c333a245
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Add ModelNode::setIdWithoutRefactoring for changes without rewriter
interaction and change the rewriter to use it.
Rename ModelNode::setId to ModelNode::setIdWithRefactoring and add the
refactoring capabilities.
Change-Id: Ia5fba19bd2eeb034d525e92f39d30954e83fa747
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
And translate the message box title.
Change-Id: I9d805c10940e5e3dbaa17323a913a4a55fc61a2d
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
The function currentProject() returns the current project based
on the current project node.
If the current document was newly created by a wizard, this did not work.
We use SessionManager::projectForFile() as a fallback.
For Qt Creator 3.2 we plan to unify this functionality with die Qml
code model.
Change-Id: I296224671a0b496fbf6fd0d8e62e74c28b4f9abb
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Pasting "into" an item that did not have any children did not work.
The method hasNodeListProperty() only return true if the item
already has children.
Change-Id: I00d20df1673758b22d056b8dd64a52c760aabf18
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
To prevent the export of all the view and to reduce compile times we
move the views in the ViewManager in a data class.
Change-Id: Ib568101433268abc1aedd502e5877d2f07076fa5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
The assert is wrong. We check the currentModel from QmlDesignerPlugin::hideDesigner()
and it can be null in case of a .ui/.qbs file.
Change-Id: Ifffa168f81bade757cc8d800150e4411c09915e7
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
CrumbleBarInfo contains the ModelNode to properly identify the node.
We cannot use the id, because no every component has an id.
If the crumble bar only contains one item it is hidden.
Change-Id: I4d421eaad8962aa9043567e1f27957b1aa089766
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This function did nothing but call EditorManager::openEditor(), so we can
call it directly instead. It was not used consistently anyway.
Change-Id: I639ef346164be9260e887faac5dc6651ccfd92c5
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This function is highly confusing as a member of DesignDocument
and the logic can be implemented directly in the ShortcutManager.
Change-Id: Id722dcb71b542b4780614c9f895f06150ccb67ca
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
The ModelNodeOperations are an implementation detail of our
DesignerActions and should not be used in other places.
Change-Id: I495bfd043a6b1dd89952b0e7d2318e429678640b
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
The TextModifers for the sub component and the document
are now assigned to the model. This simplfifies the code.
The member variables to the TextModifers are only kept for ownership.
The DesignDocument still owns the two TextModifers.
Change-Id: Idc84a2ba718666ce54683a67635a93352784dddd
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
And use NodeInstanceView directly. There is still more cleanup required
for the view handling.
Change-Id: I62417644ceefb25fb9f3bb93a894b71ae0929cb0
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
To improve the readability of the source methods should be used.
Change-Id: I839e448369a03dc42b3649baed033daa20c4d49a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This StackedWidget is a leftover from the stand alone version.
In the context of Qt Creator this makes no sense anymore.
Change-Id: I6660dd4b43bdc12fa3329d333158fa759bee4d88
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
We remove m_currentModel and replace it by currentModel().
If m_inFileComponentModel is nil the current model is the document
model, otherwise the current model is the inFileComponentModel.
No need to keep m_currentModel around explicitly.
Change-Id: I590e02dc03c2319cbf713b880cf43d740d64e942
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This is already called in changeToSubComponentAndPushOnCrumblePath()
Change-Id: Ia101144cc33407b0c6268cf7c3717502211654c6
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: I8a2e9e35980198fc4162623db044c228bd209a0f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
And PropertyName is a typedef for QByteArray. Because we don't use the
features of QString and the source would be cluttered with QLatin1Strings
we changed the property name to QByteArray.
Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
There is a hot fix, which is using a timer. This patch is using the
improved approach of testing if a document exists in the new project.
Change-Id: I16ac049c2cc4c0a21ab82fc854c8a062df037f55
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
For deleting Items we need a QmlModelView to delete
dangling property changes.
In the past we "missused" the FormEditorView.
For now VewManager will expose the form editor as
a QmlModelView.
I also cleaned some includes and removed debugs.
Task-number: QTCREATORBUG-8650
Change-Id: I22ca7c5f741324532e81918571be39babd12d2e4
Reviewed-by: Marco Bubke <marco.bubke@digia.com>