Merge remote-tracking branch 'origin/4.4'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/qbsprojectmanager/qbsproject.h Change-Id: I6b9cdf704be95ade02488c8b19582b6621282fb8
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 68 KiB |
BIN
doc/images/qtcreator-tests-view.png
Normal file
After Width: | Height: | Size: 30 KiB |
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -131,6 +131,9 @@
|
||||
\endlist
|
||||
|
||||
\QC creates the test in the specified project directory.
|
||||
For more information about creating Google tests, see the
|
||||
\l{https://github.com/google/googletest/blob/master/googletest/docs/Primer.md}
|
||||
{Google Test Primer}.
|
||||
|
||||
\section1 Setting Up the Google C++ Testing Framework
|
||||
|
||||
@@ -175,6 +178,87 @@
|
||||
\li \c {LIBS += -lgmock -L<path_to_gmock_lib>}
|
||||
\endlist
|
||||
|
||||
\section1 Building and Running Tests
|
||||
|
||||
To build and run tests:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Open a project that contains tests.
|
||||
|
||||
\li In the \uicontrol Tests view, select the tests to run.
|
||||
|
||||
\li In the \uicontrol {Test Results} output pane, select
|
||||
\inlineimage run_small.png
|
||||
(\uicontrol {Run All Tests}) to run all test or
|
||||
\inlineimage qtcreator-run-selected-tests.png
|
||||
(\uicontrol {Run Selected Tests}) to run the selected tests.
|
||||
|
||||
\note By default, \QC builds a project before deploying and running
|
||||
it.
|
||||
|
||||
\endlist
|
||||
|
||||
If a test takes more than a minute to execute, the default timeout might
|
||||
stop the test execution. To increase the timeout, select \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol General.
|
||||
|
||||
\section2 Selecting Tests to Run
|
||||
|
||||
The \uicontrol Tests view shows all the tests found for the currently active
|
||||
test frameworks in the current project. Select the test cases to run.
|
||||
|
||||
\image qtcreator-tests-view.png
|
||||
|
||||
If a Qt Quick test case does not have a name, it is marked
|
||||
\uicontrol Unnamed in the list. Unnamed test cases are executed when you
|
||||
select \uicontrol {Run All Tests}. You cannot select or deselect them.
|
||||
|
||||
\QC scans the project for tests when you open the project and updates the
|
||||
test list for the currently active test frameworks when you edit tests.
|
||||
To refresh the view, select \uicontrol {Rescan Tests} in the context menu.
|
||||
|
||||
You can add filters to specify the directories within the current project
|
||||
to scan for tests. Select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol {Test Settings} > \uicontrol General > \uicontrol Add, and
|
||||
specify paths to the directories to scan for tests. Wildcards are not
|
||||
supported in the filter expressions.
|
||||
|
||||
\image qtcreator-autotests-options.png
|
||||
|
||||
To show or hide init and cleanup or data functions in the \uicontrol Tests
|
||||
view, select \inlineimage filtericon.png
|
||||
(\uicontrol {Filter Test Tree}), and then select \uicontrol {Show Init and
|
||||
Cleanup Functions} or \uicontrol {Show Data Functions}. Double-click a
|
||||
function in the list to open its source code in the code editor.
|
||||
|
||||
The test cases are listed in alphabetic order. To list them in the order in
|
||||
which they are defined in the source code, select \inlineimage leafsort.png
|
||||
(\uicontrol {Sort Naturally}).
|
||||
|
||||
\section2 Specifying Settings for Running Qt Tests
|
||||
|
||||
The code inside a benchmark test is measured, and possibly also repeated
|
||||
several times in order to get an accurate measurement. This depends on the
|
||||
measurement back-end that you can select in the
|
||||
\uicontrol {Benchmark Metrics} group in \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Qt Test}:
|
||||
walltime, CPU tick counter, event counter, Valgrind Callgrind, and Linux
|
||||
Perf. For more information, see \l{Creating a Benchmark}.
|
||||
|
||||
\image qtcreator-autotests-options-qt.png
|
||||
|
||||
To receive verbose output when running benchmarks, select the
|
||||
\uicontrol {Verbose benchmarks} check box.
|
||||
|
||||
To allow the debugger to interrupt Qt tests on assertions, select the
|
||||
\uicontrol {Disable crash handler while debugging} check box.
|
||||
|
||||
To record information about signals and slots in the test log, select the
|
||||
\uicontrol {Log signals and slots} check box.
|
||||
|
||||
\section2 Specifying Settings for Running Google Tests
|
||||
|
||||
To specify settings for running Google tests, select \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Google Test}.
|
||||
|
||||
@@ -193,58 +277,23 @@
|
||||
failures into C++ exceptions, select the \uicontrol {Throw on failure} check
|
||||
box.
|
||||
|
||||
For more information about creating Google tests, see the
|
||||
\l{https://github.com/google/googletest/blob/master/googletest/docs/Primer.md}
|
||||
{Google Test Primer}.
|
||||
|
||||
\section1 Building and Running Tests
|
||||
|
||||
To build and run tests:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Open a project that contains tests.
|
||||
|
||||
\li In the \uicontrol {Test Results} output pane, select
|
||||
\inlineimage run_small.png
|
||||
(\uicontrol {Run All Tests}) to run all test or
|
||||
\inlineimage qtcreator-run-selected-tests.png
|
||||
(\uicontrol {Run Selected Tests}) to run the selected tests.
|
||||
|
||||
You can select the tests to run in the \uicontrol Tests view in the
|
||||
\uicontrol Projects pane. For more information, see
|
||||
\l{Viewing Tests}.
|
||||
|
||||
\note By default, \QC builds a project before deploying and running
|
||||
it.
|
||||
|
||||
\endlist
|
||||
|
||||
If a test takes more than a minute to execute, the default timeout might
|
||||
stop the test execution. To increase the timeout, select \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol General.
|
||||
|
||||
\image qtcreator-autotests-options.png
|
||||
|
||||
\QC scans the project for tests when you open the project and updates the
|
||||
test list for the currently active test frameworks when you edit tests.
|
||||
|
||||
The code inside a benchmark test is measured, and possibly also repeated
|
||||
several times in order to get an accurate measurement. This depends on the
|
||||
measurement back-end that you can select in the
|
||||
\uicontrol {Benchmark Metrics} group in \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Qt Test}:
|
||||
walltime, CPU tick counter, event counter, Valgrind Callgrind, and Linux
|
||||
Perf. For more information, see \l{Creating a Benchmark}.
|
||||
|
||||
\image qtcreator-autotests-options-qt.png
|
||||
|
||||
To allow the debugger to interrupt Qt tests on assertions, select the
|
||||
\uicontrol {Disable crash handler while debugging} check box.
|
||||
|
||||
\section1 Viewing Test Output
|
||||
|
||||
The test results are displayed in the \uicontrol {Test Results} output pane.
|
||||
The test results are displayed in the \uicontrol {Test Results} output pane
|
||||
in XML format. XML can be parsed more easily and reliably than plain text.
|
||||
|
||||
However, if a Qt test crashes, it might not produce complete XML code that
|
||||
can be parsed, which might lead to information loss. The lost information
|
||||
might be retrievable when viewing the results as plain text.
|
||||
To view the results of Qt tests as plain text, select \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Qt Test}, and
|
||||
then deselect the \uicontrol {Use XML output} check box. Then select the
|
||||
\inlineimage text.png
|
||||
(\uicontrol {Switch Between Visual and Text Display}) button in the
|
||||
\uicontrol {Test Results} output pane to switch to the text display.
|
||||
|
||||
The following table lists the messages that the \uicontrol {Test Results}
|
||||
output pane displays:
|
||||
|
||||
\table
|
||||
\header
|
||||
@@ -272,6 +321,13 @@
|
||||
\row
|
||||
\li FAIL
|
||||
\li Test case failed. Double-click the line for more information.
|
||||
\row
|
||||
\li FATAL
|
||||
\li A fatal error occurred that stops the test case from being run,
|
||||
for example.
|
||||
\row
|
||||
\li INFO
|
||||
\li Informative message.
|
||||
\row
|
||||
\li INTERNAL
|
||||
\li Internal message.
|
||||
@@ -281,6 +337,9 @@
|
||||
\row
|
||||
\li SKIP
|
||||
\li Test case was skipped.
|
||||
\row
|
||||
\li SYSTEM
|
||||
\li An error message received from or influenced by the OS.
|
||||
\row
|
||||
\li XPASS
|
||||
\li Test case passed even though it was expected to fail.
|
||||
@@ -294,7 +353,14 @@
|
||||
(\uicontrol {Filter Test Results}), and then select the types of messages to
|
||||
show.
|
||||
|
||||
To hide internal messages and run configuration warnings, select
|
||||
\uicontrol Tools > \uicontrol Options > \uicontrol {Test Settings} >
|
||||
\uicontrol General.
|
||||
By default, test result output is limited to 100,000 characters. The output
|
||||
pane is automatically scrolled down when new results are added. To display
|
||||
full results, select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol {Test Settings} > \uicontrol General, and then deselect the
|
||||
\uicontrol {Limit result output} check box. To disable automatic scrolling,
|
||||
deselect the \uicontrol {Automatically scroll results} check box.
|
||||
|
||||
Internal messages and run configuration warnings for guessed configurations
|
||||
are omitted by default. To view them, deselect the \uicontrol {Omit internal
|
||||
messages} and \uicontrol {Omit run configuration warnings} check boxes.
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -141,6 +141,7 @@
|
||||
hierarchy of a QML file.
|
||||
|
||||
\li \uicontrol Tests lists autotests and Qt Quick tests in the project.
|
||||
For more information, see \l {Running Autotests}.
|
||||
|
||||
\li \uicontrol {Type Hierarchy} shows the base classes of a class.
|
||||
|
||||
@@ -303,28 +304,6 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Viewing Tests
|
||||
|
||||
The \uicontrol Tests view shows the autotests and Qt Quick tests in the
|
||||
current project. Select the test cases to run. If a Qt
|
||||
Quick test case does not have a name, it is marked \uicontrol Unnamed in the
|
||||
list. Unnamed test cases are always executed when the application that
|
||||
contains them is run, and therefore you cannot select or deselect them.
|
||||
|
||||
To show or hide init and cleanup or data functions, select
|
||||
\uicontrol {Filter Test Tree} > \uicontrol {Show Init and Cleanup Functions}
|
||||
or \uicontrol {Show Data Functions}. Double-click a function in the list
|
||||
to open its source code in the code editor.
|
||||
|
||||
The test cases are listed in alphabetic order. To list them in the order in
|
||||
which they are defined in the source code, select \inlineimage leafsort.png
|
||||
(\uicontrol {Sort Naturally}).
|
||||
|
||||
To run tests, select \uicontrol {Run All Tests} or
|
||||
\uicontrol {Run Selected Tests} in the context menu.
|
||||
|
||||
To refresh the view, select \uicontrol {Rescan Tests} in the context menu.
|
||||
|
||||
\section2 Viewing Type Hierarchy
|
||||
|
||||
To view the base classes of a class, right-click the class and select
|
||||
@@ -375,8 +354,7 @@
|
||||
To open the \uicontrol{General Messages} and \l{Using Version Control Systems}
|
||||
{Version Control} panes, select
|
||||
\uicontrol {Window > Output Panes}. To display the \uicontrol {To-Do Entries} pane,
|
||||
enable the Todo plugin and to display the \l{Running Autotests}
|
||||
{Test Results} pane, enable the Auto Tests plugin.
|
||||
enable the Todo plugin.
|
||||
|
||||
\section2 Issues
|
||||
|
||||
|
@@ -57,17 +57,16 @@ def parse_arguments():
|
||||
|
||||
source_include_patterns = [
|
||||
# directories
|
||||
r"^scripts/.*$", # everything under scripts/
|
||||
r"^doc/.*$", # everything under doc/
|
||||
r"^(?!(share|tests)/.*$)(.*/)?$", # look into all directories except under share/ and tests/
|
||||
r"^share/(qtcreator/(qml/(qmlpuppet/(.*/)?)?)?)?$", # for shared headers for qt quick designer plugins
|
||||
r"^src/(.*/)?$", # all directories under src/
|
||||
r"^plugins/(.*/)?$", # all directories under plugins/ (if this is run on extra plugin repositories)
|
||||
# files
|
||||
r"^HACKING$",
|
||||
r"^LICENSE.*$",
|
||||
r"^README.md$",
|
||||
r"^.*\.pri$",
|
||||
r"^.*\.h$",
|
||||
r"^scripts/.*$", # include everything under scripts/
|
||||
r"^doc/.*$", # include everything under doc/
|
||||
r"^.*\.pri$", # .pri files in all directories that are looked into
|
||||
r"^.*\.h$", # .h files in all directories that are looked into
|
||||
]
|
||||
|
||||
build_include_patterns = [
|
||||
|
@@ -20,9 +20,11 @@ win32 {
|
||||
# We need the version in two separate formats for the .rc file
|
||||
# RC_VERSION=4,3,82,0 (quadruple)
|
||||
# RC_VERSION_STRING="4.4.0-beta1" (free text)
|
||||
# Also, we need to replace space with \x20 to be able to work with both rc and windres
|
||||
COPYRIGHT = "2008-$${QTCREATOR_COPYRIGHT_YEAR} The Qt Company Ltd"
|
||||
DEFINES += RC_VERSION=$$replace(QTCREATOR_VERSION, "\\.", ","),0 \
|
||||
RC_VERSION_STRING=\\\"$${QTCREATOR_DISPLAY_VERSION}\\\" \
|
||||
RC_COPYRIGHT='"\\\"2008-$${QTCREATOR_COPYRIGHT_YEAR} The Qt Company Ltd\\\""'
|
||||
RC_VERSION_STRING=\"$${QTCREATOR_DISPLAY_VERSION}\" \
|
||||
RC_COPYRIGHT=\"$$replace(COPYRIGHT, " ", "\\x20")\"
|
||||
RC_FILE = qtcreator.rc
|
||||
} else:macx {
|
||||
LIBS += -framework CoreFoundation
|
||||
|
@@ -54,9 +54,11 @@ QtcProduct {
|
||||
// We need the version in two separate formats for the .rc file
|
||||
// RC_VERSION=4,3,82,0 (quadruple)
|
||||
// RC_VERSION_STRING="4.4.0-beta1" (free text)
|
||||
// Also, we need to replace space with \x20 to be able to work with both rc and windres
|
||||
cpp.defines: outer.concat(["RC_VERSION=" + qtc.qtcreator_version.replace(/\./g, ",") + ",0",
|
||||
"RC_VERSION_STRING=\"" + qtc.qtcreator_display_version + "\"",
|
||||
"RC_COPYRIGHT=\"2008-" + qtc.qtcreator_copyright_year + " The Qt Company Ltd\""])
|
||||
"RC_VERSION_STRING=" + qtc.qtcreator_display_version,
|
||||
"RC_COPYRIGHT=2008-" + qtc.qtcreator_copyright_year
|
||||
+ " The Qt Company Ltd".replace(/ /g, "\\x20")])
|
||||
files: "qtcreator.rc"
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,8 @@
|
||||
#include <windows.h>
|
||||
|
||||
#define STRINGIFY1(x) #x
|
||||
#define STRINGIFY(x) STRINGIFY1(x)
|
||||
|
||||
IDI_ICON1 ICON DISCARDABLE "qtcreator.ico"
|
||||
IDI_ICON2 ICON DISCARDABLE "winicons/c.ico"
|
||||
IDI_ICON3 ICON DISCARDABLE "winicons/cpp.ico"
|
||||
@@ -19,10 +22,10 @@ VS_VERSION_INFO VERSIONINFO
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "FileDescription", "Qt Creator"
|
||||
VALUE "FileVersion", RC_VERSION_STRING
|
||||
VALUE "FileVersion", STRINGIFY(RC_VERSION_STRING)
|
||||
VALUE "ProductName", "Qt Creator"
|
||||
VALUE "ProductVersion", RC_VERSION_STRING
|
||||
VALUE "LegalCopyright", RC_COPYRIGHT
|
||||
VALUE "ProductVersion", STRINGIFY(RC_VERSION_STRING)
|
||||
VALUE "LegalCopyright", STRINGIFY(RC_COPYRIGHT)
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
|
@@ -1,2 +0,0 @@
|
||||
|
||||
#include "ASTPatternBuilder.h"
|
@@ -1,3 +1,22 @@
|
||||
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "Lexer.h"
|
||||
#include "Token.h"
|
||||
|
@@ -1,3 +1,22 @@
|
||||
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "ObjectiveCTypeQualifiers.h"
|
||||
|
||||
|
@@ -1,9 +1,27 @@
|
||||
#ifndef CPLUSPLUS_OBJC_TYPEQUALIFIERS_H
|
||||
#define CPLUSPLUS_OBJC_TYPEQUALIFIERS_H
|
||||
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CPlusPlusForwardDeclarations.h"
|
||||
|
||||
|
||||
namespace CPlusPlus {
|
||||
|
||||
enum {
|
||||
@@ -27,6 +45,3 @@ enum {
|
||||
CPLUSPLUS_EXPORT int classifyObjectiveCContextKeyword(const char *s, int n);
|
||||
|
||||
} // namespace CPlusPlus
|
||||
|
||||
|
||||
#endif // CPLUSPLUS_OBJC_TYPEQUALIFIERS_H
|
||||
|
@@ -1,3 +1,22 @@
|
||||
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "QtContextKeywords.h"
|
||||
|
||||
|
19
src/libs/3rdparty/cplusplus/QtContextKeywords.h
vendored
@@ -1,3 +1,22 @@
|
||||
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
5
src/libs/3rdparty/cplusplus/SafeMatcher.h
vendored
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CPLUSPLUS_SAFETYPEMATCHER_H
|
||||
#define CPLUSPLUS_SAFETYPEMATCHER_H
|
||||
#pragma once
|
||||
|
||||
#include "Matcher.h"
|
||||
|
||||
@@ -56,5 +55,3 @@ private:
|
||||
};
|
||||
|
||||
} // CPlusPlus namespace
|
||||
|
||||
#endif // CPLUSPLUS_SAFETYPEMATCHER_H
|
||||
|
1
src/libs/3rdparty/cplusplus/cplusplus.pri
vendored
@@ -40,7 +40,6 @@ SOURCES += \
|
||||
$$PWD/ASTMatch0.cpp \
|
||||
$$PWD/ASTVisitor.cpp \
|
||||
$$PWD/ASTClone.cpp \
|
||||
$$PWD/ASTPatternBuilder.cpp \
|
||||
$$PWD/ASTMatcher.cpp \
|
||||
$$PWD/Matcher.cpp \
|
||||
$$PWD/Control.cpp \
|
||||
|
@@ -30,7 +30,6 @@ Project {
|
||||
"ASTMatch0.cpp",
|
||||
"ASTMatcher.cpp",
|
||||
"ASTMatcher.h",
|
||||
"ASTPatternBuilder.cpp",
|
||||
"ASTPatternBuilder.h",
|
||||
"ASTVisit.cpp",
|
||||
"ASTVisitor.cpp",
|
||||
|
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/stringutils.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
@@ -631,26 +632,6 @@ static inline QString msgInvalidFormat(const char *key, const QString &content)
|
||||
.arg(QLatin1String(key), content);
|
||||
}
|
||||
|
||||
bool PluginSpec::readMultiLineString(const QJsonValue &value, QString *out)
|
||||
{
|
||||
QTC_ASSERT(out, return false);
|
||||
if (value.isString()) {
|
||||
*out = value.toString();
|
||||
} else if (value.isArray()) {
|
||||
QJsonArray array = value.toArray();
|
||||
QStringList lines;
|
||||
foreach (const QJsonValue &v, array) {
|
||||
if (!v.isString())
|
||||
return false;
|
||||
lines.append(v.toString());
|
||||
}
|
||||
*out = lines.join(QLatin1Char('\n'));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
@@ -735,7 +716,7 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
|
||||
copyright = value.toString();
|
||||
|
||||
value = metaData.value(QLatin1String(DESCRIPTION));
|
||||
if (!value.isUndefined() && !PluginSpec::readMultiLineString(value, &description))
|
||||
if (!value.isUndefined() && !Utils::readMultiLineString(value, &description))
|
||||
return reportError(msgValueIsNotAString(DESCRIPTION));
|
||||
|
||||
value = metaData.value(QLatin1String(URL));
|
||||
@@ -749,7 +730,7 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
|
||||
category = value.toString();
|
||||
|
||||
value = metaData.value(QLatin1String(LICENSE));
|
||||
if (!value.isUndefined() && !PluginSpec::readMultiLineString(value, &license))
|
||||
if (!value.isUndefined() && !Utils::readMultiLineString(value, &license))
|
||||
return reportError(msgValueIsNotAMultilineString(LICENSE));
|
||||
|
||||
value = metaData.value(QLatin1String(PLATFORM));
|
||||
@@ -799,7 +780,7 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
|
||||
} else if (typeValue.toLower() == QLatin1String(DEPENDENCY_TYPE_TEST)) {
|
||||
dep.type = PluginDependency::Test;
|
||||
} else {
|
||||
return reportError(tr("Dependency: \"%1\" must be \"%2\" or \"%3\" (is \"%4\")")
|
||||
return reportError(tr("Dependency: \"%1\" must be \"%2\" or \"%3\" (is \"%4\").")
|
||||
.arg(QLatin1String(DEPENDENCY_TYPE),
|
||||
QLatin1String(DEPENDENCY_TYPE_HARD),
|
||||
QLatin1String(DEPENDENCY_TYPE_SOFT),
|
||||
|
@@ -131,8 +131,6 @@ public:
|
||||
bool hasError() const;
|
||||
QString errorString() const;
|
||||
|
||||
static bool readMultiLineString(const QJsonValue &value, QString *out);
|
||||
|
||||
private:
|
||||
PluginSpec();
|
||||
|
||||
|
@@ -758,6 +758,13 @@ void ModelController::moveObject(MPackage *newOwner, MObject *object)
|
||||
QMT_ASSERT(object, return);
|
||||
QMT_ASSERT(object != m_rootPackage, return);
|
||||
|
||||
// verify that newOwner is not a child of object
|
||||
MObject *newOwnerObject = newOwner;
|
||||
while (newOwnerObject && newOwnerObject != object)
|
||||
newOwnerObject = newOwnerObject->owner();
|
||||
if (newOwnerObject == object)
|
||||
return;
|
||||
|
||||
if (newOwner != object->owner()) {
|
||||
int formerRow = 0;
|
||||
MObject *formerOwner = object->owner();
|
||||
|
@@ -2,6 +2,8 @@ import qbs
|
||||
import qbs.Environment
|
||||
import qbs.File
|
||||
import qbs.FileInfo
|
||||
import qbs.Process
|
||||
import qbs.Utilities
|
||||
|
||||
QtcLibrary {
|
||||
condition: qbs.toolchain.contains("msvc") && cdbPath
|
||||
@@ -45,11 +47,98 @@ QtcLibrary {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
cpp.includePaths: [FileInfo.joinPaths(cdbPath, "inc")]
|
||||
cpp.dynamicLibraries: [
|
||||
"user32.lib",
|
||||
FileInfo.joinPaths(cdbLibPath, "dbgeng.lib")
|
||||
]
|
||||
|
||||
property string pythonInstallDir: Environment.getEnv("PYTHON_INSTALL_DIR")
|
||||
|
||||
Probe {
|
||||
id: pythonDllProbe
|
||||
condition: product.condition
|
||||
property string pythonDir: pythonInstallDir // Input
|
||||
property string buildVariant: qbs.buildVariant // Input
|
||||
property string fileNamePrefix // Output
|
||||
configure: {
|
||||
function printWarning(msg) {
|
||||
console.warn(msg + " The python dumpers for cdb will not be available.");
|
||||
}
|
||||
|
||||
if (!pythonDir) {
|
||||
printWarning("PYTHON_INSTALL_DIR not set.");
|
||||
return;
|
||||
}
|
||||
if (!File.exists(pythonDir)) {
|
||||
printWarning("The provided python installation directory '" + pythonDir
|
||||
+ "' does not exist.");
|
||||
return;
|
||||
}
|
||||
var p = new Process();
|
||||
try {
|
||||
var pythonFilePath = FileInfo.joinPaths(pythonDir, "python.exe");
|
||||
p.exec(pythonFilePath, ["--version"], true);
|
||||
var output = p.readStdOut().trim();
|
||||
var magicPrefix = "Python ";
|
||||
if (!output.startsWith(magicPrefix)) {
|
||||
printWarning("Unexpected python output when checking for version: '"
|
||||
+ output + "'");
|
||||
return;
|
||||
}
|
||||
var versionNumberString = output.slice(magicPrefix.length);
|
||||
var versionNumbers = versionNumberString.split('.');
|
||||
if (versionNumbers.length < 2) {
|
||||
printWarning("Unexpected python output when checking for version: '"
|
||||
+ output + "'");
|
||||
return;
|
||||
}
|
||||
if (Utilities.versionCompare(versionNumberString, "3.5") < 0) {
|
||||
printWarning("The python installation at '" + pythonDir
|
||||
+ "' has version " + versionNumberString + ", but 3.5 or higher "
|
||||
+ "is required.");
|
||||
return;
|
||||
}
|
||||
found = true;
|
||||
fileNamePrefix = "python" + versionNumbers[0] + versionNumbers[1];
|
||||
if (buildVariant === "debug")
|
||||
fileNamePrefix += "_d"
|
||||
} finally {
|
||||
p.close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Group {
|
||||
name: "pythonDumper"
|
||||
condition: pythonDllProbe.found
|
||||
files: [
|
||||
"pycdbextmodule.cpp",
|
||||
"pycdbextmodule.h",
|
||||
"pyfield.cpp",
|
||||
"pyfield.h",
|
||||
"pystdoutredirect.cpp",
|
||||
"pystdoutredirect.h",
|
||||
"pytype.cpp",
|
||||
"pytype.h",
|
||||
"pyvalue.cpp",
|
||||
"pyvalue.h",
|
||||
]
|
||||
}
|
||||
|
||||
Properties {
|
||||
condition: pythonDllProbe.found
|
||||
cpp.defines: ["WITH_PYTHON=1"]
|
||||
}
|
||||
cpp.includePaths: {
|
||||
var paths = [FileInfo.joinPaths(cdbPath, "inc")];
|
||||
if (pythonDllProbe.found)
|
||||
paths.push(FileInfo.joinPaths(pythonInstallDir, "include"));
|
||||
return paths;
|
||||
}
|
||||
cpp.dynamicLibraries: {
|
||||
var libs = [ "user32.lib", FileInfo.joinPaths(cdbLibPath, "dbgeng.lib") ];
|
||||
if (pythonDllProbe.found)
|
||||
libs.push(FileInfo.joinPaths(pythonInstallDir, "libs",
|
||||
pythonDllProbe.fileNamePrefix + ".lib"));
|
||||
return libs;
|
||||
}
|
||||
cpp.linkerFlags: ["/DEF:" + FileInfo.toWindowsSeparators(
|
||||
FileInfo.joinPaths(product.sourceDirectory,
|
||||
"qtcreatorcdbext.def"))]
|
||||
@@ -61,6 +150,16 @@ QtcLibrary {
|
||||
dirName += "32";
|
||||
return FileInfo.joinPaths(qtc.libDirName, dirName);
|
||||
}
|
||||
|
||||
Group {
|
||||
condition: pythonDllProbe.found
|
||||
files: [FileInfo.joinPaths(pythonInstallDir, pythonDllProbe.fileNamePrefix + ".dll")]
|
||||
qbs.install: true
|
||||
qbs.installDir: installDir
|
||||
}
|
||||
|
||||
useNonGuiPchFile: false
|
||||
|
||||
files: [
|
||||
"common.cpp",
|
||||
"common.h",
|
||||
|
305
src/libs/utils/highlightingitemdelegate.cpp
Normal file
@@ -0,0 +1,305 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 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 "highlightingitemdelegate.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
|
||||
const int kMinimumLineNumberDigits = 6;
|
||||
|
||||
namespace Utils {
|
||||
|
||||
HighlightingItemDelegate::HighlightingItemDelegate(int tabWidth, QObject *parent)
|
||||
: QItemDelegate(parent)
|
||||
{
|
||||
setTabWidth(tabWidth);
|
||||
}
|
||||
|
||||
void HighlightingItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
static const int iconSize = 16;
|
||||
|
||||
painter->save();
|
||||
|
||||
const QStyleOptionViewItem opt = setOptions(index, option);
|
||||
painter->setFont(opt.font);
|
||||
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
|
||||
// ---- do the layout
|
||||
QRect checkRect;
|
||||
QRect pixmapRect;
|
||||
QRect textRect;
|
||||
|
||||
// check mark
|
||||
const bool checkable = (index.model()->flags(index) & Qt::ItemIsUserCheckable);
|
||||
Qt::CheckState checkState = Qt::Unchecked;
|
||||
if (checkable) {
|
||||
QVariant checkStateData = index.data(Qt::CheckStateRole);
|
||||
checkState = static_cast<Qt::CheckState>(checkStateData.toInt());
|
||||
checkRect = doCheck(opt, opt.rect, checkStateData);
|
||||
}
|
||||
|
||||
// icon
|
||||
const QIcon icon = index.model()->data(index, Qt::DecorationRole).value<QIcon>();
|
||||
if (!icon.isNull()) {
|
||||
const QSize size = icon.actualSize(QSize(iconSize, iconSize));
|
||||
pixmapRect = QRect(0, 0, size.width(), size.height());
|
||||
}
|
||||
|
||||
// text
|
||||
textRect = opt.rect.adjusted(0, 0, checkRect.width() + pixmapRect.width(), 0);
|
||||
|
||||
// do layout
|
||||
doLayout(opt, &checkRect, &pixmapRect, &textRect, false);
|
||||
// ---- draw the items
|
||||
// icon
|
||||
if (!icon.isNull())
|
||||
icon.paint(painter, pixmapRect, option.decorationAlignment);
|
||||
|
||||
// line numbers
|
||||
const int lineNumberAreaWidth = drawLineNumber(painter, opt, textRect, index);
|
||||
textRect.adjust(lineNumberAreaWidth, 0, 0, 0);
|
||||
|
||||
// text and focus/selection
|
||||
drawText(painter, opt, textRect, index);
|
||||
QItemDelegate::drawFocus(painter, opt, opt.rect);
|
||||
|
||||
// check mark
|
||||
if (checkable)
|
||||
QItemDelegate::drawCheck(painter, opt, checkRect, checkState);
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
void HighlightingItemDelegate::setTabWidth(int width)
|
||||
{
|
||||
m_tabString = QString(width, ' ');
|
||||
}
|
||||
|
||||
// returns the width of the line number area
|
||||
int HighlightingItemDelegate::drawLineNumber(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QRect &rect,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
static const int lineNumberAreaHorizontalPadding = 4;
|
||||
const int lineNumber = index.model()->data(index, int(HighlightingItemRole::LineNumber)).toInt();
|
||||
if (lineNumber < 1)
|
||||
return 0;
|
||||
const bool isSelected = option.state & QStyle::State_Selected;
|
||||
const QString lineText = QString::number(lineNumber);
|
||||
const int minimumLineNumberDigits = qMax(kMinimumLineNumberDigits, lineText.count());
|
||||
const int fontWidth = painter->fontMetrics().width(QString(minimumLineNumberDigits, '0'));
|
||||
const int lineNumberAreaWidth = lineNumberAreaHorizontalPadding + fontWidth
|
||||
+ lineNumberAreaHorizontalPadding;
|
||||
QRect lineNumberAreaRect(rect);
|
||||
lineNumberAreaRect.setWidth(lineNumberAreaWidth);
|
||||
|
||||
QPalette::ColorGroup cg = QPalette::Normal;
|
||||
if (!(option.state & QStyle::State_Active))
|
||||
cg = QPalette::Inactive;
|
||||
else if (!(option.state & QStyle::State_Enabled))
|
||||
cg = QPalette::Disabled;
|
||||
|
||||
painter->fillRect(lineNumberAreaRect, QBrush(isSelected ?
|
||||
option.palette.brush(cg, QPalette::Highlight) :
|
||||
option.palette.color(cg, QPalette::Base).darker(111)));
|
||||
|
||||
QStyleOptionViewItem opt = option;
|
||||
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
|
||||
opt.palette.setColor(cg, QPalette::Text, Qt::darkGray);
|
||||
|
||||
const QStyle *style = QApplication::style();
|
||||
const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
|
||||
|
||||
const QRect rowRect
|
||||
= lineNumberAreaRect.adjusted(-textMargin, 0,
|
||||
textMargin - lineNumberAreaHorizontalPadding, 0);
|
||||
QItemDelegate::drawDisplay(painter, opt, rowRect, lineText);
|
||||
|
||||
return lineNumberAreaWidth;
|
||||
}
|
||||
|
||||
void HighlightingItemDelegate::drawText(QPainter *painter,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QRect &rect,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
QString text = index.model()->data(index, Qt::DisplayRole).toString();
|
||||
// show number of subresults in displayString
|
||||
if (index.model()->hasChildren(index))
|
||||
text += " (" + QString::number(index.model()->rowCount(index)) + ')';
|
||||
|
||||
int searchTermStart = index.model()->data(index, int(HighlightingItemRole::StartColumn)).toInt();
|
||||
int searchTermLength = index.model()->data(index, int(HighlightingItemRole::Length)).toInt();
|
||||
if (searchTermStart < 0 || searchTermStart >= text.length() || searchTermLength < 1) {
|
||||
drawDisplay(painter, option, rect, text.replace('\t', m_tabString), {});
|
||||
return;
|
||||
}
|
||||
|
||||
// replace tabs with searchTerm bookkeeping
|
||||
int searchTermEnd = searchTermStart + searchTermLength;
|
||||
const int tabDiff = m_tabString.size() - 1;
|
||||
for (int i = 0; i < text.length(); i++) {
|
||||
if (text.at(i) == '\t') {
|
||||
text.replace(i, 1, m_tabString);
|
||||
if (i < searchTermStart) {
|
||||
searchTermStart += tabDiff;
|
||||
searchTermEnd += tabDiff;
|
||||
} else if (i < searchTermEnd) {
|
||||
searchTermEnd += tabDiff;
|
||||
searchTermLength += tabDiff;
|
||||
}
|
||||
i += tabDiff;
|
||||
}
|
||||
}
|
||||
|
||||
const QColor highlightForeground =
|
||||
index.model()->data(index, int(HighlightingItemRole::Foreground)).value<QColor>();
|
||||
const QColor highlightBackground =
|
||||
index.model()->data(index, int(HighlightingItemRole::Background)).value<QColor>();
|
||||
QTextCharFormat highlightFormat;
|
||||
highlightFormat.setForeground(highlightForeground);
|
||||
highlightFormat.setBackground(highlightBackground);
|
||||
|
||||
drawDisplay(painter, option, rect, text, {{searchTermStart, searchTermLength, highlightFormat}});
|
||||
}
|
||||
|
||||
// copied from QItemDelegate for drawDisplay
|
||||
static QString replaceNewLine(QString text)
|
||||
{
|
||||
static const QChar nl = '\n';
|
||||
for (int i = 0; i < text.count(); ++i)
|
||||
if (text.at(i) == nl)
|
||||
text[i] = QChar::LineSeparator;
|
||||
return text;
|
||||
}
|
||||
|
||||
// copied from QItemDelegate for drawDisplay
|
||||
QSizeF doTextLayout(QTextLayout *textLayout, int lineWidth)
|
||||
{
|
||||
qreal height = 0;
|
||||
qreal widthUsed = 0;
|
||||
textLayout->beginLayout();
|
||||
while (true) {
|
||||
QTextLine line = textLayout->createLine();
|
||||
if (!line.isValid())
|
||||
break;
|
||||
line.setLineWidth(lineWidth);
|
||||
line.setPosition(QPointF(0, height));
|
||||
height += line.height();
|
||||
widthUsed = qMax(widthUsed, line.naturalTextWidth());
|
||||
}
|
||||
textLayout->endLayout();
|
||||
return QSizeF(widthUsed, height);
|
||||
}
|
||||
|
||||
// copied from QItemDelegate to be able to add the 'format' parameter
|
||||
void HighlightingItemDelegate::drawDisplay(QPainter *painter,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QRect &rect, const QString &text,
|
||||
const QVector<QTextLayout::FormatRange> &format) const
|
||||
{
|
||||
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
|
||||
? QPalette::Normal : QPalette::Disabled;
|
||||
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
|
||||
cg = QPalette::Inactive;
|
||||
if (option.state & QStyle::State_Selected) {
|
||||
painter->fillRect(rect, option.palette.brush(cg, QPalette::Highlight));
|
||||
painter->setPen(option.palette.color(cg, QPalette::HighlightedText));
|
||||
} else {
|
||||
painter->setPen(option.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
|
||||
if (text.isEmpty())
|
||||
return;
|
||||
|
||||
if (option.state & QStyle::State_Editing) {
|
||||
painter->save();
|
||||
painter->setPen(option.palette.color(cg, QPalette::Text));
|
||||
painter->drawRect(rect.adjusted(0, 0, -1, -1));
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
const QStyleOptionViewItem opt = option;
|
||||
|
||||
const QWidget *widget = option.widget;
|
||||
QStyle *style = widget ? widget->style() : QApplication::style();
|
||||
const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1;
|
||||
QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); // remove width padding
|
||||
const bool wrapText = opt.features & QStyleOptionViewItem::WrapText;
|
||||
QTextOption textOption;
|
||||
textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap);
|
||||
textOption.setTextDirection(option.direction);
|
||||
textOption.setAlignment(QStyle::visualAlignment(option.direction, option.displayAlignment));
|
||||
QTextLayout textLayout;
|
||||
textLayout.setTextOption(textOption);
|
||||
textLayout.setFont(option.font);
|
||||
textLayout.setText(replaceNewLine(text));
|
||||
|
||||
QSizeF textLayoutSize = doTextLayout(&textLayout, textRect.width());
|
||||
|
||||
if (textRect.width() < textLayoutSize.width()
|
||||
|| textRect.height() < textLayoutSize.height()) {
|
||||
QString elided;
|
||||
int start = 0;
|
||||
int end = text.indexOf(QChar::LineSeparator, start);
|
||||
if (end == -1) {
|
||||
elided += option.fontMetrics.elidedText(text, option.textElideMode, textRect.width());
|
||||
} else {
|
||||
while (end != -1) {
|
||||
elided += option.fontMetrics.elidedText(text.mid(start, end - start),
|
||||
option.textElideMode, textRect.width());
|
||||
elided += QChar::LineSeparator;
|
||||
start = end + 1;
|
||||
end = text.indexOf(QChar::LineSeparator, start);
|
||||
}
|
||||
// let's add the last line (after the last QChar::LineSeparator)
|
||||
elided += option.fontMetrics.elidedText(text.mid(start),
|
||||
option.textElideMode, textRect.width());
|
||||
}
|
||||
textLayout.setText(elided);
|
||||
textLayoutSize = doTextLayout(&textLayout, textRect.width());
|
||||
}
|
||||
|
||||
const QSize layoutSize(textRect.width(), int(textLayoutSize.height()));
|
||||
const QRect layoutRect = QStyle::alignedRect(option.direction, option.displayAlignment,
|
||||
layoutSize, textRect);
|
||||
// if we still overflow even after eliding the text, enable clipping
|
||||
if (!hasClipping() && (textRect.width() < textLayoutSize.width()
|
||||
|| textRect.height() < textLayoutSize.height())) {
|
||||
painter->save();
|
||||
painter->setClipRect(layoutRect);
|
||||
textLayout.draw(painter, layoutRect.topLeft(), format, layoutRect);
|
||||
painter->restore();
|
||||
} else {
|
||||
textLayout.draw(painter, layoutRect.topLeft(), format, layoutRect);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Utils
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
@@ -25,28 +25,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <texteditor/codeassist/completionassistprovider.h>
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QStringList>
|
||||
#include <QItemDelegate>
|
||||
#include <QTextLayout>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Utils {
|
||||
|
||||
class JavaCompletionAssistProvider : public TextEditor::CompletionAssistProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
JavaCompletionAssistProvider();
|
||||
~JavaCompletionAssistProvider();
|
||||
|
||||
void init() const;
|
||||
|
||||
TextEditor::IAssistProcessor *createProcessor() const;
|
||||
|
||||
private:
|
||||
mutable QStringList m_keywords;
|
||||
enum class HighlightingItemRole {
|
||||
LineNumber = Qt::UserRole,
|
||||
StartColumn,
|
||||
Length,
|
||||
Foreground,
|
||||
Background,
|
||||
User
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
class QTCREATOR_UTILS_EXPORT HighlightingItemDelegate : public QItemDelegate
|
||||
{
|
||||
public:
|
||||
HighlightingItemDelegate(int tabWidth, QObject *parent = 0);
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void setTabWidth(int width);
|
||||
|
||||
private:
|
||||
int drawLineNumber(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QModelIndex &index) const;
|
||||
void drawText(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QRect &rect, const QModelIndex &index) const;
|
||||
using QItemDelegate::drawDisplay;
|
||||
void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect,
|
||||
const QString &text, const QVector<QTextLayout::FormatRange> &format) const;
|
||||
QString m_tabString;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
@@ -36,6 +36,7 @@
|
||||
#include <QPainter>
|
||||
#include <QPaintEngine>
|
||||
#include <QWidget>
|
||||
#include <QDebug>
|
||||
|
||||
namespace Utils {
|
||||
|
||||
@@ -67,7 +68,12 @@ static MasksAndColors masksAndColors(const Icon &icon, int dpr)
|
||||
const QColor color = creatorTheme()->color(i.second);
|
||||
const QString dprFileName = StyleHelper::availableImageResolutions(i.first).contains(dpr) ?
|
||||
StyleHelper::imageFileWithResolution(fileName, dpr) : fileName;
|
||||
result.append(qMakePair(QPixmap(dprFileName), color));
|
||||
QPixmap pixmap;
|
||||
if (!pixmap.load(dprFileName)) {
|
||||
pixmap = QPixmap(1, 1);
|
||||
qWarning() << "Could not load image: " << dprFileName;
|
||||
}
|
||||
result.append({pixmap, color});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@@ -28,8 +28,11 @@
|
||||
#include "hostosinfo.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
#include <QRegularExpression>
|
||||
#include <QSet>
|
||||
|
||||
@@ -246,4 +249,24 @@ QTCREATOR_UTILS_EXPORT QString stripAccelerator(const QString &text)
|
||||
return res;
|
||||
}
|
||||
|
||||
QTCREATOR_UTILS_EXPORT bool readMultiLineString(const QJsonValue &value, QString *out)
|
||||
{
|
||||
QTC_ASSERT(out, return false);
|
||||
if (value.isString()) {
|
||||
*out = value.toString();
|
||||
} else if (value.isArray()) {
|
||||
QJsonArray array = value.toArray();
|
||||
QStringList lines;
|
||||
foreach (const QJsonValue &v, array) {
|
||||
if (!v.isString())
|
||||
return false;
|
||||
lines.append(v.toString());
|
||||
}
|
||||
*out = lines.join(QLatin1Char('\n'));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "utils_global.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QJsonValue;
|
||||
class QStringList;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -53,6 +54,8 @@ QTCREATOR_UTILS_EXPORT QString withTildeHomePath(const QString &path);
|
||||
// Removes first unescaped ampersand in text
|
||||
QTCREATOR_UTILS_EXPORT QString stripAccelerator(const QString &text);
|
||||
|
||||
QTCREATOR_UTILS_EXPORT bool readMultiLineString(const QJsonValue &value, QString *out);
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT AbstractMacroExpander
|
||||
{
|
||||
public:
|
||||
|
@@ -113,7 +113,8 @@ SOURCES += $$PWD/environment.cpp \
|
||||
$$PWD/port.cpp \
|
||||
$$PWD/runextensions.cpp \
|
||||
$$PWD/utilsicons.cpp \
|
||||
$$PWD/guard.cpp
|
||||
$$PWD/guard.cpp \
|
||||
$$PWD/highlightingitemdelegate.cpp
|
||||
|
||||
win32:SOURCES += $$PWD/consoleprocess_win.cpp
|
||||
else:SOURCES += $$PWD/consoleprocess_unix.cpp
|
||||
@@ -239,8 +240,9 @@ HEADERS += \
|
||||
$$PWD/asconst.h \
|
||||
$$PWD/smallstringfwd.h \
|
||||
$$PWD/optional.h \
|
||||
$$PWD/../3rdparty/optional/optional.hpp \
|
||||
$$PWD/qtcfallthrough.h \
|
||||
$$PWD/../3rdparty/optional/optional.hpp
|
||||
$$PWD/highlightingitemdelegate.cpp
|
||||
|
||||
FORMS += $$PWD/filewizardpage.ui \
|
||||
$$PWD/projectintropage.ui \
|
||||
|
@@ -117,6 +117,8 @@ Project {
|
||||
"functiontraits.h",
|
||||
"guard.cpp",
|
||||
"guard.h",
|
||||
"highlightingitemdelegate.cpp",
|
||||
"highlightingitemdelegate.h",
|
||||
"historycompleter.cpp",
|
||||
"historycompleter.h",
|
||||
"hostosinfo.h",
|
||||
|
@@ -41,7 +41,6 @@ HEADERS += \
|
||||
androidsignaloperation.h \
|
||||
javaeditor.h \
|
||||
javaindenter.h \
|
||||
javacompletionassistprovider.h \
|
||||
avddialog.h \
|
||||
android_global.h \
|
||||
androidbuildapkstep.h \
|
||||
@@ -86,7 +85,6 @@ SOURCES += \
|
||||
androidsignaloperation.cpp \
|
||||
javaeditor.cpp \
|
||||
javaindenter.cpp \
|
||||
javacompletionassistprovider.cpp \
|
||||
avddialog.cpp \
|
||||
androidbuildapkstep.cpp \
|
||||
androidbuildapkwidget.cpp \
|
||||
|
@@ -107,8 +107,6 @@ Project {
|
||||
"avddialog.h",
|
||||
"certificatesmodel.cpp",
|
||||
"certificatesmodel.h",
|
||||
"javacompletionassistprovider.cpp",
|
||||
"javacompletionassistprovider.h",
|
||||
"javaeditor.cpp",
|
||||
"javaeditor.h",
|
||||
"javaindenter.cpp",
|
||||
|
@@ -42,7 +42,6 @@
|
||||
#include "androidruncontrol.h"
|
||||
#include "androidsettingspage.h"
|
||||
#include "androidtoolchain.h"
|
||||
#include "javacompletionassistprovider.h"
|
||||
#include "javaeditor.h"
|
||||
|
||||
#ifdef HAVE_QBS
|
||||
|
@@ -78,7 +78,7 @@
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Conflicting "am start" options might result in the app startup failure.</string>
|
||||
<string>If the "am start" options conflict, the application might not start.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@@ -1,113 +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 "javacompletionassistprovider.h"
|
||||
#include "androidconstants.h"
|
||||
|
||||
#include <texteditor/codeassist/assistinterface.h>
|
||||
#include <texteditor/codeassist/keywordscompletionassist.h>
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
using namespace Android;
|
||||
using namespace Android::Internal;
|
||||
|
||||
static const char *const keywords[] = {
|
||||
"abstract",
|
||||
"continue",
|
||||
"for",
|
||||
"new",
|
||||
"switch",
|
||||
"assert",
|
||||
"default",
|
||||
"goto",
|
||||
"package",
|
||||
"synchronized",
|
||||
"boolean",
|
||||
"do",
|
||||
"if",
|
||||
"private",
|
||||
"this",
|
||||
"break",
|
||||
"double",
|
||||
"implements",
|
||||
"protected",
|
||||
"throw",
|
||||
"byte",
|
||||
"else",
|
||||
"import",
|
||||
"public",
|
||||
"throws",
|
||||
"case",
|
||||
"enum",
|
||||
"instanceof",
|
||||
"return",
|
||||
"transient",
|
||||
"catch",
|
||||
"extends",
|
||||
"int",
|
||||
"short",
|
||||
"try",
|
||||
"char",
|
||||
"final",
|
||||
"interface",
|
||||
"static",
|
||||
"void",
|
||||
"class",
|
||||
"finally",
|
||||
"long",
|
||||
"strictfp",
|
||||
"volatile",
|
||||
"const",
|
||||
"float",
|
||||
"native",
|
||||
"super",
|
||||
"while",
|
||||
0
|
||||
};
|
||||
|
||||
JavaCompletionAssistProvider::JavaCompletionAssistProvider()
|
||||
{
|
||||
}
|
||||
|
||||
JavaCompletionAssistProvider::~JavaCompletionAssistProvider()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void JavaCompletionAssistProvider::init() const
|
||||
{
|
||||
for (uint i = 0; i < sizeof keywords / sizeof keywords[0] - 1; i++)
|
||||
m_keywords.append(QLatin1String(keywords[i]));
|
||||
}
|
||||
|
||||
TextEditor::IAssistProcessor *JavaCompletionAssistProvider::createProcessor() const
|
||||
{
|
||||
if (m_keywords.isEmpty())
|
||||
init();
|
||||
TextEditor::Keywords keywords = TextEditor::Keywords(m_keywords,
|
||||
QStringList(),
|
||||
QMap<QString, QStringList>());
|
||||
return new TextEditor::KeywordsCompletionAssistProcessor(keywords);
|
||||
}
|
@@ -26,8 +26,8 @@
|
||||
#include "javaeditor.h"
|
||||
#include "javaindenter.h"
|
||||
#include "androidconstants.h"
|
||||
#include "javacompletionassistprovider.h"
|
||||
|
||||
#include <texteditor/codeassist/keywordscompletionassist.h>
|
||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||
#include <texteditor/normalindenter.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
@@ -59,6 +59,14 @@ static TextEditor::TextDocument *createJavaDocument()
|
||||
|
||||
JavaEditorFactory::JavaEditorFactory()
|
||||
{
|
||||
static QStringList keywords = {
|
||||
"abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const",
|
||||
"continue", "default", "do", "double", "else", "enum", "extends", "final", "finally",
|
||||
"float", "for", "goto", "if", "implements", "import", "instanceof", "int", "interface",
|
||||
"long", "native", "new", "package", "private", "protected", "public", "return", "short",
|
||||
"static", "strictfp", "super", "switch", "synchronized", "this", "throw", "throws",
|
||||
"transient", "try", "void", "volatile", "while"
|
||||
};
|
||||
setId(Constants::JAVA_EDITOR_ID);
|
||||
setDisplayName(tr("Java Editor"));
|
||||
addMimeType(Constants::JAVA_MIMETYPE);
|
||||
@@ -67,8 +75,8 @@ JavaEditorFactory::JavaEditorFactory()
|
||||
setUseGenericHighlighter(true);
|
||||
setCommentDefinition(Utils::CommentDefinition::CppStyle);
|
||||
setEditorActionHandlers(TextEditor::TextEditorActionHandler::UnCommentSelection);
|
||||
setCompletionAssistProvider(new JavaCompletionAssistProvider);
|
||||
setMarksVisible(true);
|
||||
setCompletionAssistProvider(new TextEditor::KeywordsCompletionAssistProvider(keywords));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -47,6 +47,7 @@
|
||||
#include <cpptools/editordocumenthandle.h>
|
||||
|
||||
#include <texteditor/convenience.h>
|
||||
#include <texteditor/displaysettings.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
@@ -274,6 +275,9 @@ void ClangEditorDocumentProcessor::addDiagnosticToolTipToLayout(uint line,
|
||||
= m_diagnosticManager.diagnosticsAt(line, column);
|
||||
|
||||
target->addWidget(ClangDiagnosticWidget::create(diagnostics, ClangDiagnosticWidget::ToolTip));
|
||||
auto link = TextEditor::DisplaySettings::createAnnotationSettingsLink();
|
||||
target->addWidget(link);
|
||||
target->setAlignment(link, Qt::AlignRight);
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::editorDocumentTimerRestarted()
|
||||
|
@@ -39,7 +39,7 @@ VersionSelector::VersionSelector(const QString &fileName, const QString &message
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->headerLabel->setText(ui->headerLabel->text().arg(fileName));
|
||||
ui->loadedText->setHtml(tr("<html><head/><body><p><b>NOTE: You will not be able to check in "
|
||||
ui->loadedText->setHtml(tr("<html><head/><body><p><b>Note: You will not be able to check in "
|
||||
"this file without merging the changes (not supported by the "
|
||||
"plugin)</b></p></body></html>"));
|
||||
m_stream = new QTextStream(message.toLocal8Bit(), QIODevice::ReadOnly | QIODevice::Text);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="headerLabel">
|
||||
<property name="text">
|
||||
<string>There are multiple versions of '%1' which can be considered for checkout. Please select version to checkout:</string>
|
||||
<string>Multiple versions of "%1" can be checked out. Select the version to check out:</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -32,7 +32,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="loadedRadioButton">
|
||||
<property name="text">
|
||||
<string>&Loaded Version</string>
|
||||
<string>&Loaded version</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
|
@@ -132,7 +132,7 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
const QJsonObject metaData = plugin->metaData();
|
||||
const QJsonValue mimetypes = metaData.value("Mimetypes");
|
||||
QString mimetypeString;
|
||||
if (ExtensionSystem::PluginSpec::readMultiLineString(mimetypes, &mimetypeString))
|
||||
if (Utils::readMultiLineString(mimetypes, &mimetypeString))
|
||||
Utils::addMimeTypes(plugin->name() + ".mimetypes", mimetypeString.trimmed().toUtf8());
|
||||
}
|
||||
|
||||
|
@@ -79,12 +79,7 @@ public:
|
||||
};
|
||||
|
||||
SearchResultWidget::SearchResultWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
m_count(0),
|
||||
m_preserveCaseSupported(true),
|
||||
m_isShowingReplaceUI(false),
|
||||
m_searchAgainSupported(false),
|
||||
m_replaceSupported(false)
|
||||
QWidget(parent)
|
||||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
@@ -295,8 +290,6 @@ void SearchResultWidget::addResults(const QList<SearchResultItem> &items, Search
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int SearchResultWidget::count() const
|
||||
{
|
||||
return m_count;
|
||||
@@ -309,7 +302,6 @@ void SearchResultWidget::setSupportsReplace(bool replaceSupported, const QString
|
||||
m_dontAskAgainGroup = group;
|
||||
}
|
||||
|
||||
|
||||
void SearchResultWidget::setTextToReplace(const QString &textToReplace)
|
||||
{
|
||||
m_replaceTextEdit->setText(textToReplace);
|
||||
|
@@ -119,28 +119,28 @@ private:
|
||||
QList<SearchResultItem> checkedItems() const;
|
||||
void updateMatchesFoundLabel();
|
||||
|
||||
SearchResultTreeView *m_searchResultTreeView;
|
||||
int m_count;
|
||||
SearchResultTreeView *m_searchResultTreeView = nullptr;
|
||||
int m_count = 0;
|
||||
QString m_dontAskAgainGroup;
|
||||
QFrame *m_messageWidget;
|
||||
QFrame *m_messageWidget = nullptr;
|
||||
InfoBar m_infoBar;
|
||||
InfoBarDisplay m_infoBarDisplay;
|
||||
QWidget *m_topReplaceWidget;
|
||||
QLabel *m_replaceLabel;
|
||||
QLineEdit *m_replaceTextEdit;
|
||||
QToolButton *m_replaceButton;
|
||||
QToolButton *m_searchAgainButton;
|
||||
QCheckBox *m_preserveCaseCheck;
|
||||
QWidget *m_topReplaceWidget = nullptr;
|
||||
QLabel *m_replaceLabel = nullptr;
|
||||
QLineEdit *m_replaceTextEdit = nullptr;
|
||||
QToolButton *m_replaceButton = nullptr;
|
||||
QToolButton *m_searchAgainButton = nullptr;
|
||||
QCheckBox *m_preserveCaseCheck = nullptr;
|
||||
QCheckBox *m_renameFilesCheckBox = nullptr;
|
||||
QWidget *m_descriptionContainer;
|
||||
QLabel *m_label;
|
||||
QLabel *m_searchTerm;
|
||||
QToolButton *m_cancelButton;
|
||||
QLabel *m_matchesFoundLabel;
|
||||
bool m_preserveCaseSupported;
|
||||
bool m_isShowingReplaceUI;
|
||||
bool m_searchAgainSupported;
|
||||
bool m_replaceSupported;
|
||||
QWidget *m_descriptionContainer = nullptr;
|
||||
QLabel *m_label = nullptr;
|
||||
QLabel *m_searchTerm = nullptr;
|
||||
QToolButton *m_cancelButton = nullptr;
|
||||
QLabel *m_matchesFoundLabel = nullptr;
|
||||
bool m_preserveCaseSupported = true;
|
||||
bool m_isShowingReplaceUI = false;
|
||||
bool m_searchAgainSupported = false;
|
||||
bool m_replaceSupported = false;
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
@@ -33,14 +33,13 @@
|
||||
#include <coreplugin/modemanager.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <coreplugin/find/searchresulttreeitemdelegate.h>
|
||||
#include <coreplugin/find/searchresulttreeitemroles.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/mainwindow.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/appmainwindow.h>
|
||||
#include <utils/asconst.h>
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <utils/highlightingitemdelegate.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/itemviews.h>
|
||||
#include <utils/progressindicator.h>
|
||||
@@ -67,6 +66,10 @@
|
||||
|
||||
Q_DECLARE_METATYPE(Core::LocatorFilterEntry)
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
const int LocatorEntryRole = int(HighlightingItemRole::User);
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
@@ -99,7 +102,7 @@ private:
|
||||
QColor mBackgroundColor;
|
||||
};
|
||||
|
||||
class CompletionDelegate : public SearchResultTreeItemDelegate
|
||||
class CompletionDelegate : public HighlightingItemDelegate
|
||||
{
|
||||
public:
|
||||
CompletionDelegate(QObject *parent);
|
||||
@@ -193,7 +196,6 @@ QVariant LocatorModel::data(const QModelIndex &index, int role) const
|
||||
+ QLatin1String("\n\n") + mEntries.at(index.row()).extraInfo);
|
||||
break;
|
||||
case Qt::DecorationRole:
|
||||
case ItemDataRoles::ResultIconRole:
|
||||
if (index.column() == DisplayNameColumn) {
|
||||
LocatorFilterEntry &entry = mEntries[index.row()];
|
||||
if (!entry.displayIcon && !entry.fileName.isEmpty())
|
||||
@@ -205,21 +207,21 @@ QVariant LocatorModel::data(const QModelIndex &index, int role) const
|
||||
if (index.column() == ExtraInfoColumn)
|
||||
return QColor(Qt::darkGray);
|
||||
break;
|
||||
case ItemDataRoles::ResultItemRole:
|
||||
case LocatorEntryRole:
|
||||
return qVariantFromValue(mEntries.at(index.row()));
|
||||
case ItemDataRoles::ResultBeginColumnNumberRole:
|
||||
case ItemDataRoles::SearchTermLengthRole: {
|
||||
case int(HighlightingItemRole::StartColumn):
|
||||
case int(HighlightingItemRole::Length): {
|
||||
LocatorFilterEntry &entry = mEntries[index.row()];
|
||||
const int highlightColumn = entry.highlightInfo.dataType == LocatorFilterEntry::HighlightInfo::DisplayName
|
||||
? DisplayNameColumn
|
||||
: ExtraInfoColumn;
|
||||
if (highlightColumn == index.column()) {
|
||||
const bool startIndexRole = role == ItemDataRoles::ResultBeginColumnNumberRole;
|
||||
const bool startIndexRole = role == int(HighlightingItemRole::StartColumn);
|
||||
return startIndexRole ? entry.highlightInfo.startIndex : entry.highlightInfo.length;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemDataRoles::ResultHighlightBackgroundColor:
|
||||
case int(HighlightingItemRole::Background):
|
||||
return mBackgroundColor;
|
||||
}
|
||||
|
||||
@@ -843,7 +845,7 @@ void LocatorWidget::acceptEntry(int row)
|
||||
const QModelIndex index = m_locatorModel->index(row, 0);
|
||||
if (!index.isValid())
|
||||
return;
|
||||
const LocatorFilterEntry entry = m_locatorModel->data(index, ItemDataRoles::ResultItemRole).value<LocatorFilterEntry>();
|
||||
const LocatorFilterEntry entry = m_locatorModel->data(index, LocatorEntryRole).value<LocatorFilterEntry>();
|
||||
Q_ASSERT(entry.filter != nullptr);
|
||||
QString newText;
|
||||
int selectionStart = -1;
|
||||
@@ -926,13 +928,13 @@ LocatorPopup *createLocatorPopup(Locator *locator, QWidget *parent)
|
||||
}
|
||||
|
||||
CompletionDelegate::CompletionDelegate(QObject *parent)
|
||||
: SearchResultTreeItemDelegate(0, parent)
|
||||
: HighlightingItemDelegate(0, parent)
|
||||
{
|
||||
}
|
||||
|
||||
QSize CompletionDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
return SearchResultTreeItemDelegate::sizeHint(option, index) + QSize(0, 2);
|
||||
return HighlightingItemDelegate::sizeHint(option, index) + QSize(0, 2);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -312,6 +312,15 @@ void NavigationWidget::resizeEvent(QResizeEvent *re)
|
||||
MiniSplitter::resizeEvent(re);
|
||||
}
|
||||
|
||||
static QIcon closeIconForSide(Side side, int itemCount)
|
||||
{
|
||||
if (itemCount > 1)
|
||||
return Utils::Icons::CLOSE_SPLIT_TOP.icon();
|
||||
return side == Side::Left
|
||||
? Utils::Icons::CLOSE_SPLIT_LEFT.icon()
|
||||
: Utils::Icons::CLOSE_SPLIT_RIGHT.icon();
|
||||
}
|
||||
|
||||
Internal::NavigationSubWidget *NavigationWidget::insertSubItem(int position, int factoryIndex)
|
||||
{
|
||||
for (int pos = position + 1; pos < d->m_subWidgets.size(); ++pos) {
|
||||
@@ -331,9 +340,7 @@ Internal::NavigationSubWidget *NavigationWidget::insertSubItem(int position, int
|
||||
insertWidget(position, nsw);
|
||||
|
||||
d->m_subWidgets.insert(position, nsw);
|
||||
d->m_subWidgets.at(0)->setCloseIcon(d->m_subWidgets.size() == 1
|
||||
? Utils::Icons::CLOSE_SPLIT_LEFT.icon()
|
||||
: Utils::Icons::CLOSE_SPLIT_TOP.icon());
|
||||
d->m_subWidgets.at(0)->setCloseIcon(closeIconForSide(d->m_side, d->m_subWidgets.size()));
|
||||
NavigationWidgetPrivate::updateActivationsMap(nsw->factory()->id(), {d->m_side, position});
|
||||
return nsw;
|
||||
}
|
||||
@@ -386,10 +393,8 @@ void NavigationWidget::closeSubWidget()
|
||||
subWidget->hide();
|
||||
subWidget->deleteLater();
|
||||
// update close button of top item
|
||||
if (d->m_subWidgets.size() == 1)
|
||||
d->m_subWidgets.at(0)->setCloseIcon(d->m_subWidgets.size() == 1
|
||||
? Utils::Icons::CLOSE_SPLIT_LEFT.icon()
|
||||
: Utils::Icons::CLOSE_SPLIT_TOP.icon());
|
||||
if (!d->m_subWidgets.isEmpty())
|
||||
d->m_subWidgets.at(0)->setCloseIcon(closeIconForSide(d->m_side, d->m_subWidgets.size()));
|
||||
} else {
|
||||
setShown(false);
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "cppfindreferences.h"
|
||||
|
||||
#include "cppfilesettingspage.h"
|
||||
#include "cpptoolsconstants.h"
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cppworkingcopy.h"
|
||||
@@ -384,6 +385,11 @@ void CppFindReferences::findAll_helper(SearchResult *search, Symbol *symbol,
|
||||
connect(progress, &FutureProgress::clicked, search, &SearchResult::popup);
|
||||
}
|
||||
|
||||
static bool isAllLowerCase(const QString &text)
|
||||
{
|
||||
return text.toLower() == text;
|
||||
}
|
||||
|
||||
void CppFindReferences::onReplaceButtonClicked(const QString &text,
|
||||
const QList<SearchResultItem> &items,
|
||||
bool preserveCase)
|
||||
@@ -405,21 +411,40 @@ void CppFindReferences::onReplaceButtonClicked(const QString &text,
|
||||
if (!renameFilesCheckBox || !renameFilesCheckBox->isChecked())
|
||||
return;
|
||||
|
||||
CppFileSettings settings;
|
||||
settings.fromSettings(Core::ICore::settings());
|
||||
|
||||
const QStringList newPaths =
|
||||
Utils::transform<QList>(parameters.filesToRename,
|
||||
[¶meters, text](const Node *node) -> QString {
|
||||
[¶meters, text, &settings](const Node *node) -> QString {
|
||||
const QFileInfo fi = node->filePath().toFileInfo();
|
||||
const QString fileName = fi.fileName();
|
||||
QString newName = fileName;
|
||||
newName.replace(parameters.prettySymbolName, text, Qt::CaseInsensitive);
|
||||
const QString oldSymbolName = parameters.prettySymbolName;
|
||||
const QString oldBaseName = fi.baseName();
|
||||
const QString newSymbolName = text;
|
||||
QString newBaseName = newSymbolName;
|
||||
|
||||
if (newName != fileName) {
|
||||
newName = Utils::matchCaseReplacement(fileName, newName);
|
||||
// 1) new symbol lowercase: new base name lowercase
|
||||
if (isAllLowerCase(newSymbolName)) {
|
||||
newBaseName = newSymbolName;
|
||||
|
||||
return fi.absolutePath() + "/" + newName;
|
||||
// 2) old base name mixed case: new base name is verbatim symbol name
|
||||
} else if (!isAllLowerCase(oldBaseName)) {
|
||||
newBaseName = newSymbolName;
|
||||
|
||||
// 3) old base name lowercase, old symbol mixed case: new base name lowercase
|
||||
} else if (!isAllLowerCase(oldSymbolName)) {
|
||||
newBaseName = newSymbolName.toLower();
|
||||
|
||||
// 4) old base name lowercase, old symbol lowercase, new symbol mixed case:
|
||||
// use the preferences setting for new base name case
|
||||
} else if (settings.lowerCaseFiles) {
|
||||
newBaseName = newSymbolName.toLower();
|
||||
}
|
||||
|
||||
return QString();
|
||||
if (newBaseName == oldBaseName)
|
||||
return QString();
|
||||
|
||||
return fi.absolutePath() + "/" + newBaseName + '.' + fi.completeSuffix();
|
||||
});
|
||||
|
||||
for (int i = 0; i < parameters.filesToRename.size(); ++i) {
|
||||
|
@@ -2030,7 +2030,11 @@ void DebuggerEngine::checkState(DebuggerState state, const char *file, int line)
|
||||
|
||||
bool DebuggerEngine::isNativeMixedEnabled() const
|
||||
{
|
||||
return runParameters().nativeMixedEnabled && (runParameters().languages & QmlLanguage);
|
||||
if (DebuggerRunTool *rt = runTool()) {
|
||||
const DebuggerRunParameters &runParams = rt->runParameters();
|
||||
return runParams.nativeMixedEnabled && (runParams.languages & QmlLanguage);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DebuggerEngine::isNativeMixedActive() const
|
||||
|
@@ -4034,7 +4034,10 @@ void GdbEngine::reloadDebuggingHelpers()
|
||||
|
||||
void GdbEngine::handleGdbError(QProcess::ProcessError error)
|
||||
{
|
||||
QString program = runParameters().debugger.executable;
|
||||
QString program;
|
||||
// avoid accessing invalid memory if the process crashed
|
||||
if (runTool())
|
||||
program = runParameters().debugger.executable;
|
||||
QString msg = RunWorker::userMessageForProcessError(error, program);
|
||||
QString errorString = m_gdbProc.errorString();
|
||||
if (!errorString.isEmpty())
|
||||
|
@@ -1065,7 +1065,7 @@ bool GitClient::synchronousReset(const QString &workingDirectory,
|
||||
if (files.isEmpty()) {
|
||||
msgCannotRun(arguments, workingDirectory, resp.stdErr(), errorMessage);
|
||||
} else {
|
||||
msgCannotRun(tr("Cannot reset %n file(s) in \"%1\": %2", 0, files.size())
|
||||
msgCannotRun(tr("Cannot reset %n files in \"%1\": %2", 0, files.size())
|
||||
.arg(QDir::toNativeSeparators(workingDirectory), resp.stdErr()),
|
||||
errorMessage);
|
||||
}
|
||||
@@ -2468,9 +2468,9 @@ bool GitClient::getCommitData(const QString &workingDirectory,
|
||||
static inline QString msgCommitted(const QString &amendSHA1, int fileCount)
|
||||
{
|
||||
if (amendSHA1.isEmpty())
|
||||
return GitClient::tr("Committed %n file(s).", 0, fileCount) + '\n';
|
||||
return GitClient::tr("Committed %n files.", 0, fileCount) + '\n';
|
||||
if (fileCount)
|
||||
return GitClient::tr("Amended \"%1\" (%n file(s)).", 0, fileCount).arg(amendSHA1) + '\n';
|
||||
return GitClient::tr("Amended \"%1\" (%n files).", 0, fileCount).arg(amendSHA1) + '\n';
|
||||
return GitClient::tr("Amended \"%1\".").arg(amendSHA1);
|
||||
}
|
||||
|
||||
@@ -2561,7 +2561,7 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
|
||||
VcsOutputWindow::appendError(stdErr);
|
||||
return true;
|
||||
} else {
|
||||
VcsOutputWindow::appendError(tr("Cannot commit %n file(s): %1\n", 0, commitCount).arg(stdErr));
|
||||
VcsOutputWindow::appendError(tr("Cannot commit %n files: %1\n", 0, commitCount).arg(stdErr));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -716,9 +716,11 @@ void GitPlugin::blameFile()
|
||||
cursor.setPosition(selectionStart);
|
||||
const int startBlock = cursor.blockNumber();
|
||||
cursor.setPosition(selectionEnd);
|
||||
const int endBlock = cursor.blockNumber();
|
||||
int endBlock = cursor.blockNumber();
|
||||
if (startBlock != endBlock) {
|
||||
firstLine = startBlock + 1;
|
||||
if (cursor.atBlockStart())
|
||||
--endBlock;
|
||||
if (auto widget = qobject_cast<VcsBaseEditorWidget *>(textEditor->widget())) {
|
||||
const int previousFirstLine = widget->firstLineNumber();
|
||||
if (previousFirstLine > 0)
|
||||
|
@@ -145,11 +145,7 @@ void HelpIndexFilter::accept(LocatorFilterEntry selection,
|
||||
Q_UNUSED(selectionLength)
|
||||
const QString &key = selection.displayName;
|
||||
const QMap<QString, QUrl> &links = HelpManager::linksForKeyword(key);
|
||||
|
||||
if (links.size() == 1)
|
||||
emit linkActivated(links.begin().value());
|
||||
else
|
||||
emit linksActivated(links, key);
|
||||
emit linksActivated(links, key);
|
||||
}
|
||||
|
||||
void HelpIndexFilter::refresh(QFutureInterface<void> &future)
|
||||
|
@@ -52,7 +52,6 @@ public:
|
||||
Q_INVOKABLE QSet<QString> searchMatches(const QString &databaseFilePath,
|
||||
const QString &term, int limit);
|
||||
signals:
|
||||
void linkActivated(const QUrl &link) const;
|
||||
void linksActivated(const QMap<QString, QUrl> &links, const QString &key) const;
|
||||
|
||||
private:
|
||||
|
@@ -236,10 +236,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
|
||||
auto helpIndexFilter = new HelpIndexFilter();
|
||||
addAutoReleasedObject(helpIndexFilter);
|
||||
connect(helpIndexFilter, &HelpIndexFilter::linkActivated,
|
||||
this, &HelpPlugin::showLinkInHelpMode);
|
||||
connect(helpIndexFilter, &HelpIndexFilter::linksActivated,
|
||||
this, &HelpPlugin::showLinksInHelpMode);
|
||||
this, &HelpPlugin::showLinksInCurrentViewer);
|
||||
|
||||
RemoteHelpFilter *remoteHelpFilter = new RemoteHelpFilter();
|
||||
addAutoReleasedObject(remoteHelpFilter);
|
||||
@@ -430,11 +428,12 @@ void HelpPlugin::showLinkInHelpMode(const QUrl &source)
|
||||
showInHelpViewer(source, helpModeHelpViewer());
|
||||
}
|
||||
|
||||
void HelpPlugin::showLinksInHelpMode(const QMap<QString, QUrl> &links, const QString &key)
|
||||
void HelpPlugin::showLinksInCurrentViewer(const QMap<QString, QUrl> &links, const QString &key)
|
||||
{
|
||||
activateHelpMode();
|
||||
ICore::raiseWindow(m_mode->widget());
|
||||
m_centralWidget->showTopicChooser(links, key);
|
||||
if (links.size() < 1)
|
||||
return;
|
||||
HelpWidget *widget = helpWidgetForWindow(QApplication::activeWindow());
|
||||
widget->showLinks(links, key);
|
||||
}
|
||||
|
||||
void HelpPlugin::slotHideRightPane()
|
||||
@@ -499,6 +498,14 @@ HelpViewer *HelpPlugin::helpModeHelpViewer()
|
||||
return viewer;
|
||||
}
|
||||
|
||||
HelpWidget *HelpPlugin::helpWidgetForWindow(QWidget *window)
|
||||
{
|
||||
if (m_externalWindow && m_externalWindow->window() == window->window())
|
||||
return m_externalWindow;
|
||||
activateHelpMode();
|
||||
return m_centralWidget;
|
||||
}
|
||||
|
||||
HelpViewer *HelpPlugin::viewerForHelpViewerLocation(HelpManager::HelpViewerLocation location)
|
||||
{
|
||||
HelpManager::HelpViewerLocation actualLocation = location;
|
||||
|
@@ -89,7 +89,7 @@ private:
|
||||
|
||||
void saveExternalWindowSettings();
|
||||
void showLinkInHelpMode(const QUrl &source);
|
||||
void showLinksInHelpMode(const QMap<QString, QUrl> &links, const QString &key);
|
||||
void showLinksInCurrentViewer(const QMap<QString, QUrl> &links, const QString &key);
|
||||
void slotHideRightPane();
|
||||
|
||||
void updateSideBarSource(const QUrl &newUrl);
|
||||
@@ -109,6 +109,7 @@ private:
|
||||
void createRightPaneContextViewer();
|
||||
HelpViewer *externalHelpViewer();
|
||||
HelpViewer *helpModeHelpViewer();
|
||||
HelpWidget *helpWidgetForWindow(QWidget *window);
|
||||
|
||||
void doSetupIfNeeded();
|
||||
|
||||
|
@@ -354,10 +354,8 @@ void HelpWidget::addSideBar()
|
||||
auto indexItem = new Core::SideBarItem(indexWindow, Constants::HELP_INDEX);
|
||||
indexWindow->setOpenInNewPageActionVisible(supportsNewPages);
|
||||
indexWindow->setWindowTitle(HelpPlugin::tr(Constants::SB_INDEX));
|
||||
connect(indexWindow, &IndexWindow::linkActivated,
|
||||
this, &HelpWidget::open);
|
||||
connect(indexWindow, &IndexWindow::linksActivated,
|
||||
this, &HelpWidget::showTopicChooser);
|
||||
this, &HelpWidget::showLinks);
|
||||
m_indexAction = new QAction(HelpPlugin::tr(Constants::SB_INDEX), this);
|
||||
cmd = Core::ActionManager::registerAction(m_indexAction, Constants::HELP_INDEX, m_context->context());
|
||||
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+I")
|
||||
@@ -535,12 +533,18 @@ void HelpWidget::open(const QUrl &url, bool newPage)
|
||||
setSource(url);
|
||||
}
|
||||
|
||||
void HelpWidget::showTopicChooser(const QMap<QString, QUrl> &links,
|
||||
void HelpWidget::showLinks(const QMap<QString, QUrl> &links,
|
||||
const QString &keyword, bool newPage)
|
||||
{
|
||||
TopicChooser tc(this, keyword, links);
|
||||
if (tc.exec() == QDialog::Accepted)
|
||||
open(tc.link(), newPage);
|
||||
if (links.size() < 1)
|
||||
return;
|
||||
if (links.size() == 1) {
|
||||
open(links.first(), newPage);
|
||||
} else {
|
||||
TopicChooser tc(this, keyword, links);
|
||||
if (tc.exec() == QDialog::Accepted)
|
||||
open(tc.link(), newPage);
|
||||
}
|
||||
}
|
||||
|
||||
void HelpWidget::activateSideBarItem(const QString &id)
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
void open(const QUrl &url, bool newPage = false);
|
||||
void openFromSearch(const QUrl &url, const QStringList &searchTerms, bool newPage = false);
|
||||
void showTopicChooser(const QMap<QString, QUrl> &links, const QString &key,
|
||||
void showLinks(const QMap<QString, QUrl> &links, const QString &key,
|
||||
bool newPage = false);
|
||||
void activateSideBarItem(const QString &id);
|
||||
|
||||
|
@@ -289,7 +289,10 @@ void IosConfigurations::updateAutomaticKitList()
|
||||
continue;
|
||||
}
|
||||
Core::Id pDeviceType = deviceId(sdk.directoryName);
|
||||
QTC_ASSERT(pDeviceType.isValid(), continue);
|
||||
if (!pDeviceType.isValid()) {
|
||||
qCDebug(kitSetupLog) << "Unsupported/Invalid device type" << sdk.directoryName;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (BaseQtVersion *qtVersion : qtVersions) {
|
||||
qCDebug(kitSetupLog) << " - Qt version:" << qtVersion->displayName();
|
||||
|
@@ -125,7 +125,7 @@ void IosSettingsWidget::onStart()
|
||||
QList<QFuture<void>> futureList;
|
||||
foreach (const SimulatorInfo &info, simulatorInfoList) {
|
||||
if (!info.isShutdown()) {
|
||||
statusDialog->addMessage(tr("Cannot start simulator(%1, %2) in current state: %3")
|
||||
statusDialog->addMessage(tr("Cannot start simulator (%1, %2) in current state: %3")
|
||||
.arg(info.name).arg(info.runtimeName).arg(info.state),
|
||||
Utils::StdErrFormat);
|
||||
} else {
|
||||
@@ -151,10 +151,10 @@ void IosSettingsWidget::onCreate()
|
||||
const auto onSimulatorCreate = [this, statusDialog](const QString &name,
|
||||
const SimulatorControl::ResponseData &response) {
|
||||
if (response.success) {
|
||||
statusDialog->addMessage(tr("Simulator device(%1) created.\nUDID: %2")
|
||||
statusDialog->addMessage(tr("Simulator device (%1) created.\nUDID: %2")
|
||||
.arg(name).arg(response.simUdid), Utils::StdOutFormat);
|
||||
} else {
|
||||
statusDialog->addMessage(tr("Simulator device(%1) creation failed.\nError: %2").
|
||||
statusDialog->addMessage(tr("Simulator device (%1) creation failed.\nError: %2").
|
||||
arg(name).arg(QString::fromUtf8(response.commandOutput)),
|
||||
Utils::StdErrFormat);
|
||||
}
|
||||
@@ -218,6 +218,8 @@ void IosSettingsWidget::onRename()
|
||||
const SimulatorInfo &simInfo = simulatorInfoList.at(0);
|
||||
const QString newName = QInputDialog::getText(this, tr("Rename %1").arg(simInfo.name),
|
||||
tr("Enter new name:"));
|
||||
if (newName.isEmpty())
|
||||
return;
|
||||
|
||||
QPointer<SimulatorOperationDialog> statusDialog = new SimulatorOperationDialog(this);
|
||||
statusDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
@@ -396,7 +396,7 @@ void IosToolHandlerPrivate::toolExited(int code)
|
||||
void IosDeviceToolHandlerPrivate::subprocessError(QProcess::ProcessError error)
|
||||
{
|
||||
if (state != Stopped)
|
||||
errorMsg(IosToolHandler::tr("iOS tool Error %1").arg(error));
|
||||
errorMsg(IosToolHandler::tr("iOS tool error %1").arg(error));
|
||||
stop(-1);
|
||||
if (error == QProcess::FailedToStart) {
|
||||
qCDebug(toolHandlerLog) << "IosToolHandler::finished(" << this << ")";
|
||||
@@ -837,7 +837,7 @@ void IosSimulatorToolHandlerPrivate::requestTransferApp(const QString &appBundle
|
||||
if (response.success) {
|
||||
installAppOnSimulator();
|
||||
} else {
|
||||
errorMsg(IosToolHandler::tr("Application install on Simulator failed. Simulator not running."));
|
||||
errorMsg(IosToolHandler::tr("Application install on simulator failed. Simulator not running."));
|
||||
didTransferApp(m_bundlePath, m_deviceId, IosToolHandler::Failure);
|
||||
emit q->finished(q);
|
||||
}
|
||||
@@ -862,7 +862,7 @@ void IosSimulatorToolHandlerPrivate::requestRunApp(const QString &appBundlePath,
|
||||
|
||||
Utils::FileName appBundle = Utils::FileName::fromString(m_bundlePath);
|
||||
if (!appBundle.exists()) {
|
||||
errorMsg(IosToolHandler::tr("Application launch on Simulator failed. Invalid Bundle path %1")
|
||||
errorMsg(IosToolHandler::tr("Application launch on simulator failed. Invalid bundle path %1")
|
||||
.arg(m_bundlePath));
|
||||
didStartApp(m_bundlePath, m_deviceId, Ios::IosToolHandler::Failure);
|
||||
return;
|
||||
@@ -874,7 +874,7 @@ void IosSimulatorToolHandlerPrivate::requestRunApp(const QString &appBundlePath,
|
||||
if (response.success) {
|
||||
launchAppOnSimulator(extraArgs);
|
||||
} else {
|
||||
errorMsg(IosToolHandler::tr("Application launch on Simulator failed. Simulator not running."));
|
||||
errorMsg(IosToolHandler::tr("Application launch on simulator failed. Simulator not running."));
|
||||
didStartApp(m_bundlePath, m_deviceId, Ios::IosToolHandler::Failure);
|
||||
}
|
||||
};
|
||||
@@ -926,7 +926,7 @@ void IosSimulatorToolHandlerPrivate::installAppOnSimulator()
|
||||
isTransferringApp(m_bundlePath, m_deviceId, 100, 100, "");
|
||||
didTransferApp(m_bundlePath, m_deviceId, IosToolHandler::Success);
|
||||
} else {
|
||||
errorMsg(IosToolHandler::tr("Application install on Simulator failed. %1")
|
||||
errorMsg(IosToolHandler::tr("Application install on simulator failed. %1")
|
||||
.arg(QString::fromLocal8Bit(response.commandOutput)));
|
||||
didTransferApp(m_bundlePath, m_deviceId, IosToolHandler::Failure);
|
||||
}
|
||||
@@ -990,7 +990,7 @@ void IosSimulatorToolHandlerPrivate::launchAppOnSimulator(const QStringList &ext
|
||||
stderrFile);
|
||||
} else {
|
||||
m_pid = -1;
|
||||
errorMsg(IosToolHandler::tr("Application launch on Simulator failed. %1")
|
||||
errorMsg(IosToolHandler::tr("Application launch on simulator failed. %1")
|
||||
.arg(QString::fromLocal8Bit(response.commandOutput)));
|
||||
didStartApp(m_bundlePath, m_deviceId, Ios::IosToolHandler::Failure);
|
||||
stop(-1);
|
||||
|
@@ -82,7 +82,7 @@ bool FieldPageFactory::validateData(Core::Id typeId, const QVariant &data, QStri
|
||||
QList<QVariant> list = JsonWizardFactory::objectOrList(data, errorMessage);
|
||||
if (list.isEmpty()) {
|
||||
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard",
|
||||
"When parsing fields of page '%1': %2")
|
||||
"When parsing fields of page \"%1\": %2")
|
||||
.arg(typeId.toString()).arg(*errorMessage);
|
||||
return false;
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "projectexplorerconstants.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/winutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -102,7 +103,7 @@ static bool hostSupportsPlatform(MsvcToolChain::Platform platform)
|
||||
if (platform == MsvcToolChain::amd64 || platform == MsvcToolChain::amd64_arm
|
||||
|| platform == MsvcToolChain::amd64_x86)
|
||||
return true;
|
||||
// fall through (all x86 toolchains are also working on an amd64 host)
|
||||
Q_FALLTHROUGH(); // all x86 toolchains are also working on an amd64 host
|
||||
case Utils::HostOsInfo::HostArchitectureX86:
|
||||
return platform == MsvcToolChain::x86 || platform == MsvcToolChain::x86_amd64
|
||||
|| platform == MsvcToolChain::x86_ia64 || platform == MsvcToolChain::x86_arm;
|
||||
|
@@ -1488,7 +1488,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
});
|
||||
|
||||
expander->registerFileVariables("CurrentRun:Executable",
|
||||
tr("The currently active run configuration's executable (if applicable)"),
|
||||
tr("The currently active run configuration's executable (if applicable)."),
|
||||
[this]() -> QString {
|
||||
if (Target *target = activeTarget()) {
|
||||
if (RunConfiguration *rc = target->activeRunConfiguration()) {
|
||||
@@ -1847,7 +1847,7 @@ ProjectExplorerPlugin::OpenProjectResult ProjectExplorerPlugin::openProjects(con
|
||||
if (ProjectManager::canOpenProjectForMimeType(mt)) {
|
||||
if (!QFileInfo(filePath).isFile()) {
|
||||
appendError(errorString,
|
||||
tr("Failed opening project \"%1\": Project is not a file").arg(fileName));
|
||||
tr("Failed opening project \"%1\": Project is not a file.").arg(fileName));
|
||||
} else if (Project *pro = ProjectManager::openProject(mt, Utils::FileName::fromString(filePath))) {
|
||||
QObject::connect(pro, &Project::parsingFinished, [pro]() {
|
||||
emit SessionManager::instance()->projectFinishedParsing(pro);
|
||||
|
@@ -936,7 +936,7 @@ void RunControlPrivate::onWorkerStarted(RunWorker *worker)
|
||||
continueStart();
|
||||
return;
|
||||
}
|
||||
showError(tr("Unexpected run control state %1 when worker %2 started")
|
||||
showError(tr("Unexpected run control state %1 when worker %2 started.")
|
||||
.arg(stateName(state))
|
||||
.arg(worker->d->id));
|
||||
}
|
||||
@@ -1467,11 +1467,11 @@ bool RunWorkerPrivate::canStart() const
|
||||
void RunWorkerPrivate::timerEvent(QTimerEvent *ev)
|
||||
{
|
||||
if (ev->timerId() == startWatchdogTimerId) {
|
||||
q->reportFailure(tr("Worker start timed out"));
|
||||
q->reportFailure(tr("Worker start timed out."));
|
||||
return;
|
||||
}
|
||||
if (ev->timerId() == stopWatchdogTimerId) {
|
||||
q->reportFailure(tr("Worker stop timed out"));
|
||||
q->reportFailure(tr("Worker stop timed out."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1610,7 +1610,7 @@ QString RunWorker::userMessageForProcessError(QProcess::ProcessError error, cons
|
||||
"permissions to invoke the program.").arg(program);
|
||||
break;
|
||||
case QProcess::Crashed:
|
||||
msg = tr("The process was ended forcefully");
|
||||
msg = tr("The process was ended forcefully.");
|
||||
break;
|
||||
case QProcess::Timedout:
|
||||
// "The last waitFor...() function timed out. "
|
||||
|
@@ -59,18 +59,19 @@ static Core::Id categoryForType(Task::TaskType type)
|
||||
class TaskMark : public TextEditor::TextMark
|
||||
{
|
||||
public:
|
||||
TaskMark(unsigned int id, const QString &fileName, int lineNumber,
|
||||
Task::TaskType type, bool visible) :
|
||||
TextMark(fileName, lineNumber, categoryForType(type)),
|
||||
m_id(id)
|
||||
TaskMark(const Task &task) :
|
||||
TextMark(task.file.toString(), task.line, categoryForType(task.type)),
|
||||
m_id(task.taskId)
|
||||
{
|
||||
setColor(type == Task::Error ? Utils::Theme::ProjectExplorer_TaskError_TextMarkColor
|
||||
: Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor);
|
||||
setDefaultToolTip(type == Task::Error ? QApplication::translate("TaskHub", "Error")
|
||||
: QApplication::translate("TaskHub", "Warning"));
|
||||
setPriority(type == Task::Error ? TextEditor::TextMark::NormalPriority
|
||||
: TextEditor::TextMark::LowPriority);
|
||||
setVisible(visible);
|
||||
setColor(task.type == Task::Error ? Utils::Theme::ProjectExplorer_TaskError_TextMarkColor
|
||||
: Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor);
|
||||
setDefaultToolTip(task.type == Task::Error ? QApplication::translate("TaskHub", "Error")
|
||||
: QApplication::translate("TaskHub", "Warning"));
|
||||
setPriority(task.type == Task::Error ? TextEditor::TextMark::NormalPriority
|
||||
: TextEditor::TextMark::LowPriority);
|
||||
setToolTip(task.description);
|
||||
setIcon(task.icon);
|
||||
setVisible(!task.icon.isNull());
|
||||
}
|
||||
|
||||
bool isClickable() const;
|
||||
@@ -151,12 +152,8 @@ void TaskHub::addTask(Task task)
|
||||
task.line = -1;
|
||||
task.movedLine = task.line;
|
||||
|
||||
if (task.line != -1) {
|
||||
auto mark = new TaskMark(task.taskId, task.file.toString(), task.line, task.type, !task.icon.isNull());
|
||||
mark->setToolTip(task.description);
|
||||
mark->setIcon(task.icon);
|
||||
task.setMark(mark);
|
||||
}
|
||||
if (task.line != -1)
|
||||
task.setMark(new TaskMark(task));
|
||||
emit m_instance->taskAdded(task);
|
||||
}
|
||||
|
||||
|
@@ -210,7 +210,7 @@ void QbsBuildStep::cancel()
|
||||
QVariantMap QbsBuildStep::qbsConfiguration(VariableHandling variableHandling) const
|
||||
{
|
||||
QVariantMap config = m_qbsConfiguration;
|
||||
config.insert(QLatin1String(Constants::QBS_FORCE_PROBES_KEY), m_forceProbes);
|
||||
config.insert(Constants::QBS_FORCE_PROBES_KEY, m_forceProbes);
|
||||
if (variableHandling == ExpandVariables) {
|
||||
const Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||
for (auto it = config.begin(), end = config.end(); it != end; ++it) {
|
||||
@@ -227,9 +227,9 @@ void QbsBuildStep::setQbsConfiguration(const QVariantMap &config)
|
||||
QbsProject *pro = static_cast<QbsProject *>(project());
|
||||
|
||||
QVariantMap tmp = config;
|
||||
tmp.insert(QLatin1String(Constants::QBS_CONFIG_PROFILE_KEY), pro->profileForTarget(target()));
|
||||
if (!tmp.contains(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY)))
|
||||
tmp.insert(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY),
|
||||
tmp.insert(Constants::QBS_CONFIG_PROFILE_KEY, pro->profileForTarget(target()));
|
||||
if (!tmp.contains(Constants::QBS_CONFIG_VARIANT_KEY))
|
||||
tmp.insert(Constants::QBS_CONFIG_VARIANT_KEY,
|
||||
QString::fromLatin1(Constants::QBS_VARIANT_DEBUG));
|
||||
|
||||
if (tmp == m_qbsConfiguration)
|
||||
@@ -263,13 +263,13 @@ bool QbsBuildStep::cleanInstallRoot() const
|
||||
|
||||
bool QbsBuildStep::hasCustomInstallRoot() const
|
||||
{
|
||||
return m_qbsConfiguration.contains(QLatin1String(Constants::QBS_INSTALL_ROOT_KEY));
|
||||
return m_qbsConfiguration.contains(Constants::QBS_INSTALL_ROOT_KEY);
|
||||
}
|
||||
|
||||
Utils::FileName QbsBuildStep::installRoot() const
|
||||
{
|
||||
Utils::FileName root = Utils::FileName::fromString(m_qbsConfiguration
|
||||
.value(QLatin1String(Constants::QBS_INSTALL_ROOT_KEY)).toString());
|
||||
.value(Constants::QBS_INSTALL_ROOT_KEY).toString());
|
||||
if (root.isNull()) {
|
||||
const QbsBuildConfiguration * const bc
|
||||
= static_cast<QbsBuildConfiguration *>(buildConfiguration());
|
||||
@@ -293,15 +293,15 @@ bool QbsBuildStep::fromMap(const QVariantMap &map)
|
||||
if (!ProjectExplorer::BuildStep::fromMap(map))
|
||||
return false;
|
||||
|
||||
setQbsConfiguration(map.value(QLatin1String(QBS_CONFIG)).toMap());
|
||||
m_qbsBuildOptions.setDryRun(map.value(QLatin1String(QBS_DRY_RUN)).toBool());
|
||||
m_qbsBuildOptions.setKeepGoing(map.value(QLatin1String(QBS_KEEP_GOING)).toBool());
|
||||
m_qbsBuildOptions.setMaxJobCount(map.value(QLatin1String(QBS_MAXJOBCOUNT)).toInt());
|
||||
const bool showCommandLines = map.value(QLatin1String(QBS_SHOWCOMMANDLINES)).toBool();
|
||||
setQbsConfiguration(map.value(QBS_CONFIG).toMap());
|
||||
m_qbsBuildOptions.setDryRun(map.value(QBS_DRY_RUN).toBool());
|
||||
m_qbsBuildOptions.setKeepGoing(map.value(QBS_KEEP_GOING).toBool());
|
||||
m_qbsBuildOptions.setMaxJobCount(map.value(QBS_MAXJOBCOUNT).toInt());
|
||||
const bool showCommandLines = map.value(QBS_SHOWCOMMANDLINES).toBool();
|
||||
m_qbsBuildOptions.setEchoMode(showCommandLines ? qbs::CommandEchoModeCommandLine
|
||||
: qbs::CommandEchoModeSummary);
|
||||
m_qbsBuildOptions.setInstall(map.value(QLatin1String(QBS_INSTALL), true).toBool());
|
||||
m_qbsBuildOptions.setRemoveExistingInstallation(map.value(QLatin1String(QBS_CLEAN_INSTALL_ROOT))
|
||||
m_qbsBuildOptions.setInstall(map.value(QBS_INSTALL, true).toBool());
|
||||
m_qbsBuildOptions.setRemoveExistingInstallation(map.value(QBS_CLEAN_INSTALL_ROOT)
|
||||
.toBool());
|
||||
m_forceProbes = map.value(forceProbesKey()).toBool();
|
||||
return true;
|
||||
@@ -310,14 +310,14 @@ bool QbsBuildStep::fromMap(const QVariantMap &map)
|
||||
QVariantMap QbsBuildStep::toMap() const
|
||||
{
|
||||
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
||||
map.insert(QLatin1String(QBS_CONFIG), m_qbsConfiguration);
|
||||
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsBuildOptions.dryRun());
|
||||
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsBuildOptions.keepGoing());
|
||||
map.insert(QLatin1String(QBS_MAXJOBCOUNT), m_qbsBuildOptions.maxJobCount());
|
||||
map.insert(QLatin1String(QBS_SHOWCOMMANDLINES),
|
||||
map.insert(QBS_CONFIG, m_qbsConfiguration);
|
||||
map.insert(QBS_DRY_RUN, m_qbsBuildOptions.dryRun());
|
||||
map.insert(QBS_KEEP_GOING, m_qbsBuildOptions.keepGoing());
|
||||
map.insert(QBS_MAXJOBCOUNT, m_qbsBuildOptions.maxJobCount());
|
||||
map.insert(QBS_SHOWCOMMANDLINES,
|
||||
m_qbsBuildOptions.echoMode() == qbs::CommandEchoModeCommandLine);
|
||||
map.insert(QLatin1String(QBS_INSTALL), m_qbsBuildOptions.install());
|
||||
map.insert(QLatin1String(QBS_CLEAN_INSTALL_ROOT),
|
||||
map.insert(QBS_INSTALL, m_qbsBuildOptions.install());
|
||||
map.insert(QBS_CLEAN_INSTALL_ROOT,
|
||||
m_qbsBuildOptions.removeExistingInstallation());
|
||||
map.insert(forceProbesKey(), m_forceProbes);
|
||||
return map;
|
||||
@@ -389,7 +389,7 @@ void QbsBuildStep::handleProcessResultReport(const qbs::ProcessResult &result)
|
||||
|
||||
m_parser->setWorkingDirectory(result.workingDirectory());
|
||||
|
||||
QString commandline = result.executableFilePath() + QLatin1Char(' ')
|
||||
QString commandline = result.executableFilePath() + ' '
|
||||
+ Utils::QtcProcess::joinArgs(result.arguments());
|
||||
addOutput(commandline, OutputFormat::Stdout);
|
||||
|
||||
@@ -422,15 +422,15 @@ QString QbsBuildStep::buildVariant() const
|
||||
bool QbsBuildStep::isQmlDebuggingEnabled() const
|
||||
{
|
||||
QVariantMap data = qbsConfiguration(PreserveVariables);
|
||||
return data.value(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY), false).toBool()
|
||||
|| data.value(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY), false).toBool();
|
||||
return data.value(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY, false).toBool()
|
||||
|| data.value(Constants::QBS_CONFIG_QUICK_DEBUG_KEY, false).toBool();
|
||||
}
|
||||
|
||||
void QbsBuildStep::setBuildVariant(const QString &variant)
|
||||
{
|
||||
if (m_qbsConfiguration.value(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY)).toString() == variant)
|
||||
if (m_qbsConfiguration.value(Constants::QBS_CONFIG_VARIANT_KEY).toString() == variant)
|
||||
return;
|
||||
m_qbsConfiguration.insert(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY), variant);
|
||||
m_qbsConfiguration.insert(Constants::QBS_CONFIG_VARIANT_KEY, variant);
|
||||
emit qbsConfigurationChanged();
|
||||
QbsBuildConfiguration *bc = static_cast<QbsBuildConfiguration *>(buildConfiguration());
|
||||
if (bc)
|
||||
@@ -629,18 +629,17 @@ void QbsBuildStepConfigWidget::updateState()
|
||||
updateQmlDebuggingOption();
|
||||
|
||||
const QString buildVariant = m_step->buildVariant();
|
||||
const int idx = (buildVariant == QLatin1String(Constants::QBS_VARIANT_DEBUG)) ? 0 : 1;
|
||||
const int idx = (buildVariant == Constants::QBS_VARIANT_DEBUG) ? 0 : 1;
|
||||
m_ui->buildVariantComboBox->setCurrentIndex(idx);
|
||||
QString command = static_cast<QbsBuildConfiguration *>(m_step->buildConfiguration())
|
||||
->equivalentCommandLine(m_step);
|
||||
|
||||
for (int i = 0; i < m_propertyCache.count(); ++i) {
|
||||
command += QLatin1Char(' ') + m_propertyCache.at(i).name
|
||||
+ QLatin1Char(':') + m_propertyCache.at(i).effectiveValue;
|
||||
command += ' ' + m_propertyCache.at(i).name + ':' + m_propertyCache.at(i).effectiveValue;
|
||||
}
|
||||
|
||||
if (m_step->isQmlDebuggingEnabled())
|
||||
command += QLatin1String(" Qt.declarative.qmlDebugging:true Qt.quick.qmlDebugging:true");
|
||||
command += " Qt.declarative.qmlDebugging:true Qt.quick.qmlDebugging:true";
|
||||
m_ui->commandLineTextEdit->setPlainText(command);
|
||||
|
||||
QString summary = tr("<b>Qbs:</b> %1").arg(command);
|
||||
@@ -670,16 +669,16 @@ void QbsBuildStepConfigWidget::updatePropertyEdit(const QVariantMap &data)
|
||||
QVariantMap editable = data;
|
||||
|
||||
// remove data that is edited with special UIs:
|
||||
editable.remove(QLatin1String(Constants::QBS_CONFIG_PROFILE_KEY));
|
||||
editable.remove(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY));
|
||||
editable.remove(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY));
|
||||
editable.remove(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY));
|
||||
editable.remove(QLatin1String(Constants::QBS_FORCE_PROBES_KEY));
|
||||
editable.remove(QLatin1String(Constants::QBS_INSTALL_ROOT_KEY));
|
||||
editable.remove(Constants::QBS_CONFIG_PROFILE_KEY);
|
||||
editable.remove(Constants::QBS_CONFIG_VARIANT_KEY);
|
||||
editable.remove(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY);
|
||||
editable.remove(Constants::QBS_CONFIG_QUICK_DEBUG_KEY);
|
||||
editable.remove(Constants::QBS_FORCE_PROBES_KEY);
|
||||
editable.remove(Constants::QBS_INSTALL_ROOT_KEY);
|
||||
|
||||
QStringList propertyList;
|
||||
for (QVariantMap::const_iterator i = editable.constBegin(); i != editable.constEnd(); ++i)
|
||||
propertyList.append(i.key() + QLatin1Char(':') + i.value().toString());
|
||||
propertyList.append(i.key() + ':' + i.value().toString());
|
||||
|
||||
m_ui->propertyEdit->setText(Utils::QtcProcess::joinArgs(propertyList));
|
||||
}
|
||||
@@ -688,9 +687,9 @@ void QbsBuildStepConfigWidget::changeBuildVariant(int idx)
|
||||
{
|
||||
QString variant;
|
||||
if (idx == 1)
|
||||
variant = QLatin1String(Constants::QBS_VARIANT_RELEASE);
|
||||
variant = Constants::QBS_VARIANT_RELEASE;
|
||||
else
|
||||
variant = QLatin1String(Constants::QBS_VARIANT_DEBUG);
|
||||
variant = Constants::QBS_VARIANT_DEBUG;
|
||||
m_ignoreChange = true;
|
||||
m_step->setBuildVariant(variant);
|
||||
m_ignoreChange = false;
|
||||
@@ -768,16 +767,16 @@ void QbsBuildStepConfigWidget::applyCachedProperties()
|
||||
const QVariantMap tmp = m_step->qbsConfiguration(QbsBuildStep::PreserveVariables);
|
||||
|
||||
// Insert values set up with special UIs:
|
||||
data.insert(QLatin1String(Constants::QBS_CONFIG_PROFILE_KEY),
|
||||
tmp.value(QLatin1String(Constants::QBS_CONFIG_PROFILE_KEY)));
|
||||
data.insert(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY),
|
||||
tmp.value(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY)));
|
||||
if (tmp.contains(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY)))
|
||||
data.insert(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY),
|
||||
tmp.value(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY)));
|
||||
if (tmp.contains(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY)))
|
||||
data.insert(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY),
|
||||
tmp.value(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY)));
|
||||
data.insert(Constants::QBS_CONFIG_PROFILE_KEY,
|
||||
tmp.value(Constants::QBS_CONFIG_PROFILE_KEY));
|
||||
data.insert(Constants::QBS_CONFIG_VARIANT_KEY,
|
||||
tmp.value(Constants::QBS_CONFIG_VARIANT_KEY));
|
||||
if (tmp.contains(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY))
|
||||
data.insert(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY,
|
||||
tmp.value(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY));
|
||||
if (tmp.contains(Constants::QBS_CONFIG_QUICK_DEBUG_KEY))
|
||||
data.insert(Constants::QBS_CONFIG_QUICK_DEBUG_KEY,
|
||||
tmp.value(Constants::QBS_CONFIG_QUICK_DEBUG_KEY));
|
||||
|
||||
for (int i = 0; i < m_propertyCache.count(); ++i) {
|
||||
const Property &property = m_propertyCache.at(i);
|
||||
@@ -793,11 +792,11 @@ void QbsBuildStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked)
|
||||
{
|
||||
QVariantMap data = m_step->qbsConfiguration(QbsBuildStep::PreserveVariables);
|
||||
if (checked) {
|
||||
data.insert(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY), checked);
|
||||
data.insert(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY), checked);
|
||||
data.insert(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY, checked);
|
||||
data.insert(Constants::QBS_CONFIG_QUICK_DEBUG_KEY, checked);
|
||||
} else {
|
||||
data.remove(QLatin1String(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY));
|
||||
data.remove(QLatin1String(Constants::QBS_CONFIG_QUICK_DEBUG_KEY));
|
||||
data.remove(Constants::QBS_CONFIG_DECLARATIVE_DEBUG_KEY);
|
||||
data.remove(Constants::QBS_CONFIG_QUICK_DEBUG_KEY);
|
||||
}
|
||||
|
||||
m_ignoreChange = true;
|
||||
@@ -819,7 +818,7 @@ bool QbsBuildStepConfigWidget::validateProperties(Utils::FancyLineEdit *edit, QS
|
||||
QList<Property> properties;
|
||||
const Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||
foreach (const QString &rawArg, argList) {
|
||||
int pos = rawArg.indexOf(QLatin1Char(':'));
|
||||
int pos = rawArg.indexOf(':');
|
||||
if (pos > 0) {
|
||||
const QString rawValue = rawArg.mid(pos + 1);
|
||||
Property property(rawArg.left(pos), rawValue, expander->expand(rawValue));
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#include <cpptools/cppprojectupdater.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/buildenvironmentwidget.h>
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/buildtargetinfo.h>
|
||||
#include <projectexplorer/deploymentdata.h>
|
||||
@@ -688,6 +689,30 @@ QString QbsProject::uniqueProductName(const qbs::ProductData &product)
|
||||
return product.name() + QLatin1Char('.') + product.profile();
|
||||
}
|
||||
|
||||
void QbsProject::configureAsExampleProject(const QSet<Id> &platforms)
|
||||
{
|
||||
QList<const BuildInfo *> infoList;
|
||||
QList<Kit *> kits = KitManager::kits();
|
||||
const auto qtVersionMatchesPlatform = [platforms](const QtSupport::BaseQtVersion *version) {
|
||||
return platforms.isEmpty() || platforms.intersects(version->targetDeviceTypes());
|
||||
};
|
||||
foreach (Kit *k, kits) {
|
||||
const QtSupport::BaseQtVersion * const qtVersion
|
||||
= QtSupport::QtKitInformation::qtVersion(k);
|
||||
if (!qtVersion || !qtVersionMatchesPlatform(qtVersion))
|
||||
continue;
|
||||
const IBuildConfigurationFactory * const factory
|
||||
= IBuildConfigurationFactory::find(k, projectFilePath().toString());
|
||||
if (!factory)
|
||||
continue;
|
||||
for (BuildInfo * const info : factory->availableSetups(k, projectFilePath().toString()))
|
||||
infoList << info;
|
||||
}
|
||||
setup(infoList);
|
||||
qDeleteAll(infoList);
|
||||
prepareForParsing();
|
||||
}
|
||||
|
||||
void QbsProject::parse(const QVariantMap &config, const Environment &env, const QString &dir,
|
||||
const QString &configName)
|
||||
{
|
||||
|
@@ -108,6 +108,8 @@ public:
|
||||
const qbs::ProductData &product);
|
||||
static QString uniqueProductName(const qbs::ProductData &product);
|
||||
|
||||
void configureAsExampleProject(const QSet<Core::Id> &platforms) final;
|
||||
|
||||
void invalidate();
|
||||
void delayParsing();
|
||||
|
||||
|
@@ -60,19 +60,19 @@ const char QBS_CLEANSTEP_ID[] = "Qbs.CleanStep";
|
||||
const char QBS_INSTALLSTEP_ID[] = "Qbs.InstallStep";
|
||||
|
||||
// QBS strings:
|
||||
static const char QBS_VARIANT_DEBUG[] = "debug";
|
||||
static const char QBS_VARIANT_RELEASE[] = "release";
|
||||
const char QBS_VARIANT_DEBUG[] = "debug";
|
||||
const char QBS_VARIANT_RELEASE[] = "release";
|
||||
|
||||
static const char QBS_CONFIG_VARIANT_KEY[] = "qbs.buildVariant";
|
||||
static const char QBS_CONFIG_PROFILE_KEY[] = "qbs.profile";
|
||||
static const char QBS_INSTALL_ROOT_KEY[] = "qbs.installRoot";
|
||||
static const char QBS_CONFIG_DECLARATIVE_DEBUG_KEY[] = "Qt.declarative.qmlDebugging";
|
||||
static const char QBS_CONFIG_QUICK_DEBUG_KEY[] = "Qt.quick.qmlDebugging";
|
||||
const char QBS_CONFIG_VARIANT_KEY[] = "qbs.buildVariant";
|
||||
const char QBS_CONFIG_PROFILE_KEY[] = "qbs.profile";
|
||||
const char QBS_INSTALL_ROOT_KEY[] = "qbs.installRoot";
|
||||
const char QBS_CONFIG_DECLARATIVE_DEBUG_KEY[] = "Qt.declarative.qmlDebugging";
|
||||
const char QBS_CONFIG_QUICK_DEBUG_KEY[] = "Qt.quick.qmlDebugging";
|
||||
const char QBS_FORCE_PROBES_KEY[] = "qbspm.forceProbes";
|
||||
|
||||
// Icons:
|
||||
static const char QBS_GROUP_ICON[] = ":/qbsprojectmanager/images/groups.png";
|
||||
static const char QBS_PRODUCT_OVERLAY_ICON[] = ":/qbsprojectmanager/images/productgear.png";
|
||||
const char QBS_GROUP_ICON[] = ":/qbsprojectmanager/images/groups.png";
|
||||
const char QBS_PRODUCT_OVERLAY_ICON[] = ":/qbsprojectmanager/images/productgear.png";
|
||||
|
||||
// Toolchain related settings:
|
||||
const char QBS_TARGETOS[] = "qbs.targetOS";
|
||||
|
@@ -244,7 +244,6 @@ void MakeFileParse::parseAssignments(QList<QMakeAssignment> *assignments)
|
||||
|
||||
static FileName findQMakeBinaryFromMakefile(const QString &makefile)
|
||||
{
|
||||
bool debugAdding = false;
|
||||
QFile fi(makefile);
|
||||
if (fi.exists() && fi.open(QFile::ReadOnly)) {
|
||||
QTextStream ts(&fi);
|
||||
@@ -252,8 +251,6 @@ static FileName findQMakeBinaryFromMakefile(const QString &makefile)
|
||||
while (!ts.atEnd()) {
|
||||
QString line = ts.readLine();
|
||||
if (r1.exactMatch(line)) {
|
||||
if (debugAdding)
|
||||
qDebug()<<"#~~ QMAKE is:"<<r1.cap(1).trimmed();
|
||||
QFileInfo qmake(r1.cap(1).trimmed());
|
||||
QString qmakePath = qmake.filePath();
|
||||
if (!QString::fromLatin1(QTC_HOST_EXE_SUFFIX).isEmpty()
|
||||
|
@@ -24,330 +24,282 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "profilecompletionassist.h"
|
||||
#include "qmakeprojectmanagerconstants.h"
|
||||
|
||||
#include <texteditor/codeassist/assistinterface.h>
|
||||
#include <texteditor/codeassist/keywordscompletionassist.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include "texteditor/codeassist/keywordscompletionassist.h"
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
using namespace QmakeProjectManager::Internal;
|
||||
using namespace TextEditor;
|
||||
|
||||
|
||||
static const char *const variableKeywords[] = {
|
||||
"CCFLAG",
|
||||
"CLEAN_DEPS",
|
||||
"CONFIG",
|
||||
"DEFINES",
|
||||
"DEF_FILE",
|
||||
"DEPENDPATH",
|
||||
"DEPLOYMENT",
|
||||
"DEPLOYMENT_PLUGIN",
|
||||
"DESTDIR",
|
||||
"DESTDIR_TARGET",
|
||||
"DISTFILES",
|
||||
"DLLDESTDIR",
|
||||
"DSP_TEMPLATE",
|
||||
"FORMS",
|
||||
"FORMS3",
|
||||
"GUID",
|
||||
"HEADERS",
|
||||
"ICON",
|
||||
"INCLUDEPATH",
|
||||
"INSTALLS",
|
||||
"LEXIMPLS",
|
||||
"LEXOBJECTS",
|
||||
"LEXSOURCES",
|
||||
"LIBS",
|
||||
"LITERAL_HASH",
|
||||
"MAKEFILE",
|
||||
"MAKEFILE_GENERATOR",
|
||||
"MOBILITY",
|
||||
"MOC_DIR",
|
||||
"OBJECTIVE_HEADERS",
|
||||
"OBJECTIVE_SOURCES",
|
||||
"OBJECTS",
|
||||
"OBJECTS_DIR",
|
||||
"OBJMOC",
|
||||
"OTHER_FILES",
|
||||
"OUT_PWD",
|
||||
"PKGCONFIG",
|
||||
"POST_TARGETDEPS",
|
||||
"PRECOMPILED_HEADER",
|
||||
"PRE_TARGETDEPS",
|
||||
"PWD",
|
||||
"QMAKE",
|
||||
"QMAKESPEC",
|
||||
"QMAKE_APP_FLAG",
|
||||
"QMAKE_APP_OR_DLL",
|
||||
"QMAKE_AR_CMD",
|
||||
"QMAKE_BUNDLE_DATA",
|
||||
"QMAKE_BUNDLE_EXTENSION",
|
||||
"QMAKE_CC",
|
||||
"QMAKE_CFLAGS",
|
||||
"QMAKE_CFLAGS_DEBUG",
|
||||
"QMAKE_CFLAGS_MT",
|
||||
"QMAKE_CFLAGS_MT_DBG",
|
||||
"QMAKE_CFLAGS_MT_DLL",
|
||||
"QMAKE_CFLAGS_MT_DLLDBG",
|
||||
"QMAKE_CFLAGS_RELEASE",
|
||||
"QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO",
|
||||
"QMAKE_CFLAGS_SHLIB",
|
||||
"QMAKE_CFLAGS_THREAD",
|
||||
"QMAKE_CFLAGS_WARN_OFF",
|
||||
"QMAKE_CFLAGS_WARN_ON",
|
||||
"QMAKE_CLEAN",
|
||||
"QMAKE_CXX",
|
||||
"QMAKE_CXXFLAGS",
|
||||
"QMAKE_CXXFLAGS_DEBUG",
|
||||
"QMAKE_CXXFLAGS_MT",
|
||||
"QMAKE_CXXFLAGS_MT_DBG",
|
||||
"QMAKE_CXXFLAGS_MT_DLL",
|
||||
"QMAKE_CXXFLAGS_MT_DLLDBG",
|
||||
"QMAKE_CXXFLAGS_RELEASE",
|
||||
"QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO",
|
||||
"QMAKE_CXXFLAGS_SHLIB",
|
||||
"QMAKE_CXXFLAGS_THREAD",
|
||||
"QMAKE_CXXFLAGS_WARN_OFF",
|
||||
"QMAKE_CXXFLAGS_WARN_ON",
|
||||
"QMAKE_DISTCLEAN",
|
||||
"QMAKE_EXTENSION_SHLIB",
|
||||
"QMAKE_EXTRA_COMPILERS",
|
||||
"QMAKE_EXTRA_TARGETS",
|
||||
"QMAKE_EXT_CPP",
|
||||
"QMAKE_EXT_H",
|
||||
"QMAKE_EXT_LEX",
|
||||
"QMAKE_EXT_MOC",
|
||||
"QMAKE_EXT_OBJ",
|
||||
"QMAKE_EXT_PRL",
|
||||
"QMAKE_EXT_UI",
|
||||
"QMAKE_EXT_YACC",
|
||||
"QMAKE_FAILED_REQUIREMENTS",
|
||||
"QMAKE_FRAMEWORK_BUNDLE_NAME",
|
||||
"QMAKE_FRAMEWORK_VERSION",
|
||||
"QMAKE_INCDIR",
|
||||
"QMAKE_INCDIR_EGL",
|
||||
"QMAKE_INCDIR_OPENGL",
|
||||
"QMAKE_INCDIR_OPENGL_ES1",
|
||||
"QMAKE_INCDIR_OPENGL_ES2",
|
||||
"QMAKE_INCDIR_OPENVG",
|
||||
"QMAKE_INCDIR_QT",
|
||||
"QMAKE_INCDIR_THREAD",
|
||||
"QMAKE_INCDIR_X11",
|
||||
"QMAKE_INFO_PLIST",
|
||||
"QMAKE_LFLAGS",
|
||||
"QMAKE_LFLAGS_CONSOLE",
|
||||
"QMAKE_LFLAGS_CONSOLE_DLL",
|
||||
"QMAKE_LFLAGS_DEBUG",
|
||||
"QMAKE_LFLAGS_PLUGIN",
|
||||
"QMAKE_LFLAGS_QT_DLL",
|
||||
"QMAKE_LFLAGS_RELEASE",
|
||||
"QMAKE_LFLAGS_RPATH",
|
||||
"QMAKE_LFLAGS_SHAPP",
|
||||
"QMAKE_LFLAGS_SHLIB",
|
||||
"QMAKE_LFLAGS_SONAME",
|
||||
"QMAKE_LFLAGS_THREAD",
|
||||
"QMAKE_LFLAGS_WINDOWS",
|
||||
"QMAKE_LFLAGS_WINDOWS_DLL",
|
||||
"QMAKE_LIBDIR",
|
||||
"QMAKE_LIBDIR_EGL",
|
||||
"QMAKE_LIBDIR_FLAGS",
|
||||
"QMAKE_LIBDIR_OPENGL",
|
||||
"QMAKE_LIBDIR_OPENVG",
|
||||
"QMAKE_LIBDIR_QT",
|
||||
"QMAKE_LIBDIR_X11",
|
||||
"QMAKE_LIBS",
|
||||
"QMAKE_LIBS_CONSOLE",
|
||||
"QMAKE_LIBS_EGL",
|
||||
"QMAKE_LIBS_OPENGL",
|
||||
"QMAKE_LIBS_OPENGL_ES1",
|
||||
"QMAKE_LIBS_OPENGL_ES2",
|
||||
"QMAKE_LIBS_OPENGL_QT",
|
||||
"QMAKE_LIBS_OPENVG",
|
||||
"QMAKE_LIBS_QT",
|
||||
"QMAKE_LIBS_QT_DLL",
|
||||
"QMAKE_LIBS_QT_OPENGL",
|
||||
"QMAKE_LIBS_QT_THREAD",
|
||||
"QMAKE_LIBS_RT",
|
||||
"QMAKE_LIBS_RTMT",
|
||||
"QMAKE_LIBS_THREAD",
|
||||
"QMAKE_LIBS_WINDOWS",
|
||||
"QMAKE_LIBS_X11",
|
||||
"QMAKE_LIBS_X11SM",
|
||||
"QMAKE_LIB_FLAG",
|
||||
"QMAKE_LINK",
|
||||
"QMAKE_LINK_SHLIB_CMD",
|
||||
"QMAKE_LN_SHLIB",
|
||||
"QMAKE_MACOSX_DEPLOYMENT_TARGET",
|
||||
"QMAKE_MAC_SDK",
|
||||
"QMAKE_MAKEFILE",
|
||||
"QMAKE_MOC_SRC",
|
||||
"QMAKE_POST_LINK",
|
||||
"QMAKE_PRE_LINK",
|
||||
"QMAKE_PROJECT_NAME",
|
||||
"QMAKE_QMAKE",
|
||||
"QMAKE_QT_DLL",
|
||||
"QMAKE_RESOURCE_FLAGS",
|
||||
"QMAKE_RPATH",
|
||||
"QMAKE_RPATHDIR",
|
||||
"QMAKE_RUN_CC",
|
||||
"QMAKE_RUN_CC_IMP",
|
||||
"QMAKE_RUN_CXX",
|
||||
"QMAKE_RUN_CXX_IMP",
|
||||
"QMAKE_TARGET",
|
||||
"QMAKE_UIC",
|
||||
"QT",
|
||||
"QTPLUGIN",
|
||||
"QT_MAJOR_VERSION",
|
||||
"QT_MINOR_VERSION",
|
||||
"QT_PATCH_VERSION",
|
||||
"QT_VERSION",
|
||||
"RCC_DIR",
|
||||
"RC_FILE",
|
||||
"REQUIRES",
|
||||
"RESOURCES",
|
||||
"RES_FILE",
|
||||
"RSS_RULES",
|
||||
"SIGNATURE_FILE",
|
||||
"SOURCES",
|
||||
"SRCMOC",
|
||||
"STATECHARTS",
|
||||
"SUBDIRS",
|
||||
"TARGET",
|
||||
"TEMPLATE",
|
||||
"TRANSLATIONS",
|
||||
"UICIMPLS",
|
||||
"UICOBJECTS",
|
||||
"UI_DIR",
|
||||
"UI_HEADERS_DIR",
|
||||
"UI_SOURCES_DIR",
|
||||
"VERSION",
|
||||
"VERSION_PE_HEADER",
|
||||
"VER_MAJ",
|
||||
"VER_MIN",
|
||||
"VER_PAT",
|
||||
"VPATH",
|
||||
"YACCIMPLS",
|
||||
"YACCOBJECTS",
|
||||
"YACCSOURCES",
|
||||
"_PRO_FILE_",
|
||||
"_PRO_FILE_PWD_",
|
||||
0
|
||||
};
|
||||
|
||||
static const char *const functionKeywords[] = {
|
||||
"CONFIG",
|
||||
"absolute_path",
|
||||
"basename",
|
||||
"cache",
|
||||
"cat",
|
||||
"clean_path",
|
||||
"clear",
|
||||
"contains",
|
||||
"count",
|
||||
"debug",
|
||||
"defined",
|
||||
"dirname",
|
||||
"enumerate_vars",
|
||||
"equals",
|
||||
"error",
|
||||
"escape_expand",
|
||||
"eval",
|
||||
"exists",
|
||||
"export",
|
||||
"files",
|
||||
"find",
|
||||
"first",
|
||||
"for",
|
||||
"format_number",
|
||||
"fromfile",
|
||||
"getenv",
|
||||
"greaterThan",
|
||||
"if",
|
||||
"include",
|
||||
"infile",
|
||||
"isActiveConfig",
|
||||
"isEmpty",
|
||||
"isEqual",
|
||||
"join",
|
||||
"last",
|
||||
"lessThan",
|
||||
"list",
|
||||
"load",
|
||||
"log",
|
||||
"lower",
|
||||
"member",
|
||||
"message",
|
||||
"mkpath",
|
||||
"packagesExist",
|
||||
"parseJson",
|
||||
"prompt",
|
||||
"quote",
|
||||
"re_escape",
|
||||
"relative_path",
|
||||
"replace",
|
||||
"requires",
|
||||
"resolve_depends",
|
||||
"reverse",
|
||||
"section",
|
||||
"shadowed",
|
||||
"shell_path",
|
||||
"shell_quote",
|
||||
"size",
|
||||
"sort_depends",
|
||||
"split",
|
||||
"sprintf",
|
||||
"system",
|
||||
"system_path",
|
||||
"system_quote",
|
||||
"title",
|
||||
"touch",
|
||||
"unique",
|
||||
"unset",
|
||||
"upper",
|
||||
"val_escape",
|
||||
"warning",
|
||||
"write_file",
|
||||
0
|
||||
};
|
||||
|
||||
// -------------------------------
|
||||
// ProFileCompletionAssistProvider
|
||||
// -------------------------------
|
||||
void ProFileCompletionAssistProvider::init()
|
||||
const TextEditor::Keywords &QmakeProjectManager::Internal::qmakeKeywords()
|
||||
{
|
||||
for (uint i = 0; i < sizeof variableKeywords / sizeof variableKeywords[0] - 1; i++)
|
||||
m_variables.append(QLatin1String(variableKeywords[i]));
|
||||
for (uint i = 0; i < sizeof functionKeywords / sizeof functionKeywords[0] - 1; i++)
|
||||
m_functions.append(QLatin1String(functionKeywords[i]));
|
||||
}
|
||||
|
||||
ProFileCompletionAssistProvider::~ProFileCompletionAssistProvider()
|
||||
{
|
||||
}
|
||||
|
||||
IAssistProcessor *ProFileCompletionAssistProvider::createProcessor() const
|
||||
{
|
||||
if (m_variables.isEmpty())
|
||||
const_cast<ProFileCompletionAssistProvider *>(this)->init();
|
||||
TextEditor::Keywords keywords = TextEditor::Keywords(m_variables, m_functions, QMap<QString, QStringList>());
|
||||
auto processor = new KeywordsCompletionAssistProcessor(keywords);
|
||||
processor->setSnippetGroup(TextEditor::Constants::TEXT_SNIPPET_GROUP_ID);
|
||||
return processor;
|
||||
}
|
||||
|
||||
QStringList ProFileCompletionAssistProvider::variables() const
|
||||
{
|
||||
if (m_variables.isEmpty())
|
||||
const_cast<ProFileCompletionAssistProvider *>(this)->init();
|
||||
return m_variables;
|
||||
}
|
||||
|
||||
QStringList ProFileCompletionAssistProvider::functions() const
|
||||
{
|
||||
if (m_functions.isEmpty())
|
||||
const_cast<ProFileCompletionAssistProvider *>(this)->init();
|
||||
return m_functions;
|
||||
static TextEditor::Keywords keywords(
|
||||
QStringList{ // variables
|
||||
"CCFLAG",
|
||||
"CLEAN_DEPS",
|
||||
"CONFIG",
|
||||
"DEFINES",
|
||||
"DEF_FILE",
|
||||
"DEPENDPATH",
|
||||
"DEPLOYMENT",
|
||||
"DEPLOYMENT_PLUGIN",
|
||||
"DESTDIR",
|
||||
"DESTDIR_TARGET",
|
||||
"DISTFILES",
|
||||
"DLLDESTDIR",
|
||||
"DSP_TEMPLATE",
|
||||
"FORMS",
|
||||
"FORMS3",
|
||||
"GUID",
|
||||
"HEADERS",
|
||||
"ICON",
|
||||
"INCLUDEPATH",
|
||||
"INSTALLS",
|
||||
"LEXIMPLS",
|
||||
"LEXOBJECTS",
|
||||
"LEXSOURCES",
|
||||
"LIBS",
|
||||
"LITERAL_HASH",
|
||||
"MAKEFILE",
|
||||
"MAKEFILE_GENERATOR",
|
||||
"MOBILITY",
|
||||
"MOC_DIR",
|
||||
"OBJECTIVE_HEADERS",
|
||||
"OBJECTIVE_SOURCES",
|
||||
"OBJECTS",
|
||||
"OBJECTS_DIR",
|
||||
"OBJMOC",
|
||||
"OTHER_FILES",
|
||||
"OUT_PWD",
|
||||
"PKGCONFIG",
|
||||
"POST_TARGETDEPS",
|
||||
"PRECOMPILED_HEADER",
|
||||
"PRE_TARGETDEPS",
|
||||
"PWD",
|
||||
"QMAKE",
|
||||
"QMAKESPEC",
|
||||
"QMAKE_APP_FLAG",
|
||||
"QMAKE_APP_OR_DLL",
|
||||
"QMAKE_AR_CMD",
|
||||
"QMAKE_BUNDLE_DATA",
|
||||
"QMAKE_BUNDLE_EXTENSION",
|
||||
"QMAKE_CC",
|
||||
"QMAKE_CFLAGS",
|
||||
"QMAKE_CFLAGS_DEBUG",
|
||||
"QMAKE_CFLAGS_MT",
|
||||
"QMAKE_CFLAGS_MT_DBG",
|
||||
"QMAKE_CFLAGS_MT_DLL",
|
||||
"QMAKE_CFLAGS_MT_DLLDBG",
|
||||
"QMAKE_CFLAGS_RELEASE",
|
||||
"QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO",
|
||||
"QMAKE_CFLAGS_SHLIB",
|
||||
"QMAKE_CFLAGS_THREAD",
|
||||
"QMAKE_CFLAGS_WARN_OFF",
|
||||
"QMAKE_CFLAGS_WARN_ON",
|
||||
"QMAKE_CLEAN",
|
||||
"QMAKE_CXX",
|
||||
"QMAKE_CXXFLAGS",
|
||||
"QMAKE_CXXFLAGS_DEBUG",
|
||||
"QMAKE_CXXFLAGS_MT",
|
||||
"QMAKE_CXXFLAGS_MT_DBG",
|
||||
"QMAKE_CXXFLAGS_MT_DLL",
|
||||
"QMAKE_CXXFLAGS_MT_DLLDBG",
|
||||
"QMAKE_CXXFLAGS_RELEASE",
|
||||
"QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO",
|
||||
"QMAKE_CXXFLAGS_SHLIB",
|
||||
"QMAKE_CXXFLAGS_THREAD",
|
||||
"QMAKE_CXXFLAGS_WARN_OFF",
|
||||
"QMAKE_CXXFLAGS_WARN_ON",
|
||||
"QMAKE_DISTCLEAN",
|
||||
"QMAKE_EXTENSION_SHLIB",
|
||||
"QMAKE_EXTRA_COMPILERS",
|
||||
"QMAKE_EXTRA_TARGETS",
|
||||
"QMAKE_EXT_CPP",
|
||||
"QMAKE_EXT_H",
|
||||
"QMAKE_EXT_LEX",
|
||||
"QMAKE_EXT_MOC",
|
||||
"QMAKE_EXT_OBJ",
|
||||
"QMAKE_EXT_PRL",
|
||||
"QMAKE_EXT_UI",
|
||||
"QMAKE_EXT_YACC",
|
||||
"QMAKE_FAILED_REQUIREMENTS",
|
||||
"QMAKE_FRAMEWORK_BUNDLE_NAME",
|
||||
"QMAKE_FRAMEWORK_VERSION",
|
||||
"QMAKE_INCDIR",
|
||||
"QMAKE_INCDIR_EGL",
|
||||
"QMAKE_INCDIR_OPENGL",
|
||||
"QMAKE_INCDIR_OPENGL_ES1",
|
||||
"QMAKE_INCDIR_OPENGL_ES2",
|
||||
"QMAKE_INCDIR_OPENVG",
|
||||
"QMAKE_INCDIR_QT",
|
||||
"QMAKE_INCDIR_THREAD",
|
||||
"QMAKE_INCDIR_X11",
|
||||
"QMAKE_INFO_PLIST",
|
||||
"QMAKE_LFLAGS",
|
||||
"QMAKE_LFLAGS_CONSOLE",
|
||||
"QMAKE_LFLAGS_CONSOLE_DLL",
|
||||
"QMAKE_LFLAGS_DEBUG",
|
||||
"QMAKE_LFLAGS_PLUGIN",
|
||||
"QMAKE_LFLAGS_QT_DLL",
|
||||
"QMAKE_LFLAGS_RELEASE",
|
||||
"QMAKE_LFLAGS_RPATH",
|
||||
"QMAKE_LFLAGS_SHAPP",
|
||||
"QMAKE_LFLAGS_SHLIB",
|
||||
"QMAKE_LFLAGS_SONAME",
|
||||
"QMAKE_LFLAGS_THREAD",
|
||||
"QMAKE_LFLAGS_WINDOWS",
|
||||
"QMAKE_LFLAGS_WINDOWS_DLL",
|
||||
"QMAKE_LIBDIR",
|
||||
"QMAKE_LIBDIR_EGL",
|
||||
"QMAKE_LIBDIR_FLAGS",
|
||||
"QMAKE_LIBDIR_OPENGL",
|
||||
"QMAKE_LIBDIR_OPENVG",
|
||||
"QMAKE_LIBDIR_QT",
|
||||
"QMAKE_LIBDIR_X11",
|
||||
"QMAKE_LIBS",
|
||||
"QMAKE_LIBS_CONSOLE",
|
||||
"QMAKE_LIBS_EGL",
|
||||
"QMAKE_LIBS_OPENGL",
|
||||
"QMAKE_LIBS_OPENGL_ES1",
|
||||
"QMAKE_LIBS_OPENGL_ES2",
|
||||
"QMAKE_LIBS_OPENGL_QT",
|
||||
"QMAKE_LIBS_OPENVG",
|
||||
"QMAKE_LIBS_QT",
|
||||
"QMAKE_LIBS_QT_DLL",
|
||||
"QMAKE_LIBS_QT_OPENGL",
|
||||
"QMAKE_LIBS_QT_THREAD",
|
||||
"QMAKE_LIBS_RT",
|
||||
"QMAKE_LIBS_RTMT",
|
||||
"QMAKE_LIBS_THREAD",
|
||||
"QMAKE_LIBS_WINDOWS",
|
||||
"QMAKE_LIBS_X11",
|
||||
"QMAKE_LIBS_X11SM",
|
||||
"QMAKE_LIB_FLAG",
|
||||
"QMAKE_LINK",
|
||||
"QMAKE_LINK_SHLIB_CMD",
|
||||
"QMAKE_LN_SHLIB",
|
||||
"QMAKE_MACOSX_DEPLOYMENT_TARGET",
|
||||
"QMAKE_MAC_SDK",
|
||||
"QMAKE_MAKEFILE",
|
||||
"QMAKE_MOC_SRC",
|
||||
"QMAKE_POST_LINK",
|
||||
"QMAKE_PRE_LINK",
|
||||
"QMAKE_PROJECT_NAME",
|
||||
"QMAKE_QMAKE",
|
||||
"QMAKE_QT_DLL",
|
||||
"QMAKE_RESOURCE_FLAGS",
|
||||
"QMAKE_RPATH",
|
||||
"QMAKE_RPATHDIR",
|
||||
"QMAKE_RUN_CC",
|
||||
"QMAKE_RUN_CC_IMP",
|
||||
"QMAKE_RUN_CXX",
|
||||
"QMAKE_RUN_CXX_IMP",
|
||||
"QMAKE_TARGET",
|
||||
"QMAKE_UIC",
|
||||
"QT",
|
||||
"QTPLUGIN",
|
||||
"QT_MAJOR_VERSION",
|
||||
"QT_MINOR_VERSION",
|
||||
"QT_PATCH_VERSION",
|
||||
"QT_VERSION",
|
||||
"RCC_DIR",
|
||||
"RC_FILE",
|
||||
"REQUIRES",
|
||||
"RESOURCES",
|
||||
"RES_FILE",
|
||||
"RSS_RULES",
|
||||
"SIGNATURE_FILE",
|
||||
"SOURCES",
|
||||
"SRCMOC",
|
||||
"STATECHARTS",
|
||||
"SUBDIRS",
|
||||
"TARGET",
|
||||
"TEMPLATE",
|
||||
"TRANSLATIONS",
|
||||
"UICIMPLS",
|
||||
"UICOBJECTS",
|
||||
"UI_DIR",
|
||||
"UI_HEADERS_DIR",
|
||||
"UI_SOURCES_DIR",
|
||||
"VERSION",
|
||||
"VERSION_PE_HEADER",
|
||||
"VER_MAJ",
|
||||
"VER_MIN",
|
||||
"VER_PAT",
|
||||
"VPATH",
|
||||
"YACCIMPLS",
|
||||
"YACCOBJECTS",
|
||||
"YACCSOURCES",
|
||||
"_PRO_FILE_",
|
||||
"_PRO_FILE_PWD_"},
|
||||
QStringList{ // functions
|
||||
"CONFIG",
|
||||
"absolute_path",
|
||||
"basename",
|
||||
"cache",
|
||||
"cat",
|
||||
"clean_path",
|
||||
"clear",
|
||||
"contains",
|
||||
"count",
|
||||
"debug",
|
||||
"defined",
|
||||
"dirname",
|
||||
"enumerate_vars",
|
||||
"equals",
|
||||
"error",
|
||||
"escape_expand",
|
||||
"eval",
|
||||
"exists",
|
||||
"export",
|
||||
"files",
|
||||
"find",
|
||||
"first",
|
||||
"for",
|
||||
"format_number",
|
||||
"fromfile",
|
||||
"getenv",
|
||||
"greaterThan",
|
||||
"if",
|
||||
"include",
|
||||
"infile",
|
||||
"isActiveConfig",
|
||||
"isEmpty",
|
||||
"isEqual",
|
||||
"join",
|
||||
"last",
|
||||
"lessThan",
|
||||
"list",
|
||||
"load",
|
||||
"log",
|
||||
"lower",
|
||||
"member",
|
||||
"message",
|
||||
"mkpath",
|
||||
"packagesExist",
|
||||
"parseJson",
|
||||
"prompt",
|
||||
"quote",
|
||||
"re_escape",
|
||||
"relative_path",
|
||||
"replace",
|
||||
"requires",
|
||||
"resolve_depends",
|
||||
"reverse",
|
||||
"section",
|
||||
"shadowed",
|
||||
"shell_path",
|
||||
"shell_quote",
|
||||
"size",
|
||||
"sort_depends",
|
||||
"split",
|
||||
"sprintf",
|
||||
"system",
|
||||
"system_path",
|
||||
"system_quote",
|
||||
"title",
|
||||
"touch",
|
||||
"unique",
|
||||
"unset",
|
||||
"upper",
|
||||
"val_escape",
|
||||
"warning",
|
||||
"write_file"});
|
||||
return keywords;
|
||||
}
|
||||
|
@@ -25,29 +25,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <texteditor/codeassist/completionassistprovider.h>
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
namespace TextEditor { class Keywords; }
|
||||
namespace QmakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class ProFileCompletionAssistProvider : public TextEditor::CompletionAssistProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
void init();
|
||||
~ProFileCompletionAssistProvider();
|
||||
|
||||
TextEditor::IAssistProcessor *createProcessor() const override;
|
||||
QStringList variables() const;
|
||||
QStringList functions() const;
|
||||
|
||||
private:
|
||||
QStringList m_variables;
|
||||
QStringList m_functions;
|
||||
};
|
||||
const TextEditor::Keywords &qmakeKeywords();
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmakeProjectManager
|
||||
|
@@ -182,16 +182,14 @@ ProFileEditorFactory::ProFileEditorFactory()
|
||||
setDocumentCreator(createProFileDocument);
|
||||
setEditorWidgetCreator([]() { return new ProFileEditorWidget; });
|
||||
|
||||
ProFileCompletionAssistProvider *pcap = new ProFileCompletionAssistProvider;
|
||||
setCompletionAssistProvider(pcap);
|
||||
setCompletionAssistProvider(new KeywordsCompletionAssistProvider(qmakeKeywords()));
|
||||
|
||||
setCommentDefinition(Utils::CommentDefinition::HashStyle);
|
||||
setEditorActionHandlers(TextEditorActionHandler::UnCommentSelection
|
||||
| TextEditorActionHandler::JumpToFileUnderCursor);
|
||||
|
||||
Keywords keywords(pcap->variables(), pcap->functions(), QMap<QString, QStringList>());
|
||||
addHoverHandler(new ProFileHoverHandler(keywords));
|
||||
setSyntaxHighlighterCreator([keywords]() { return new ProFileHighlighter(keywords); });
|
||||
addHoverHandler(new ProFileHoverHandler);
|
||||
setSyntaxHighlighterCreator([]() { return new ProFileHighlighter; });
|
||||
|
||||
const QString defaultOverlay = QLatin1String(ProjectExplorer::Constants::FILEOVERLAY_QT);
|
||||
Core::FileIconProvider::registerIconOverlayForSuffix(
|
||||
|
@@ -52,8 +52,8 @@ static TextStyle styleForFormat(int format)
|
||||
return C_TEXT;
|
||||
}
|
||||
|
||||
ProFileHighlighter::ProFileHighlighter(const Keywords &keywords)
|
||||
: m_keywords(keywords)
|
||||
ProFileHighlighter::ProFileHighlighter()
|
||||
: m_keywords(qmakeKeywords())
|
||||
{
|
||||
setTextFormatCategories(NumProfileFormats, styleForFormat);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ public:
|
||||
NumProfileFormats
|
||||
};
|
||||
|
||||
explicit ProFileHighlighter(const TextEditor::Keywords &keywords);
|
||||
ProFileHighlighter();
|
||||
void highlightBlock(const QString &text);
|
||||
|
||||
private:
|
||||
|
@@ -39,8 +39,8 @@ using namespace Core;
|
||||
namespace QmakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
ProFileHoverHandler::ProFileHoverHandler(const TextEditor::Keywords &keywords)
|
||||
: m_keywords(keywords)
|
||||
ProFileHoverHandler::ProFileHoverHandler()
|
||||
: m_keywords(qmakeKeywords())
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,7 @@ namespace Internal {
|
||||
class ProFileHoverHandler : public TextEditor::BaseHoverHandler
|
||||
{
|
||||
public:
|
||||
explicit ProFileHoverHandler(const TextEditor::Keywords &keywords);
|
||||
ProFileHoverHandler();
|
||||
|
||||
private:
|
||||
void identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos) override;
|
||||
|
@@ -140,9 +140,9 @@ void SelectionTool::hoverMoveEvent(const QList<QGraphicsItem*> &itemList,
|
||||
}
|
||||
|
||||
if ((topSelectedItemIsMovable(itemList) && !view()->hasSingleSelectedModelNode())
|
||||
|| selectedItemCursorInMovableArea(event->scenePos())
|
||||
|| (selectedItemCursorInMovableArea(event->scenePos())
|
||||
&& !event->modifiers().testFlag(Qt::ControlModifier)
|
||||
&& !event->modifiers().testFlag(Qt::ShiftModifier)) {
|
||||
&& !event->modifiers().testFlag(Qt::ShiftModifier))) {
|
||||
view()->changeToMoveTool();
|
||||
return;
|
||||
}
|
||||
|
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DesignDocument_h
|
||||
#define DesignDocument_h
|
||||
#pragma once
|
||||
|
||||
#include <model.h>
|
||||
#include <rewriterview.h>
|
||||
@@ -155,6 +154,3 @@ private: // variables
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
|
||||
#endif // DesignDocument_h
|
||||
|
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef StackedUtilityPanelController_h
|
||||
#define StackedUtilityPanelController_h
|
||||
#pragma once
|
||||
|
||||
#include "utilitypanelcontroller.h"
|
||||
|
||||
@@ -55,5 +54,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
#endif // StackedUtilityPanelController_h
|
||||
|
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef UtilityPanelController_h
|
||||
#define UtilityPanelController_h
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@@ -47,5 +46,3 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
#endif // UtilityPanelController_h
|
||||
|
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QmlAnchorBindingProxy_h
|
||||
#define QmlAnchorBindingProxy_h
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <modelnode.h>
|
||||
@@ -248,6 +247,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlDesigner
|
||||
|
||||
|
||||
#endif //QmlAnchorBindingProxy
|
||||
|
@@ -95,7 +95,7 @@ void MetaInfoReader::elementStart(const QString &name)
|
||||
case ParsingHints:
|
||||
case Finished:
|
||||
case Undefined: setParserState(Error);
|
||||
addError(tr("Illegal state while parsing"), currentSourceLocation());
|
||||
addError(tr("Illegal state while parsing."), currentSourceLocation());
|
||||
case Error:
|
||||
default: return;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ void MetaInfoReader::elementEnd()
|
||||
case ParsingDocument:
|
||||
case Finished:
|
||||
case Undefined: setParserState(Error);
|
||||
addError(tr("Illegal state while parsing"), currentSourceLocation());
|
||||
addError(tr("Illegal state while parsing."), currentSourceLocation());
|
||||
case Error:
|
||||
default: return;
|
||||
}
|
||||
@@ -126,12 +126,12 @@ void MetaInfoReader::propertyDefinition(const QString &name, const QVariant &val
|
||||
case ParsingItemLibrary: readItemLibraryEntryProperty(name, value); break;
|
||||
case ParsingProperty: readPropertyProperty(name, value); break;
|
||||
case ParsingQmlSource: readQmlSourceProperty(name, value); break;
|
||||
case ParsingMetaInfo: addError(tr("No property definition allowed"), currentSourceLocation()); break;
|
||||
case ParsingMetaInfo: addError(tr("No property definition allowed."), currentSourceLocation()); break;
|
||||
case ParsingDocument:
|
||||
case ParsingHints: readHint(name, value); break;
|
||||
case Finished:
|
||||
case Undefined: setParserState(Error);
|
||||
addError(tr("Illegal state while parsing"), currentSourceLocation());
|
||||
addError(tr("Illegal state while parsing."), currentSourceLocation());
|
||||
case Error:
|
||||
default: return;
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ static IWidgetPlugin *instance(WidgetPluginData &p)
|
||||
p.failed = true;
|
||||
p.errorMessage = QCoreApplication::translate("WidgetPluginManager",
|
||||
"Failed to create instance of file "
|
||||
"'%1': %2").arg(p.path).arg(p.errorMessage);
|
||||
"\"%1\": %2").arg(p.path).arg(p.errorMessage);
|
||||
qWarning() << p.errorMessage;
|
||||
return 0;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ static IWidgetPlugin *instance(WidgetPluginData &p)
|
||||
if (!object) {
|
||||
p.failed = true;
|
||||
p.errorMessage = QCoreApplication::translate("WidgetPluginManager",
|
||||
"Failed to create instance of file '%1'."
|
||||
"Failed to create instance of file \"%1\"."
|
||||
).arg(p.path);
|
||||
qWarning() << p.errorMessage;
|
||||
return 0;
|
||||
@@ -83,7 +83,7 @@ static IWidgetPlugin *instance(WidgetPluginData &p)
|
||||
if (!iplugin) {
|
||||
p.failed = true;
|
||||
p.errorMessage = QCoreApplication::translate("WidgetPluginManager",
|
||||
"File '%1' is not a QmlDesigner plugin."
|
||||
"File \"%1\" is not a Qt Quick Designer plugin."
|
||||
).arg(p.path);
|
||||
qWarning() << p.errorMessage;
|
||||
delete object;
|
||||
|
@@ -397,6 +397,7 @@ Project {
|
||||
"componentcore/selectioncontext.h",
|
||||
"componentcore/qmldesignericonprovider.cpp",
|
||||
"componentcore/qmldesignericonprovider.h",
|
||||
"componentcore/componentcore.qrc",
|
||||
"texteditor/texteditorstatusbar.cpp",
|
||||
"texteditor/texteditorstatusbar.h",
|
||||
"componentcore/changestyleaction.cpp",
|
||||
|
@@ -146,7 +146,7 @@ FindInFilesSilverSearcher::FindInFilesSilverSearcher()
|
||||
if (!isEnabled()) {
|
||||
auto layout = new QHBoxLayout(m_widget);
|
||||
layout->setMargin(0);
|
||||
QLabel *label = new QLabel(tr("SilverSearcher is not available on system"));
|
||||
QLabel *label = new QLabel(tr("Silver Searcher is not available on the system."));
|
||||
label->setStyleSheet("QLabel { color : red; }");
|
||||
layout->addWidget(label);
|
||||
}
|
||||
|
@@ -589,7 +589,7 @@ CountingLabel::CountingLabel()
|
||||
|
||||
void CountingLabel::updateCount(int count)
|
||||
{
|
||||
setText(BaseFileFind::tr("%n found", nullptr, count));
|
||||
setText(BaseFileFind::tr("%n found.", nullptr, count));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <texteditor/codeassist/genericproposalmodel.h>
|
||||
#include <texteditor/completionsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
@@ -243,4 +244,22 @@ KeywordsCompletionAssistProcessor::generateProposalList(const QStringList &words
|
||||
});
|
||||
}
|
||||
|
||||
KeywordsCompletionAssistProvider::KeywordsCompletionAssistProvider(const Keywords &keyWords,
|
||||
const QString &snippetGroup)
|
||||
: m_keyWords(keyWords)
|
||||
, m_snippetGroup(snippetGroup)
|
||||
{ }
|
||||
|
||||
IAssistProvider::RunType KeywordsCompletionAssistProvider::runType() const
|
||||
{
|
||||
return Synchronous;
|
||||
}
|
||||
|
||||
IAssistProcessor *KeywordsCompletionAssistProvider::createProcessor() const
|
||||
{
|
||||
auto processor = new KeywordsCompletionAssistProcessor(m_keyWords);
|
||||
processor->setSnippetGroup(m_snippetGroup);
|
||||
return processor;
|
||||
}
|
||||
|
||||
} // namespace TextEditor
|
||||
|
@@ -28,8 +28,11 @@
|
||||
#include "iassistprocessor.h"
|
||||
#include "assistproposalitem.h"
|
||||
#include "ifunctionhintproposalmodel.h"
|
||||
#include "completionassistprovider.h"
|
||||
#include "../snippets/snippetassistcollector.h"
|
||||
|
||||
#include "texteditor/texteditorconstants.h"
|
||||
|
||||
namespace TextEditor {
|
||||
|
||||
class AssistInterface;
|
||||
@@ -38,8 +41,8 @@ class TEXTEDITOR_EXPORT Keywords
|
||||
{
|
||||
public:
|
||||
Keywords() = default;
|
||||
Keywords(const QStringList &variables, const QStringList &functions,
|
||||
const QMap<QString, QStringList> &functionArgs);
|
||||
Keywords(const QStringList &variables, const QStringList &functions = QStringList(),
|
||||
const QMap<QString, QStringList> &functionArgs = QMap<QString, QStringList>());
|
||||
bool isVariable(const QString &word) const;
|
||||
bool isFunction(const QString &word) const;
|
||||
|
||||
@@ -79,6 +82,21 @@ private:
|
||||
QStringList m_functionSymbols;
|
||||
};
|
||||
|
||||
class TEXTEDITOR_EXPORT KeywordsCompletionAssistProvider : public CompletionAssistProvider
|
||||
{
|
||||
public:
|
||||
KeywordsCompletionAssistProvider(const Keywords &keyWords = Keywords(),
|
||||
const QString &snippetGroup = QString(Constants::TEXT_SNIPPET_GROUP_ID));
|
||||
|
||||
// IAssistProvider interface
|
||||
RunType runType() const override;
|
||||
IAssistProcessor *createProcessor() const override;
|
||||
|
||||
private:
|
||||
Keywords m_keyWords;
|
||||
QString m_snippetGroup;
|
||||
};
|
||||
|
||||
class TEXTEDITOR_EXPORT KeywordsCompletionAssistProcessor : public IAssistProcessor
|
||||
{
|
||||
public:
|
||||
|
@@ -25,6 +25,12 @@
|
||||
|
||||
#include "displaysettings.h"
|
||||
|
||||
#include "texteditorconstants.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
|
||||
#include <QLabel>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
|
||||
@@ -131,7 +137,17 @@ bool DisplaySettings::equals(const DisplaySettings &ds) const
|
||||
&& m_displayAnnotations == ds.m_displayAnnotations
|
||||
&& m_annotationAlignment == ds.m_annotationAlignment
|
||||
&& m_minimalAnnotationContent == ds.m_minimalAnnotationContent
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
QLabel *DisplaySettings::createAnnotationSettingsLink()
|
||||
{
|
||||
auto *label = new QLabel("<i><a href>Annotation Settings</a></i>", Core::ICore::mainWindow());
|
||||
QObject::connect(label, &QLabel::linkActivated, []() {
|
||||
Utils::ToolTip::hideImmediately();
|
||||
Core::ICore::showOptionsDialog(Constants::TEXT_EDITOR_DISPLAY_SETTINGS);
|
||||
});
|
||||
return label;
|
||||
}
|
||||
|
||||
} // namespace TextEditor
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
class QLabel;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace TextEditor {
|
||||
@@ -72,6 +73,8 @@ public:
|
||||
int m_minimalAnnotationContent = 15;
|
||||
|
||||
bool equals(const DisplaySettings &ds) const;
|
||||
|
||||
static QLabel *createAnnotationSettingsLink();
|
||||
};
|
||||
|
||||
inline bool operator==(const DisplaySettings &t1, const DisplaySettings &t2) { return t1.equals(t2); }
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#include "tabsettings.h"
|
||||
#include "textdocument.h"
|
||||
#include "textdocumentlayout.h"
|
||||
#include "texteditorconstants.h"
|
||||
#include "texteditoroverlay.h"
|
||||
#include "refactoroverlay.h"
|
||||
#include "texteditorsettings.h"
|
||||
@@ -56,6 +57,7 @@
|
||||
#include <texteditor/codeassist/assistinterface.h>
|
||||
#include <texteditor/codeassist/codeassistant.h>
|
||||
#include <texteditor/codeassist/completionassistprovider.h>
|
||||
#include <texteditor/codeassist/keywordscompletionassist.h>
|
||||
#include <texteditor/generichighlighter/context.h>
|
||||
#include <texteditor/generichighlighter/highlightdefinition.h>
|
||||
#include <texteditor/generichighlighter/highlighter.h>
|
||||
@@ -3291,30 +3293,32 @@ bool TextEditorWidgetPrivate::processAnnotaionTooltipRequest(const QTextBlock &b
|
||||
return false;
|
||||
|
||||
for (const AnnotationRect &annotationRect : m_annotationRects[block.blockNumber()]) {
|
||||
if (annotationRect.rect.contains(pos)) {
|
||||
auto layout = new QGridLayout;
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(2);
|
||||
annotationRect.mark->addToToolTipLayout(layout);
|
||||
TextMarks marks = blockUserData->marks();
|
||||
if (marks.size() > 1) {
|
||||
QFrame* separator = new QFrame();
|
||||
separator->setFrameShape(QFrame::HLine);
|
||||
layout->addWidget(separator, 2, 0, 1, layout->columnCount());
|
||||
layout->addWidget(new QLabel(tr("Other annotations:")), 3, 0, 1,
|
||||
layout->columnCount());
|
||||
if (!annotationRect.rect.contains(pos))
|
||||
continue;
|
||||
|
||||
Utils::sort(marks, [](const TextMark* mark1, const TextMark* mark2){
|
||||
return mark1->priority() > mark2->priority();
|
||||
});
|
||||
for (const TextMark *mark : Utils::asConst(marks)) {
|
||||
if (mark != annotationRect.mark)
|
||||
mark->addToToolTipLayout(layout);
|
||||
}
|
||||
auto layout = new QGridLayout;
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(2);
|
||||
annotationRect.mark->addToToolTipLayout(layout);
|
||||
TextMarks marks = blockUserData->marks();
|
||||
if (marks.size() > 1) {
|
||||
QFrame* separator = new QFrame();
|
||||
separator->setFrameShape(QFrame::HLine);
|
||||
layout->addWidget(separator, layout->rowCount(), 0, 1, -1);
|
||||
layout->addWidget(new QLabel(tr("Other annotations:")), layout->rowCount(), 0, 1, -1);
|
||||
|
||||
Utils::sort(marks, [](const TextMark* mark1, const TextMark* mark2){
|
||||
return mark1->priority() > mark2->priority();
|
||||
});
|
||||
for (const TextMark *mark : Utils::asConst(marks)) {
|
||||
if (mark != annotationRect.mark)
|
||||
mark->addToToolTipLayout(layout);
|
||||
}
|
||||
ToolTip::show(q->mapToGlobal(pos), layout, q);
|
||||
return true;
|
||||
}
|
||||
layout->addWidget(DisplaySettings::createAnnotationSettingsLink(),
|
||||
layout->rowCount(), 0, 1, -1, Qt::AlignRight);
|
||||
ToolTip::show(q->mapToGlobal(pos), layout, q);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -8136,13 +8140,7 @@ public:
|
||||
TextEditorFactoryPrivate(TextEditorFactory *parent) :
|
||||
q(parent),
|
||||
m_widgetCreator([]() { return new TextEditorWidget; }),
|
||||
m_editorCreator([]() { return new BaseTextEditor; }),
|
||||
m_completionAssistProvider(0),
|
||||
m_useGenericHighlighter(false),
|
||||
m_duplicatedSupported(true),
|
||||
m_codeFoldingSupported(false),
|
||||
m_paranthesesMatchinEnabled(false),
|
||||
m_marksVisible(false)
|
||||
m_editorCreator([]() { return new BaseTextEditor; })
|
||||
{}
|
||||
|
||||
BaseTextEditor *duplicateTextEditor(BaseTextEditor *other)
|
||||
@@ -8163,12 +8161,12 @@ public:
|
||||
TextEditorFactory::SyntaxHighLighterCreator m_syntaxHighlighterCreator;
|
||||
CommentDefinition m_commentDefinition;
|
||||
QList<BaseHoverHandler *> m_hoverHandlers; // owned
|
||||
CompletionAssistProvider * m_completionAssistProvider; // owned
|
||||
bool m_useGenericHighlighter;
|
||||
bool m_duplicatedSupported;
|
||||
bool m_codeFoldingSupported;
|
||||
bool m_paranthesesMatchinEnabled;
|
||||
bool m_marksVisible;
|
||||
CompletionAssistProvider * m_completionAssistProvider = nullptr; // owned
|
||||
bool m_useGenericHighlighter = false;
|
||||
bool m_duplicatedSupported = true;
|
||||
bool m_codeFoldingSupported = false;
|
||||
bool m_paranthesesMatchinEnabled = false;
|
||||
bool m_marksVisible = false;
|
||||
};
|
||||
|
||||
} /// namespace Internal
|
||||
@@ -8266,6 +8264,7 @@ void TextEditorFactory::setParenthesesMatchingEnabled(bool on)
|
||||
|
||||
IEditor *TextEditorFactory::createEditor()
|
||||
{
|
||||
static KeywordsCompletionAssistProvider basicSnippetProvider;
|
||||
TextDocumentPtr doc(d->m_documentCreator());
|
||||
|
||||
if (d->m_indenterCreator)
|
||||
@@ -8274,7 +8273,8 @@ IEditor *TextEditorFactory::createEditor()
|
||||
if (d->m_syntaxHighlighterCreator)
|
||||
doc->setSyntaxHighlighter(d->m_syntaxHighlighterCreator());
|
||||
|
||||
doc->setCompletionAssistProvider(d->m_completionAssistProvider);
|
||||
doc->setCompletionAssistProvider(d->m_completionAssistProvider ? d->m_completionAssistProvider
|
||||
: &basicSnippetProvider);
|
||||
|
||||
return d->createEditorHelper(doc);
|
||||
}
|
||||
|
74
src/share/3rdparty/generic-highlighter/alert.xml
vendored
@@ -1,68 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
This file is part of KDE's kate project.
|
||||
|
||||
copyright : (C) 2004 by Dominik Haumann
|
||||
email : dhdev at gmx dot de
|
||||
|
||||
**********************************************************************
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; if not, write to the *
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
|
||||
* Boston, MA 02110-1301, USA. *
|
||||
**********************************************************************
|
||||
|
||||
This file is included in every file that highlights the "alerts" keywords.
|
||||
That's why extensions and mimetype are empty.
|
||||
|
||||
Changes by Alex Turbov:
|
||||
Introduce 3 alert levels and sort keywords according importance.
|
||||
Few more keywords has been added.
|
||||
-->
|
||||
<language version="3" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhdev@gmx.de)" license="LGPLv2+" hidden="true">
|
||||
<language version="5" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhaumann@kde.org)" license="MIT" hidden="true">
|
||||
<highlighting>
|
||||
<list name="alerts_hi">
|
||||
<item> ALERT </item>
|
||||
<item> ATTENTION </item>
|
||||
<item> DANGER </item>
|
||||
<item> HACK </item>
|
||||
<item> SECURITY </item>
|
||||
<item>ALERT</item>
|
||||
<item>ATTENTION</item>
|
||||
<item>DANGER</item>
|
||||
<item>HACK</item>
|
||||
<item>SECURITY</item>
|
||||
</list>
|
||||
<list name="alerts_mid">
|
||||
<item> BUG </item>
|
||||
<item> FIXME </item>
|
||||
<item> DEPRECATED </item>
|
||||
<item> TASK </item>
|
||||
<item> TODO </item>
|
||||
<item> TBD </item>
|
||||
<item> WARNING </item>
|
||||
<item> CAUTION </item>
|
||||
<item> NOLINT </item>
|
||||
<item>BUG</item>
|
||||
<item>FIXME</item>
|
||||
<item>DEPRECATED</item>
|
||||
<item>TASK</item>
|
||||
<item>TODO</item>
|
||||
<item>TBD</item>
|
||||
<item>WARNING</item>
|
||||
<item>CAUTION</item>
|
||||
<item>NOLINT</item>
|
||||
</list>
|
||||
<list name="alerts_lo">
|
||||
<item> ### </item>
|
||||
<item> NOTE </item>
|
||||
<item> NOTICE </item>
|
||||
<item> TEST </item>
|
||||
<item> TESTING </item>
|
||||
<item>###</item>
|
||||
<item>NOTE</item>
|
||||
<item>NOTICE</item>
|
||||
<item>TEST</item>
|
||||
<item>TESTING</item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
|
||||
<StringDetect attribute="Region Marker" context="#stay" String="{{{" beginRegion="AlertRegion1" />
|
||||
<StringDetect attribute="Region Marker" context="#stay" String="}}}" endRegion="AlertRegion1" />
|
||||
<StringDetect attribute="Region Marker" context="#stay" String="BEGIN" beginRegion="AlertRegion2" />
|
||||
<StringDetect attribute="Region Marker" context="#stay" String="END" endRegion="AlertRegion2" />
|
||||
<WordDetect attribute="Region Marker" context="#stay" String="BEGIN" beginRegion="AlertRegion2" />
|
||||
<WordDetect attribute="Region Marker" context="#stay" String="END" endRegion="AlertRegion2" />
|
||||
<keyword attribute="Alert Level 1" context="#stay" String="alerts_hi" />
|
||||
<keyword attribute="Alert Level 2" context="#stay" String="alerts_mid" />
|
||||
<keyword attribute="Alert Level 3" context="#stay" String="alerts_lo" />
|
||||
|
845
src/share/3rdparty/generic-highlighter/bash.xml
vendored
@@ -8,7 +8,7 @@
|
||||
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
|
||||
<!ENTITY pathpart "([\w_@.%*?+-]|\\ )"> <!-- valid character in a file name -->
|
||||
]>
|
||||
<language name="Bash" version="3" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
<language name="Bash" version="4" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
|
||||
<!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)
|
||||
Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)
|
||||
@@ -18,440 +18,440 @@
|
||||
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> else </item>
|
||||
<item> for </item>
|
||||
<item> function </item>
|
||||
<item> in </item>
|
||||
<item> select </item>
|
||||
<item> until </item>
|
||||
<item> while </item>
|
||||
<item> elif </item>
|
||||
<item> then </item>
|
||||
<item> set </item>
|
||||
<item>else</item>
|
||||
<item>for</item>
|
||||
<item>function</item>
|
||||
<item>in</item>
|
||||
<item>select</item>
|
||||
<item>until</item>
|
||||
<item>while</item>
|
||||
<item>elif</item>
|
||||
<item>then</item>
|
||||
<item>set</item>
|
||||
</list>
|
||||
|
||||
<list name="builtins">
|
||||
<item> : </item>
|
||||
<item> source </item>
|
||||
<item> alias </item>
|
||||
<item> bg </item>
|
||||
<item> bind </item>
|
||||
<item> break </item>
|
||||
<item> builtin </item>
|
||||
<item> cd </item>
|
||||
<item> caller </item>
|
||||
<item> command </item>
|
||||
<item> compgen </item>
|
||||
<item> complete </item>
|
||||
<item> continue </item>
|
||||
<item> dirs </item>
|
||||
<item> disown </item>
|
||||
<item> echo </item>
|
||||
<item> enable </item>
|
||||
<item> eval </item>
|
||||
<item> exec </item>
|
||||
<item> exit </item>
|
||||
<item> fc </item>
|
||||
<item> fg </item>
|
||||
<item> getopts </item>
|
||||
<item> hash </item>
|
||||
<item> help </item>
|
||||
<item> history </item>
|
||||
<item> jobs </item>
|
||||
<item> kill </item>
|
||||
<item> let </item>
|
||||
<item> logout </item>
|
||||
<item> popd </item>
|
||||
<item> printf </item>
|
||||
<item> pushd </item>
|
||||
<item> pwd </item>
|
||||
<item> return </item>
|
||||
<item> set </item>
|
||||
<item> shift </item>
|
||||
<item> shopt </item>
|
||||
<item> suspend </item>
|
||||
<item> test </item>
|
||||
<item> time </item>
|
||||
<item> times </item>
|
||||
<item> trap </item>
|
||||
<item> type </item>
|
||||
<item> ulimit </item>
|
||||
<item> umask </item>
|
||||
<item> unalias </item>
|
||||
<item> wait </item>
|
||||
<item>:</item>
|
||||
<item>source</item>
|
||||
<item>alias</item>
|
||||
<item>bg</item>
|
||||
<item>bind</item>
|
||||
<item>break</item>
|
||||
<item>builtin</item>
|
||||
<item>cd</item>
|
||||
<item>caller</item>
|
||||
<item>command</item>
|
||||
<item>compgen</item>
|
||||
<item>complete</item>
|
||||
<item>continue</item>
|
||||
<item>dirs</item>
|
||||
<item>disown</item>
|
||||
<item>echo</item>
|
||||
<item>enable</item>
|
||||
<item>eval</item>
|
||||
<item>exec</item>
|
||||
<item>exit</item>
|
||||
<item>fc</item>
|
||||
<item>fg</item>
|
||||
<item>getopts</item>
|
||||
<item>hash</item>
|
||||
<item>help</item>
|
||||
<item>history</item>
|
||||
<item>jobs</item>
|
||||
<item>kill</item>
|
||||
<item>let</item>
|
||||
<item>logout</item>
|
||||
<item>popd</item>
|
||||
<item>printf</item>
|
||||
<item>pushd</item>
|
||||
<item>pwd</item>
|
||||
<item>return</item>
|
||||
<item>set</item>
|
||||
<item>shift</item>
|
||||
<item>shopt</item>
|
||||
<item>suspend</item>
|
||||
<item>test</item>
|
||||
<item>time</item>
|
||||
<item>times</item>
|
||||
<item>trap</item>
|
||||
<item>type</item>
|
||||
<item>ulimit</item>
|
||||
<item>umask</item>
|
||||
<item>unalias</item>
|
||||
<item>wait</item>
|
||||
</list>
|
||||
|
||||
<list name="builtins_var">
|
||||
<item> export </item>
|
||||
<item> unset </item>
|
||||
<item> declare </item>
|
||||
<item> typeset </item>
|
||||
<item> local </item>
|
||||
<item> read </item>
|
||||
<item> readonly </item>
|
||||
<item>export</item>
|
||||
<item>unset</item>
|
||||
<item>declare</item>
|
||||
<item>typeset</item>
|
||||
<item>local</item>
|
||||
<item>read</item>
|
||||
<item>readonly</item>
|
||||
</list>
|
||||
|
||||
<list name="unixcommands">
|
||||
<!-- /bin -->
|
||||
<item> arch </item>
|
||||
<item> awk </item>
|
||||
<item> bash </item>
|
||||
<item> bunzip2 </item>
|
||||
<item> bzcat </item>
|
||||
<item> bzcmp </item>
|
||||
<item> bzdiff </item>
|
||||
<item> bzegrep </item>
|
||||
<item> bzfgrep </item>
|
||||
<item> bzgrep </item>
|
||||
<item> bzip2 </item>
|
||||
<item> bzip2recover </item>
|
||||
<item> bzless </item>
|
||||
<item> bzmore </item>
|
||||
<item> cat </item>
|
||||
<item> chattr </item>
|
||||
<item> chgrp </item>
|
||||
<item> chmod </item>
|
||||
<item> chown </item>
|
||||
<item> chvt </item>
|
||||
<item> cp </item>
|
||||
<item> date </item>
|
||||
<item> dd </item>
|
||||
<item> deallocvt </item>
|
||||
<item> df </item>
|
||||
<item> dir </item>
|
||||
<item> dircolors </item>
|
||||
<item> dmesg </item>
|
||||
<item> dnsdomainname </item>
|
||||
<item> domainname </item>
|
||||
<item> du </item>
|
||||
<item> dumpkeys </item>
|
||||
<item> echo </item>
|
||||
<item> ed </item>
|
||||
<item> egrep </item>
|
||||
<item> false </item>
|
||||
<item> fgconsole </item>
|
||||
<item> fgrep </item>
|
||||
<item> fuser </item>
|
||||
<item> gawk </item>
|
||||
<item> getkeycodes </item>
|
||||
<item> gocr </item>
|
||||
<item> grep </item>
|
||||
<item> groff </item>
|
||||
<item> groups </item>
|
||||
<item> gunzip </item>
|
||||
<item> gzexe </item>
|
||||
<item> gzip </item>
|
||||
<item> hostname </item>
|
||||
<item> igawk </item>
|
||||
<item> install </item>
|
||||
<item> kbd_mode </item>
|
||||
<item> kbdrate </item>
|
||||
<item> killall </item>
|
||||
<item> last </item>
|
||||
<item> lastb </item>
|
||||
<item> link </item>
|
||||
<item> ln </item>
|
||||
<item> loadkeys </item>
|
||||
<item> loadunimap </item>
|
||||
<item> login </item>
|
||||
<item> ls </item>
|
||||
<item> lsattr </item>
|
||||
<item> lsmod </item>
|
||||
<item> lsmod.old </item>
|
||||
<item> lzcat </item>
|
||||
<item> lzcmp </item>
|
||||
<item> lzdiff </item>
|
||||
<item> lzegrep </item>
|
||||
<item> lzfgrep </item>
|
||||
<item> lzgrep </item>
|
||||
<item> lzless </item>
|
||||
<item> lzcat </item>
|
||||
<item> lzma </item>
|
||||
<item> lzmainfo </item>
|
||||
<item> lzmore </item>
|
||||
<item> mapscrn </item>
|
||||
<item> mesg </item>
|
||||
<item> mkdir </item>
|
||||
<item> mkfifo </item>
|
||||
<item> mknod </item>
|
||||
<item> mktemp </item>
|
||||
<item> more </item>
|
||||
<item> mount </item>
|
||||
<item> mv </item>
|
||||
<item> nano </item>
|
||||
<item> netstat </item>
|
||||
<item> nisdomainname </item>
|
||||
<item> nroff </item>
|
||||
<item> openvt </item>
|
||||
<item> pgawk </item>
|
||||
<item> pidof </item>
|
||||
<item> ping </item>
|
||||
<item> ps </item>
|
||||
<item> pstree </item>
|
||||
<item> pwd </item>
|
||||
<item> rbash </item>
|
||||
<item> readlink </item>
|
||||
<item> red </item>
|
||||
<item> resizecons </item>
|
||||
<item> rm </item>
|
||||
<item> rmdir </item>
|
||||
<item> run-parts </item>
|
||||
<item> sash </item>
|
||||
<item> sed </item>
|
||||
<item> setfont </item>
|
||||
<item> setkeycodes </item>
|
||||
<item> setleds </item>
|
||||
<item> setmetamode </item>
|
||||
<item> setserial </item>
|
||||
<item> sh </item>
|
||||
<item> showkey </item>
|
||||
<item> shred </item>
|
||||
<item> sleep </item>
|
||||
<item> ssed </item>
|
||||
<item> stat </item>
|
||||
<item> stty </item>
|
||||
<item> su </item>
|
||||
<item> sync </item>
|
||||
<item> tar </item>
|
||||
<item> tempfile </item>
|
||||
<item> touch </item>
|
||||
<item> troff </item>
|
||||
<item> true </item>
|
||||
<item> umount </item>
|
||||
<item> uname </item>
|
||||
<item> unicode_start </item>
|
||||
<item> unicode_stop </item>
|
||||
<item> unlink </item>
|
||||
<item> unlzma </item>
|
||||
<item> unxz </item>
|
||||
<item> utmpdump </item>
|
||||
<item> uuidgen </item>
|
||||
<item> vdir </item>
|
||||
<item> wall </item>
|
||||
<item> wc </item>
|
||||
<item> xz </item>
|
||||
<item> xzcat </item>
|
||||
<item> ypdomainname </item>
|
||||
<item> zcat </item>
|
||||
<item> zcmp </item>
|
||||
<item> zdiff </item>
|
||||
<item> zegrep </item>
|
||||
<item> zfgrep </item>
|
||||
<item> zforce </item>
|
||||
<item> zgrep </item>
|
||||
<item> zless </item>
|
||||
<item> zmore </item>
|
||||
<item> znew </item>
|
||||
<item> zsh </item>
|
||||
<item>arch</item>
|
||||
<item>awk</item>
|
||||
<item>bash</item>
|
||||
<item>bunzip2</item>
|
||||
<item>bzcat</item>
|
||||
<item>bzcmp</item>
|
||||
<item>bzdiff</item>
|
||||
<item>bzegrep</item>
|
||||
<item>bzfgrep</item>
|
||||
<item>bzgrep</item>
|
||||
<item>bzip2</item>
|
||||
<item>bzip2recover</item>
|
||||
<item>bzless</item>
|
||||
<item>bzmore</item>
|
||||
<item>cat</item>
|
||||
<item>chattr</item>
|
||||
<item>chgrp</item>
|
||||
<item>chmod</item>
|
||||
<item>chown</item>
|
||||
<item>chvt</item>
|
||||
<item>cp</item>
|
||||
<item>date</item>
|
||||
<item>dd</item>
|
||||
<item>deallocvt</item>
|
||||
<item>df</item>
|
||||
<item>dir</item>
|
||||
<item>dircolors</item>
|
||||
<item>dmesg</item>
|
||||
<item>dnsdomainname</item>
|
||||
<item>domainname</item>
|
||||
<item>du</item>
|
||||
<item>dumpkeys</item>
|
||||
<item>echo</item>
|
||||
<item>ed</item>
|
||||
<item>egrep</item>
|
||||
<item>false</item>
|
||||
<item>fgconsole</item>
|
||||
<item>fgrep</item>
|
||||
<item>fuser</item>
|
||||
<item>gawk</item>
|
||||
<item>getkeycodes</item>
|
||||
<item>gocr</item>
|
||||
<item>grep</item>
|
||||
<item>groff</item>
|
||||
<item>groups</item>
|
||||
<item>gunzip</item>
|
||||
<item>gzexe</item>
|
||||
<item>gzip</item>
|
||||
<item>hostname</item>
|
||||
<item>igawk</item>
|
||||
<item>install</item>
|
||||
<item>kbd_mode</item>
|
||||
<item>kbdrate</item>
|
||||
<item>killall</item>
|
||||
<item>last</item>
|
||||
<item>lastb</item>
|
||||
<item>link</item>
|
||||
<item>ln</item>
|
||||
<item>loadkeys</item>
|
||||
<item>loadunimap</item>
|
||||
<item>login</item>
|
||||
<item>ls</item>
|
||||
<item>lsattr</item>
|
||||
<item>lsmod</item>
|
||||
<item>lsmod.old</item>
|
||||
<item>lzcat</item>
|
||||
<item>lzcmp</item>
|
||||
<item>lzdiff</item>
|
||||
<item>lzegrep</item>
|
||||
<item>lzfgrep</item>
|
||||
<item>lzgrep</item>
|
||||
<item>lzless</item>
|
||||
<item>lzcat</item>
|
||||
<item>lzma</item>
|
||||
<item>lzmainfo</item>
|
||||
<item>lzmore</item>
|
||||
<item>mapscrn</item>
|
||||
<item>mesg</item>
|
||||
<item>mkdir</item>
|
||||
<item>mkfifo</item>
|
||||
<item>mknod</item>
|
||||
<item>mktemp</item>
|
||||
<item>more</item>
|
||||
<item>mount</item>
|
||||
<item>mv</item>
|
||||
<item>nano</item>
|
||||
<item>netstat</item>
|
||||
<item>nisdomainname</item>
|
||||
<item>nroff</item>
|
||||
<item>openvt</item>
|
||||
<item>pgawk</item>
|
||||
<item>pidof</item>
|
||||
<item>ping</item>
|
||||
<item>ps</item>
|
||||
<item>pstree</item>
|
||||
<item>pwd</item>
|
||||
<item>rbash</item>
|
||||
<item>readlink</item>
|
||||
<item>red</item>
|
||||
<item>resizecons</item>
|
||||
<item>rm</item>
|
||||
<item>rmdir</item>
|
||||
<item>run-parts</item>
|
||||
<item>sash</item>
|
||||
<item>sed</item>
|
||||
<item>setfont</item>
|
||||
<item>setkeycodes</item>
|
||||
<item>setleds</item>
|
||||
<item>setmetamode</item>
|
||||
<item>setserial</item>
|
||||
<item>sh</item>
|
||||
<item>showkey</item>
|
||||
<item>shred</item>
|
||||
<item>sleep</item>
|
||||
<item>ssed</item>
|
||||
<item>stat</item>
|
||||
<item>stty</item>
|
||||
<item>su</item>
|
||||
<item>sync</item>
|
||||
<item>tar</item>
|
||||
<item>tempfile</item>
|
||||
<item>touch</item>
|
||||
<item>troff</item>
|
||||
<item>true</item>
|
||||
<item>umount</item>
|
||||
<item>uname</item>
|
||||
<item>unicode_start</item>
|
||||
<item>unicode_stop</item>
|
||||
<item>unlink</item>
|
||||
<item>unlzma</item>
|
||||
<item>unxz</item>
|
||||
<item>utmpdump</item>
|
||||
<item>uuidgen</item>
|
||||
<item>vdir</item>
|
||||
<item>wall</item>
|
||||
<item>wc</item>
|
||||
<item>xz</item>
|
||||
<item>xzcat</item>
|
||||
<item>ypdomainname</item>
|
||||
<item>zcat</item>
|
||||
<item>zcmp</item>
|
||||
<item>zdiff</item>
|
||||
<item>zegrep</item>
|
||||
<item>zfgrep</item>
|
||||
<item>zforce</item>
|
||||
<item>zgrep</item>
|
||||
<item>zless</item>
|
||||
<item>zmore</item>
|
||||
<item>znew</item>
|
||||
<item>zsh</item>
|
||||
|
||||
<!-- some from /usr/bin -->
|
||||
<item> aclocal </item>
|
||||
<item> aconnect </item>
|
||||
<item> aplay </item>
|
||||
<item> apm </item>
|
||||
<item> apmsleep </item>
|
||||
<item> apropos </item>
|
||||
<item> ar </item>
|
||||
<item> arecord </item>
|
||||
<item> as </item>
|
||||
<item> as86 </item>
|
||||
<item> autoconf </item>
|
||||
<item> autoheader </item>
|
||||
<item> automake </item>
|
||||
<item> awk </item>
|
||||
<item> basename </item>
|
||||
<item> bc </item>
|
||||
<item> bison </item>
|
||||
<item> c++ </item>
|
||||
<item> cal </item>
|
||||
<item> cat </item>
|
||||
<item> cc </item>
|
||||
<item> cdda2wav </item>
|
||||
<item> cdparanoia </item>
|
||||
<item> cdrdao </item>
|
||||
<item> cd-read </item>
|
||||
<item> cdrecord </item>
|
||||
<item> chfn </item>
|
||||
<item> chgrp </item>
|
||||
<item> chmod </item>
|
||||
<item> chown </item>
|
||||
<item> chroot </item>
|
||||
<item> chsh </item>
|
||||
<item> clear </item>
|
||||
<item> cmp </item>
|
||||
<item> co </item>
|
||||
<item> col </item>
|
||||
<item> comm </item>
|
||||
<item> cp </item>
|
||||
<item> cpio </item>
|
||||
<item> cpp </item>
|
||||
<item> cut </item>
|
||||
<item> dc </item>
|
||||
<item> dd </item>
|
||||
<item> df </item>
|
||||
<item> diff </item>
|
||||
<item> diff3 </item>
|
||||
<item> dir </item>
|
||||
<item> dircolors </item>
|
||||
<item> directomatic </item>
|
||||
<item> dirname </item>
|
||||
<item> du </item>
|
||||
<item> env </item>
|
||||
<item> expr </item>
|
||||
<item> fbset </item>
|
||||
<item> file </item>
|
||||
<item> find </item>
|
||||
<item> flex </item>
|
||||
<item> flex++ </item>
|
||||
<item> fmt </item>
|
||||
<item> free </item>
|
||||
<item> ftp </item>
|
||||
<item> funzip </item>
|
||||
<item> fuser </item>
|
||||
<item> g++ </item>
|
||||
<item> gawk </item>
|
||||
<item> gc </item>
|
||||
<item> gcc </item>
|
||||
<item> clang </item>
|
||||
<item> valgrind </item>
|
||||
<item> xdg-open </item>
|
||||
<item> cmake </item>
|
||||
<item> qmake </item>
|
||||
<item> svn </item>
|
||||
<item> git </item>
|
||||
<item> rsync </item>
|
||||
<item> gdb </item>
|
||||
<item> getent </item>
|
||||
<item> getopt </item>
|
||||
<item> gettext </item>
|
||||
<item> gettextize </item>
|
||||
<item> gimp </item>
|
||||
<item> gimp-remote </item>
|
||||
<item> gimptool </item>
|
||||
<item> gmake </item>
|
||||
<item> gs </item>
|
||||
<item> head </item>
|
||||
<item> hexdump </item>
|
||||
<item> id </item>
|
||||
<item> install </item>
|
||||
<item> join </item>
|
||||
<item> kill </item>
|
||||
<item> killall </item>
|
||||
<item> ld </item>
|
||||
<item> ld86 </item>
|
||||
<item> ldd </item>
|
||||
<item> less </item>
|
||||
<item> lex </item>
|
||||
<item> ln </item>
|
||||
<item> locate </item>
|
||||
<item> lockfile </item>
|
||||
<item> logname </item>
|
||||
<item> lp </item>
|
||||
<item> lpr </item>
|
||||
<item> ls </item>
|
||||
<item> lynx </item>
|
||||
<item> m4 </item>
|
||||
<item> make </item>
|
||||
<item> man </item>
|
||||
<item> mkdir </item>
|
||||
<item> mknod </item>
|
||||
<item> msgfmt </item>
|
||||
<item> mv </item>
|
||||
<item> namei </item>
|
||||
<item> nasm </item>
|
||||
<item> nawk </item>
|
||||
<item> nice </item>
|
||||
<item> nl </item>
|
||||
<item> nm </item>
|
||||
<item> nm86 </item>
|
||||
<item> nmap </item>
|
||||
<item> nohup </item>
|
||||
<item> nop </item>
|
||||
<item> od </item>
|
||||
<item> passwd </item>
|
||||
<item> patch </item>
|
||||
<item> pcregrep </item>
|
||||
<item> pcretest </item>
|
||||
<item> perl </item>
|
||||
<item> perror </item>
|
||||
<item> pidof </item>
|
||||
<item> pr </item>
|
||||
<item> printf </item>
|
||||
<item> procmail </item>
|
||||
<item> prune </item>
|
||||
<item> ps2ascii </item>
|
||||
<item> ps2epsi </item>
|
||||
<item> ps2frag </item>
|
||||
<item> ps2pdf </item>
|
||||
<item> ps2ps </item>
|
||||
<item> psbook </item>
|
||||
<item> psmerge </item>
|
||||
<item> psnup </item>
|
||||
<item> psresize </item>
|
||||
<item> psselect </item>
|
||||
<item> pstops </item>
|
||||
<item> rcs </item>
|
||||
<item> rev </item>
|
||||
<item> rm </item>
|
||||
<item> scp </item>
|
||||
<item> sed </item>
|
||||
<item> seq </item>
|
||||
<item> setterm </item>
|
||||
<item> shred </item>
|
||||
<item> size </item>
|
||||
<item> size86 </item>
|
||||
<item> skill </item>
|
||||
<item> slogin </item>
|
||||
<item> snice </item>
|
||||
<item> sort </item>
|
||||
<item> sox </item>
|
||||
<item> split </item>
|
||||
<item> ssh </item>
|
||||
<item> ssh-add </item>
|
||||
<item> ssh-agent </item>
|
||||
<item> ssh-keygen </item>
|
||||
<item> ssh-keyscan </item>
|
||||
<item> stat </item>
|
||||
<item> strings </item>
|
||||
<item> strip </item>
|
||||
<item> sudo </item>
|
||||
<item> suidperl </item>
|
||||
<item> sum </item>
|
||||
<item> tac </item>
|
||||
<item> tail </item>
|
||||
<item> tee </item>
|
||||
<item> test </item>
|
||||
<item> tr </item>
|
||||
<item> uniq </item>
|
||||
<item> unlink </item>
|
||||
<item> unzip </item>
|
||||
<item> updatedb </item>
|
||||
<item> updmap </item>
|
||||
<item> uptime </item>
|
||||
<item> users </item>
|
||||
<item> vmstat </item>
|
||||
<item> w </item>
|
||||
<item> wc </item>
|
||||
<item> wget </item>
|
||||
<item> whatis </item>
|
||||
<item> whereis </item>
|
||||
<item> which </item>
|
||||
<item> who </item>
|
||||
<item> whoami </item>
|
||||
<item> write </item>
|
||||
<item> xargs </item>
|
||||
<item> yacc </item>
|
||||
<item> yes </item>
|
||||
<item> zip </item>
|
||||
<item> zsoelim </item>
|
||||
<item>aclocal</item>
|
||||
<item>aconnect</item>
|
||||
<item>aplay</item>
|
||||
<item>apm</item>
|
||||
<item>apmsleep</item>
|
||||
<item>apropos</item>
|
||||
<item>ar</item>
|
||||
<item>arecord</item>
|
||||
<item>as</item>
|
||||
<item>as86</item>
|
||||
<item>autoconf</item>
|
||||
<item>autoheader</item>
|
||||
<item>automake</item>
|
||||
<item>awk</item>
|
||||
<item>basename</item>
|
||||
<item>bc</item>
|
||||
<item>bison</item>
|
||||
<item>c++</item>
|
||||
<item>cal</item>
|
||||
<item>cat</item>
|
||||
<item>cc</item>
|
||||
<item>cdda2wav</item>
|
||||
<item>cdparanoia</item>
|
||||
<item>cdrdao</item>
|
||||
<item>cd-read</item>
|
||||
<item>cdrecord</item>
|
||||
<item>chfn</item>
|
||||
<item>chgrp</item>
|
||||
<item>chmod</item>
|
||||
<item>chown</item>
|
||||
<item>chroot</item>
|
||||
<item>chsh</item>
|
||||
<item>clear</item>
|
||||
<item>cmp</item>
|
||||
<item>co</item>
|
||||
<item>col</item>
|
||||
<item>comm</item>
|
||||
<item>cp</item>
|
||||
<item>cpio</item>
|
||||
<item>cpp</item>
|
||||
<item>cut</item>
|
||||
<item>dc</item>
|
||||
<item>dd</item>
|
||||
<item>df</item>
|
||||
<item>diff</item>
|
||||
<item>diff3</item>
|
||||
<item>dir</item>
|
||||
<item>dircolors</item>
|
||||
<item>directomatic</item>
|
||||
<item>dirname</item>
|
||||
<item>du</item>
|
||||
<item>env</item>
|
||||
<item>expr</item>
|
||||
<item>fbset</item>
|
||||
<item>file</item>
|
||||
<item>find</item>
|
||||
<item>flex</item>
|
||||
<item>flex++</item>
|
||||
<item>fmt</item>
|
||||
<item>free</item>
|
||||
<item>ftp</item>
|
||||
<item>funzip</item>
|
||||
<item>fuser</item>
|
||||
<item>g++</item>
|
||||
<item>gawk</item>
|
||||
<item>gc</item>
|
||||
<item>gcc</item>
|
||||
<item>clang</item>
|
||||
<item>valgrind</item>
|
||||
<item>xdg-open</item>
|
||||
<item>cmake</item>
|
||||
<item>qmake</item>
|
||||
<item>svn</item>
|
||||
<item>git</item>
|
||||
<item>rsync</item>
|
||||
<item>gdb</item>
|
||||
<item>getent</item>
|
||||
<item>getopt</item>
|
||||
<item>gettext</item>
|
||||
<item>gettextize</item>
|
||||
<item>gimp</item>
|
||||
<item>gimp-remote</item>
|
||||
<item>gimptool</item>
|
||||
<item>gmake</item>
|
||||
<item>gs</item>
|
||||
<item>head</item>
|
||||
<item>hexdump</item>
|
||||
<item>id</item>
|
||||
<item>install</item>
|
||||
<item>join</item>
|
||||
<item>kill</item>
|
||||
<item>killall</item>
|
||||
<item>ld</item>
|
||||
<item>ld86</item>
|
||||
<item>ldd</item>
|
||||
<item>less</item>
|
||||
<item>lex</item>
|
||||
<item>ln</item>
|
||||
<item>locate</item>
|
||||
<item>lockfile</item>
|
||||
<item>logname</item>
|
||||
<item>lp</item>
|
||||
<item>lpr</item>
|
||||
<item>ls</item>
|
||||
<item>lynx</item>
|
||||
<item>m4</item>
|
||||
<item>make</item>
|
||||
<item>man</item>
|
||||
<item>mkdir</item>
|
||||
<item>mknod</item>
|
||||
<item>msgfmt</item>
|
||||
<item>mv</item>
|
||||
<item>namei</item>
|
||||
<item>nasm</item>
|
||||
<item>nawk</item>
|
||||
<item>nice</item>
|
||||
<item>nl</item>
|
||||
<item>nm</item>
|
||||
<item>nm86</item>
|
||||
<item>nmap</item>
|
||||
<item>nohup</item>
|
||||
<item>nop</item>
|
||||
<item>od</item>
|
||||
<item>passwd</item>
|
||||
<item>patch</item>
|
||||
<item>pcregrep</item>
|
||||
<item>pcretest</item>
|
||||
<item>perl</item>
|
||||
<item>perror</item>
|
||||
<item>pidof</item>
|
||||
<item>pr</item>
|
||||
<item>printf</item>
|
||||
<item>procmail</item>
|
||||
<item>prune</item>
|
||||
<item>ps2ascii</item>
|
||||
<item>ps2epsi</item>
|
||||
<item>ps2frag</item>
|
||||
<item>ps2pdf</item>
|
||||
<item>ps2ps</item>
|
||||
<item>psbook</item>
|
||||
<item>psmerge</item>
|
||||
<item>psnup</item>
|
||||
<item>psresize</item>
|
||||
<item>psselect</item>
|
||||
<item>pstops</item>
|
||||
<item>rcs</item>
|
||||
<item>rev</item>
|
||||
<item>rm</item>
|
||||
<item>scp</item>
|
||||
<item>sed</item>
|
||||
<item>seq</item>
|
||||
<item>setterm</item>
|
||||
<item>shred</item>
|
||||
<item>size</item>
|
||||
<item>size86</item>
|
||||
<item>skill</item>
|
||||
<item>slogin</item>
|
||||
<item>snice</item>
|
||||
<item>sort</item>
|
||||
<item>sox</item>
|
||||
<item>split</item>
|
||||
<item>ssh</item>
|
||||
<item>ssh-add</item>
|
||||
<item>ssh-agent</item>
|
||||
<item>ssh-keygen</item>
|
||||
<item>ssh-keyscan</item>
|
||||
<item>stat</item>
|
||||
<item>strings</item>
|
||||
<item>strip</item>
|
||||
<item>sudo</item>
|
||||
<item>suidperl</item>
|
||||
<item>sum</item>
|
||||
<item>tac</item>
|
||||
<item>tail</item>
|
||||
<item>tee</item>
|
||||
<item>test</item>
|
||||
<item>tr</item>
|
||||
<item>uniq</item>
|
||||
<item>unlink</item>
|
||||
<item>unzip</item>
|
||||
<item>updatedb</item>
|
||||
<item>updmap</item>
|
||||
<item>uptime</item>
|
||||
<item>users</item>
|
||||
<item>vmstat</item>
|
||||
<item>w</item>
|
||||
<item>wc</item>
|
||||
<item>wget</item>
|
||||
<item>whatis</item>
|
||||
<item>whereis</item>
|
||||
<item>which</item>
|
||||
<item>who</item>
|
||||
<item>whoami</item>
|
||||
<item>write</item>
|
||||
<item>xargs</item>
|
||||
<item>yacc</item>
|
||||
<item>yes</item>
|
||||
<item>zip</item>
|
||||
<item>zsoelim</item>
|
||||
|
||||
<!-- others -->
|
||||
<item> dcop </item>
|
||||
<item> kdialog </item>
|
||||
<item> kfile </item>
|
||||
<item> xhost </item>
|
||||
<item> xmodmap </item>
|
||||
<item> xset </item>
|
||||
<item>dcop</item>
|
||||
<item>kdialog</item>
|
||||
<item>kfile</item>
|
||||
<item>xhost</item>
|
||||
<item>xmodmap</item>
|
||||
<item>xset</item>
|
||||
</list>
|
||||
|
||||
|
||||
@@ -587,7 +587,8 @@
|
||||
<RegExpr attribute="Redirection" context="#stay" String="([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)" />
|
||||
<!-- handle &, &&, | and || -->
|
||||
<RegExpr attribute="Control" context="#pop" String="([|&;])\1?" />
|
||||
<RegExpr attribute="Option" context="#stay" String="-?-[a-z][A-Za-z0-9_-]*" />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[a-zA-Z_]+-[A-Za-z0-9_-]*" />
|
||||
<RegExpr attribute="Option" context="#stay" String="-?-[a-zA-Z_][A-Za-z0-9_-]*" />
|
||||
<keyword attribute="Option" context="#stay" String="keywords" />
|
||||
<AnyChar String=")}" context="#pop" lookAhead="true"/>
|
||||
</context>
|
||||
|
2026
src/share/3rdparty/generic-highlighter/cmake.xml
vendored
1666
src/share/3rdparty/generic-highlighter/css.xml
vendored
363
src/share/3rdparty/generic-highlighter/doxygen.xml
vendored
@@ -3,39 +3,14 @@
|
||||
[
|
||||
<!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord -->
|
||||
]>
|
||||
<!--
|
||||
This file is part of KDE's kate project.
|
||||
|
||||
Copyright 2004 Dominik Haumann (dhdev@gmx.de)
|
||||
Copyright 2007 Matthew Woehlke (mw_triad@users.sourceforge.net)
|
||||
Copyright 2009-2013 Alex Turbov (I.zaufi@gmail.com)
|
||||
|
||||
**********************************************************************
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the *
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
|
||||
* Boston, MA 02110-1301, USA. *
|
||||
**********************************************************************
|
||||
-->
|
||||
|
||||
<language name="Doxygen"
|
||||
version="3"
|
||||
version="4"
|
||||
kateversion="5.0"
|
||||
section="Markup"
|
||||
extensions="*.dox;*.doxygen"
|
||||
mimetype="text/x-doxygen"
|
||||
author="Dominik Haumann (dhdev@gmx.de)"
|
||||
license="LGPLv2+"
|
||||
author="Dominik Haumann (dhaumann@kde.org)"
|
||||
license="MIT"
|
||||
priority="9">
|
||||
<highlighting>
|
||||
<!-- NOTE: all tags may begin with a \ or @ char
|
||||
@@ -44,201 +19,201 @@
|
||||
do not present in keywords due separate handle rules...
|
||||
-->
|
||||
<list name="TagOnly">
|
||||
<item> \arg </item> <item> @arg </item>
|
||||
<item> \author </item> <item> @author </item>
|
||||
<item> \authors </item> <item> @authors </item>
|
||||
<item> \brief </item> <item> @brief </item>
|
||||
<item> \callgraph </item> <item> @callgraph </item>
|
||||
<item> \callergraph </item> <item> @callergraph </item>
|
||||
<item> \date </item> <item> @date </item>
|
||||
<item> \deprecated </item> <item> @deprecated </item>
|
||||
<item> \details </item> <item> @details </item>
|
||||
<item> \docbookonly </item> <item> @docbookonly </item>
|
||||
<item> \else </item> <item> @else </item>
|
||||
<item> \endcond </item> <item> @endcond </item>
|
||||
<item> \enddocbookonly </item> <item> @enddocbookonly </item>
|
||||
<item> \endhtmlonly </item> <item> @endhtmlonly </item>
|
||||
<item> \endif </item> <item> @endif </item>
|
||||
<item> \endinternal </item> <item> @endinternal </item>
|
||||
<item> \endlatexonly </item> <item> @endlatexonly </item>
|
||||
<item> \endlink </item> <item> @endlink </item>
|
||||
<item> \endmanonly </item> <item> @endmanonly </item>
|
||||
<item> \endparblock </item> <item> @endparblock </item>
|
||||
<item> \endrtfonly </item> <item> @endrtfonly </item>
|
||||
<item> \endsecreflist </item> <item> @endsecreflist </item>
|
||||
<item> \endxmlonly </item> <item> @endxmlonly </item>
|
||||
<item> \f[ </item> <item> @f[ </item>
|
||||
<item> \f] </item> <item> @f] </item>
|
||||
<item> \f$ </item> <item> @f$ </item>
|
||||
<item>\arg</item> <item>@arg</item>
|
||||
<item>\author</item> <item>@author</item>
|
||||
<item>\authors</item> <item>@authors</item>
|
||||
<item>\brief</item> <item>@brief</item>
|
||||
<item>\callgraph</item> <item>@callgraph</item>
|
||||
<item>\callergraph</item> <item>@callergraph</item>
|
||||
<item>\date</item> <item>@date</item>
|
||||
<item>\deprecated</item> <item>@deprecated</item>
|
||||
<item>\details</item> <item>@details</item>
|
||||
<item>\docbookonly</item> <item>@docbookonly</item>
|
||||
<item>\else</item> <item>@else</item>
|
||||
<item>\endcond</item> <item>@endcond</item>
|
||||
<item>\enddocbookonly</item> <item>@enddocbookonly</item>
|
||||
<item>\endhtmlonly</item> <item>@endhtmlonly</item>
|
||||
<item>\endif</item> <item>@endif</item>
|
||||
<item>\endinternal</item> <item>@endinternal</item>
|
||||
<item>\endlatexonly</item> <item>@endlatexonly</item>
|
||||
<item>\endlink</item> <item>@endlink</item>
|
||||
<item>\endmanonly</item> <item>@endmanonly</item>
|
||||
<item>\endparblock</item> <item>@endparblock</item>
|
||||
<item>\endrtfonly</item> <item>@endrtfonly</item>
|
||||
<item>\endsecreflist</item> <item>@endsecreflist</item>
|
||||
<item>\endxmlonly</item> <item>@endxmlonly</item>
|
||||
<item>\f[</item> <item>@f[</item>
|
||||
<item>\f]</item> <item>@f]</item>
|
||||
<item>\f$</item> <item>@f$</item>
|
||||
<!-- TODO Add @f{environment}{ and @f} -->
|
||||
<item> \hideinitializer </item> <item> @hideinitializer </item>
|
||||
<item> \htmlonly </item> <item> @htmlonly </item>
|
||||
<item>\hideinitializer</item> <item>@hideinitializer</item>
|
||||
<item>\htmlonly</item> <item>@htmlonly</item>
|
||||
<!-- TODO @internal is a candidate to be handled separately, cuz may introduce folding region -->
|
||||
<item> \internal </item> <item> @internal </item>
|
||||
<item> \invariant </item> <item> @invariant </item>
|
||||
<item> \latexonly </item> <item> @latexonly </item>
|
||||
<item> \li </item> <item> @li </item>
|
||||
<item> \manonly </item> <item> @manonly </item>
|
||||
<item> \n </item> <item> @n </item>
|
||||
<item> \nosubgrouping </item> <item> @nosubgrouping </item>
|
||||
<item> \only </item> <item> @only </item>
|
||||
<item> \parblock </item> <item> @parblock </item>
|
||||
<item> \post </item> <item> @post </item>
|
||||
<item> \pre </item> <item> @pre </item>
|
||||
<item> \private </item> <item> @pivate </item>
|
||||
<item> \privatesection </item> <item> @pivatesection </item>
|
||||
<item> \protected </item> <item> @protected </item>
|
||||
<item> \protectedsection </item> <item> @protectedsection </item>
|
||||
<item> \public </item> <item> @public </item>
|
||||
<item> \publicsection </item> <item> @publicsection </item>
|
||||
<item> \pure </item> <item> @pure </item>
|
||||
<item> \remark </item> <item> @remark </item>
|
||||
<item> \remarks </item> <item> @remarks </item>
|
||||
<item> \return </item> <item> @return </item>
|
||||
<item> \returns </item> <item> @returns </item>
|
||||
<item> \result </item> <item> @result </item>
|
||||
<item> \rtfonly </item> <item> @rtfonly </item>
|
||||
<item> \sa </item> <item> @sa </item>
|
||||
<item> \secreflist </item> <item> @secreflist </item>
|
||||
<item> \see </item> <item> @see </item>
|
||||
<item> \short </item> <item> @short </item>
|
||||
<item> \showinitializer </item> <item> @showinitializer </item>
|
||||
<item> \since </item> <item> @since </item>
|
||||
<item> \static </item> <item> @static </item>
|
||||
<item> \tableofcontents </item> <item> @tableofcontents </item>
|
||||
<item> \test </item> <item> @test </item>
|
||||
<item> \version </item> <item> @version </item>
|
||||
<item> \xmlonly </item> <item> @xmlonly </item>
|
||||
<item>\internal</item> <item>@internal</item>
|
||||
<item>\invariant</item> <item>@invariant</item>
|
||||
<item>\latexonly</item> <item>@latexonly</item>
|
||||
<item>\li</item> <item>@li</item>
|
||||
<item>\manonly</item> <item>@manonly</item>
|
||||
<item>\n</item> <item>@n</item>
|
||||
<item>\nosubgrouping</item> <item>@nosubgrouping</item>
|
||||
<item>\only</item> <item>@only</item>
|
||||
<item>\parblock</item> <item>@parblock</item>
|
||||
<item>\post</item> <item>@post</item>
|
||||
<item>\pre</item> <item>@pre</item>
|
||||
<item>\private</item> <item>@pivate</item>
|
||||
<item>\privatesection</item> <item>@pivatesection</item>
|
||||
<item>\protected</item> <item>@protected</item>
|
||||
<item>\protectedsection</item> <item>@protectedsection</item>
|
||||
<item>\public</item> <item>@public</item>
|
||||
<item>\publicsection</item> <item>@publicsection</item>
|
||||
<item>\pure</item> <item>@pure</item>
|
||||
<item>\remark</item> <item>@remark</item>
|
||||
<item>\remarks</item> <item>@remarks</item>
|
||||
<item>\return</item> <item>@return</item>
|
||||
<item>\returns</item> <item>@returns</item>
|
||||
<item>\result</item> <item>@result</item>
|
||||
<item>\rtfonly</item> <item>@rtfonly</item>
|
||||
<item>\sa</item> <item>@sa</item>
|
||||
<item>\secreflist</item> <item>@secreflist</item>
|
||||
<item>\see</item> <item>@see</item>
|
||||
<item>\short</item> <item>@short</item>
|
||||
<item>\showinitializer</item> <item>@showinitializer</item>
|
||||
<item>\since</item> <item>@since</item>
|
||||
<item>\static</item> <item>@static</item>
|
||||
<item>\tableofcontents</item> <item>@tableofcontents</item>
|
||||
<item>\test</item> <item>@test</item>
|
||||
<item>\version</item> <item>@version</item>
|
||||
<item>\xmlonly</item> <item>@xmlonly</item>
|
||||
<!-- TODO Introduce separate context for @~ ? -->
|
||||
<item> \# </item> <item> @# </item>
|
||||
<item> \$ </item> <item> @$ </item>
|
||||
<item> \% </item> <item> @% </item>
|
||||
<item> \& </item> <item> @& </item>
|
||||
<item> \> </item> <item> @> </item>
|
||||
<item> \< </item> <item> @< </item>
|
||||
<item> \" </item> <item> @" </item>
|
||||
<item> \:: </item> <item> @:: </item>
|
||||
<item> \@ </item> <item> @@ </item>
|
||||
<item> \\ </item> <item> @\ </item>
|
||||
<item> \~ </item> <item> @~ </item>
|
||||
<item> \. </item> <item> @. </item>
|
||||
<item> \-- </item> <item> @-- </item>
|
||||
<item> \--- </item> <item> @--- </item>
|
||||
<item>\#</item> <item>@#</item>
|
||||
<item>\$</item> <item>@$</item>
|
||||
<item>\%</item> <item>@%</item>
|
||||
<item>\&</item> <item>@&</item>
|
||||
<item>\></item> <item>@></item>
|
||||
<item>\<</item> <item>@<</item>
|
||||
<item>\"</item> <item>@"</item>
|
||||
<item>\::</item> <item>@::</item>
|
||||
<item>\@</item> <item>@@</item>
|
||||
<item>\\</item> <item>@\</item>
|
||||
<item>\~</item> <item>@~</item>
|
||||
<item>\.</item> <item>@.</item>
|
||||
<item>\--</item> <item>@--</item>
|
||||
<item>\---</item> <item>@---</item>
|
||||
</list>
|
||||
|
||||
<list name="TagWord">
|
||||
<item> \a </item> <item> @a </item>
|
||||
<item> \anchor </item> <item> @anchor </item>
|
||||
<item> \b </item> <item> @b </item>
|
||||
<item> \c </item> <item> @c </item>
|
||||
<item> \cite </item> <item> @cite </item>
|
||||
<item> \cond </item> <item> @cond </item>
|
||||
<item> \copybrief </item> <item> @copybrief </item>
|
||||
<item> \copydetails </item> <item> @copydetails </item>
|
||||
<item> \copydoc </item> <item> @copydoc </item>
|
||||
<item> \def </item> <item> @def </item>
|
||||
<item> \dir </item> <item> @dir </item>
|
||||
<item> \dontinclude </item> <item> @dontinclude </item>
|
||||
<item> \e </item> <item> @e </item>
|
||||
<item> \elseif </item> <item> @elseif </item>
|
||||
<item> \em </item> <item> @em </item>
|
||||
<item> \enum </item> <item> @enum </item>
|
||||
<item> \example </item> <item> @example </item>
|
||||
<item> \exception </item> <item> @exception </item>
|
||||
<item> \exceptions </item> <item> @exceptions </item>
|
||||
<item> \extends </item> <item> @extends </item>
|
||||
<item> \file </item> <item> @file </item>
|
||||
<item> \htmlinclude </item> <item> @htmlinclude </item>
|
||||
<item> \idlexcept </item> <item> @idlexcept </item>
|
||||
<item> \if </item> <item> @if </item>
|
||||
<item> \ifnot </item> <item> @ifnot </item>
|
||||
<item> \implements </item> <item> @implements </item>
|
||||
<item> \include </item> <item> @include </item>
|
||||
<item> \includelineno </item> <item> @includelineno </item>
|
||||
<item> \latexinclude </item> <item> @latexinclude </item>
|
||||
<item> \link </item> <item> @link </item>
|
||||
<item> \memberof </item> <item> @memberof </item>
|
||||
<item> \namespace </item> <item> @namespace </item>
|
||||
<item> \p </item> <item> @p </item>
|
||||
<item> \package </item> <item> @package </item>
|
||||
<item> \property </item> <item> @property </item>
|
||||
<item> \relatedalso </item> <item> @relatedalso </item>
|
||||
<item> \relatesalso </item> <item> @relatesalso </item>
|
||||
<item> \related </item> <item> @related </item>
|
||||
<item> \relates </item> <item> @relates </item>
|
||||
<item> \retval </item> <item> @retval </item>
|
||||
<item> \throw </item> <item> @throw </item>
|
||||
<item> \throws </item> <item> @throws </item>
|
||||
<item> \verbinclude </item> <item> @verbinclude </item>
|
||||
<item> \version </item> <item> @version </item>
|
||||
<item>\a</item> <item>@a</item>
|
||||
<item>\anchor</item> <item>@anchor</item>
|
||||
<item>\b</item> <item>@b</item>
|
||||
<item>\c</item> <item>@c</item>
|
||||
<item>\cite</item> <item>@cite</item>
|
||||
<item>\cond</item> <item>@cond</item>
|
||||
<item>\copybrief</item> <item>@copybrief</item>
|
||||
<item>\copydetails</item> <item>@copydetails</item>
|
||||
<item>\copydoc</item> <item>@copydoc</item>
|
||||
<item>\def</item> <item>@def</item>
|
||||
<item>\dir</item> <item>@dir</item>
|
||||
<item>\dontinclude</item> <item>@dontinclude</item>
|
||||
<item>\e</item> <item>@e</item>
|
||||
<item>\elseif</item> <item>@elseif</item>
|
||||
<item>\em</item> <item>@em</item>
|
||||
<item>\enum</item> <item>@enum</item>
|
||||
<item>\example</item> <item>@example</item>
|
||||
<item>\exception</item> <item>@exception</item>
|
||||
<item>\exceptions</item> <item>@exceptions</item>
|
||||
<item>\extends</item> <item>@extends</item>
|
||||
<item>\file</item> <item>@file</item>
|
||||
<item>\htmlinclude</item> <item>@htmlinclude</item>
|
||||
<item>\idlexcept</item> <item>@idlexcept</item>
|
||||
<item>\if</item> <item>@if</item>
|
||||
<item>\ifnot</item> <item>@ifnot</item>
|
||||
<item>\implements</item> <item>@implements</item>
|
||||
<item>\include</item> <item>@include</item>
|
||||
<item>\includelineno</item> <item>@includelineno</item>
|
||||
<item>\latexinclude</item> <item>@latexinclude</item>
|
||||
<item>\link</item> <item>@link</item>
|
||||
<item>\memberof</item> <item>@memberof</item>
|
||||
<item>\namespace</item> <item>@namespace</item>
|
||||
<item>\p</item> <item>@p</item>
|
||||
<item>\package</item> <item>@package</item>
|
||||
<item>\property</item> <item>@property</item>
|
||||
<item>\relatedalso</item> <item>@relatedalso</item>
|
||||
<item>\relatesalso</item> <item>@relatesalso</item>
|
||||
<item>\related</item> <item>@related</item>
|
||||
<item>\relates</item> <item>@relates</item>
|
||||
<item>\retval</item> <item>@retval</item>
|
||||
<item>\throw</item> <item>@throw</item>
|
||||
<item>\throws</item> <item>@throws</item>
|
||||
<item>\verbinclude</item> <item>@verbinclude</item>
|
||||
<item>\version</item> <item>@version</item>
|
||||
<!-- TODO Introduce separate context for @xrefitem? -->
|
||||
<item> \xrefitem </item> <item> @xrefitem </item>
|
||||
<item>\xrefitem</item> <item>@xrefitem</item>
|
||||
</list>
|
||||
<list name="TagParam">
|
||||
<item> \param </item> <item> @param </item>
|
||||
<item>\param</item> <item>@param</item>
|
||||
<!-- TODO @tparam has no optional direction actually! -->
|
||||
<item> \tparam </item> <item> @tparam </item>
|
||||
<item>\tparam</item> <item>@tparam</item>
|
||||
</list>
|
||||
<!-- TODO Better (separate?) highlighting for @image required -->
|
||||
<list name="TagWordWord">
|
||||
<item> \image </item> <item> @image </item>
|
||||
<item>\image</item> <item>@image</item>
|
||||
</list>
|
||||
<!-- TODO @union, @struct, @protocol, @interface, @class, @category
|
||||
actually takes 3 params, 1 mandatory and 2 optional
|
||||
-->
|
||||
<!-- TODO @headerfile actually takes 2 params, where last one is optional -->
|
||||
<list name="TagWordString">
|
||||
<item> \addtogroup </item> <item> @addtogroup </item>
|
||||
<item> \category </item> <item> @category </item>
|
||||
<item> \class </item> <item> @class </item>
|
||||
<item> \diafile </item> <item> @diafile </item>
|
||||
<item> \dotfile </item> <item> @dotfile </item>
|
||||
<item> \defgroup </item> <item> @defgroup </item>
|
||||
<item> \interface </item> <item> @interface </item>
|
||||
<item> \headerfile </item> <item> @headerfile </item>
|
||||
<item> \mscfile </item> <item> @mscfile </item>
|
||||
<item> \page </item> <item> @page </item>
|
||||
<item> \paragraph </item> <item> @paragraph </item>
|
||||
<item> \protocol </item> <item> @prtocol </item>
|
||||
<item> \ref </item> <item> @ref </item>
|
||||
<item> \section </item> <item> @section </item>
|
||||
<item> \snippet </item> <item> @snippet </item>
|
||||
<item> \struct </item> <item> @struct </item>
|
||||
<item> \subpage </item> <item> @subpage </item>
|
||||
<item> \subsection </item> <item> @subsection </item>
|
||||
<item> \subsubsection </item> <item> @subsubsection </item>
|
||||
<item> \union </item> <item> @union </item>
|
||||
<item> \weakgroup </item> <item> @weakgroup </item>
|
||||
<item>\addtogroup</item> <item>@addtogroup</item>
|
||||
<item>\category</item> <item>@category</item>
|
||||
<item>\class</item> <item>@class</item>
|
||||
<item>\diafile</item> <item>@diafile</item>
|
||||
<item>\dotfile</item> <item>@dotfile</item>
|
||||
<item>\defgroup</item> <item>@defgroup</item>
|
||||
<item>\interface</item> <item>@interface</item>
|
||||
<item>\headerfile</item> <item>@headerfile</item>
|
||||
<item>\mscfile</item> <item>@mscfile</item>
|
||||
<item>\page</item> <item>@page</item>
|
||||
<item>\paragraph</item> <item>@paragraph</item>
|
||||
<item>\protocol</item> <item>@prtocol</item>
|
||||
<item>\ref</item> <item>@ref</item>
|
||||
<item>\section</item> <item>@section</item>
|
||||
<item>\snippet</item> <item>@snippet</item>
|
||||
<item>\struct</item> <item>@struct</item>
|
||||
<item>\subpage</item> <item>@subpage</item>
|
||||
<item>\subsection</item> <item>@subsection</item>
|
||||
<item>\subsubsection</item> <item>@subsubsection</item>
|
||||
<item>\union</item> <item>@union</item>
|
||||
<item>\weakgroup</item> <item>@weakgroup</item>
|
||||
</list>
|
||||
<list name="TagString">
|
||||
<item> \addindex </item> <item> @addindex </item>
|
||||
<item> \copyright </item> <item> @copyright </item>
|
||||
<item> \fn </item> <item> @fn </item>
|
||||
<item> \ingroup </item> <item> @ingroup </item>
|
||||
<item> \line </item> <item> @line </item>
|
||||
<item> \mainpage </item> <item> @mainpage </item>
|
||||
<item> \name </item> <item> @name </item>
|
||||
<item> \overload </item> <item> @overload </item>
|
||||
<item> \par </item> <item> @par </item>
|
||||
<item> \skip </item> <item> @skip </item>
|
||||
<item> \skipline </item> <item> @skipline </item>
|
||||
<item> \typedef </item> <item> @typedef </item>
|
||||
<item> \until </item> <item> @until </item>
|
||||
<item> \var </item> <item> @var </item>
|
||||
<item> \vhdlflow </item> <item> @vhdlflow </item>
|
||||
<item>\addindex</item> <item>@addindex</item>
|
||||
<item>\copyright</item> <item>@copyright</item>
|
||||
<item>\fn</item> <item>@fn</item>
|
||||
<item>\ingroup</item> <item>@ingroup</item>
|
||||
<item>\line</item> <item>@line</item>
|
||||
<item>\mainpage</item> <item>@mainpage</item>
|
||||
<item>\name</item> <item>@name</item>
|
||||
<item>\overload</item> <item>@overload</item>
|
||||
<item>\par</item> <item>@par</item>
|
||||
<item>\skip</item> <item>@skip</item>
|
||||
<item>\skipline</item> <item>@skipline</item>
|
||||
<item>\typedef</item> <item>@typedef</item>
|
||||
<item>\until</item> <item>@until</item>
|
||||
<item>\var</item> <item>@var</item>
|
||||
<item>\vhdlflow</item> <item>@vhdlflow</item>
|
||||
</list>
|
||||
<list name="Note">
|
||||
<item> \note </item> <item> @note </item>
|
||||
<item>\note</item> <item>@note</item>
|
||||
</list>
|
||||
<list name="Warning">
|
||||
<item> \warning </item> <item> @warning </item>
|
||||
<item>\warning</item> <item>@warning</item>
|
||||
</list>
|
||||
<list name="Attention">
|
||||
<item> \attention </item> <item> @attention </item>
|
||||
<item> \bug </item> <item> @bug </item>
|
||||
<item>\attention</item> <item>@attention</item>
|
||||
<item>\bug</item> <item>@bug</item>
|
||||
</list>
|
||||
<list name="Todo">
|
||||
<item> \todo </item> <item> @todo </item>
|
||||
<item>\todo</item> <item>@todo</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
|
7480
src/share/3rdparty/generic-highlighter/java.xml
vendored
190
src/share/3rdparty/generic-highlighter/makefile.xml
vendored
@@ -16,10 +16,10 @@
|
||||
author="Per Wigren (wigren@home.se)" license="">
|
||||
<highlighting>
|
||||
<list name = "keywords" >
|
||||
<item> include </item>
|
||||
<item> -include </item>
|
||||
<item> define </item>
|
||||
<item> endef </item>
|
||||
<item>include</item>
|
||||
<item>-include</item>
|
||||
<item>define</item>
|
||||
<item>endef</item>
|
||||
</list>
|
||||
<!-- https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html -->
|
||||
<list name="gmake_if_keywords">
|
||||
@@ -33,19 +33,19 @@
|
||||
<list name="gmake_endif_keywords"><item>endif</item></list>
|
||||
<!-- bmake statements: https://www.freebsd.org/cgi/man.cgi?make(1)#INCLUDE_STATEMENTS,_CONDITIONALS_AND_FOR_LOOPS -->
|
||||
<list name="bmake_if_keywords">
|
||||
<item> .if </item>
|
||||
<item> .ifdef </item>
|
||||
<item> .ifndef </item>
|
||||
<item> .ifmake </item>
|
||||
<item> .ifnmake </item>
|
||||
<item>.if</item>
|
||||
<item>.ifdef</item>
|
||||
<item>.ifndef</item>
|
||||
<item>.ifmake</item>
|
||||
<item>.ifnmake</item>
|
||||
</list>
|
||||
<list name="bmake_else_keywords">
|
||||
<item> .elif </item>
|
||||
<item> .elifdef </item>
|
||||
<item> .elifndef </item>
|
||||
<item> .elifmake </item>
|
||||
<item> .elifnmake </item>
|
||||
<item> .else </item> <!-- TODO: anything following .else should be highlighted as an error -->
|
||||
<item>.elif</item>
|
||||
<item>.elifdef</item>
|
||||
<item>.elifndef</item>
|
||||
<item>.elifmake</item>
|
||||
<item>.elifnmake</item>
|
||||
<item>.else</item> <!-- TODO: anything following .else should be highlighted as an error -->
|
||||
</list>
|
||||
<list name="bmake_endif_keywords"><item>.endif</item></list>
|
||||
|
||||
@@ -64,9 +64,9 @@
|
||||
<!-- For compat bmake also handles include but this is already highlighted. <item>include</item> -->
|
||||
</list>
|
||||
<list name="bmake_message_stmt">
|
||||
<item> .info </item>
|
||||
<item> .warning </item>
|
||||
<item> .error </item>
|
||||
<item>.info</item>
|
||||
<item>.warning</item>
|
||||
<item>.error</item>
|
||||
</list>
|
||||
<!-- Use single element list here so that .for/.endfor also shows up in code completion -->
|
||||
<list name="bmake_for_stmt"><item>.for</item></list>
|
||||
@@ -74,92 +74,92 @@
|
||||
|
||||
<!-- https://www.freebsd.org/cgi/man.cgi?make(1)#SPECIAL_TARGETS -->
|
||||
<list name="bmake_special_targets">
|
||||
<item> .BEGIN </item>
|
||||
<item> .DEFAULT </item>
|
||||
<item> .END </item>
|
||||
<item> .ERROR </item>
|
||||
<item> .IGNORE </item>
|
||||
<item> .INTERRUPT </item>
|
||||
<item> .MAIN </item>
|
||||
<item> .MAKEFLAGS </item>
|
||||
<item> .NOPATH </item>
|
||||
<item> .NOTPARALLEL </item>
|
||||
<item> .NO_PARALLEL </item>
|
||||
<item> .OBJDIR </item>
|
||||
<item> .ORDER </item>
|
||||
<item> .PATH </item>
|
||||
<item> .PHONY </item>
|
||||
<item> .PRECIOUS </item>
|
||||
<item> .SHELL </item>
|
||||
<item> .SILENT </item>
|
||||
<item> .STALE </item>
|
||||
<item> .SUFFIXES </item>
|
||||
<item>.BEGIN</item>
|
||||
<item>.DEFAULT</item>
|
||||
<item>.END</item>
|
||||
<item>.ERROR</item>
|
||||
<item>.IGNORE</item>
|
||||
<item>.INTERRUPT</item>
|
||||
<item>.MAIN</item>
|
||||
<item>.MAKEFLAGS</item>
|
||||
<item>.NOPATH</item>
|
||||
<item>.NOTPARALLEL</item>
|
||||
<item>.NO_PARALLEL</item>
|
||||
<item>.OBJDIR</item>
|
||||
<item>.ORDER</item>
|
||||
<item>.PATH</item>
|
||||
<item>.PHONY</item>
|
||||
<item>.PRECIOUS</item>
|
||||
<item>.SHELL</item>
|
||||
<item>.SILENT</item>
|
||||
<item>.STALE</item>
|
||||
<item>.SUFFIXES</item>
|
||||
</list>
|
||||
<!-- https://www.freebsd.org/cgi/man.cgi?make(1)#SPECIAL_SOURCES_(ATTRIBUTES) -->
|
||||
<list name="bmake_special_sources">
|
||||
<item> .EXEC </item>
|
||||
<item> .IGNORE </item>
|
||||
<item> .MADE </item>
|
||||
<item> .MAKE </item>
|
||||
<item> .META </item>
|
||||
<item> .NOMETA </item>
|
||||
<item> .NOMETA_CMP </item>
|
||||
<item> .NOPATH </item>
|
||||
<item> .NOTMAIN </item>
|
||||
<item> .OPTIONAL </item>
|
||||
<item> .PHONY </item>
|
||||
<item> .PRECIOUS </item>
|
||||
<item> .RECURSIVE </item>
|
||||
<item> .SILENT </item>
|
||||
<item> .USE </item>
|
||||
<item> .USEBEFORE </item>
|
||||
<item> .WAIT </item>
|
||||
<item>.EXEC</item>
|
||||
<item>.IGNORE</item>
|
||||
<item>.MADE</item>
|
||||
<item>.MAKE</item>
|
||||
<item>.META</item>
|
||||
<item>.NOMETA</item>
|
||||
<item>.NOMETA_CMP</item>
|
||||
<item>.NOPATH</item>
|
||||
<item>.NOTMAIN</item>
|
||||
<item>.OPTIONAL</item>
|
||||
<item>.PHONY</item>
|
||||
<item>.PRECIOUS</item>
|
||||
<item>.RECURSIVE</item>
|
||||
<item>.SILENT</item>
|
||||
<item>.USE</item>
|
||||
<item>.USEBEFORE</item>
|
||||
<item>.WAIT</item>
|
||||
</list>
|
||||
|
||||
<list name="bmake_other_stmts">
|
||||
<item> .unexport-env </item>
|
||||
<item> .unexport </item>
|
||||
<item> .undef </item>
|
||||
<item> .export-env </item>
|
||||
<item> .export </item>
|
||||
<item>.unexport-env</item>
|
||||
<item>.unexport</item>
|
||||
<item>.undef</item>
|
||||
<item>.export-env</item>
|
||||
<item>.export</item>
|
||||
</list>
|
||||
|
||||
<list name = "functions">
|
||||
<item> call </item>
|
||||
<item> subst </item>
|
||||
<item> patsubst </item>
|
||||
<item> strip </item>
|
||||
<item> findstring </item>
|
||||
<item> filter </item>
|
||||
<item> filter-out </item>
|
||||
<item> sort </item>
|
||||
<item> word </item>
|
||||
<item> wordlist </item>
|
||||
<item> words </item>
|
||||
<item> firstword </item>
|
||||
<item> lastword </item>
|
||||
<item> dir </item>
|
||||
<item> notdir </item>
|
||||
<item> suffix </item>
|
||||
<item> basename </item>
|
||||
<item> addsuffix </item>
|
||||
<item> addprefix </item>
|
||||
<item> join </item>
|
||||
<item> wildcard </item>
|
||||
<item> realpath </item>
|
||||
<item> abspath </item>
|
||||
<item> if </item>
|
||||
<item> or </item>
|
||||
<item> and </item>
|
||||
<item> foreach </item>
|
||||
<item> value </item>
|
||||
<item> eval </item>
|
||||
<item> origin </item>
|
||||
<item> flavor </item>
|
||||
<item> shell </item>
|
||||
<item> error </item>
|
||||
<item> warning </item>
|
||||
<item> info </item>
|
||||
<item>call</item>
|
||||
<item>subst</item>
|
||||
<item>patsubst</item>
|
||||
<item>strip</item>
|
||||
<item>findstring</item>
|
||||
<item>filter</item>
|
||||
<item>filter-out</item>
|
||||
<item>sort</item>
|
||||
<item>word</item>
|
||||
<item>wordlist</item>
|
||||
<item>words</item>
|
||||
<item>firstword</item>
|
||||
<item>lastword</item>
|
||||
<item>dir</item>
|
||||
<item>notdir</item>
|
||||
<item>suffix</item>
|
||||
<item>basename</item>
|
||||
<item>addsuffix</item>
|
||||
<item>addprefix</item>
|
||||
<item>join</item>
|
||||
<item>wildcard</item>
|
||||
<item>realpath</item>
|
||||
<item>abspath</item>
|
||||
<item>if</item>
|
||||
<item>or</item>
|
||||
<item>and</item>
|
||||
<item>foreach</item>
|
||||
<item>value</item>
|
||||
<item>eval</item>
|
||||
<item>origin</item>
|
||||
<item>flavor</item>
|
||||
<item>shell</item>
|
||||
<item>error</item>
|
||||
<item>warning</item>
|
||||
<item>info</item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context name="normal" attribute="Normal" lineEndContext="#stay">
|
||||
|
162
src/share/3rdparty/generic-highlighter/perl.xml
vendored
@@ -39,88 +39,88 @@
|
||||
|
||||
Enhance tr/// and y/// support.
|
||||
-->
|
||||
<language name="Perl" version="3" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
|
||||
<language name="Perl" version="4" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> if </item>
|
||||
<item> unless </item>
|
||||
<item> else </item>
|
||||
<item> elsif </item>
|
||||
<item> while </item>
|
||||
<item> until </item>
|
||||
<item> for </item>
|
||||
<item> each </item>
|
||||
<item> foreach </item>
|
||||
<item> next </item>
|
||||
<item> last </item>
|
||||
<item> break </item>
|
||||
<item> continue </item>
|
||||
<item> return </item>
|
||||
<item> my </item>
|
||||
<item> our </item>
|
||||
<item> local </item>
|
||||
<item> state </item>
|
||||
<item> BEGIN </item>
|
||||
<item> END </item>
|
||||
<item> package </item>
|
||||
<item> sub </item>
|
||||
<item> do </item>
|
||||
<item> given </item>
|
||||
<item> when </item>
|
||||
<item> default </item>
|
||||
<item> __END__ </item>
|
||||
<item> __DATA__ </item>
|
||||
<item> __FILE__ </item>
|
||||
<item> __LINE__ </item>
|
||||
<item> __PACKAGE__ </item>
|
||||
<item>if</item>
|
||||
<item>unless</item>
|
||||
<item>else</item>
|
||||
<item>elsif</item>
|
||||
<item>while</item>
|
||||
<item>until</item>
|
||||
<item>for</item>
|
||||
<item>each</item>
|
||||
<item>foreach</item>
|
||||
<item>next</item>
|
||||
<item>last</item>
|
||||
<item>break</item>
|
||||
<item>continue</item>
|
||||
<item>return</item>
|
||||
<item>my</item>
|
||||
<item>our</item>
|
||||
<item>local</item>
|
||||
<item>state</item>
|
||||
<item>BEGIN</item>
|
||||
<item>END</item>
|
||||
<item>package</item>
|
||||
<item>sub</item>
|
||||
<item>do</item>
|
||||
<item>given</item>
|
||||
<item>when</item>
|
||||
<item>default</item>
|
||||
<item>__END__</item>
|
||||
<item>__DATA__</item>
|
||||
<item>__FILE__</item>
|
||||
<item>__LINE__</item>
|
||||
<item>__PACKAGE__</item>
|
||||
</list>
|
||||
<list name="operators">
|
||||
<item> = </item>
|
||||
<item> != </item>
|
||||
<item> ~= </item>
|
||||
<item> += </item>
|
||||
<item> -= </item>
|
||||
<item> *= </item>
|
||||
<item> /= </item>
|
||||
<item> **= </item>
|
||||
<item> |= </item>
|
||||
<item> ||= </item>
|
||||
<item> //= </item>
|
||||
<item> &= </item>
|
||||
<item> &&= </item>
|
||||
<item> ?= </item>
|
||||
<item> + </item>
|
||||
<item> - </item>
|
||||
<item> * </item>
|
||||
<!-- <item> / </item>//-->
|
||||
<item> % </item>
|
||||
<item> || </item>
|
||||
<item> // </item>
|
||||
<item> && </item>
|
||||
<item> | </item>
|
||||
<item> & </item>
|
||||
<item> < </item>
|
||||
<item> << </item>
|
||||
<item> > </item>
|
||||
<item> >> </item>
|
||||
<item> ^ </item>
|
||||
<item> -> </item>
|
||||
<item> => </item>
|
||||
<item> . </item>
|
||||
<item> , </item>
|
||||
<item> ; </item>
|
||||
<item> :: </item>
|
||||
<item> \ </item>
|
||||
<item> and </item>
|
||||
<item> or </item>
|
||||
<item> not </item>
|
||||
<item> eq </item>
|
||||
<item> ne </item>
|
||||
<item> lt </item>
|
||||
<item> gt </item>
|
||||
<item> le </item>
|
||||
<item> ge </item>
|
||||
<item> cmp </item>
|
||||
<item>=</item>
|
||||
<item>!=</item>
|
||||
<item>~=</item>
|
||||
<item>+=</item>
|
||||
<item>-=</item>
|
||||
<item>*=</item>
|
||||
<item>/=</item>
|
||||
<item>**=</item>
|
||||
<item>|=</item>
|
||||
<item>||=</item>
|
||||
<item>//=</item>
|
||||
<item>&=</item>
|
||||
<item>&&=</item>
|
||||
<item>?=</item>
|
||||
<item>+</item>
|
||||
<item>-</item>
|
||||
<item>*</item>
|
||||
<!-- <item>/</item>//-->
|
||||
<item>%</item>
|
||||
<item>||</item>
|
||||
<item>//</item>
|
||||
<item>&&</item>
|
||||
<item>|</item>
|
||||
<item>&</item>
|
||||
<item><</item>
|
||||
<item><<</item>
|
||||
<item>></item>
|
||||
<item>>></item>
|
||||
<item>^</item>
|
||||
<item>-></item>
|
||||
<item>=></item>
|
||||
<item>.</item>
|
||||
<item>,</item>
|
||||
<item>;</item>
|
||||
<item>::</item>
|
||||
<item>\</item>
|
||||
<item>and</item>
|
||||
<item>or</item>
|
||||
<item>not</item>
|
||||
<item>eq</item>
|
||||
<item>ne</item>
|
||||
<item>lt</item>
|
||||
<item>gt</item>
|
||||
<item>le</item>
|
||||
<item>ge</item>
|
||||
<item>cmp</item>
|
||||
</list>
|
||||
<list name="functions">
|
||||
<item>abs</item>
|
||||
@@ -744,14 +744,14 @@
|
||||
<RegExpr attribute="Keyword" context="here_document_dumb" String="\s*'([^']+)'\s*;?" />
|
||||
</context>
|
||||
<context name="here_document" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="^%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||
<RegExpr attribute="Keyword" context="here_document" String="\=\s*<<\s*["']?([A-Z0-9_\-]+)["']?" beginRegion="HEREDoc" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
<DetectSpaces />
|
||||
</context>
|
||||
<context name="here_document_dumb" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
|
244
src/share/3rdparty/generic-highlighter/ruby.xml
vendored
@@ -31,7 +31,7 @@
|
||||
|
||||
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
|
||||
<language name="Ruby" section="Scripts"
|
||||
version="3" kateversion="3.3"
|
||||
version="4" kateversion="3.3"
|
||||
extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile"
|
||||
mimetype="application/x-ruby"
|
||||
style="ruby" indenter="ruby"
|
||||
@@ -40,74 +40,74 @@
|
||||
<highlighting>
|
||||
|
||||
<list name="keywords">
|
||||
<item> BEGIN </item>
|
||||
<item> END </item>
|
||||
<item> and </item>
|
||||
<item> begin </item>
|
||||
<item> break </item>
|
||||
<item> case </item>
|
||||
<item> defined? </item>
|
||||
<item> do </item>
|
||||
<item> else </item>
|
||||
<item> elsif </item>
|
||||
<item> end </item>
|
||||
<item> ensure </item>
|
||||
<item> for </item>
|
||||
<item> if </item>
|
||||
<item> in </item>
|
||||
<item> next </item>
|
||||
<item> not </item>
|
||||
<item> or </item>
|
||||
<item> redo </item>
|
||||
<item> rescue </item>
|
||||
<item> retry </item>
|
||||
<item> return </item>
|
||||
<item> then </item>
|
||||
<item> unless </item>
|
||||
<item> until </item>
|
||||
<item> when </item>
|
||||
<item> yield </item>
|
||||
<item>BEGIN</item>
|
||||
<item>END</item>
|
||||
<item>and</item>
|
||||
<item>begin</item>
|
||||
<item>break</item>
|
||||
<item>case</item>
|
||||
<item>defined?</item>
|
||||
<item>do</item>
|
||||
<item>else</item>
|
||||
<item>elsif</item>
|
||||
<item>end</item>
|
||||
<item>ensure</item>
|
||||
<item>for</item>
|
||||
<item>if</item>
|
||||
<item>in</item>
|
||||
<item>next</item>
|
||||
<item>not</item>
|
||||
<item>or</item>
|
||||
<item>redo</item>
|
||||
<item>rescue</item>
|
||||
<item>retry</item>
|
||||
<item>return</item>
|
||||
<item>then</item>
|
||||
<item>unless</item>
|
||||
<item>until</item>
|
||||
<item>when</item>
|
||||
<item>yield</item>
|
||||
</list>
|
||||
|
||||
<list name="access-control">
|
||||
<item> private_class_method </item>
|
||||
<item> private </item>
|
||||
<item> protected </item>
|
||||
<item> public_class_method </item>
|
||||
<item> public </item>
|
||||
<item>private_class_method</item>
|
||||
<item>private</item>
|
||||
<item>protected</item>
|
||||
<item>public_class_method</item>
|
||||
<item>public</item>
|
||||
</list>
|
||||
|
||||
<list name="attribute-definitions">
|
||||
<item> attr_reader </item>
|
||||
<item> attr_writer </item>
|
||||
<item> attr_accessor </item>
|
||||
<item>attr_reader</item>
|
||||
<item>attr_writer</item>
|
||||
<item>attr_accessor</item>
|
||||
</list>
|
||||
|
||||
<list name="definitions">
|
||||
<item> alias </item>
|
||||
<item> module </item>
|
||||
<item> class </item>
|
||||
<item> def </item>
|
||||
<item> undef </item>
|
||||
<item>alias</item>
|
||||
<item>module</item>
|
||||
<item>class</item>
|
||||
<item>def</item>
|
||||
<item>undef</item>
|
||||
</list>
|
||||
|
||||
<list name="pseudo-variables">
|
||||
<item> self </item>
|
||||
<item> super </item>
|
||||
<item> nil </item>
|
||||
<item> false </item>
|
||||
<item> true </item>
|
||||
<item> caller </item>
|
||||
<item> __FILE__ </item>
|
||||
<item> __LINE__ </item>
|
||||
<item>self</item>
|
||||
<item>super</item>
|
||||
<item>nil</item>
|
||||
<item>false</item>
|
||||
<item>true</item>
|
||||
<item>caller</item>
|
||||
<item>__FILE__</item>
|
||||
<item>__LINE__</item>
|
||||
</list>
|
||||
|
||||
<list name="default-globals">
|
||||
<item> $stdout </item>
|
||||
<item> $defout </item>
|
||||
<item> $stderr </item>
|
||||
<item> $deferr </item>
|
||||
<item> $stdin </item>
|
||||
<item>$stdout</item>
|
||||
<item>$defout</item>
|
||||
<item>$stderr</item>
|
||||
<item>$deferr</item>
|
||||
<item>$stdin</item>
|
||||
</list>
|
||||
|
||||
<!-- Kernel module methods.
|
||||
@@ -116,67 +116,67 @@
|
||||
-->
|
||||
<list name="kernel-methods">
|
||||
<!-- backquote ` -->
|
||||
<item> abort </item>
|
||||
<item> at_exit </item>
|
||||
<item> autoload </item>
|
||||
<item> autoload? </item>
|
||||
<item> binding </item>
|
||||
<item> block_given? </item>
|
||||
<item> callcc </item>
|
||||
<item> caller </item>
|
||||
<item> catch </item>
|
||||
<item> chomp </item>
|
||||
<item> chomp! </item>
|
||||
<item> chop </item>
|
||||
<item> chop! </item>
|
||||
<item> eval </item>
|
||||
<item> exec </item>
|
||||
<item> exit </item>
|
||||
<item> exit! </item>
|
||||
<item> fail </item>
|
||||
<item> fork </item>
|
||||
<item> format </item>
|
||||
<item> getc </item>
|
||||
<item> gets </item>
|
||||
<item> global_variables </item>
|
||||
<item> gsub </item>
|
||||
<item> gsub! </item>
|
||||
<item> iterator? </item>
|
||||
<item> lambda </item>
|
||||
<item> load </item>
|
||||
<item> local_variables </item>
|
||||
<item> loop </item>
|
||||
<item> method_missing </item>
|
||||
<item> open </item>
|
||||
<item> p </item>
|
||||
<item> print </item>
|
||||
<item> printf </item>
|
||||
<item> proc </item>
|
||||
<item> putc </item>
|
||||
<item> puts </item>
|
||||
<item> raise </item>
|
||||
<item> rand </item>
|
||||
<item> readline </item>
|
||||
<item> readlines </item>
|
||||
<item> require </item>
|
||||
<item> require_relative </item>
|
||||
<item> scan </item>
|
||||
<item> select </item>
|
||||
<item> set_trace_func </item>
|
||||
<item> sleep </item>
|
||||
<item> split </item>
|
||||
<item> sprintf </item>
|
||||
<item> srand </item>
|
||||
<item> sub </item>
|
||||
<item> sub! </item>
|
||||
<item> syscall </item>
|
||||
<item> system </item>
|
||||
<item> test </item>
|
||||
<item> throw </item>
|
||||
<item> trace_var </item>
|
||||
<item> trap </item>
|
||||
<item> untrace_var </item>
|
||||
<item> warn </item>
|
||||
<item>abort</item>
|
||||
<item>at_exit</item>
|
||||
<item>autoload</item>
|
||||
<item>autoload?</item>
|
||||
<item>binding</item>
|
||||
<item>block_given?</item>
|
||||
<item>callcc</item>
|
||||
<item>caller</item>
|
||||
<item>catch</item>
|
||||
<item>chomp</item>
|
||||
<item>chomp!</item>
|
||||
<item>chop</item>
|
||||
<item>chop!</item>
|
||||
<item>eval</item>
|
||||
<item>exec</item>
|
||||
<item>exit</item>
|
||||
<item>exit!</item>
|
||||
<item>fail</item>
|
||||
<item>fork</item>
|
||||
<item>format</item>
|
||||
<item>getc</item>
|
||||
<item>gets</item>
|
||||
<item>global_variables</item>
|
||||
<item>gsub</item>
|
||||
<item>gsub!</item>
|
||||
<item>iterator?</item>
|
||||
<item>lambda</item>
|
||||
<item>load</item>
|
||||
<item>local_variables</item>
|
||||
<item>loop</item>
|
||||
<item>method_missing</item>
|
||||
<item>open</item>
|
||||
<item>p</item>
|
||||
<item>print</item>
|
||||
<item>printf</item>
|
||||
<item>proc</item>
|
||||
<item>putc</item>
|
||||
<item>puts</item>
|
||||
<item>raise</item>
|
||||
<item>rand</item>
|
||||
<item>readline</item>
|
||||
<item>readlines</item>
|
||||
<item>require</item>
|
||||
<item>require_relative</item>
|
||||
<item>scan</item>
|
||||
<item>select</item>
|
||||
<item>set_trace_func</item>
|
||||
<item>sleep</item>
|
||||
<item>split</item>
|
||||
<item>sprintf</item>
|
||||
<item>srand</item>
|
||||
<item>sub</item>
|
||||
<item>sub!</item>
|
||||
<item>syscall</item>
|
||||
<item>system</item>
|
||||
<item>test</item>
|
||||
<item>throw</item>
|
||||
<item>trace_var</item>
|
||||
<item>trap</item>
|
||||
<item>untrace_var</item>
|
||||
<item>warn</item>
|
||||
</list>
|
||||
|
||||
<list name="mixin-methods">
|
||||
@@ -204,14 +204,14 @@
|
||||
<RegExpr attribute="Keyword" String="\;\s*(while|until)\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" beginRegion="def block" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Keyword" String="\;\s*(if|unless)\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bclass\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bmodule\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bbegin\b" context="#stay" beginRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="class" context="#stay" beginRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="module" context="#stay" beginRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="begin" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bfor\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bcase\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bdo\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bdef\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bend\b" context="#stay" endRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="case" context="#stay" beginRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="do" context="#stay" beginRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="def" context="#stay" beginRegion="def block"/>
|
||||
<WordDetect attribute="Keyword" String="end" context="#stay" endRegion="def block"/>
|
||||
<!-- elsif/else close the current block and start a new one -->
|
||||
<RegExpr attribute="Keyword" String="\b(else|elsif|rescue|ensure)\b" context="#stay" endRegion="def block" beginRegion="def block"/>
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<!ENTITY name "(?![0-9])[\w_:][\w.:_-]*">
|
||||
<!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
||||
]>
|
||||
<language name="XML" version="5" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/xml;application/scxml+xml" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
<language name="XML" version="6" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
<contexts>
|
||||
|