1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00
Commit graph

123 commits

Author SHA1 Message Date
Nathan Ridge
54e9a84673 Rename ICPPEvaluation.getTypeOrFunctionSet() to getType().
getTypeOrFunctionSet() is an unwieldy name, and since the return type
is IType, it seems reasonable to call the function getType().

Change-Id: I7e3211fdd3b474cc8e33da3e1f398b58122fe89d
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-12-23 23:30:50 -05:00
Matthew Bastien
0027b29aba Bug 481126 - Walk QML Types AST
Added several classes that can be used to aggregate all of the
information from within a .qmltypes file as defined by
http://doc.qt.io/qt-5/qtqml-modules-qmldir.html#writing-a-qmltypes-file

Change-Id: Ia36c3bb1a4a0254c4125733d6faabbb5a4606133
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-22 15:04:28 -05:00
Matthew Bastien
a43976b882 Bug 481126 - Convert Acorn AST into Java
Added the class QmlASTNodeHandler that creates and manages Proxy
instances of the QML AST node interfaces.  The proxies are created
dynamically based on what methods are called on the interface.  That
way, the AST is loaded as needed rather than all at once.  Added a few
tests to verify behavior (however, they are not comprehensive; there are
a lot more cases that should be verified in the future).

Change-Id: I64038f9668942a67e1f1b7dceac6c7dbed2d46d7
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-16 11:40:14 -05:00
Matthew Bastien
84b5f4bfd2 Bug 480238 - QML AST in Java
Created a set of Interfaces to represent the JavaScript and QML Ast in
plain Java.  Updated acorn-qml to be able to parse the entirety of QML
syntax as specified by the QML grammar.  Also modified the QML AST to
represent the added syntax and modified tern-qml to handle the new AST
elements.

Changed the way that the QMLAnalyzer handles path resolution.  Paths are
now relative to the local file system.

Note: the normal acorn-qml parser cannot parse the full range of QML
syntax due to ambiguities.  However, the loose parser can.  We're still
waiting on Acorn to bring lookahead to the normal parser in order to
resolve this.

Change-Id: I77c820ad46301975b2a91969a656d428ad9409c1
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-14 11:13:52 -05:00
Matthew Bastien
e91dc6f389 Bug 480238 - Acorn-QML Parse QML Types File
Added the 'mode' option to acorn-qml that, when set to "qmltypes", will
allow it to parse the slightly different syntax that qmltypes files
have.  Added a few tests to check this functionality.

Change-Id: Ica240c33ad9a153953f099845cdcb71e241c3a8d
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-09 17:12:15 -05:00
Matthew Bastien
1d36f36ef8 Bug 481126 - QML Directory File Parsing
Added a new parser that is able to construct an AST for a given qmldir
file.  Added tests to ensure the parser works for standard qmldir files.

Change-Id: I292aace3cdec8b4a544033f80812df965fef50b8
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-09 14:58:22 -05:00
Doug Schaefer
6ba6157708 Bug 481126 - Add hyperlink support to open decl in QML editor.
Also moved the text package contents to the editor package.

Change-Id: I352f8cfa78e937fb4046f86df8c7767df6c5eff2
2015-12-08 11:27:15 -05:00
Matthew Bastien
d6bba126d8 Bug 481126 - QML Parse Query Type
Added two new query types to tern-qml: 'parseFile' and 'parseString'
which will return an AST for the given file or string respectively.

Change-Id: I4608866c002d43defb4d462c4a981282ed97e1c6
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-07 12:08:33 -05:00
Matthew Bastien
42e3859b68 Bug 481126 - QML Imports Working in Editor
Hooked up the extra logic needed to get Tern-QML's imports to work in
the QML File Editor.

Change-Id: I6fa222223ca8b6b177e4004e48f2f1863ab4d7b4
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-06 15:05:41 -05:00
Matthew Bastien
dd3815bb91 Bug 481126 - Tern-QML Directory Imports
Added functionality to tern-qml that allows it to recognize directory
imports of the form:  import "<directory>" [as <Qualifier>].  Content
assist and find definitions also work for these new imports.  Moreover,
fixed the QML Scoping to be easier to handle in the future by defining
new Scope Objects specifically for QML.  Finally, used JS Hint and
Beautify to have a more uniform coding style between all the files of
acorn-qml and tern-qml.

Also fixed up the HTML Demo to allow editing of multiple files to show
the new imports.

