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>
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>
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
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>
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>
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>
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>
The acorn parser is now able to parse QML import and pragma statements.
Change-Id: Iaeebaa21f8b013935f8cdf2c2a2ff511038e1069
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
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>
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>
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
Also added bracket matching to the QML editor.
Change-Id: Ieb960bdec103a1c2055c3fda3dcda028ce73bb0a
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
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>
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
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>
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>
This is breaking downstream builds.
This reverts commit 18e6101a53.
Change-Id: I5dd2ee129518757866ab832c683b648d13b07b83
Reviewed-on: https://git.eclipse.org/r/38594
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
after tests were fixed found funny bug that was there forever test was
creating incorrect header file because our comment extractor takes
comment from first occurence of function name, it is not actual java
parser. Because indexer was not running test was passing.
Change-Id: Ib0cea722e6c9766949d07b629ef7a9197529ef45
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/37410
Tested-by: Hudson CI
Jacoco arguments are missing when executing certain tests. This happens when
argLine is being overriden. We had the same problem in Linux Tools. We solved
it by prepending the argLine with ${tycho.testArgLine}. This should help
improving the Code coverage metric in Sonar.
Also update the jacoco version to fix a bug when building with Java 8.
Change-Id: I7f73f40488efc01fc7d643940c1ac0d5950c900d
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/32507
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
This fixes the NPE but not the underlying reason for the Qt plugin to be
activated. I think that might be happening because of the Codan checker
-- from what I recall, that extension point doesn't have a way to
prevent plugin activation.
The NPE is fixed by checking CACHE for null before using it. The #stop
method unregisters and sets CACHE to null. However, unregistering
doesn't prevent notifications that are already in flight. I suspect
that notification arrives, and then CACHE is null.
My test workspace would throw the NPE on every exit, with this change it
never does.
Change-Id: I01360a4c19c85fba53269d265948daf6d083c8d1
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/28751
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
features
Change-Id: I52a71e62f8161990657e96ef52403fd7f69698a2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27499
This means that:
- feature.xml files now make a reference to the shared license plugin
using version 0.0.0
- feature.properties files no longer have the text for the license
- license.html and epl-v10.html files are removed as they are part
of the shared license plugin
- build.properties files no longer reference removed files
- the main pom.xml file references the license repository
Change-Id: Ibd880480de3a07597084d44cce7b822903509079
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27250