forked from qt-creator/qt-creator
Android: Remove useless java autocompleter.
Change-Id: Icf32ea00ba039a517dae78435efc86aae992e05a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -42,7 +42,6 @@ HEADERS += \
|
|||||||
androidsignaloperation.h \
|
androidsignaloperation.h \
|
||||||
javaeditor.h \
|
javaeditor.h \
|
||||||
javaindenter.h \
|
javaindenter.h \
|
||||||
javaautocompleter.h \
|
|
||||||
javacompletionassistprovider.h \
|
javacompletionassistprovider.h \
|
||||||
avddialog.h \
|
avddialog.h \
|
||||||
android_global.h \
|
android_global.h \
|
||||||
@@ -84,7 +83,6 @@ SOURCES += \
|
|||||||
androidsignaloperation.cpp \
|
androidsignaloperation.cpp \
|
||||||
javaeditor.cpp \
|
javaeditor.cpp \
|
||||||
javaindenter.cpp \
|
javaindenter.cpp \
|
||||||
javaautocompleter.cpp \
|
|
||||||
javacompletionassistprovider.cpp \
|
javacompletionassistprovider.cpp \
|
||||||
avddialog.cpp \
|
avddialog.cpp \
|
||||||
androidbuildapkstep.cpp \
|
androidbuildapkstep.cpp \
|
||||||
|
|||||||
@@ -92,8 +92,6 @@ QtcPlugin {
|
|||||||
"avddialog.h",
|
"avddialog.h",
|
||||||
"certificatesmodel.cpp",
|
"certificatesmodel.cpp",
|
||||||
"certificatesmodel.h",
|
"certificatesmodel.h",
|
||||||
"javaautocompleter.cpp",
|
|
||||||
"javaautocompleter.h",
|
|
||||||
"javacompletionassistprovider.cpp",
|
"javacompletionassistprovider.cpp",
|
||||||
"javacompletionassistprovider.h",
|
"javacompletionassistprovider.h",
|
||||||
"javaeditor.cpp",
|
"javaeditor.cpp",
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
||||||
** information use the contact form at https://www.qt.io/contact-us.
|
|
||||||
**
|
|
||||||
** GNU General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
** General Public License version 3 as published by the Free Software
|
|
||||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
||||||
** included in the packaging of this file. Please review the following
|
|
||||||
** information to ensure the GNU General Public License requirements will
|
|
||||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "javaautocompleter.h"
|
|
||||||
#include <QTextCursor>
|
|
||||||
|
|
||||||
using namespace Android;
|
|
||||||
using namespace Android::Internal;
|
|
||||||
|
|
||||||
JavaAutoCompleter::JavaAutoCompleter()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool JavaAutoCompleter::contextAllowsAutoParentheses(const QTextCursor &cursor, const QString &textToInsert) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(cursor)
|
|
||||||
Q_UNUSED(textToInsert)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
||||||
** information use the contact form at https://www.qt.io/contact-us.
|
|
||||||
**
|
|
||||||
** GNU General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
** General Public License version 3 as published by the Free Software
|
|
||||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
||||||
** included in the packaging of this file. Please review the following
|
|
||||||
** information to ensure the GNU General Public License requirements will
|
|
||||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <texteditor/autocompleter.h>
|
|
||||||
|
|
||||||
namespace Android {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class JavaAutoCompleter : public TextEditor::AutoCompleter
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
// TODO What does the base class do?
|
|
||||||
// I only need the contextAllowsAutoParenthses change
|
|
||||||
JavaAutoCompleter();
|
|
||||||
bool contextAllowsAutoParentheses(const QTextCursor &cursor,
|
|
||||||
const QString &textToInsert = QString()) const;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#include "javaeditor.h"
|
#include "javaeditor.h"
|
||||||
#include "javaindenter.h"
|
#include "javaindenter.h"
|
||||||
#include "javaautocompleter.h"
|
|
||||||
#include "androidconstants.h"
|
#include "androidconstants.h"
|
||||||
#include "javacompletionassistprovider.h"
|
#include "javacompletionassistprovider.h"
|
||||||
|
|
||||||
@@ -74,7 +73,6 @@ JavaEditorFactory::JavaEditorFactory()
|
|||||||
addMimeType(Constants::JAVA_MIMETYPE);
|
addMimeType(Constants::JAVA_MIMETYPE);
|
||||||
|
|
||||||
setDocumentCreator([]() { return new JavaDocument; });
|
setDocumentCreator([]() { return new JavaDocument; });
|
||||||
setAutoCompleterCreator([]() { return new JavaAutoCompleter; });
|
|
||||||
setUseGenericHighlighter(true);
|
setUseGenericHighlighter(true);
|
||||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||||
setEditorActionHandlers(TextEditor::TextEditorActionHandler::UnCommentSelection);
|
setEditorActionHandlers(TextEditor::TextEditorActionHandler::UnCommentSelection);
|
||||||
|
|||||||
Reference in New Issue
Block a user