Change-Id: I2cdd18b1b8765400f6b24145f0677127a221fe10
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-12-04 11:18:00 -05:00
Doug Schaefer
3ec33023c3 Hide the exception on QML load from the UI.
Change-Id: Ib4bb21f5e7ec7e4d53d6dfe4f9098dd45575089a
2015-12-04 10:03:56 -05:00
Doug Schaefer
8d898be364 Add command an UI to reload the QML Analyzer.
This is just a temporary thing while we're developing it.

Change-Id: Id83fac1fa22f451ead2de8493a4c7457320b8008
2015-12-03 12:09:47 -05:00
Doug Schaefer
f1a21f5c64 Bug 481126 - Hook up QML content assist to tern.js-based analyzer
Also renames Activator.

Change-Id: I58161a40b0caa2930e4fb2a5b2a70748fbe552ae
2015-12-02 22:23:16 -05:00
Doug Schaefer
68b8c98473 Start to hook up tern-qml to Java and port some tests.
Change-Id: Ibee411855ffc78e1c183a6c845072ab1eac2b7df
2015-12-01 10:53:43 -05:00
Matthew Bastien
31150e4af1 Bug 481126 - QML Scoping Issues
Fixed the following issues with QML:
  -The parent scope of a QML Object is the file's root Object scope
  -Content assist for an Object Property should only display the
immediate Object's properties, not it's parent(s)
  -Content assist for an incomplete property binding should display
JavaScript hints as well

Added missing license headers and new tests.  Had to modify the
acorn-qml parser plugin in order to make some of the changes.  Added
tests for those as well.

Change-Id: I289167cbaacd8088f87dfafc689e67c0110d942f
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-11-30 16:29:58 -05:00
Doug Schaefer
3dd8f57dcf Bug 481978 - Lots of clean-up to the Qt Build and Launch.
Especially launch. Now have local and QNX launches (which are 
in our internal repo) working.

Change-Id: I97bacc520cc6806fe9622700b2bb3f544e4aad94
2015-11-27 09:41:40 -05:00
Doug Schaefer
e3496e1246 Bug 481978 - Big overhaul of new build system to work with Qt.
Moved new build system to it's own plug-ins. Cleaned up the root
build configuration and toolchain classes and use them for Qt local
run builds. Also hooks Qt local run launch delegate to launch target
manager and associated delegate interface.

Change-Id: I0c0f711ee53005edd399f6d24ba96658d606e1e5
2015-11-24 22:11:33 -05:00
Matthew Bastien
b5606e115f Bug 481126 - Tern QML Tests
Added a testing framework similar to acorn-qml's for tern-qml and began
adding tests.  Updated acorn-qml and tern-qml to use acorn v2.6.4 which
includes the changes to acorn_loose that enable loose parser plugins.

Change-Id: Ib6af4b476321fde4b3f15aac8342764a45985dfa
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-11-17 10:23:31 -05:00
Doug Schaefer
2e6c6216fb Bug 481978 - UI to add Qt installs. Installs are now persisted.
Change-Id: I1fa75b71615959df314a9aaca5f01e17069ec35f
2015-11-12 10:18:37 -05:00
Matthew Bastien
2d6e4f4b8a Bug 481850 - QML Error Tolerant Parser
Added the loose plugin to acorn-qml which is error-tolerant in its
parsing approach.  Switched the main parser to automatically use strict
mode and to complain if the ECMA Script version is set to anything
higher than 5.  This simplifies the parsing a little bit and keeps us in
sync with Qt which currently uses ECMA Script 5 in its JavaScript
runtime environment.

Updated the test framework to accommodate the loose parser and be less
'magic' in how it runs the tests.  Added new tests to make sure the
loose parser is, in fact, error tolerant.

Change-Id: I670fc01853198d2261fbf9d8b017d225c4612182
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-11-12 10:04:21 -05:00
Doug Schaefer
67f78c8094 Remove the ANTLR based QML parser. We're planning on tern.js instead.
The prototyping of a tern.js based QML parser and semantic analyzer
is working out well. We are proceeding with that for now and are
removing the ANTLR based QML parser we were thinking of to clean
things up.

Change-Id: I5b9894ade1904d017709542ef23d1f80c4886e45
2015-11-06 15:26:37 -05:00
Matthew Bastien
894c74be7e Bug 481126 - QML Static Analysis based on Tern.js
Tern can now perform static analysis on the following QML constructs:
  - QML Property Declarations
  - QML Property Bindings
  - QML Signals
  - QML Signal Handlers

