- Fix AutotoolsNewMakeGenerator.getWinOSType method to
use the build env variables when invoking the sh
command because the path to "sh" may be specified there
Change-Id: Ibcde5de924c50b6557fb4264572ddd59b02bb99a
Reviewed-on: https://git.eclipse.org/r/19400
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
IP-Clean: Jeff Johnston <jjohnstn@redhat.com>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
The test case in the previous commit was invalid. The test case did not
modify the binding that was referenced by the name and it was checking
for the wrong binding after reading the reference from the Database.
Further, the test case had a hole where the type of binding that was
being used happens to have same node type in both the C and C++
linkages.
I've fixed the test case as follows:
1) The test type is now an enum which has a different nodeType in the C
and C++ linkages. The test case will now be able to catch cases where
the wrong linkage is used when reading the binding.
2) The test case now changes the name to reference a binding in a
different linkage. This means the later code (in the test case) is
expected to actually load a binding from a different linkage.
3) The test case now checks that the loaded binding really did come from
the other linkage. The previous implementation of the test case was
using the wrong binding for the checks.
I've also updated the implementation so that the updated test case
passes.
As an aside, during this update we (Doug and I) noticed that PDOMNames
unnecessarily store a PDOMLinkage. Bindings come from languages, and
therefore need a PDOMLinkage (so that the proper type can be loaded).
Names reference bindings and therefore should not have a linkage. The
motivating example is that there should be one binding for the printf
function, but it could be referenced using names that are created by
different parsers. This can be fixed in a later change.
The major change to implementation is that PDOMNode now stores an
identifier for the factory to use when loading the node. PDOMNode was
already using an int to store the nodeType. I've split this to store
the factoryId as a short and the nodeType as a short. The highest
nodeType currently in use is 58 -- a short should provide ample room for
expansion.
Since PDOMNode is now able to pick the proper factory for loading, we no
longer need the PDOMLinkage.getNode(long) method and I've marked it
deprecated. Instead there is a new method PDOMNode.load(PDOM, long).
Nodes read their factoryId from the database, so the PDOMLinkage is not
needed.
Later commits should cleanup the following:
a) Remove PDOMLinkage from PDOMNode (and related)
b) Change return type of PDOMNode.getNodeType to short
c) Replace deprecated calls to PDOMLinkage.getNode
Among these changes, (a) should allow removal of the external references
list. If names can be loaded without a linkage, then there would be no
reason to store the linkage when storing the name.
Change-Id: Ife2b21cb21ed1ac6d6c361d0ffb8c7434832c79c
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19377
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
This replaces the QtQuick2 project wizard with Qt4 and Qt5 wizards that
include the old content as well as:
1) Make targets to build and clean the project
2) Sample interaction between C++ and QML
3) A Qt header path provider so that paths from the Qt installation are
properly resolved in the project.
Item 3 is particularly important for using the 'New Class' wizard with
QObject as the base class. Unless the Qt paths are pre-populated the
QObject base class will not be found and the New Class wizard's Finish
button will be disabled.
The Qt headers are resolved by running `qmake -query QT_INSTALL_HEADERS`
and then creating IncludePath entries for all sub-folders. This list of
include paths is persisted with other shared language settings into a
file in the workspace metadata area.
The persisted data is reloaded when any of the following change:
- the modification time of the qmake binary
- the modification time of the reported QT_INSTALL_HEADERS folder
The persisted node is ignored when the target qmake binary no longer
exists. The node is removed from the persisted form the next time that
the shared settings are persisted.
Change-Id: Ic82fdb147e6a69060f93e2e9aed2e919139a0ae9
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/16909
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
Qt allows string-based key/value pairs to be inserted into QObject class
definitions. E.g.,
class Q : public QObject
{
Q_OBJECT
Q_CLASSINFO( "key1", "value1" )
};
The class info is accessible in the meta-object system. See:
http://qt-project.org/doc/qt-4.8/qmetaclassinfo.html
For more information.
This patch adds the API to access these key/value pairs from the
QtIndex. The values are stored in a single block in the PDOM record for
the QObject.
The API returns the value for a given key if it is found in the receiver
QObject or any of its base classes. The API returns the first such
value that is found.
This patch also adds a test case for this functionality.
Change-Id: Ie3f821a0c5f6f1347a0c0c6dafa184510ae26c29
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19154
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
The Qt meta-object system allows C++ enums to be added as simple enums
and as flags. There is more detail at:
http://qt-project.org/doc/qt-4.8/qobject.html#Q_ENUMS
and http://qt-project.org/doc/qt-4.8/qflags.html
This patch adds IQEnum to the QtIndex. IQEnums are contained in
IQObjects and therefore are accessed with the IQObject.getEnums.
An IQEnum holds its name, enumerators, and a boolean indicating whether
the instance represents a Qt flag.
A Qt flag is an enum where the enumerators are intended to be used with
bitwise operations. The Q_DECLARE_FLAGS macro is used to introduce a
type-safe container for the flags.
This patch also adds unit tests for this new functionality.
Change-Id: If51524e93533bae82a3263f3c7973a31793a8a83
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19147
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
Add IViewInMemory interface to general CDT to make it available for CDI
also.
Use IViewInMemory in DSF, and override it for the GDB case.
No need to use IViewInMemory.viewInMemory() yet, but it is put in the
new interface to be future-proof.
Change-Id: Iba9abee6b9bb459b4ec3a4fd72378f77f417643a
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/18952
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>
We have a new way of gathering variables from gdb using some fancy
python scripts. These changes are to easily allow us to override
the variable manager to do that.
Change-Id: I213c5835fa165227747a88da1f239bff1b41e673
Reviewed-on: https://git.eclipse.org/r/17464
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
The CDT persists an index of source code relationships by processing the
AST produced by the parser. There is an existing extension-point that
allows contributors to create new linkages in this persisted file.
However there is no mechanism allowing contributors to influence the
data that is stored to the file.
This introduces a new extension-point allowing contributors to
participate in processing the AST that is being persisted to the index.
The intent is for this to be used to store data into the contributor's
new Linkage.
There is no change in functionality for existing linkages. A
contributor will soon be added in the Qt plugin.
Change-Id: I845c90cbf7c713e23319e2ed1168eb7d74db5868
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19089
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
This creates a new method in CPPSemantics that will lookup a list of
IBindings from a qualifiedName. E.g., given:
namespace A
{
namespace B
{
int b;
}
}
CPPSemantics.findBindingsByQualifiedName(scope, "A::B::b"); will return
an array with the CPPVariable binding for b.
This commit contains a new test case for various cases that I've thought
about. I had expected that by using the existing lookup functions (in
CPPSemantics) I wouldn't have to think too hard about various matches.
However, the existing functions didn't work quite the way that I
expected.
Change-Id: I8a5aacba4a02d87f71ed4698aa432c3161395a31
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19067
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
API is located at org.eclipse.cdt.qt.core.index package.
Entry point is QMakeProjectInfoFactory.getForActiveConfigurationIn method
that provides ability to retrieve QMake information (IQMakeInfo interface)
for active project configuration of a specified project.
Also allows to listen on changes of such information.
qmakeEnvProvider extensions allows CDT build-system to provide environment
for QMake runs within their build-system.
Information is gather by parsing output of:
1) qmake -query
2) qmake -E file.pro // only for QMake version 3.0
Change-Id: Iae569bdbc89dc26d60530596b66b5227f36dfae6
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/19082
Reviewed-by: Andrew Eidsness <eclipse@jfront.com>
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
The existing PDOMBinding and PDOMName implementations do not allow
references between linkages. This feature is needed so that the new Qt
linkage can reference elements in the C++ linkage. It will also allow
the C++ implementation for extern "C" to be cleaned up (see
PDOM.getCrossLanguageBindings).
Prior to this change, a PDOMBinding held three lists of names. One for
each of declarations, definitions, and references. This change adds a
fourth list for external references. External references are stored as
a linked list of nodes. Each node holds:
- The linkage id.
- A pointer to the next node (or 0 for end-of-list).
- A pointer to the record of first name in the list.
The linkage id is held separately because a PDOMName does not have any
field of it's own for linkage. By grouping elements in this way, we can
reuse most of the existing list-related code.
External references are accessed through a new PDOMIterator class. This
is needed so that we can advance to the next linkage node when we get to
the end of one node's list of names.
This also adds a unit test for the new API.
Change-Id: Ie2b14848db7409905beda0cec752080d5f42eec8
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/18979
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
add MIGDBShow MIGDBShowLanguage MIGDBSetLanguage
When retrieving memory context's address size do
Store initial language
Set language to c
Read address size
Restore initial language
Change-Id: I6b504526a1cde8d509299d57cf3e1d70d73c4f5b
Signed-off-by: Philippe Gil <gil@adacore.com>
Reviewed-on: https://git.eclipse.org/r/18371
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
I also removed some test plug-ins from the feature that were not getting
built and therefore could not be included.
Change-Id: I4c450b3029a5010c3f23b2dcda5c1356b9295688
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/18323
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>