1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

17 commits

Author SHA1 Message Date
Sergey Prigogin
d8154bd340 Inremented branding plugin version to 8.5 2014-07-21 17:39:01 -07:00
Nathan Ridge
6cbdabfbec Bug 432701 - Move code that determines the value of an initializer to SemanticUtil
Change-Id: I0fcbad27155d875b420ce99cd9e9ba202448cc59
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/26418
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-05-14 12:27:57 -04:00
Sergey Prigogin
5d7a19fa6c Enabled JDK 1.7.
Change-Id: Ic2a161ea3c318dc1e8ba01c271c936bf5ed8763d
Reviewed-on: https://git.eclipse.org/r/21020
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-24 13:38:55 -05:00
Sergey Prigogin
1d166260a8 Bumped up CDT version to 8.4.
Change-Id: I1229344feaaed4a3551ceb7b1ef1410545048b55
Reviewed-on: https://git.eclipse.org/r/20908
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-21 17:35:29 -05:00
Andrew Eidsness
fd074ab029 Bug 425102 QObject::connect content assist still broken
The content assistant was treating all function calls in the same way.
Here is an example showing the two cases that should be handled:

    qobj.connect( qobj.func(), SIGNAL( sig() ), SLOT( slot() ) );

In this case sig() applies to the return type of qobj::func() and slot()
applies to qobj (the same instance that connect is called upon).

The previous implementation of the assistant was not making a
distinction between these two cases.

I've added another test case to confirm behaviour in this area.

Change-Id: I8f76a5d5ae7384ea5162c5d36abeebb4c79c394b
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20848
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-20 22:40:56 -05:00
Andrew Eidsness
78fc903d16 Bug 422841 QtIndex API for qmlRegisterType function calls
The Qt spec includes a special function that is used to introduce C++
types to a namespace that is accessible from QML.  E.g.,

	qmlRegisterType<Q>( "uri", 1, 0, "QMLType" );

This will create a QML type called QMLType.  The type will include the
signals, slots, and invokable that are defined in the C++ class Q.  The
type is accessible in QML using the given URI and the version is 1.0.

More information is available at:

	http://qt-project.org/doc/qt-4.8/qdeclarativeengine.html

This patch adds IQmlRegisteredType, a collection of which can be
accessed from a new method in QtIndex.

This also includes new test cases for this feature.

Change-Id: I70c44d1d8d3a0594de44e692a16f7b26396e8464
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20347
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-07 15:21:47 -05:00
Andrew Eidsness
ff690ab953 Content assistant for Qt elements
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>
2013-12-12 14:05:53 -05:00
Andrew Eidsness
c6c1ef94fc Fix Qt plugin's project structure
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>
2013-12-12 11:12:13 -05:00
Andrew Eidsness
fccbec7b0d Bug 422841: Initial implementation of QtIndex
This uses the new PDOMASTProcessor extension point to create a
Qt-specifc PDOMLinkage.  This initial version of the linkage only stores
QObjects and their base classes.  Later commits will fill out other
details and introduce classes that use this data for things like Content
Assistance and Codan checking.

This patch introduces the following:

1) QtIndex: This is an index that provides access to Qt-specific data.
The index is mostly a wrapper on the CDT's existing IIndex, but it
provides very specific information about the Qt elements.  The only data
that can be accessed from the QtIndex (in this patch) is a QObject and
the QObject's that appear in its base class specifier list.

2) QtPDOMLinkage: This linkage is implemenated as an extension of the
PDOMCPPLinkage.  In some cases it adds references to Qt names from the
C++ bindings.

3) Test suite: The test suite has some base classes for parsing the Qt
source code.  The only test case is for the simple functionality that is
being added in this patch -- examining the base class specifier list of
QObjects.

These areas will be extended in later patches.

Change-Id: I13fb83beb7f50cd2efb1de97b562245dc642468d
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19113
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-11-29 14:43:41 -05:00
Andrew Gvozdev
652ce4748e Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
Doug Schaefer
eb663099f5 Clean up more of the legal files for the new features LLVM and Qt. 2013-05-30 13:33:39 -04:00
Doug Schaefer
3795dbf60e Add pom files for the Qt plug-ins and feature. 2013-04-13 17:01:14 -04:00
Andrew Eidsness
719982b23b Recognize Q_SIGNAL and Q_SLOT on single functions
Qt allows signals and slots to be marked directly on the function, e.g.,