Added basic support for the 'id' property that can be assigned to any
QML Object.  Fixed acorn-qml's member function parsing and added tests.
The 'demo' folder contains an html demo of the qml tern implementation
using codemirror as the editor.

Change-Id: I9e4d3837b194ff92a36a8d62bef288f61743e4ce
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-11-06 14:39:28 -05:00
Doug Schaefer
790f90ee55 Bug 481352 - Adapt Qt and Arduino providers to ILaunchTargets
ILaunchTarget replaces IRemoteConnection.

Change-Id: I77825ae1347cec7095655548e06cb6dbc5c2aaf4
2015-11-04 23:59:46 -05:00
Matthew Bastien
19cd53ec10 Bug 480238 - Clean Up Acorn QML Parser
Fixed the AST elements so that they more closely match the format used
by acorn (i.e. using 'id' instead of 'identifier' and 'name' instead of
'raw' for the identifier name).  Resolved one of the ambiguities dealing
with using 'signal', 'property', and 'readonly' as identifiers for
properties and QML Objects.   Added a bunch of new tests and fixed the
old ones to match the new AST.

Change-Id: I5a8bbd14b3e6f8531268740dd9e57cb48a0e22b3
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-11-04 09:51:34 -05:00
Matthew Bastien
f9143ebfdc Bug 481126 - QML Static Analysis based on Tern.js
Moved the Tern.js work and acorn-qml into the Qt Core plugin rather than
in a separate plugin.  Added walk.js in order to facilitate walking the
QML AST by acorn-qml.  Changed a few things in index.js and inject.js
for acorn-qml in order to get it working in a browser environment.
Added a tern-qml webpage demo which doesn't do much for now.

Change-Id: I3c8a3d57c98a4936d0e038774b410bb2a68afb6c
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-10-30 17:48:01 -04:00
Matthew Bastien
a9730dc194 Bug 480238 - Parse QML Object Literal and Members
Acorn-qml can now parse a large subset of QML syntax.  The only two
things left to do at this point are to allow QML Object Literals in
Property Bindings and to allow QML contextual keywords such as 'signal'
as property binding identifiers.  Both of these require lookahead which
acorn does not ship with at the moment, so this may be a bit of an
undertaking.  Also, added a whole bunch of tests to parse the new
syntax.

Change-Id: I0950fa29265c8337b5c9bfc0a1ec0c3ba8267426
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-10-27 14:53:13 -04:00
Matthew Bastien
89f0a08d77 Bug 480238 - Parse QML Header Statements
The acorn parser is now able to parse QML import and pragma statements.

Change-Id: Iaeebaa21f8b013935f8cdf2c2a2ff511038e1069
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-10-23 14:33:13 -04:00
Matthew Bastien
f8b769b2b3 Bug 480238 - QML Parser based on Acorn
Added a new plugin 'org.eclipse.cdt.qt.core.acorn' which houses the new
acorn-qml parser.

Change-Id: I7b456ecec97d44e10ca7e259523b5262c67c538d
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-10-20 15:55:20 -04:00
Matthew Bastien
6c3f10576b Bug 478938 - Automatically add source files to Qt Project File
Added basic content assist for built-in qmake variables since there are
so many of them.

Added a bunch of new classes dealing with basic parsing and modification
of Qt Project Files.  For now the parser is a simple regular expression
matcher that finds instances of variables.  The modification class
supports preservation of indentation and comments that are tied to
variables in the project file.

Change-Id: I0539458d5c1cf29e6c9c1246e4e717e7cbec1b84
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-10-05 12:41:41 -04:00
Doug Schaefer
3b26dc26c4 Set up QML parser tests using TestSourceReader.
Change-Id: I40a3ef8dcf53d6189a980ae6ae7128746867c70f
2015-09-30 19:45:36 -06:00
Doug Schaefer
7cf2a14cc9 Move QML stuff to qt.core plug-in. Add deps for ANTLR, FreeMarker.
Moves to the cdt 4.6 platform where the new ANTLR and Freemarker deps
will be. Also properly names the qt test plug-ins.

Change-Id: I026873583c6e6ca7602cb983ab04f99acd700a4b
2015-09-30 08:22:59 -04:00
Doug Schaefer
34378cb163 Hack in Windows support for Qt build and launch.
Only supports Qt 5.5 and mingw492_32 and only if installed into
C:/Qt or %HOME%/Qt.

