CodanPreferencesLoader.getProjectNode will sometimes return null. This
patch adds null checks before using the result.
Change-Id: If4dd70e6673d5da62cc0b8e899fb5066bdaa4bef
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19873
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This adds content assistants for QObject::connect function calls and
Q_PROPERTY expansions.
QObject::connect function calls look like:
QObject::connect(
sender, SIGNAL(someSignalFunction(int),
receiver, SLOT(someSlotFunction(int));
The assistant provides proposals in the SIGNAL and SLOT expansions. The
QObject for the corresponding type is used to create a list of signal or
slot function signatures.
Q_PROPERTY expansions look like:
Q_PROPERTY( type name READ someFunction ... )
[The ... is a list of optional attributes.] The assistant proposes
attribute names that have not yet been added. It also proposals
appropriate values for the attribute.
This patch also adds test cases for this feature.
Change-Id: I0eb25235bb423c1cfcd743075331f90f269afea7
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19721
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
The Qt plugins have been naming internal packages using two different
prefixes:
cdt.qt.internal
cdt.internal.qt
This renames all packages to cdt.internal.qt, which seems to be the
convention for other projects.
I've increased the Qt plugin versions because alot of new API has been
added, especially to the qt.core plugin. I increased the version in the
MANIFEST.MF and pom.xml files.
I've also fixed the MANIFEST.MF files to take CDT out of the plugin
names.
I've also replaced a call to CCorePlugin.log(Exception) with a call to
QtUIPlugin.log (and added the logging functions to QtUIPlugin.
Change-Id: I1e3e7b2a42c2eb79fe33608c14a1abcf013a9f2c
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19698
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
This adds support for Qt slots, signals, and invokables to the QtIndex.
This does not yet generate PDOM references for QObject::connection
function calls and the Content Assistant is not contributed yet.
This also fixes a problem in the GNUCPPSourceParser class (internal to
cdt.core). The class has a protected method that accepts an inner enum
as a parameter. That enum was marked as private, meaning the method
could not actually be used by subclasses. I've updated the enum to
match the visibility of the method.
There are three big areas needed to support Qt methods:
1) Slot and signal regions must be identified in the C++ class
definition. These regions are introduced with special macros and the
region extends to the next region or to the next visibility label.
Single methods can also be marked with (different) special macros.
This only applies outside of a slot/signal region.
I've created QtASTClass which examines the input class spec in order
to identify all such regions. This information is used when creating
the QtPDOM nodes for these methods.
2) Some places in Qt use type information embedded as macro expansion
parameters. The values are lost by the standard C++ parser (since they
are just text in the expansion). I've added an extension to the
GNUCPPSourceParser that accepts an input string (the macro expansion
parameter) and produces an appropriate IASTNode if possible.
3) The Qt moc follows specific and non-standard rules when matching
method signatures inside of QObject::connect function calls. I've added
a utility that creates the same signature using the CDT AST as input.
I learned the rules used by the moc by observing it's output for
significant cases. Those cases have been put into a test case that is
included in this patch.
Change-Id: If812558db315abec637653cc974abf1c0c13d95b
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19672
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
This extends IQObject so that it can return the list of Q_PROPERTY
expansions. Each Q_PROPERTY is represented by the new IQProperty. The
attributes of the property are stored in IQProperty.Attribute.
Where applicable, the attributes insert a reference from the associated
C++ binding. This means that the Q_PROPERTY expansion will be included
in the list of references for the C++ binding.
This also simplifies the process for adding new PDOMBindings to the Qt
linkage. New instances are stored in an implementation of IQtASTName
and able to directly create and return a new QtPDOMBinding. This avoids
creating three parallel inheritance hierachies (compared to the previous
Qt PDOM implementations).
The patch includes test cases to check handling of Q_PROPERTY
expansions.
Change-Id: I7d256d1a938d24a9eb726c472fb150a02f26eb32
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19602
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
handleEvent method updates for related project only
and does not fire listeners under 'sync' lock.
Change-Id: Id9726925ff9c044a3c13238406bdf3228ccf2933
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/19361
Reviewed-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>