class T
{
    Q_SIGNAL void some_signal();
    Q_SLOT   void some_slot();
};

This change modifies the Qt signal/slot tagger to look for these tags in
addition to the previously implemented search for the visibility label.

Change-Id: Ibf43df8d80d4ca9f8b62776e7a35a4fc067a289e
Reviewed-on: https://git.eclipse.org/r/10701
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-28 18:19:59 -05:00
Andrew Eidsness
6c6ab24c23 Bug 400020: Allow tagging of IBindings
Addresses review comments from https://git.eclipse.org/r/#/c/10648.

Fixes the junit problems by making sure that the dummy PDOM acquires its
write lock before calling exercising the tag index.

Original commit message:
This new extension point allows contributors to put their own
information into the PDOM and to later retrieve it for their own
purposes.

There are many details in the bug.  The idea is that contributors
provide an implementation of IBindingTagger, which is given a chance to
examine IBindings when they are created.  The ITagWriter interface
allows the contributor to create a new tag which can then have data
written to it.

The ITagService interface (accessible from CCorePlugin.getTagService()
provides a way for the contributor to later get an instance of
ITagReader to retrieve tags from bindings.

ITags are copied to the PDOM when the associated binding is persisteed.

Contributors use a unique id (based on their plugin id), so that
multiple contributors are able to independently tag a given binding.

In-memory tags are not cached.  I've done some timing tests using my
sample implementation and found no measurable difference.  The full log
lines look like:

	!MESSAGE Indexed 'simple-01' (2 sources, 184 headers) in <see below>
sec: 21,550 declarations; 35,394 references; 0 unresolved inclusions; 1
syntax errors; 0 unresolved names (0.00%)

I did 5 tests using the current master (no tagging-related code), the
times were:
	18.86 sec
	 9.17 sec
	 5.91 sec
	 4.79 sec
	 4.83 sec

And then I ran the same sequence of tests using the code in this
commit:
	18.73 sec
	 9.39 sec
	 6.50 sec
	 4.78 sec
	 5.27 sec

If performance does become a problem, then caching could be introduced
with a new implementation of ITaggableService.  The two problems are
finding a key other than the identity of the IBinding (since IBindings
are re-created often) and properly evicting stale entries when the
binding is no longer valid.

The process of copying tags from an in-memory IBinding to a PDOMBinding,
is a synchronization.  This means that tags that are no longer
applicable, will be removed from the persistent store.

While developing this I found that PDOMBindings are not deleted from the
Database (only the names that reference them are deleted), so there is
no provision for deleting all tags at once.

New database locks are not needed.  By the time the persistent tags are
accessed, higher levels of code have already taken a read or write lock
as appropriate.

There are new unit tests covering the changes to the PDOM.

Change-Id: I6ae1afc949082f7f4484b3faa1550670be43312f
Reviewed-on: https://git.eclipse.org/r/10659
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-26 21:17:01 -05:00
Andrew Eidsness
1908efec38 qt slot/signal auto-complete
Tags signal and slot methods when the index is created.  Uses these tags
to suggest values inside of SIGNAL and SLOT macro expansions.  Enabled
only for projects with the QtNature.

Recognizes QObject::connect function calls and suggests SIGNAL(a) and
SLOT(a) for the 2nd and 4th parameters.

When expanding the SIGNAL and SLOT macros within a call to
QObject::connect, suggests signals and slots based on the type of the
previous parameter.

E.g. in

    QObjectA a;
    QObjectB b;
    QObject::connect( &a, SIGNAL(*), &b, SLOT(**) );

The content assistant will suggest the methods of type QObjectA that
have been marked as signals at *, and the methods of QObjectB that have
been marked as slots at **.

Change-Id: Ia6aaa71724547b0977e322399a500f072004767a
Reviewed-on: https://git.eclipse.org/r/10532
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-20 16:13:49 -05:00
Andrew Eidsness
862099aa7a Bug 399985: Semantic highlighting for qt signals/slots
The signals, slots, Q_SIGNALS, and Q_SLOTS macros are
used as 'keywords' when developing Qt applications.  This
patch adds a semantic highlighter for these keywords in
projects with a qtnature.

Change-Id: I7a5906aa69e6d7dab4ce20a16b425ae177f9bd25
Reviewed-on: https://git.eclipse.org/r/10179
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-05 10:37:02 -05:00
Doug Schaefer
09357c4df6 Added support for Qt. Extended AddFiles template to change start/end
patterns.
2013-01-12 00:57:49 -05:00