Change-Id: I10e293fe5c7a72430a624dcf74fd8fc9a806c34c
2015-09-28 14:46:38 -04:00
Doug Schaefer
64bf3c4f69 Starting to put Qt onto the new build system and launch.
Change-Id: I3e65f5d69bfb35d16b2d1135f99517c7a2b2c437
2015-09-28 13:24:41 -04:00
Matthew Bastien
74c21f5427 Bug 478231 - Hook up .qrc files to the XML Editor
Change-Id: I41b8e07474b608d8311fbc3f117f9386e73b5305
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-09-23 20:39:38 -04:00
Matthew Bastien
8235aa4492 Bug 478211 - Create Qt Project File Editor
Also added bracket matching to the QML editor.

Change-Id: Ieb960bdec103a1c2055c3fda3dcda028ce73bb0a
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-09-23 15:26:34 -04:00
Matthew Bastien
4cc61d0449 Bug 477962 - Create Basic QML Editor with Syntax Highlighting
Added a QML Editor which handles basic syntax highlighting for keywords,
multi-line and single-line comments, and strings.  The highlight colours
are similar to that of Qt Creator and cannot be modified by users as of
yet.

Change-Id: Ied0ab0432a3a2a43f93733964747c792e29771c4
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
2015-09-21 11:53:02 -04:00
Doug Schaefer
6e6156e42f Add missing copyright notices. 2015-08-31 15:32:43 -04:00
Doug Schaefer
64c5782589 Bug 321443 - First implementation of new build model.
Includes adaptation of the Arduino build model where many of these
ideas started to the new model. And start of the Qt build system which
uses it.

Change-Id: Icb212185773ebc4d415e8a9862101744703ff80b
2015-08-31 14:14:21 -04:00
Doug Schaefer
eb8d3cad86 Start of work on doing Qt the new way.
Change-Id: Icc891538549485f9ad99614f36262ed218fb0609
2015-08-27 00:20:55 -04:00
Doug Schaefer
f047a404b0 Quick test framework for QML parser tests.
Change-Id: Id731074c35f3dc23fbfc2ea249da46fa2404fa25
2015-07-20 22:11:25 -04:00
Doug Schaefer
91f4a98335 Finish ECMAScript lexer. Upgrade to ANTLR 4.5.1.
Also added ANTLR src zip so you can see source.

Change-Id: I5041445c1401dfe0f35a80b9e5f6809504930120
2015-07-17 23:20:52 -04:00
Doug Schaefer
fac0ca9ddc Add copyrights to the QML parser source files.
Change-Id: Iae5bcf4000e66d3655ef0a47cb68aac8c18eced9
2015-07-17 23:18:33 -04:00
Doug Schaefer
00b591ae89 Start of QML parser.
Change-Id: I434e0267371a8b6e353c59b22d3b32832d842192
2015-07-17 09:59:13 -04:00
Jeff Johnston
833003c99d Fix some missing test resources in qt and core tests.
Change-Id: I1a7a5749d668065e10935ad428259e5f5d476951
2015-07-07 18:02:33 -04:00
Richard Eames
795c418f10 Bug 379684 Support for User Defined Literals
This patch adds preliminary support for C++11 user defined literals:
* Syntax support
* Type deduction in expressions
* Template literal operators
* String literal concatenation

Change-Id: I8a9760036a2c8428295f0e1ffb4b519a0a2577c9
Signed-off-by: Richard Eames <eclipse@naddiseo.ca>
2015-07-07 00:38:55 -04:00
Sergey Prigogin
fda80f2275 Cosmetics. 2015-06-26 15:10:49 -07:00
Marc Khouzam
bb61124897 Incremented CDT feature version to 8.8.0
Change-Id: Ib1189a08a5f0225fd676b682dc8a10477ad3acc5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-06-10 09:33:49 -04:00
Marc Khouzam
e820f872ad Incremented CDT feature version to 8.7.0
Change-Id: Ife0feaaa9263d2b7797e31d628250bd26caff1b5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-05-04 21:07:13 -04:00
Alena Laskavaia
dcc9de7b0e fixed schema validation error on Mars
- more errors...

Change-Id: Iab24ae4f7e95bd674765855b54eeb7de019b2162
2015-03-16 20:10:53 -04:00
Marc-Andre Laperle
afd11359e6 Extract test VM args to common property base.test.vmargs
This makes it easier to change arguments for all tests. As a side-effect,
all tests now enable assertion (-ea) and have the same max heap size, etc.

Change-Id: I0965d40ba3283efe7eacdf927f6c302ee0ab30f0
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2015-02-06 13:02:28 -05:00