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:
@@ -55,6 +55,7 @@ JavaEditor::JavaEditor(JavaEditorWidget *editor)
|
||||
setContext(Core::Context(Constants::C_JAVA_EDITOR,
|
||||
TextEditor::Constants::C_TEXTEDITOR));
|
||||
setDuplicateSupported(true);
|
||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||
}
|
||||
|
||||
Core::IEditor *JavaEditor::duplicate()
|
||||
@@ -88,18 +89,9 @@ JavaEditorWidget::JavaEditorWidget(JavaEditorWidget *other)
|
||||
|
||||
void JavaEditorWidget::ctor()
|
||||
{
|
||||
m_commentDefinition.clearCommentStyles();
|
||||
m_commentDefinition.singleLine = QLatin1String("//");
|
||||
m_commentDefinition.multiLineStart = QLatin1String("/*");
|
||||
m_commentDefinition.multiLineEnd = QLatin1String("*/");
|
||||
setAutoCompleter(new JavaAutoCompleter);
|
||||
}
|
||||
|
||||
void JavaEditorWidget::unCommentSelection()
|
||||
{
|
||||
Utils::unCommentSelection(this, m_commentDefinition);
|
||||
}
|
||||
|
||||
TextEditor::BaseTextEditor *JavaEditorWidget::createEditor()
|
||||
{
|
||||
return new JavaEditor(this);
|
||||
|
||||
Reference in New Issue
Block a user