forked from qt-creator/qt-creator
TextEditor: Re-work comment definition handling
No need for most of the machinery. Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -800,11 +800,6 @@ void QmlJSTextEditorWidget::resizeEvent(QResizeEvent *event)
|
||||
hideContextPane();
|
||||
}
|
||||
|
||||
void QmlJSTextEditorWidget::unCommentSelection()
|
||||
{
|
||||
Utils::unCommentSelection(this);
|
||||
}
|
||||
|
||||
QmlJSEditorDocument *QmlJSTextEditorWidget::qmlJsEditorDocument() const
|
||||
{
|
||||
return m_qmlJsEditorDocument;
|
||||
|
||||
@@ -78,8 +78,6 @@ public:
|
||||
QmlJSTextEditorWidget(QmlJSTextEditorWidget *other);
|
||||
~QmlJSTextEditorWidget();
|
||||
|
||||
virtual void unCommentSelection();
|
||||
|
||||
QmlJSEditorDocument *qmlJsEditorDocument() const;
|
||||
|
||||
QModelIndex outlineModelIndex();
|
||||
|
||||
@@ -54,6 +54,7 @@ QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor)
|
||||
m_context.add(TextEditor::Constants::C_TEXTEDITOR);
|
||||
m_context.add(ProjectExplorer::Constants::LANG_QMLJS);
|
||||
setDuplicateSupported(true);
|
||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||
}
|
||||
|
||||
bool QmlJSEditor::isDesignModePreferred() const
|
||||
@@ -65,11 +66,6 @@ bool QmlJSEditor::isDesignModePreferred() const
|
||||
return false;
|
||||
}
|
||||
|
||||
const Utils::CommentDefinition *QmlJSEditor::commentDefinition() const
|
||||
{
|
||||
return &m_commentDefinition;
|
||||
}
|
||||
|
||||
TextEditor::CompletionAssistProvider *QmlJSEditor::completionAssistProvider()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>();
|
||||
|
||||
@@ -50,11 +50,7 @@ public:
|
||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||
bool isDesignModePreferred() const;
|
||||
|
||||
const Utils::CommentDefinition *commentDefinition() const;
|
||||
|
||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||
private:
|
||||
Utils::CommentDefinition m_commentDefinition;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user