Bug 577097: Merge o.e.remote into CDT
Change-Id: I357cd9be2d7f4b4045ccbcb374ea5bfdc7626229
12
.clang-format
Normal file
|
@ -0,0 +1,12 @@
|
|||
BasedOnStyle: LLVM
|
||||
|
||||
# Set column width to 120
|
||||
ColumnLimit: 120
|
||||
|
||||
# Sorting include statements will put "windows.h" last and result in build error.
|
||||
# To avoid unpredictable build errors, disable sorting.
|
||||
SortIncludes: false
|
||||
|
||||
# Use 4 spaces as indentation
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
165
.gitattributes
vendored
Normal file
|
@ -0,0 +1,165 @@
|
|||
* text=auto
|
||||
|
||||
# Generic files
|
||||
AUTHORS text
|
||||
ChangeLog text
|
||||
COPYING text
|
||||
NEWS text
|
||||
README text
|
||||
CONTRIBUTING text
|
||||
LICENSE text
|
||||
*.txt text
|
||||
*.md text
|
||||
*.zip binary
|
||||
|
||||
# C-like Sources
|
||||
*.asm text
|
||||
*.c text
|
||||
*.cc text
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.in text
|
||||
*.s text
|
||||
*.S text
|
||||
*.elf binary
|
||||
|
||||
# C-like configuration/scripts
|
||||
*.ac text
|
||||
*.am text
|
||||
# file permission +x
|
||||
*.bat text
|
||||
*.build text
|
||||
*.incl text
|
||||
makefile text
|
||||
Makefile text
|
||||
*.mk text
|
||||
# file permission +x
|
||||
*.sh text
|
||||
|
||||
# Qt
|
||||
*.pro text
|
||||
*.qml text
|
||||
*.qrc text
|
||||
|
||||
# Visual Studio
|
||||
*.dsp text eol=crlf
|
||||
*.dsw text eol=crlf
|
||||
*.filters text eol=crlf
|
||||
*.sln text eol=crlf
|
||||
*.vcxproj text eol=crlf
|
||||
|
||||
# C output files
|
||||
# (These should not normally be checked in, exceptions for pre-compiled libraries and tests)
|
||||
*.o binary
|
||||
*.d text
|
||||
# file permission +x
|
||||
*.dll binary diff=dll
|
||||
*.a binary
|
||||
# file permission +x
|
||||
*.exe binary
|
||||
*.out binary
|
||||
*.app binary
|
||||
# file permission +x
|
||||
*.jnilib binary diff=hex
|
||||
# file permission +x
|
||||
*.so binary
|
||||
|
||||
# Web/Javascript/Node
|
||||
*.css text
|
||||
*.htm text
|
||||
*.html text
|
||||
*.js text
|
||||
*.json text
|
||||
.npmignore text
|
||||
package-list text
|
||||
*.xml text
|
||||
*.xsd text
|
||||
*.xsl text
|
||||
yarn.lock text
|
||||
*.lock text
|
||||
|
||||
# Images
|
||||
*.gif binary
|
||||
*.icns binary
|
||||
*.ico binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.png binary
|
||||
*.PNG binary
|
||||
*.xpm binary
|
||||
|
||||
# Java/Eclipse
|
||||
# remove trailing whitespace
|
||||
*.java text
|
||||
# remove trailing whitespace
|
||||
*.properties text
|
||||
.api_filters text
|
||||
.classpath text
|
||||
*.exsd text
|
||||
*.g text
|
||||
*.inf text
|
||||
*.ini text
|
||||
*.launch text
|
||||
*.mappings text
|
||||
# remove trailing whitespace
|
||||
*.MF text
|
||||
.options text
|
||||
*.options text
|
||||
*.prefs text
|
||||
*.product text
|
||||
.project text
|
||||
*.setup text
|
||||
*.target text
|
||||
|
||||
# Java output files
|
||||
# (These should not normally be checked in, exceptions for pre-compiled libraries and tests)
|
||||
*.class binary
|
||||
*.jar binary
|
||||
|
||||
# Files used in tests
|
||||
*.awts text
|
||||
be32 binary
|
||||
be32lib binary
|
||||
be64 binary
|
||||
be64lib binary
|
||||
*.bin binary
|
||||
exe binary
|
||||
exebig_g binary
|
||||
exe_g binary
|
||||
*.expected text
|
||||
*.F90 text
|
||||
*.init text
|
||||
launchConfigTestGdbinit text
|
||||
le32 binary
|
||||
le32lib binary
|
||||
le64 binary
|
||||
le64lib binary
|
||||
*.main text
|
||||
output-1 text
|
||||
*.pda text
|
||||
*.rts text
|
||||
*.srec text eol=lf
|
||||
test_commands text
|
||||
|
||||
# Other special files
|
||||
cdtOptions text
|
||||
.clang-format text
|
||||
.contentsettings text
|
||||
*.csv text
|
||||
*.dia binary
|
||||
*.dictionary text
|
||||
.eclipseproduct text
|
||||
.euml2 text
|
||||
.gitattributes text
|
||||
.gitignore text
|
||||
.gitkeep text
|
||||
*.patch text
|
||||
*.src text
|
||||
*.tmLanguage text
|
||||
*.top text
|
||||
*.ucd text
|
||||
.umlproject text
|
||||
# remove trailing whitespace
|
||||
# file permission +x
|
||||
*.py text
|
||||
*.xhtml text
|
11
.gitignore
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*/*/bin
|
||||
/*/*/index
|
||||
/*/*/target
|
||||
/workspace/
|
||||
.DS_Store
|
||||
.nfs*
|
||||
.polyglot.*
|
||||
check_code_cleanliness_workspace/
|
||||
.META-INF_MANIFEST.MF
|
||||
*.takari_issue_192
|
||||
*.log
|
8
.mvn/extensions.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.eclipse.tycho.extras</groupId>
|
||||
<artifactId>tycho-pomless</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</extension>
|
||||
</extensions>
|
11
.project
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.root</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
72
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,72 @@
|
|||
# Contributing to Eclipse C/C++ Development Tools
|
||||
|
||||
Thanks for your interest in this project.
|
||||
|
||||
## Project description
|
||||
|
||||
The Eclipse CDT Project provides a fully functional C and C++ Integrated
|
||||
Development Environment based on the Eclipse platform. Features include: support
|
||||
for project creation and managed build for various toolchains, standard make
|
||||
build, source navigation, various source knowledge tools, such as type
|
||||
hierarchy, call graph, include browser, macro definition browser, code editor
|
||||
with syntax highlighting, folding and hyperlink navigation, source code
|
||||
refactoring and code generation, visual debugging tools, including memory,
|
||||
registers, and disassembly viewers.
|
||||
|
||||
* https://projects.eclipse.org/projects/tools.cdt
|
||||
|
||||
## Developer resources
|
||||
|
||||
### Building CDT
|
||||
|
||||
The recommended flow for most users is to follow instructions on [getting started with CDT development](https://wiki.eclipse.org/Getting_started_with_CDT_development).
|
||||
|
||||
For information on building CDT from the command line using maven, refer to the [README](README.md)'s Command-line Build instructions with Maven section.
|
||||
|
||||
|
||||
Additional information is available on:
|
||||
|
||||
* https://github.com/eclipse-cdt/cdt-infra/wiki
|
||||
* https://projects.eclipse.org/projects/tools.cdt/developer
|
||||
|
||||
The project maintains the following source code repositories
|
||||
|
||||
* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.cdt
|
||||
* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.cdt.edc
|
||||
* http://git.eclipse.org/c/cdt/org.eclipse.cdt.master.git
|
||||
* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.launchbar
|
||||
* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.tools.templates
|
||||
* https://github.com/eclipse-cdt/cdt-gdb-adapter
|
||||
* https://github.com/eclipse-cdt/cdt-gdb-vscode
|
||||
* https://github.com/eclipse-cdt/cdt-vscode
|
||||
* https://github.com/eclipse-cdt/cdt-infra
|
||||
|
||||
This project uses Bugzilla to track ongoing development and issues.
|
||||
|
||||
* Search for issues: https://bugs.eclipse.org/bugs/buglist.cgi?product=CDT
|
||||
* Create a new report: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT
|
||||
|
||||
Be sure to search for existing bugs before you create another one. Remember that
|
||||
contributions are always welcome!
|
||||
|
||||
## Eclipse Contributor Agreement
|
||||
|
||||
Before your contribution can be accepted by the project team contributors must
|
||||
electronically sign the Eclipse Contributor Agreement (ECA).
|
||||
|
||||
* http://www.eclipse.org/legal/ECA.php
|
||||
|
||||
Commits that are provided by non-committers must have a Signed-off-by field in
|
||||
the footer indicating that the author is aware of the terms by which the
|
||||
contribution has been provided to the project. The non-committer must
|
||||
additionally have an Eclipse Foundation account and must have a signed Eclipse
|
||||
Contributor Agreement (ECA) on file.
|
||||
|
||||
For more information, please see the Eclipse Committer Handbook:
|
||||
https://www.eclipse.org/projects/handbook/#resources-commit
|
||||
|
||||
## Contact
|
||||
|
||||
Contact the project developers via the project's "dev" list.
|
||||
|
||||
* https://dev.eclipse.org/mailman/listinfo/cdt-dev
|
277
LICENSE
Normal file
|
@ -0,0 +1,277 @@
|
|||
Eclipse Public License - v 2.0
|
||||
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
|
||||
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
|
||||
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial content
|
||||
Distributed under this Agreement, and
|
||||
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
where such changes and/or additions to the Program originate from
|
||||
and are Distributed by that particular Contributor. A Contribution
|
||||
"originates" from a Contributor if it was added to the Program by
|
||||
such Contributor itself or anyone acting on such Contributor's behalf.
|
||||
Contributions do not include changes or additions to the Program that
|
||||
are not Modified Works.
|
||||
|
||||
"Contributor" means any person or entity that Distributes the Program.
|
||||
|
||||
"Licensed Patents" mean patent claims licensable by a Contributor which
|
||||
are necessarily infringed by the use or sale of its Contribution alone
|
||||
or when combined with the Program.
|
||||
|
||||
"Program" means the Contributions Distributed in accordance with this
|
||||
Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement
|
||||
or any Secondary License (as applicable), including Contributors.
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source Code or other
|
||||
form, that is based on (or derived from) the Program and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship.
|
||||
|
||||
"Modified Works" shall mean any work in Source Code or other form that
|
||||
results from an addition to, deletion from, or modification of the
|
||||
contents of the Program, including, for purposes of clarity any new file
|
||||
in Source Code form that contains any contents of the Program. Modified
|
||||
Works shall not include works that contain only declarations,
|
||||
interfaces, types, classes, structures, or files of the Program solely
|
||||
in each case in order to link to, bind by name, or subclass the Program
|
||||
or Modified Works thereof.
|
||||
|
||||
"Distribute" means the acts of a) distributing or b) making available
|
||||
in any manner that enables the transfer of a copy.
|
||||
|
||||
"Source Code" means the form of a Program preferred for making
|
||||
modifications, including but not limited to software source code,
|
||||
documentation source, and configuration files.
|
||||
|
||||
"Secondary License" means either the GNU General Public License,
|
||||
Version 2.0, or any later versions of that license, including any
|
||||
exceptions or additional permissions as identified by the initial
|
||||
Contributor.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby
|
||||
grants Recipient a non-exclusive, worldwide, royalty-free copyright
|
||||
license to reproduce, prepare Derivative Works of, publicly display,
|
||||
publicly perform, Distribute and sublicense the Contribution of such
|
||||
Contributor, if any, and such Derivative Works.
|
||||
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby
|
||||
grants Recipient a non-exclusive, worldwide, royalty-free patent
|
||||
license under Licensed Patents to make, use, sell, offer to sell,
|
||||
import and otherwise transfer the Contribution of such Contributor,
|
||||
if any, in Source Code or other form. This patent license shall
|
||||
apply to the combination of the Contribution and the Program if, at
|
||||
the time the Contribution is added by the Contributor, such addition
|
||||
of the Contribution causes such combination to be covered by the
|
||||
Licensed Patents. The patent license shall not apply to any other
|
||||
combinations which include the Contribution. No hardware per se is
|
||||
licensed hereunder.
|
||||
|
||||
c) Recipient understands that although each Contributor grants the
|
||||
licenses to its Contributions set forth herein, no assurances are
|
||||
provided by any Contributor that the Program does not infringe the
|
||||
patent or other intellectual property rights of any other entity.
|
||||
Each Contributor disclaims any liability to Recipient for claims
|
||||
brought by any other entity based on infringement of intellectual
|
||||
property rights or otherwise. As a condition to exercising the
|
||||
rights and licenses granted hereunder, each Recipient hereby
|
||||
assumes sole responsibility to secure any other intellectual
|
||||
property rights needed, if any. For example, if a third party
|
||||
patent license is required to allow Recipient to Distribute the
|
||||
Program, it is Recipient's responsibility to acquire that license
|
||||
before distributing the Program.
|
||||
|
||||
d) Each Contributor represents that to its knowledge it has
|
||||
sufficient copyright rights in its Contribution, if any, to grant
|
||||
the copyright license set forth in this Agreement.
|
||||
|
||||
e) Notwithstanding the terms of any Secondary License, no
|
||||
Contributor makes additional grants to any Recipient (other than
|
||||
those set forth in this Agreement) as a result of such Recipient's
|
||||
receipt of the Program under the terms of a Secondary License
|
||||
(if permitted under the terms of Section 3).
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
3.1 If a Contributor Distributes the Program in any form, then:
|
||||
|
||||
a) the Program must also be made available as Source Code, in
|
||||
accordance with section 3.2, and the Contributor must accompany
|
||||
the Program with a statement that the Source Code for the Program
|
||||
is available under this Agreement, and informs Recipients how to
|
||||
obtain it in a reasonable manner on or through a medium customarily
|
||||
used for software exchange; and
|
||||
|
||||
b) the Contributor may Distribute the Program under a license
|
||||
different than this Agreement, provided that such license:
|
||||
i) effectively disclaims on behalf of all other Contributors all
|
||||
warranties and conditions, express and implied, including
|
||||
warranties or conditions of title and non-infringement, and
|
||||
implied warranties or conditions of merchantability and fitness
|
||||
for a particular purpose;
|
||||
|
||||
ii) effectively excludes on behalf of all other Contributors all
|
||||
liability for damages, including direct, indirect, special,
|
||||
incidental and consequential damages, such as lost profits;
|
||||
|
||||
iii) does not attempt to limit or alter the recipients' rights
|
||||
in the Source Code under section 3.2; and
|
||||
|
||||
iv) requires any subsequent distribution of the Program by any
|
||||
party to be under a license that satisfies the requirements
|
||||
of this section 3.
|
||||
|
||||
3.2 When the Program is Distributed as Source Code:
|
||||
|
||||
a) it must be made available under this Agreement, or if the
|
||||
Program (i) is combined with other material in a separate file or
|
||||
files made available under a Secondary License, and (ii) the initial
|
||||
Contributor attached to the Source Code the notice described in
|
||||
Exhibit A of this Agreement, then the Program may be made available
|
||||
under the terms of such Secondary Licenses, and
|
||||
|
||||
b) a copy of this Agreement must be included with each copy of
|
||||
the Program.
|
||||
|
||||
3.3 Contributors may not remove or alter any copyright, patent,
|
||||
trademark, attribution notices, disclaimers of warranty, or limitations
|
||||
of liability ("notices") contained within the Program from any copy of
|
||||
the Program which they Distribute, provided that Contributors may add
|
||||
their own appropriate notices.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities
|
||||
with respect to end users, business partners and the like. While this
|
||||
license is intended to facilitate the commercial use of the Program,
|
||||
the Contributor who includes the Program in a commercial product
|
||||
offering should do so in a manner which does not create potential
|
||||
liability for other Contributors. Therefore, if a Contributor includes
|
||||
the Program in a commercial product offering, such Contributor
|
||||
("Commercial Contributor") hereby agrees to defend and indemnify every
|
||||
other Contributor ("Indemnified Contributor") against any losses,
|
||||
damages and costs (collectively "Losses") arising from claims, lawsuits
|
||||
and other legal actions brought by a third party against the Indemnified
|
||||
Contributor to the extent caused by the acts or omissions of such
|
||||
Commercial Contributor in connection with its distribution of the Program
|
||||
in a commercial product offering. The obligations in this section do not
|
||||
apply to any claims or Losses relating to any actual or alleged
|
||||
intellectual property infringement. In order to qualify, an Indemnified
|
||||
Contributor must: a) promptly notify the Commercial Contributor in
|
||||
writing of such claim, and b) allow the Commercial Contributor to control,
|
||||
and cooperate with the Commercial Contributor in, the defense and any
|
||||
related settlement negotiations. The Indemnified Contributor may
|
||||
participate in any such claim at its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial
|
||||
product offering, Product X. That Contributor is then a Commercial
|
||||
Contributor. If that Commercial Contributor then makes performance
|
||||
claims, or offers warranties related to Product X, those performance
|
||||
claims and warranties are such Commercial Contributor's responsibility
|
||||
alone. Under this section, the Commercial Contributor would have to
|
||||
defend claims against the other Contributors related to those performance
|
||||
claims and warranties, and if a court requires any other Contributor to
|
||||
pay any damages as a result, the Commercial Contributor must pay
|
||||
those damages.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
||||
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
|
||||
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE. Each Recipient is solely responsible for determining the
|
||||
appropriateness of using and distributing the Program and assumes all
|
||||
risks associated with its exercise of rights under this Agreement,
|
||||
including but not limited to the risks and costs of program errors,
|
||||
compliance with applicable laws, damage to or loss of data, programs
|
||||
or equipment, and unavailability or interruption of operations.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
||||
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
|
||||
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
||||
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
||||
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this Agreement, and without further
|
||||
action by the parties hereto, such provision shall be reformed to the
|
||||
minimum extent necessary to make such provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against any entity
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
||||
Program itself (excluding combinations of the Program with other software
|
||||
or hardware) infringes such Recipient's patent(s), then such Recipient's
|
||||
rights granted under Section 2(b) shall terminate as of the date such
|
||||
litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it
|
||||
fails to comply with any of the material terms or conditions of this
|
||||
Agreement and does not cure such failure in a reasonable period of
|
||||
time after becoming aware of such noncompliance. If all Recipient's
|
||||
rights under this Agreement terminate, Recipient agrees to cease use
|
||||
and distribution of the Program as soon as reasonably practicable.
|
||||
However, Recipient's obligations under this Agreement and any licenses
|
||||
granted by Recipient relating to the Program shall continue and survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement,
|
||||
but in order to avoid inconsistency the Agreement is copyrighted and
|
||||
may only be modified in the following manner. The Agreement Steward
|
||||
reserves the right to publish new versions (including revisions) of
|
||||
this Agreement from time to time. No one other than the Agreement
|
||||
Steward has the right to modify this Agreement. The Eclipse Foundation
|
||||
is the initial Agreement Steward. The Eclipse Foundation may assign the
|
||||
responsibility to serve as the Agreement Steward to a suitable separate
|
||||
entity. Each new version of the Agreement will be given a distinguishing
|
||||
version number. The Program (including Contributions) may always be
|
||||
Distributed subject to the version of the Agreement under which it was
|
||||
received. In addition, after a new version of the Agreement is published,
|
||||
Contributor may elect to Distribute the Program (including its
|
||||
Contributions) under the new version.
|
||||
|
||||
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
|
||||
receives no rights or licenses to the intellectual property of any
|
||||
Contributor under this Agreement, whether expressly, by implication,
|
||||
estoppel or otherwise. All rights in the Program not expressly granted
|
||||
under this Agreement are reserved. Nothing in this Agreement is intended
|
||||
to be enforceable by any entity that is not a Contributor or Recipient.
|
||||
No third-party beneficiary rights are created under this Agreement.
|
||||
|
||||
Exhibit A - Form of Secondary Licenses Notice
|
||||
|
||||
"This Source Code may also be made available under the following
|
||||
Secondary Licenses when the conditions for such availability set forth
|
||||
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
|
||||
version(s), and exceptions or additional permissions here}."
|
||||
|
||||
Simply including a copy of this Agreement, including this Exhibit A
|
||||
is not sufficient to license the Source Code under Secondary Licenses.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to
|
||||
look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
192
README.md
Normal file
|
@ -0,0 +1,192 @@
|
|||
# Eclipse CDT
|
||||
|
||||
## Contributing
|
||||
|
||||
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for contributing information
|
||||
|
||||
## Developing CDT
|
||||
|
||||
Most developers, developing CDT in the Eclipse IDE, should use [Getting_started_with_CDT_development](https://wiki.eclipse.org/Getting_started_with_CDT_development).
|
||||
|
||||
## Command-line Build instructions with Maven
|
||||
|
||||
Eclipse CDT uses the standard Maven and Tycho workflow for building CDT using Maven 3.6.0 and Java 8. Therefore to package CDT do:
|
||||
|
||||
```
|
||||
mvn package
|
||||
```
|
||||
|
||||
and the resulting p2 repository will be in `releng/org.eclipse.cdt.repo/target/repository`
|
||||
|
||||
The current set of options to Maven used for building on the CI can be seen in the Jenkinsfiles
|
||||
on [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt)
|
||||
|
||||
To build CDT plug-ins you need a standard Maven & Java developement environment. The Dockerfiles used for CDT's images are
|
||||
published in [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/docker). The requirements for running all tests
|
||||
successfully and for rebuilding non-Java parts of CDT are much more extensive than standard Maven & Java and include
|
||||
items such as GCC, GDB, yarn, Node, etc. Refer to the Dockerfiles for the current versions of those dependencies.
|
||||
|
||||
### Profiles
|
||||
|
||||
There are a number of profiles (-P to mvn) to control the behaviour of the build.
|
||||
|
||||
#### cdtRepo, simrelRepo, defaultCdtTarget
|
||||
|
||||
Individual p2 repos can be turned on and off to allow building CDT, or parts of CDT against
|
||||
different target platforms easily.
|
||||
For example, you can:
|
||||
- test CDT against a pre-built CDT by using the cdtRepo profile.
|
||||
- build the standalone rcp debugger against the latest simrel `mvn verify -DuseSimrelRepo -f debug/org.eclipse.cdt.debug.application.product`
|
||||
|
||||
#### build-standalone-debugger-rcp
|
||||
|
||||
Using the `build-standalone-debugger-rcp` profile will include the standalone debugger, located
|
||||
in `debug/org.eclipse.cdt.debug.application.product`
|
||||
|
||||
#### skip-all-tests, skip-tests-except-cdt-ui, skip-tests-except-dsf-gdb, skip-tests-except-lsp, skip-tests-except-cdt-other
|
||||
|
||||
Using any of the above profiles can skip large sets of tests. The CI build uses this to parallelize tests. See https://ci.eclipse.org/cdt/view/Gerrit/
|
||||
|
||||
#### terminal-only
|
||||
|
||||
The terminal directory has a special profile that enables only the terminal and its dependencies when used. The allows
|
||||
running maven like this `mvn -f terminal/pom.xml verify -P only-terminal` to build and test only the terminal
|
||||
and its dependencies. A special terminal only p2 site is created in `terminal/repo/target/repository`. The CI build
|
||||
uses this to speedup turnaround on changes only affecting the terminal. See https://ci.eclipse.org/cdt/view/Gerrit/
|
||||
|
||||
#### baseline-compare-and-replace
|
||||
|
||||
`baseline-compare-and-replace` profile controls whether baseline replace and compare
|
||||
is performed. On a local build you want to avoid baseline replace and compare,
|
||||
especially if you have different versions of Java than the baseline was built with.
|
||||
|
||||
If you have the same version of Java as the build machine you can run baseline comparison and
|
||||
replace. To do that run with the `baseline-compare-and-replace` profile.
|
||||
|
||||
Requires verify phase of maven to run, i.e. will not run with `mvn package` even if profile is specified.
|
||||
|
||||
#### production
|
||||
|
||||
Runs the production steps of the build. This profile can only be run on the CDT CI machines
|
||||
as access to Eclipse key signing server is needed to sign the jars.
|
||||
|
||||
#### regenHelp
|
||||
|
||||
Some of the help systems in Eclipse CDT require the `regenHelp` profile to rebuild their HTML from the source documents. For example, to regenerate the help
|
||||
for Autotools or Meson do:
|
||||
|
||||
```
|
||||
mvn generate-resources -DuseSimrelRepo -f build/org.eclipse.cdt.meson.docs -PregenHelp
|
||||
```
|
||||
|
||||
```
|
||||
mvn generate-resources -DuseSimrelRepo -f build/org.eclipse.cdt.autotools.docs -PregenHelp
|
||||
```
|
||||
|
||||
#### jniheaders
|
||||
|
||||
The `jniheaders` profile can be used on the `core/org.eclipse.cdt.core.native` and
|
||||
`native/org.eclipse.cdt.native.serial` to rebuild the header files for JNI natives.
|
||||
See also `native` property below.
|
||||
|
||||
### Properties
|
||||
|
||||
There are a number of properties (-D to mvn) to control the behaviour of the build. Refer to the
|
||||
pom.xml for the full list. Many of the properties are not intended to be set at the command
|
||||
line.
|
||||
|
||||
#### skipDoc
|
||||
|
||||
Documentation generation for CDT can be time consuming. For local builds this can be skipped
|
||||
with `-DskipDoc=true`
|
||||
|
||||
#### skipTests
|
||||
|
||||
Running tests for CDT can be time consuming. For local builds this can be skipped
|
||||
with `-DskipTests=true`.
|
||||
|
||||
#### excludedGroups to skip slow or flaky tests
|
||||
|
||||
Some tests in CDT are fairly slow to run and rarely are exercising actively changing code. Some tests in CDT are fairly flaky to run and rarely are exercising actively changing code. These tests are excluded from the main CDT builds (both master/branch and gerrit verify jobs) and are instead run in a special job. Therefore the Jenkinsfiles for master/branch and gerrit use excludedGroups by default.
|
||||
|
||||
To skip slow tests use `-DexcludedGroups=slowTest`
|
||||
To skip flaky tests use `-DexcludedGroups=flakyTest`
|
||||
To skip both use `-DexcludedGroups=flakyTest,slowTest`
|
||||
|
||||
See section below on marking tests for how to annotate a test properly.
|
||||
|
||||
#### jgit.dirtyWorkingTree-cdtDefault
|
||||
|
||||
Running a build with uncommitted changes will normally cause an error. To run a build with
|
||||
uncommited changes use `-Djgit.dirtyWorkingTree-cdtDefault=warning`
|
||||
|
||||
#### dsf.gdb.tests.gdbPath
|
||||
|
||||
For running CDT's DSF-GDB tests, this specifies the path to the location of gdb.
|
||||
|
||||
#### cdt.tests.dsf.gdb.versions
|
||||
|
||||
For running CDT's DSF-GDB tests, this specifies the executable names of the gdbs to run, comma-separated.
|
||||
|
||||
There are a few special values that can be specified (see BaseParametrizedTestCase for source):
|
||||
|
||||
- all: run all versions listed in ITestConstants.ALL_KNOWN_VERSIONS
|
||||
- supported: run all versions listed in ITestConstants.ALL_SUPPORTED_VERSIONS
|
||||
- unsupported: run all versions listed in ITestConstants.ALL_UNSUPPORTED_VERSIONS
|
||||
|
||||
The default, defined in the root pom.xml, should be the most recent released version of gdb.
|
||||
|
||||
To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh)
|
||||
|
||||
#### native
|
||||
|
||||
The `native` property can be used to build the native libraries. Defining the `native` property will activate profiles to add the extra steps to compile the natives libraries used by CDT. The main CDT build by default will not build the libraries, but instead use the versions of the libraries checked into git. Therefore when users modify the sources of the native libraries, they have to build and commit the changed library binaries as part of the commit.
|
||||
|
||||
The `releng/scripts/check_code_cleanliness.sh`, which is run on the build machine as part of the gerrit and main build flows, will ensure that the libraries that are checked in are indeed up to date with their sources.
|
||||
|
||||
The `native` property can be one of the following:
|
||||
|
||||
- `linux.x86_64` - uses local tools and builds only linux.x86_64 libraries
|
||||
- `linux.ppc64le` - uses local tools and builds only linux.ppc64le libraries
|
||||
- `docker` - uses CDT's docker releng images to do the native builds for all platforms
|
||||
- `all` - uses local tools to do the native builds for all platforms
|
||||
|
||||
Therefore to build all the natives using docker add `-Dnative=docker` to your maven command line (e.g. `mvn verify -Dnative=docker`).
|
||||
|
||||
To build only the native libraries `mvn process-resources` can be used on the individual bundles with the simrel target platform, e.g.:
|
||||
|
||||
- Serial library: `mvn process-resources -Dnative=docker -DuseSimrelRepo -f native/org.eclipse.cdt.native.serial`
|
||||
- Core library: `mvn process-resources -Dnative=docker -DuseSimrelRepo -f core/org.eclipse.cdt.core.native`
|
||||
|
||||
However, the challenge is that dll files on Windows have a timestamp in them. To have reproducible builds, we need to have a reproducible timestamp. As [Microsoft](https://devblogs.microsoft.com/oldnewthing/20180103-00/?p=97705) has moved away from using a timestamp to rather use a hash of the source files as the value, we therefore hash the source files used by the library and the header files for the Java API and use that as the value.
|
||||
|
||||
An additional tip is to set the following in `.gitconfig` to allow you to diff `.dll` files. This will show the timestamp of the DLL in the diff as part of the DLL headers.
|
||||
|
||||
```
|
||||
[diff "dll"]
|
||||
textconv = objdump -x
|
||||
binary = true
|
||||
```
|
||||
|
||||
When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.)
|
||||
|
||||
`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'`
|
||||
|
||||
See also `jniheaders` profile above.
|
||||
|
||||
### Marking tests as Slow or Flaky
|
||||
|
||||
Tests in CDT can be marked as Slow or Flaky to prevent them running as part of the standard test suites. See excludedGroups to skip slow or flaky tests sections above.
|
||||
|
||||
The proper way to mark a test as slow or flaky is to add a JUnit5 @Tag on the test with `flakyTest` or `slowTest`. The canonical values for these are in the JUnit5 base test `org.eclipse.cdt.core.testplugin.util.BaseTestCase5`.
|
||||
|
||||
These tags can only be applied to JUnit5 (aka Jupiter) tests. If a test needs converting, do that in a separate commit before adding the tags so that the test refactoring can be verified before excluding the test from normal runs.
|
||||
|
||||
### Converting tests to JUnit5
|
||||
|
||||
To take advantage of new features, such as excluding flaky and slow tests, individual tests need to JUnit5 (aka Jupiter). If a test is currently written in JUnit4 or JUnit3 style it needs to be converted to JUnit5 first. Those tests that currently derive from `org.eclipse.cdt.core.testplugin.util.BaseTestCase` can change to `org.eclipse.cdt.core.testplugin.util.BaseTestCase5` and make further adjustments. Common adjustments are:
|
||||
- refactoring `setUp`/`tearDown` methods to use `@BeforeEach` and `@AfterEach` annotations
|
||||
- refactor complicated uses of TestSuites in JUnit3 that were workarounds for the lack of JUnit features like `@BeforeAll` and `@AfterAll`.
|
||||
- add `@Test` annotation (make sure to use `org.junit.jupiter.api.Test` and not JUnit4's `org.junit.Test`)
|
||||
- statically import assert methods from `org.junit.jupiter.api.Assertions` (note that in JUnit5 the message is now last instead of first, this generally leads to an error by changing the imports, except in the case of `assertEquals` where the first and third parameter are `String`)
|
||||
|
5
build/org.eclipse.cdt.autotools-feature/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin
|
||||
@dot
|
||||
javaCompiler...args
|
||||
build.xml
|
||||
target
|
17
build/org.eclipse.cdt.autotools-feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.autotools-feature</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
3
build/org.eclipse.cdt.autotools-feature/build.properties
Normal file
|
@ -0,0 +1,3 @@
|
|||
bin.includes = feature.xml,\
|
||||
feature.properties,\
|
||||
p2.inf
|
22
build/org.eclipse.cdt.autotools-feature/feature.properties
Normal file
|
@ -0,0 +1,22 @@
|
|||
#################################################################################
|
||||
# Copyright (c) 2008 Red Hat, Inc.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License 2.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
#################################################################################
|
||||
featureName=C/C++ Autotools support
|
||||
description=Plugins for maintaining C/C++ projects that use Autotools (autoconf and automake).
|
||||
provider=Eclipse CDT
|
||||
copyright=\
|
||||
Copyright (c) 2006, 2018 Red Hat, Inc. and others.\n\
|
||||
This program and the accompanying materials\n\
|
||||
are made available under the terms of the Eclipse Public License 2.0\n\
|
||||
which accompanies this distribution, and is available at\n\
|
||||
https://www.eclipse.org/legal/epl-2.0/
|
76
build/org.eclipse.cdt.autotools-feature/feature.xml
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2008, 2021 Contributors to the Eclipse Foundation
|
||||
|
||||
This program and the accompanying materials
|
||||
are made available under the terms of the Eclipse Public License 2.0
|
||||
which accompanies this distribution, and is available at
|
||||
https://www.eclipse.org/legal/epl-2.0/
|
||||
|
||||
SPDX-License-Identifier: EPL-2.0
|
||||
-->
|
||||
<feature
|
||||
id="org.eclipse.cdt.autotools"
|
||||
label="%featureName"
|
||||
version="10.5.0.qualifier"
|
||||
provider-name="%provider"
|
||||
plugin="org.eclipse.cdt.autotools.ui"
|
||||
license-feature="org.eclipse.license"
|
||||
license-feature-version="0.0.0">
|
||||
|
||||
<description>
|
||||
%description
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
%copyright
|
||||
</copyright>
|
||||
|
||||
<license url="%licenseURL">
|
||||
%license
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import plugin="org.eclipse.cdt.managedbuilder.core" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.core" version="5.1.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.ui" version="5.1.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.managedbuilder.ui" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.managedbuilder.gnu.ui" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.cheatsheets"/>
|
||||
<import plugin="org.eclipse.ui" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.runtime" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.jface.text" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.editors" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.resources" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.ide" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.make.core" version="5.1.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.make.ui" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.console" version="3.3.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.help" version="3.3.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.variables" version="3.2.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.views" version="3.3.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.filesystem" version="1.2.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.cdt.autotools.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.cdt.autotools.ui"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.cdt.autotools.docs"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
</feature>
|
6
build/org.eclipse.cdt.autotools-feature/p2.inf
Normal file
|
@ -0,0 +1,6 @@
|
|||
update.id=org.eclipse.linuxtools.cdt.autotools.feature.group
|
||||
update.range=(0,$version$)
|
||||
provides.99.namespace=org.eclipse.equinox.p2.iu
|
||||
provides.99.name=org.eclipse.linuxtools.cdt.autotools.feature.group
|
||||
provides.99.version=$version$
|
||||
|
7
build/org.eclipse.cdt.autotools.core/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
56
build/org.eclipse.cdt.autotools.core/.gitignore
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
bin
|
||||
@dot
|
||||
javaCompiler...args
|
||||
build.xml
|
||||
target
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
||||
/bin
|
34
build/org.eclipse.cdt.autotools.core/.project
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.autotools.core</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,486 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
|
||||
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
|
||||
org.eclipse.jdt.core.builder.invalidClasspath=abort
|
||||
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
|
||||
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend
|
||||
org.eclipse.jdt.core.circularClasspath=error
|
||||
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
|
||||
org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error
|
||||
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
|
||||
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.localPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.localSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
|
||||
org.eclipse.jdt.core.compiler.problem.APILeak=warning
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.align_with_spaces=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true
|
||||
org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=120
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=true
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
|
||||
org.eclipse.jdt.core.incompleteClasspath=error
|
||||
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
|
|
@ -0,0 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning
|
||||
org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
|
|
@ -0,0 +1,133 @@
|
|||
cleanup.add_default_serial_version_id=true
|
||||
cleanup.add_generated_serial_version_id=false
|
||||
cleanup.add_missing_annotations=true
|
||||
cleanup.add_missing_deprecated_annotations=true
|
||||
cleanup.add_missing_methods=false
|
||||
cleanup.add_missing_nls_tags=false
|
||||
cleanup.add_missing_override_annotations=true
|
||||
cleanup.add_missing_override_annotations_interface_methods=true
|
||||
cleanup.add_serial_version_id=false
|
||||
cleanup.always_use_blocks=true
|
||||
cleanup.always_use_parentheses_in_expressions=false
|
||||
cleanup.always_use_this_for_non_static_field_access=false
|
||||
cleanup.always_use_this_for_non_static_method_access=false
|
||||
cleanup.convert_functional_interfaces=false
|
||||
cleanup.convert_to_enhanced_for_loop=false
|
||||
cleanup.correct_indentation=false
|
||||
cleanup.format_source_code=true
|
||||
cleanup.format_source_code_changes_only=false
|
||||
cleanup.insert_inferred_type_arguments=false
|
||||
cleanup.make_local_variable_final=true
|
||||
cleanup.make_parameters_final=false
|
||||
cleanup.make_private_fields_final=true
|
||||
cleanup.make_type_abstract_if_missing_method=false
|
||||
cleanup.make_variable_declarations_final=false
|
||||
cleanup.never_use_blocks=false
|
||||
cleanup.never_use_parentheses_in_expressions=true
|
||||
cleanup.organize_imports=true
|
||||
cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
cleanup.remove_private_constructors=true
|
||||
cleanup.remove_redundant_modifiers=false
|
||||
cleanup.remove_redundant_semicolons=true
|
||||
cleanup.remove_redundant_type_arguments=true
|
||||
cleanup.remove_trailing_whitespaces=true
|
||||
cleanup.remove_trailing_whitespaces_all=true
|
||||
cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
cleanup.remove_unnecessary_casts=true
|
||||
cleanup.remove_unnecessary_nls_tags=false
|
||||
cleanup.remove_unused_imports=true
|
||||
cleanup.remove_unused_local_variables=false
|
||||
cleanup.remove_unused_private_fields=true
|
||||
cleanup.remove_unused_private_members=false
|
||||
cleanup.remove_unused_private_methods=true
|
||||
cleanup.remove_unused_private_types=true
|
||||
cleanup.sort_members=false
|
||||
cleanup.sort_members_all=false
|
||||
cleanup.use_anonymous_class_creation=false
|
||||
cleanup.use_blocks=false
|
||||
cleanup.use_blocks_only_for_return_and_throw=false
|
||||
cleanup.use_lambda=true
|
||||
cleanup.use_parentheses_in_expressions=false
|
||||
cleanup.use_this_for_non_static_field_access=false
|
||||
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
cleanup.use_this_for_non_static_method_access=false
|
||||
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||
cleanup_profile=_CDT
|
||||
cleanup_settings_version=2
|
||||
eclipse.preferences.version=1
|
||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||
formatter_profile=_CDT
|
||||
formatter_settings_version=14
|
||||
internal.default.compliance=user
|
||||
org.eclipse.jdt.ui.exception.name=e
|
||||
org.eclipse.jdt.ui.gettersetter.use.is=true
|
||||
org.eclipse.jdt.ui.ignorelowercasenames=true
|
||||
org.eclipse.jdt.ui.importorder=java;javax;org;com;
|
||||
org.eclipse.jdt.ui.keywordthis=false
|
||||
org.eclipse.jdt.ui.ondemandthreshold=1000
|
||||
org.eclipse.jdt.ui.overrideannotation=true
|
||||
org.eclipse.jdt.ui.staticondemandthreshold=1000
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=
|
||||
sp_cleanup.add_default_serial_version_id=true
|
||||
sp_cleanup.add_generated_serial_version_id=false
|
||||
sp_cleanup.add_missing_annotations=true
|
||||
sp_cleanup.add_missing_deprecated_annotations=true
|
||||
sp_cleanup.add_missing_methods=false
|
||||
sp_cleanup.add_missing_nls_tags=false
|
||||
sp_cleanup.add_missing_override_annotations=true
|
||||
sp_cleanup.add_missing_override_annotations_interface_methods=true
|
||||
sp_cleanup.add_serial_version_id=false
|
||||
sp_cleanup.always_use_blocks=true
|
||||
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||
sp_cleanup.convert_functional_interfaces=false
|
||||
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||
sp_cleanup.correct_indentation=false
|
||||
sp_cleanup.format_source_code=true
|
||||
sp_cleanup.format_source_code_changes_only=false
|
||||
sp_cleanup.insert_inferred_type_arguments=false
|
||||
sp_cleanup.make_local_variable_final=true
|
||||
sp_cleanup.make_parameters_final=false
|
||||
sp_cleanup.make_private_fields_final=true
|
||||
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||
sp_cleanup.make_variable_declarations_final=false
|
||||
sp_cleanup.never_use_blocks=false
|
||||
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||
sp_cleanup.on_save_use_additional_actions=true
|
||||
sp_cleanup.organize_imports=true
|
||||
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
sp_cleanup.remove_private_constructors=true
|
||||
sp_cleanup.remove_redundant_modifiers=false
|
||||
sp_cleanup.remove_redundant_semicolons=true
|
||||
sp_cleanup.remove_redundant_type_arguments=true
|
||||
sp_cleanup.remove_trailing_whitespaces=true
|
||||
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
sp_cleanup.remove_unnecessary_casts=true
|
||||
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||
sp_cleanup.remove_unused_imports=true
|
||||
sp_cleanup.remove_unused_local_variables=false
|
||||
sp_cleanup.remove_unused_private_fields=true
|
||||
sp_cleanup.remove_unused_private_members=false
|
||||
sp_cleanup.remove_unused_private_methods=true
|
||||
sp_cleanup.remove_unused_private_types=true
|
||||
sp_cleanup.sort_members=false
|
||||
sp_cleanup.sort_members_all=false
|
||||
sp_cleanup.use_anonymous_class_creation=false
|
||||
sp_cleanup.use_blocks=false
|
||||
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||
sp_cleanup.use_lambda=true
|
||||
sp_cleanup.use_parentheses_in_expressions=false
|
||||
sp_cleanup.use_this_for_non_static_field_access=false
|
||||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
sp_cleanup.use_this_for_non_static_method_access=false
|
||||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
|
@ -0,0 +1,184 @@
|
|||
ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
|
||||
API_USE_SCAN_FIELD_SEVERITY=Error
|
||||
API_USE_SCAN_METHOD_SEVERITY=Error
|
||||
API_USE_SCAN_TYPE_SEVERITY=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
|
||||
FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
|
||||
FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error
|
||||
FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
|
||||
ILLEGAL_EXTEND=Warning
|
||||
ILLEGAL_IMPLEMENT=Warning
|
||||
ILLEGAL_INSTANTIATE=Warning
|
||||
ILLEGAL_OVERRIDE=Warning
|
||||
ILLEGAL_REFERENCE=Warning
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
INVALID_ANNOTATION=Ignore
|
||||
INVALID_JAVADOC_TAG=Error
|
||||
INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
|
||||
LEAK_EXTEND=Warning
|
||||
LEAK_FIELD_DECL=Warning
|
||||
LEAK_IMPLEMENT=Warning
|
||||
LEAK_METHOD_PARAM=Warning
|
||||
LEAK_METHOD_RETURN_TYPE=Warning
|
||||
METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
MISSING_EE_DESCRIPTIONS=Warning
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
UNUSED_PROBLEM_FILTERS=Warning
|
||||
automatically_removed_unused_problem_filters=false
|
||||
changed_execution_env=Error
|
||||
eclipse.preferences.version=1
|
||||
incompatible_api_component_version=Error
|
||||
incompatible_api_component_version_include_major_without_breaking_change=Disabled
|
||||
incompatible_api_component_version_include_minor_without_api_change=Disabled
|
||||
incompatible_api_component_version_report_major_without_breaking_change=Warning
|
||||
incompatible_api_component_version_report_minor_without_api_change=Warning
|
||||
invalid_since_tag_version=Error
|
||||
malformed_since_tag=Error
|
||||
missing_since_tag=Error
|
||||
report_api_breakage_when_major_version_incremented=Disabled
|
||||
report_resolution_errors_api_component=Warning
|
|
@ -0,0 +1,35 @@
|
|||
compilers.f.unresolved-features=1
|
||||
compilers.f.unresolved-plugins=1
|
||||
compilers.incompatible-environment=1
|
||||
compilers.p.build=1
|
||||
compilers.p.build.bin.includes=1
|
||||
compilers.p.build.encodings=2
|
||||
compilers.p.build.java.compiler=2
|
||||
compilers.p.build.java.compliance=1
|
||||
compilers.p.build.missing.output=2
|
||||
compilers.p.build.output.library=1
|
||||
compilers.p.build.source.library=1
|
||||
compilers.p.build.src.includes=1
|
||||
compilers.p.deprecated=1
|
||||
compilers.p.discouraged-class=1
|
||||
compilers.p.internal=1
|
||||
compilers.p.missing-packages=2
|
||||
compilers.p.missing-version-export-package=2
|
||||
compilers.p.missing-version-import-package=2
|
||||
compilers.p.missing-version-require-bundle=2
|
||||
compilers.p.no-required-att=0
|
||||
compilers.p.no.automatic.module=1
|
||||
compilers.p.not-externalized-att=1
|
||||
compilers.p.service.component.without.lazyactivation=1
|
||||
compilers.p.unknown-attribute=1
|
||||
compilers.p.unknown-class=1
|
||||
compilers.p.unknown-element=1
|
||||
compilers.p.unknown-identifier=1
|
||||
compilers.p.unknown-resource=1
|
||||
compilers.p.unresolved-ex-points=0
|
||||
compilers.p.unresolved-import=0
|
||||
compilers.s.create-docs=false
|
||||
compilers.s.doc-folder=doc
|
||||
compilers.s.open-tags=1
|
||||
compilers.use-project=true
|
||||
eclipse.preferences.version=1
|
36
build/org.eclipse.cdt.autotools.core/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,36 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name.0
|
||||
Bundle-SymbolicName: org.eclipse.cdt.autotools.core;singleton:=true
|
||||
Bundle-Version: 2.1.100.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.autotools.core.AutotoolsPlugin
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
|
||||
org.eclipse.core.runtime;bundle-version="3.4.0",
|
||||
org.eclipse.jface.text;bundle-version="3.4.0",
|
||||
org.eclipse.ui.editors;bundle-version="3.4.0",
|
||||
org.eclipse.ui.workbench.texteditor;bundle-version="3.4.0",
|
||||
org.eclipse.core.resources;bundle-version="3.4.0",
|
||||
org.eclipse.ui.ide;bundle-version="3.4.0",
|
||||
org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
|
||||
org.eclipse.cdt.core;bundle-version="6.5.0",
|
||||
org.eclipse.cdt.ui;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.100",
|
||||
org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
|
||||
org.eclipse.cdt.make.core;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.make.ui;bundle-version="5.0.100",
|
||||
org.eclipse.ui.console;bundle-version="3.3.0",
|
||||
org.eclipse.help;bundle-version="3.3.100",
|
||||
org.eclipse.core.variables;bundle-version="3.2.100",
|
||||
org.eclipse.ui.views;bundle-version="3.3.0",
|
||||
org.eclipse.core.filesystem;bundle-version="1.2.0",
|
||||
org.eclipse.remote.core;bundle-version="2.0.0",
|
||||
org.eclipse.cdt.remote.core;bundle-version="1.0.1"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Vendor: %provider
|
||||
Export-Package: org.eclipse.cdt.autotools.core;x-friends:="org.eclipse.cdt.autotools.ui",
|
||||
org.eclipse.cdt.internal.autotools.core;x-friends:="org.eclipse.cdt.autotools.ui",
|
||||
org.eclipse.cdt.internal.autotools.core.configure;x-friends:="org.eclipse.cdt.autotools.ui",
|
||||
org.eclipse.cdt.internal.autotools.core.wizards;x-friends:="org.eclipse.cdt.autotools.ui"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Automatic-Module-Name: org.eclipse.cdt.autotools.core
|
36
build/org.eclipse.cdt.autotools.core/about.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title>About</title>
|
||||
</head>
|
||||
<body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>November 30, 2017</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>
|
||||
The Eclipse Foundation makes available all content in this plug-in
|
||||
("Content"). Unless otherwise indicated below, the Content
|
||||
is provided to you under the terms and conditions of the Eclipse
|
||||
Public License Version 2.0 ("EPL"). A copy of the EPL is
|
||||
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you did not receive this Content directly from the Eclipse
|
||||
Foundation, the Content is being redistributed by another party
|
||||
("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the
|
||||
Redistributor's license that was provided with the Content. If no such
|
||||
license exists, contact the Redistributor. Unless otherwise indicated
|
||||
below, the terms and conditions of the EPL still apply to any source
|
||||
code in the Content and such source code may be obtained at <a
|
||||
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
9
build/org.eclipse.cdt.autotools.core/build.properties
Normal file
|
@ -0,0 +1,9 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = plugin.xml,\
|
||||
META-INF/,\
|
||||
.,\
|
||||
html/,\
|
||||
about.html,\
|
||||
plugin.properties
|
||||
src.includes = about.html
|
13
build/org.eclipse.cdt.autotools.core/html/maintopic.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Main Topic</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Main Topic</h1>
|
||||
Please enter your text here.
|
||||
</body>
|
||||
</html>
|
13
build/org.eclipse.cdt.autotools.core/html/subtopic.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Sub Topic</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Sub Topic</h1>
|
||||
Please enter your text here.
|
||||
</body>
|
||||
</html>
|
13
build/org.eclipse.cdt.autotools.core/html/toc.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Table of Contents</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Table of Contents</h1>
|
||||
Please enter your text here.
|
||||
</body>
|
||||
</html>
|
189
build/org.eclipse.cdt.autotools.core/plugin.properties
Normal file
|
@ -0,0 +1,189 @@
|
|||
#################################################################################
|
||||
# Copyright (c) 2006, 2012 Red Hat, Inc.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License 2.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
# IBM Corporation
|
||||
#################################################################################
|
||||
ConvertWizard.description=Convert to C/C++ Autotools Project
|
||||
NewCProject.description=GNU C Autotools Project
|
||||
NewCProjectV2.description=GNU C Autotools Project V2
|
||||
NewCCProject.description=GNU C++ Autotools Project
|
||||
NewCWizard.name=GNU C Autotools Project
|
||||
NewCWizardV2.name=GNU C Autotools Project V2
|
||||
NewCCWizard.name=GNU C++ Autotools Project
|
||||
|
||||
Autotools.wizard.name=GNU Autotools Build Wizard
|
||||
|
||||
Autoconf.editor.name=Autoconf Editor
|
||||
|
||||
BuildProperty.value.name.default=Default;
|
||||
BuildProperty.value.name.debug=Debug
|
||||
BuildProperty.type.name.autotools=GNU Autotools
|
||||
|
||||
PreferenceAutotools.name=Autotools
|
||||
PreferenceAutomakeEditor.name=Automake Editor
|
||||
PreferenceAutoconfEditor.name=Autoconf Editor
|
||||
|
||||
PropertyAutotools.name=Autotools
|
||||
PropertyAutotools.general.name=General
|
||||
PropertyAutotools.configure.name=Configure Settings
|
||||
PropertyTabEditor.name=Editors
|
||||
AutotoolsBuildPropertyTab.name=Behaviour
|
||||
AutotoolsEditorsPropertyTab.name=Editors
|
||||
AutotoolsToolsPropertyTab.name=Tools Settings
|
||||
AutotoolsConfigurePropertyTab.name=Configure Settings
|
||||
|
||||
PropertyTabEditor.tooltip=Set options for Autotools-specific editors
|
||||
PropertyTabBuild.tooltip=Set additional Autotools build options
|
||||
|
||||
Makefile.builder.name=Autotools Makefile Generator
|
||||
Autotools.projecttype.name=GNU Autotools
|
||||
AutotoolsNature.name=Autotools Project Nature
|
||||
AutotoolsNewNature.name=Autotools Project Nature V2
|
||||
Configuration.build.name=Build (GNU)
|
||||
Configuration.debug.name=Debug (GNU)
|
||||
Autotools.targetplatform.name=GNU Autotools Target Platform
|
||||
Autotools.gnu.toolchain.name=GNU Autotools Toolchain
|
||||
Configure.outputType=Configure Output (config.status)
|
||||
Autogen.outputType=Autogen Output (configure)
|
||||
|
||||
CommandCategorySource.name=Source
|
||||
CommandCategorySource.description=Source commands
|
||||
CommandCategoryTools.name=Tools
|
||||
CommandCategoryTools.description=Autotool tools
|
||||
ShowTooltip.name=Show Tooltip Description
|
||||
ShowTooltip.description=Shows the tooltip description for the element at the cursor
|
||||
|
||||
# Scope and Key Commands
|
||||
ACeditor.scope.name=Autoconf Editor
|
||||
ACeditor.scope.description=Editor for Autoconf Configuration Source Files
|
||||
|
||||
Tool.configure=configure
|
||||
|
||||
OptionCategory.configure.general=General
|
||||
Option.configure.name=Name
|
||||
Option.configure.builddir=Build directory
|
||||
Option.configure.builddir.tip=Subdirectory off of project where build will occur
|
||||
Option.configure.configdir=Configure tool directory
|
||||
Option.configure.configdir.tip=Subdirectory off of project containing configure scripts
|
||||
Option.configure.cache_file=Name of configuration cache file (--cache-file)
|
||||
Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
|
||||
Option.configure.no_create=Turn off file creation <not advised> (--no-create)
|
||||
Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
|
||||
Option.configure.quiet=Turn off checking messages (--quiet)
|
||||
Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
|
||||
Option.configure.help=Display help contents of top-level configuration (--help)
|
||||
Option.configure.help.tip=Ask configuration file to display its help documentation
|
||||
Option.configure.version=Display version of autotools used to create configuration (--version)
|
||||
Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
|
||||
|
||||
OptionCategory.configure.platform=Platform Specifiers
|
||||
Option.configure.host=Host platform (--host)
|
||||
Option.configure.host.tip=Platform that project will run on
|
||||
Option.configure.target=Target platform (--target)
|
||||
Option.configure.target.tip=Platform that project will target output for
|
||||
Option.configure.build=Build platform (--build)
|
||||
Option.configure.build.tip=Platform where project is being built
|
||||
|
||||
OptionCategory.configure.directories=Directory specifiers
|
||||
Option.configure.prefix=Arch-independent install directory (--prefix)
|
||||
Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
|
||||
Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
|
||||
Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
|
||||
Option.configure.libdir=Object code library directory (--libdir)
|
||||
Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
|
||||
Option.configure.bindir=User executable directory (--bindir)
|
||||
Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
|
||||
Option.configure.sbindir=System admin executable directory (--sbindir)
|
||||
Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
|
||||
Option.configure.includedir=C Header file directory (--includdir)
|
||||
Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
|
||||
Option.configure.datadir=Read-only architecture-independent data (--datadir)
|
||||
Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
|
||||
Option.configure.sysconfdir=Read-only single-machine data directory (--syconfdir)
|
||||
Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
|
||||
Option.configure.infodir=Info file documentation directory (--infodir)
|
||||
Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
|
||||
Option.configure.mandir=Man file documentation directory (--mandir)
|
||||
Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
|
||||
Option.configure.srcdir=Sources directory (--srcdir)
|
||||
Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
|
||||
Option.configure.localstatedir=Modifiable single-machine data directory (--localstatedir)
|
||||
Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
|
||||
Option.configure.sharedstatedir=Modifiable architecture-independent data directory (--sharedstatedir)
|
||||
Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com]
|
||||
Option.configure.libexecdir=Program executable directory (--libexecdir)
|
||||
Option.configure.libexecdir.tip=Place where program executables will be installed [EPREFIX/libexec]
|
||||
Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
|
||||
Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
|
||||
|
||||
OptionCategory.configure.filenames=File-name transformations
|
||||
Option.configure.program_prefix=Installed program prefix (--program-prefix)
|
||||
Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
|
||||
Option.configure.program_suffix=Installed program suffix (--program-suffix)
|
||||
Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
|
||||
Option.configure.program_transform_name=Installed program name transform (--program-transform-name)
|
||||
Option.configure.program_transform_name.tip=A sed string used to transform installed program names
|
||||
|
||||
OptionCategory.configure.features=Features and packages
|
||||
Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
|
||||
Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
|
||||
Option.configure.user=User-specified configuration options
|
||||
Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
|
||||
|
||||
Tool.autogen = autogen.sh
|
||||
|
||||
OptionCategory.autogen.general=Options
|
||||
Option.autogen.user=Command line options
|
||||
Option.autogen.user.tip=Specify options to pass to the top-level autogen.sh script
|
||||
|
||||
RedHatVendor.name = Red Hat
|
||||
Bundle-Name.0 = Autotools Plug-in
|
||||
provider=Eclipse CDT
|
||||
ConvertWizard.name = Convert to a C/C++ Autotools Project
|
||||
InvokeAutotools.label = Invoke Autotools
|
||||
InvokeAutotools.mnemonic = I
|
||||
InvokeAutoconf.label = Invoke Autoconf
|
||||
InvokeAutoconf.mnemonic = c
|
||||
InvokeAutoconf.description = Run autoconf in the selected directory
|
||||
InvokeAutoheader.label = Invoke Autoheader
|
||||
InvokeAutoheader.mnemonic = h
|
||||
InvokeAutoheader.description = Run autoheader from the selected directory
|
||||
InvokeAutomake.label = Invoke Automake
|
||||
InvokeAutomake.mnemonic = m
|
||||
InvokeAutomake.description = Run automake from the selected directory
|
||||
InvokeAutoreconf.label = Invoke Autoreconf
|
||||
InvokeAutoreconf.mnemonic = r
|
||||
InvokeAutoreconf.description = Run autoreconf from the selected directory
|
||||
InvokeAclocal.label = Invoke Aclocal
|
||||
InvokeAclocal.mnemonic = l
|
||||
InvokeAclocal.description = Run aclocal from the selected directory
|
||||
InvokeLibtoolize.label = Invoke Libtoolize
|
||||
InvokeLibtoolize.mnemonic = t
|
||||
InvokeLibtoolize.description = Run libtoolize in the selected directory
|
||||
Reconfigure.label = Reconfigure Project
|
||||
Reconfigure.mnemonic = f
|
||||
Reconfigure.description = Run configuration scripts for project
|
||||
DynamicBuild.label = Dynamic Build Info
|
||||
GetIncludePath.label = Get Include Path
|
||||
GetDefinedSymbols.label = Get Defined Symbols
|
||||
IncludesOption.name = includes
|
||||
SymbolsOption.name = symbols
|
||||
AutomakeEditor.name = AutomakeEditor
|
||||
Automake.name = automake
|
||||
ConfigureScript.name=Configure Script
|
||||
AutogenScript.name=Autogen Script
|
||||
LibtoolGCCBuildOutputParser.name = CDT Libtool GCC Build Output Parser
|
||||
|
||||
AutotoolsProblemMarker.name=Configure Problem
|
||||
AutotoolsErrorParser.name=Autotools Error Parser
|
||||
|
||||
AutoconfErrorParser.name=Autoconf Error Parser
|
659
build/org.eclipse.cdt.autotools.core/plugin.xml
Normal file
|
@ -0,0 +1,659 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.0"?>
|
||||
<plugin>
|
||||
|
||||
<extension
|
||||
id="autotoolsProperties"
|
||||
name="Autotools Build Properties"
|
||||
point="org.eclipse.cdt.managedbuilder.core.buildProperties">
|
||||
<propertyValue
|
||||
property="org.eclipse.cdt.build.core.buildType"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
|
||||
name="%BuildProperty.value.name.default"/>
|
||||
<propertyValue
|
||||
property="org.eclipse.cdt.build.core.buildType"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildType.debug"
|
||||
name="%BuildProperty.value.name.debug"/>
|
||||
<propertyValue
|
||||
property="org.eclipse.cdt.build.core.buildArtefactType"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
|
||||
name="%BuildProperty.type.name.autotools"/>
|
||||
</extension>
|
||||
<extension
|
||||
id="cdt.autotools.core.managed.build.info"
|
||||
name="Autotools Managed Build Info"
|
||||
point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
|
||||
<managedBuildRevision fileVersion="4.0.0"/>
|
||||
<tool
|
||||
command="configure"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"
|
||||
isAbstract="false"
|
||||
name="%Tool.configure"
|
||||
natureFilter="both"
|
||||
supportsManagedBuild="false">
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
name="%OptionCategory.configure.general"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.name"
|
||||
resourceFilter="all"
|
||||
valueHandler="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
valueType="string">
|
||||
</option>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
defaultValue="build"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.builddir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.builddir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.builddir.tip"
|
||||
valueHandler="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
valueType="string"/>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.configdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.configdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.configdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--cache-file="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.cache_file"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.cache_file"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.cache_file.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--help"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.help"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.help"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.help.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--no-create"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.no_create"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.no_create"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.no_create.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--quiet"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.quiet"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.quiet"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.quiet.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--version"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.version"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.version"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.version.tip"
|
||||
valueType="boolean"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
name="%OptionCategory.configure.platform"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
command="--host="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.host"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.host"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.host.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
command="--target="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.target"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.target"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.target.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
command="--build="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.build"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.build"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.build.tip"
|
||||
valueType="string"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
name="%OptionCategory.configure.directories"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--prefix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.prefix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.prefix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.prefix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--exec-prefix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.exec_prefix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.exec_prefix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.exec_prefix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--libdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.libdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.libdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.libdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--bindir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.bindir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.bindir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.bindir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--sbindir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sbindir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.sbindir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.sbindir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--includedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.includedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.includedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.includedir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--datadir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.datadir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.datadir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.datadir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--sysconfdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sysconfdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.sysconfdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.sysconfdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--infodir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.infodir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.infodir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.infodir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--mandir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.mandir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.mandir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.mandir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--srcdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.srcdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.srcdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.srcdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--localstatedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.localstatedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.localstatedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.localstatedir"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--sharedstatedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sharedstatedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.sharedstatedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.sharedstatedir"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--libexecdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.libexecdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.libexecdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.libexecdir"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--oldincludedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.oldincludedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.oldincludedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.oldincludedir.tip"
|
||||
valueType="string"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
name="%OptionCategory.configure.filenames"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
command="--program-prefix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.program_prefix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.program_prefix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.program_prefix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
command="--program-suffix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.program_suffix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.program_suffix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.program_suffix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
command="--program-transform-name="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.program_transform_name"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.program_transform_name"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.program_transform_name.tip"
|
||||
valueType="string"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
|
||||
name="%OptionCategory.configure.features"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
|
||||
command="--enable-maintainer-mode"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.enable_maintainer_mode"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.enable_maintainer_mode"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.enable_maintainer_mode.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.user"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.user"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.user.tip"
|
||||
valueType="string">
|
||||
<enablement
|
||||
type="CONTAINER_ATTRIBUTE"
|
||||
attribute="defaultValue"
|
||||
value="CFLAGS=-g -O0"
|
||||
extensionAdjustment="false">
|
||||
<checkBuildProperty
|
||||
property="org.eclipse.cdt.build.core.buildType"
|
||||
value="org.eclipse.linuxtools.cdt.autotools.core.buildType.debug"/>
|
||||
</enablement>
|
||||
</option>
|
||||
<outputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.outputType.configure"
|
||||
name="%Configure.outputType"
|
||||
outputs="status"
|
||||
primaryOutput="true"/>
|
||||
<inputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.inputType.configure"
|
||||
multipleOfType="false"
|
||||
sourceContentType="org.eclipse.linuxtools.cdt.autotools.core.configureScript">
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool
|
||||
command="autogen.sh"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen"
|
||||
isAbstract="false"
|
||||
name="%Tool.autogen"
|
||||
natureFilter="both"
|
||||
supportsManagedBuild="false">
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.autogen.general"
|
||||
name="%OptionCategory.autogen.general"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
|
||||
</optionCategory>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.autogen.general"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.autogen.user"
|
||||
isAbstract="false"
|
||||
name="%Option.autogen.user"
|
||||
resourceFilter="all"
|
||||
tip="%Option.autogen.user.tip"
|
||||
valueType="string">
|
||||
</option>
|
||||
<outputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.outputType.autogen"
|
||||
name="%Autogen.outputType"
|
||||
outputNames="configure"
|
||||
primaryOutput="true">
|
||||
</outputType>
|
||||
<inputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.inputType.autogen"
|
||||
multipleOfType="false"
|
||||
sourceContentType="org.eclipse.linuxtools.cdt.autotools.core.autogenScript">
|
||||
</inputType>
|
||||
</tool>
|
||||
<targetPlatform
|
||||
archList="all"
|
||||
binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.MachO64;org.eclipse.cdt.core.PE;org.eclipse.cdt.core.Cygwin_PE"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform"
|
||||
isAbstract="false"
|
||||
name="%Autotools.targetplatform.name"/>
|
||||
<projectType
|
||||
buildArtefactType="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.projectType"
|
||||
isAbstract="false">
|
||||
<configuration
|
||||
buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
|
||||
cleanCommand="rm -rf"
|
||||
errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.configuration.build"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain}"
|
||||
name="%Configuration.build.name">
|
||||
<toolChain
|
||||
archList="all"
|
||||
configurationEnvironmentSupplier="org.eclipse.cdt.internal.autotools.core.AutotoolsEnvironmentVariableSupplier"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolChain"
|
||||
languageSettingsProviders="org.eclipse.cdt.autotools.core.LibtoolGCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||
name="%Autotools.gnu.toolchain.name"
|
||||
supportsManagedBuild="false"
|
||||
targetTool="org.eclipse.linuxtools.cdt.autotools.core.tool.configure">
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.gnu.toolchain.tool.configure"
|
||||
isAbstract="false"
|
||||
natureFilter="both"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.autogen"
|
||||
isAbstract="false"
|
||||
natureFilter="both"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
|
||||
</tool>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc"
|
||||
isAbstract="false"
|
||||
superClass="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
</tool>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp"
|
||||
isAbstract="false"
|
||||
superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
</tool>
|
||||
<targetPlatform
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.targetPlatform"
|
||||
isAbstract="false"
|
||||
name="%Autotools.targetplatform.name"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform">
|
||||
</targetPlatform>
|
||||
<builder
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder"
|
||||
isAbstract="false"
|
||||
isVariableCaseSensitive="false"
|
||||
name="%Makefile.builder.name">
|
||||
</builder>
|
||||
<supportedProperties>
|
||||
<property
|
||||
id="org.eclipse.cdt.build.core.buildArtefactType">
|
||||
<value
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools">
|
||||
</value>
|
||||
</property>
|
||||
</supportedProperties>
|
||||
</toolChain>
|
||||
</configuration>
|
||||
<configuration
|
||||
buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.linuxtools.cdt.autotools.core.buildType.debug"
|
||||
cleanCommand="rm -rf"
|
||||
errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.configuration.build.debug"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain}"
|
||||
name="%Configuration.debug.name">
|
||||
<toolChain
|
||||
archList="all"
|
||||
configurationEnvironmentSupplier="org.eclipse.cdt.internal.autotools.core.AutotoolsEnvironmentVariableSupplier"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolChain.debug"
|
||||
languageSettingsProviders="org.eclipse.cdt.autotools.core.LibtoolGCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||
name="%Autotools.gnu.toolchain.name"
|
||||
supportsManagedBuild="false"
|
||||
targetTool="org.eclipse.linuxtools.cdt.autotools.core.tool.configure">
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.gnu.toolchain.tool.configure.debug"
|
||||
isAbstract="false"
|
||||
natureFilter="both"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.autogen.debug"
|
||||
isAbstract="false"
|
||||
natureFilter="both"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
|
||||
</tool>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc.debug"
|
||||
isAbstract="false"
|
||||
superClass="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
</tool>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp.debug"
|
||||
isAbstract="false"
|
||||
superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
</tool>
|
||||
<targetPlatform
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.targetPlatform.debug"
|
||||
isAbstract="false"
|
||||
name="%Autotools.targetplatform.name"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform">
|
||||
</targetPlatform>
|
||||
<builder
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder.debug"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder"
|
||||
isAbstract="false"
|
||||
isVariableCaseSensitive="false">
|
||||
</builder>
|
||||
<supportedProperties>
|
||||
<property
|
||||
id="org.eclipse.cdt.build.core.buildArtefactType">
|
||||
<value
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools">
|
||||
</value>
|
||||
</property>
|
||||
<property
|
||||
id="org.eclipse.cdt.build.core.buildType">
|
||||
<value
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildType.debug">
|
||||
</value>
|
||||
</property>
|
||||
</supportedProperties>
|
||||
</toolChain>
|
||||
</configuration>
|
||||
</projectType>
|
||||
</extension>
|
||||
<extension
|
||||
id="autotoolsNatureV2"
|
||||
name="%AutotoolsNewNature.name"
|
||||
point="org.eclipse.core.resources.natures">
|
||||
<requires-nature
|
||||
id="org.eclipse.cdt.managedbuilder.core.managedBuildNature">
|
||||
</requires-nature>
|
||||
<runtime>
|
||||
<run
|
||||
class="org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature">
|
||||
</run>
|
||||
</runtime>
|
||||
<builder
|
||||
id="org.eclipse.cdt.autotools.core.genmakebuilderV2">
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
id="genmakebuilderV2"
|
||||
name="%Makefile.builder.name"
|
||||
point="org.eclipse.core.resources.builders">
|
||||
<builder
|
||||
callOnEmptyDelta="true"
|
||||
hasNature="true"
|
||||
isConfigurable="true">
|
||||
<run
|
||||
class="org.eclipse.cdt.internal.autotools.core.AutotoolsConfigurationBuilder">
|
||||
</run>
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.cdt.core.templateProcessTypes">
|
||||
<processType
|
||||
name="NewAutotoolsProject"
|
||||
processRunner="org.eclipse.cdt.internal.autotools.core.wizards.NewAutotoolsProject">
|
||||
<simple
|
||||
name="name">
|
||||
</simple>
|
||||
<simple
|
||||
external="true"
|
||||
name="location"
|
||||
nullable="true">
|
||||
</simple>
|
||||
<simple
|
||||
name="artifactExtension">
|
||||
</simple>
|
||||
<simple
|
||||
external="true"
|
||||
name="isCProject">
|
||||
</simple>
|
||||
</processType>
|
||||
<processType
|
||||
name="SetAutotoolsStringOptionValue"
|
||||
processRunner="org.eclipse.cdt.internal.autotools.core.wizards.SetAutotoolsStringOptionValue">
|
||||
<simple
|
||||
name="name">
|
||||
</simple>
|
||||
<complexArray
|
||||
name="resourcePaths">
|
||||
<baseType>
|
||||
<simple
|
||||
name="id">
|
||||
</simple>
|
||||
<simple
|
||||
name="value">
|
||||
</simple>
|
||||
</baseType>
|
||||
</complexArray>
|
||||
</processType>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.contenttype.contentTypes">
|
||||
<content-type
|
||||
id="org.eclipse.cdt.autotools.core.configureScript"
|
||||
name="%ConfigureScript.name"
|
||||
priority="high">
|
||||
</content-type>
|
||||
<content-type
|
||||
id="org.eclipse.cdt.autotools.core.autogenScript"
|
||||
name="%AutogenScript.name"
|
||||
priority="high">
|
||||
</content-type>
|
||||
<file-association
|
||||
content-type="org.eclipse.cdt.autotools.core.configureScript"
|
||||
file-names="configure">
|
||||
</file-association>
|
||||
<file-association
|
||||
content-type="org.eclipse.cdt.autotools.core.autogenScript"
|
||||
file-names="autogen.sh">
|
||||
</file-association>
|
||||
</extension>
|
||||
<extension
|
||||
id="problem"
|
||||
name="%AutotoolsProblemMarker.name"
|
||||
point="org.eclipse.core.resources.markers">
|
||||
<super
|
||||
type="org.eclipse.cdt.core.problem">
|
||||
</super>
|
||||
<persistent
|
||||
value="true">
|
||||
</persistent>
|
||||
<attribute
|
||||
name="libraryInfo">
|
||||
</attribute>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.ide.markerResolution">
|
||||
<markerResolutionGenerator
|
||||
class="org.eclipse.cdt.internal.autotools.core.MarkerResolutionGenerator"
|
||||
markerType="org.eclipse.cdt.autotools.core.problem">
|
||||
</markerResolutionGenerator>
|
||||
</extension>
|
||||
<extension
|
||||
id="AutoconfErrorParser"
|
||||
name="AutoconfErrorParser"
|
||||
point="org.eclipse.cdt.core.ErrorParser">
|
||||
<errorparser
|
||||
class="org.eclipse.cdt.internal.autotools.core.ErrorParser"
|
||||
id="org.eclipse.cdt.autotools.core.ErrorParser"
|
||||
name="%AutoconfErrorParser.name">
|
||||
</errorparser>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider
|
||||
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser"
|
||||
id="org.eclipse.cdt.autotools.core.LibtoolGCCBuildCommandParser"
|
||||
name="%LibtoolGCCBuildOutputParser.name"
|
||||
parameter="(libtool:\s+compile:\s+)?((g?cc)|([gc]\+\+)|(clang))"
|
||||
prefer-non-shared="true">
|
||||
</provider>
|
||||
</extension>
|
||||
</plugin>
|
|
@ -0,0 +1,251 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2016 Red Hat Inc. and others
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial implementation
|
||||
* IBM Rational Software - add and remove nature static methods
|
||||
* Anna Dushistova (MontaVista) - [402595]Autotools nature loses builders added by contributed wizard pages
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.autotools.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.autotools.core.AutotoolsConfigurationBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||
import org.eclipse.core.resources.ICommand;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IProjectNature;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
public class AutotoolsNewProjectNature implements IProjectNature {
|
||||
|
||||
public static final String AUTOTOOLS_NATURE_ID = "org.eclipse.cdt.autotools.core.autotoolsNatureV2"; //$NON-NLS-1$
|
||||
public static final String OLD_AUTOTOOLS_NATURE_ID = "org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2"; //$NON-NLS-1$
|
||||
public static final String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".genmakebuilder"; //$NON-NLS-1$
|
||||
/**
|
||||
* @since 1.3
|
||||
*/
|
||||
public static final String REMOTE_BUILDER_ID = "org.eclipse.ptp.rdt.sync.cdt.core.SyncBuilder"; //$NON-NLS-1$
|
||||
public static final String OLD_AUTOTOOLS_BUILDER_ID = "org.eclipse.linuxtools.cdt.autotools.genmakebuilder"; //$NON-NLS-1$
|
||||
|
||||
private IProject project;
|
||||
|
||||
@Override
|
||||
public void configure() throws CoreException {
|
||||
addAutotoolsBuilder(project, new NullProgressMonitor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deconfigure() throws CoreException {
|
||||
// TODO remove builder from here
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProject getProject() {
|
||||
return project;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProject(IProject project) {
|
||||
this.project = project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Autotools builder to the project
|
||||
* @param project
|
||||
* @param monitor
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void addAutotoolsBuilder(IProject project, IProgressMonitor monitor) throws CoreException {
|
||||
// Add the builder to the project
|
||||
IProjectDescription description = project.getDescription();
|
||||
ICommand[] commands = description.getBuildSpec();
|
||||
if (checkEquals(commands, getBuildCommandsList(description, commands))) {
|
||||
return;
|
||||
}
|
||||
final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
|
||||
final IProject proj = project;
|
||||
|
||||
Job backgroundJob = new Job("Autotools Set Project Description") {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
|
||||
protected boolean savedAutoBuildingValue;
|
||||
|
||||
@Override
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
turnOffAutoBuild(workspace);
|
||||
IProjectDescription prDescription = proj.getDescription();
|
||||
//Other pieces of wizard might have contributed new builder commands;
|
||||
//need to make sure we are using the most recent ones
|
||||
ICommand[] currentCommands = prDescription.getBuildSpec();
|
||||
ICommand[] newCommands = getBuildCommandsList(prDescription, currentCommands);
|
||||
if (!checkEquals(currentCommands, newCommands)) {
|
||||
prDescription.setBuildSpec(newCommands);
|
||||
proj.setDescription(prDescription, new NullProgressMonitor());
|
||||
}
|
||||
restoreAutoBuild(workspace);
|
||||
}
|
||||
|
||||
protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
savedAutoBuildingValue = workspaceDesc.isAutoBuilding();
|
||||
workspaceDesc.setAutoBuilding(false);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
protected final void restoreAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
workspaceDesc.setAutoBuilding(savedAutoBuildingValue);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
}, rule, IWorkspace.AVOID_UPDATE, monitor);
|
||||
} catch (CoreException e) {
|
||||
return e.getStatus();
|
||||
}
|
||||
IStatus returnStatus = Status.OK_STATUS;
|
||||
return returnStatus;
|
||||
}
|
||||
};
|
||||
backgroundJob.setRule(rule);
|
||||
backgroundJob.schedule();
|
||||
}
|
||||
|
||||
static boolean checkEquals(ICommand[] commands, ICommand[] newCommands) {
|
||||
if (newCommands.length != commands.length) {
|
||||
return false;
|
||||
}
|
||||
for (int j = 0; j < commands.length; ++j) {
|
||||
if (!commands[j].getBuilderName().equals(newCommands[j].getBuilderName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static ICommand[] getBuildCommandsList(IProjectDescription description, ICommand[] commands) {
|
||||
ArrayList<ICommand> commandList = new ArrayList<>();
|
||||
|
||||
// Make sure the Autotools Configuration builder just precedes the Common Builder
|
||||
for (int i = 0; i < commands.length; i++) {
|
||||
ICommand command = commands[i];
|
||||
if (command.getBuilderName().equals(AutotoolsConfigurationBuilder.BUILDER_ID)) {
|
||||
// ignore it
|
||||
} else {
|
||||
if (command.getBuilderName().equals(OLD_AUTOTOOLS_BUILDER_ID)) {
|
||||
ICommand newCommand = description.newCommand();
|
||||
newCommand.setBuilderName(BUILDER_ID);
|
||||
command = newCommand;
|
||||
}
|
||||
// Make sure that the Autotools builder precedes the Managed builder
|
||||
// or the Remote Synchronized builder.
|
||||
if (command.getBuilderName().equals(BUILDER_ID) || command.getBuilderName().equals(REMOTE_BUILDER_ID)) {
|
||||
// add Autotools Configuration builder just before builder
|
||||
ICommand newCommand = description.newCommand();
|
||||
newCommand.setBuilderName(AutotoolsConfigurationBuilder.BUILDER_ID);
|
||||
commandList.add(newCommand);
|
||||
}
|
||||
commandList.add(command);
|
||||
}
|
||||
}
|
||||
return commandList.toArray(new ICommand[commandList.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding an autotools nature to a project.
|
||||
*
|
||||
* @param proj the project to add the autotools nature to.
|
||||
* @param monitor a progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
*/
|
||||
public static void addAutotoolsNature(IProject project, IProgressMonitor monitor) throws CoreException {
|
||||
addNature(project, AUTOTOOLS_NATURE_ID, monitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding a nature to a project.
|
||||
*
|
||||
* @param proj the project to add the nature to.
|
||||
* @param natureId the id of the nature to assign to the project
|
||||
* @param monitor a progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
*/
|
||||
public static void addNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
|
||||
IProjectDescription description = project.getDescription();
|
||||
String[] prevNatures = description.getNatureIds();
|
||||
for (int i = 0; i < prevNatures.length; i++) {
|
||||
if (natureId.equals(prevNatures[i]))
|
||||
return;
|
||||
}
|
||||
String[] newNatures = new String[prevNatures.length + 1];
|
||||
System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
|
||||
newNatures[prevNatures.length] = natureId;
|
||||
description.setNatureIds(newNatures);
|
||||
project.setDescription(description, monitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to remove the autotools nature from a project.
|
||||
*
|
||||
* @param project to remove the autotools nature from
|
||||
* @param mon progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void removeAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
|
||||
removeNature(project, AUTOTOOLS_NATURE_ID, mon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to remove the old autotools nature from a project.
|
||||
*
|
||||
* @param project to remove the old autotools nature from
|
||||
* @param mon progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void removeOldAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
|
||||
removeNature(project, OLD_AUTOTOOLS_NATURE_ID, mon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for removing a project nature from a project.
|
||||
*
|
||||
* @param proj the project to remove the nature from
|
||||
* @param natureId the nature id to remove
|
||||
* @param monitor a progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
*/
|
||||
public static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
|
||||
IProjectDescription description = project.getDescription();
|
||||
String[] prevNatures = description.getNatureIds();
|
||||
List<String> newNatures = new ArrayList<>(Arrays.asList(prevNatures));
|
||||
newNatures.remove(natureId);
|
||||
description.setNatureIds(newNatures.toArray(new String[newNatures.size()]));
|
||||
project.setDescription(description, monitor);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.autotools.core;
|
||||
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
public class AutotoolsOptionConstants {
|
||||
// IAutotoolOption Names
|
||||
public static final String TOOL_CONFIGURE = "configure"; //$NON-NLS-1$
|
||||
public static final String CATEGORY_GENERAL = "general"; //$NON-NLS-1$
|
||||
public static final String OPT_CONFIGDIR = "configdir"; //$NON-NLS-1$
|
||||
public static final String OPT_CACHE_FILE = "cache-file"; //$NON-NLS-1$
|
||||
public static final String OPT_HELP = "help"; //$NON-NLS-1$
|
||||
public static final String OPT_NO_CREATE = "no-create"; //$NON-NLS-1$
|
||||
public static final String OPT_QUIET = "quiet"; //$NON-NLS-1$
|
||||
public static final String OPT_VERSION = "version"; //$NON-NLS-1$
|
||||
public static final String CATEGORY_PLATFORM = "platform"; //$NON-NLS-1$
|
||||
public static final String OPT_HOST = "host"; //$NON-NLS-1$
|
||||
public static final String OPT_BUILD = "build"; //$NON-NLS-1$
|
||||
public static final String OPT_TARGET = "target"; //$NON-NLS-1$
|
||||
public static final String CATEGORY_DIRECTORIES = "directories"; //$NON-NLS-1$
|
||||
public static final String OPT_PREFIX = "prefix"; //$NON-NLS-1$
|
||||
public static final String OPT_EXEC_PREFIX = "exec-prefix"; //$NON-NLS-1$
|
||||
public static final String OPT_LIBDIR = "libdir"; //$NON-NLS-1$
|
||||
public static final String OPT_BINDIR = "bindir"; //$NON-NLS-1$
|
||||
public static final String OPT_SBINDIR = "sbindir"; //$NON-NLS-1$
|
||||
public static final String OPT_INCLUDEDIR = "includedir"; //$NON-NLS-1$
|
||||
public static final String OPT_DATADIR = "datadir"; //$NON-NLS-1$
|
||||
public static final String OPT_SYSCONFDIR = "sysconfdir"; //$NON-NLS-1$
|
||||
public static final String OPT_INFODIR = "infodir"; //$NON-NLS-1$
|
||||
public static final String OPT_MANDIR = "mandir"; //$NON-NLS-1$
|
||||
public static final String OPT_SRCDIR = "srcdir"; //$NON-NLS-1$
|
||||
public static final String OPT_LOCALSTATEDIR = "localstatedir"; //$NON-NLS-1$
|
||||
public static final String OPT_SHAREDSTATEDIR = "sharedstatedir"; //$NON-NLS-1$
|
||||
public static final String OPT_LIBEXECDIR = "libexecdir"; //$NON-NLS-1$
|
||||
public static final String OPT_OLDINCLUDEDIR = "oldincludedir"; //$NON-NLS-1$
|
||||
public static final String CATEGORY_FILENAMES = "filenames"; //$NON-NLS-1$
|
||||
public static final String OPT_PROGRAM_PREFIX = "program-prefix"; //$NON-NLS-1$
|
||||
public static final String OPT_PROGRAM_SUFFIX = "program-suffix"; //$NON-NLS-1$
|
||||
public static final String OPT_PROGRAM_TRANSFORM_NAME = "program-transform-name"; //$NON-NLS-1$
|
||||
public static final String CATEGORY_FEATURES = "features"; //$NON-NLS-1$
|
||||
public static final String OPT_ENABLE_MAINTAINER_MODE = "enable-maintainer-mode"; //$NON-NLS-1$
|
||||
public static final String FLAG_CFLAGS = "CFLAGS"; //$NON-NLS-1$
|
||||
/**
|
||||
* @since 1.4
|
||||
*/
|
||||
public static final String FLAG_CFLAGS_FLAGS = "CFLAGS|CXXFLAGS"; //$NON-NLS-1$
|
||||
public static final String OPT_CFLAGS_DEBUG = "cflags-debug"; //$NON-NLS-1$
|
||||
public static final String OPT_CFLAGS_GPROF = "cflags-gprof"; //$NON-NLS-1$
|
||||
public static final String OPT_CFLAGS_GCOV = "cflags-gcov"; //$NON-NLS-1$
|
||||
public static final String OPT_USER = "user"; //$NON-NLS-1$
|
||||
public static final String TOOL_AUTOGEN = "autogen"; //$NON-NLS-1$
|
||||
public static final String CATEGORY_OPTIONS = "options"; //$NON-NLS-1$
|
||||
public static final String OPT_AUTOGENOPTS = "autogenOpts"; //$NON-NLS-1$
|
||||
/**
|
||||
* @since 2.0
|
||||
*/
|
||||
public static final String CATEGORY_ENVVAR = "cat_envvar"; //$NON-NLS-1$
|
||||
/**
|
||||
* @since 2.0
|
||||
*/
|
||||
public final static String OPT_ENVVAR = "env_vars"; //$NON-NLS-1$
|
||||
|
||||
}
|
|
@ -0,0 +1,216 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Red Hat Inc..
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.autotools.core;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
|
||||
/**
|
||||
* The main plugin class to be used in the desktop.
|
||||
*/
|
||||
|
||||
public class AutotoolsPlugin extends AbstractUIPlugin {
|
||||
|
||||
//The shared instance.
|
||||
private static AutotoolsPlugin plugin;
|
||||
private ResourceBundle resourceBundle;
|
||||
|
||||
public static final String PLUGIN_ID = "org.eclipse.cdt.autotools.core"; //$NON-NLS-1$
|
||||
public static final String AUTOTOOLS_PROJECT_TYPE_ID = "org.eclipse.linuxtools.cdt.autotools.core.projectType"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public AutotoolsPlugin() {
|
||||
Assert.isTrue(plugin == null);
|
||||
plugin = this;
|
||||
try {
|
||||
resourceBundle = ResourceBundle.getBundle(PLUGIN_ID + ".Resources"); //$NON-NLS-1$
|
||||
} catch (MissingResourceException x) {
|
||||
resourceBundle = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String getPluginId() {
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
|
||||
public static String getUniqueIdentifier() {
|
||||
if (getDefault() == null) {
|
||||
// If the default instance is not yet initialized,
|
||||
// return a static identifier. This identifier must
|
||||
// match the plugin id defined in plugin.xml
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
return getDefault().getBundle().getSymbolicName();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called when the plug-in is stopped
|
||||
*/
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
super.stop(context);
|
||||
plugin = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance.
|
||||
*/
|
||||
public static AutotoolsPlugin getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the OSGi service with the given service interface.
|
||||
*
|
||||
* @param service service interface
|
||||
* @return the specified service or null if it's not registered
|
||||
* @since 1.5
|
||||
*/
|
||||
public static <T> T getService(Class<T> service) {
|
||||
BundleContext context = plugin.getBundle().getBundleContext();
|
||||
ServiceReference<T> ref = context.getServiceReference(service);
|
||||
return ref != null ? context.getService(ref) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string from the plugin's resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getResourceString(String key) {
|
||||
ResourceBundle bundle = AutotoolsPlugin.getDefault().getResourceBundle();
|
||||
try {
|
||||
return bundle.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string from the plugin's resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @param args an array of substituition strings
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getFormattedString(String key, String[] args) {
|
||||
return MessageFormat.format(getResourceString(key), (Object[]) args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the plugin's resource bundle,
|
||||
*/
|
||||
public ResourceBundle getResourceBundle() {
|
||||
return resourceBundle;
|
||||
}
|
||||
|
||||
public static boolean hasTargetBuilder(IProject project) {
|
||||
try {
|
||||
// When a project is converted to an Autotools project, we
|
||||
// replace the ManagedMake builder with a special one that
|
||||
// handles MakeTargets. If a project is brought into Eclipse and
|
||||
// uses the New Project Wizard to create a ManagedMake project that
|
||||
// is of type: Autotools, this added step is not done. If we know
|
||||
// we have an Autotools project from the configuration id, then
|
||||
// we should add the builder now. We also should replace the
|
||||
// default ManagedMake scanner provider with the Autotools one,
|
||||
// then return true.
|
||||
if (project.getNature(ManagedCProjectNature.MNG_NATURE_ID) != null) {
|
||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||
IManagedProject m = info.getManagedProject();
|
||||
if (m != null && m.getProjectType().getId().equals(AUTOTOOLS_PROJECT_TYPE_ID)) {
|
||||
AutotoolsNewProjectNature.addAutotoolsBuilder(project, new NullProgressMonitor());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception f) {
|
||||
// Don't care...fall through to not found.
|
||||
}
|
||||
// Otherwise not found.
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void log(IStatus status) {
|
||||
ResourcesPlugin.getPlugin().getLog().log(status);
|
||||
}
|
||||
|
||||
public static void logErrorMessage(String message) {
|
||||
log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
|
||||
}
|
||||
|
||||
public static void log(Throwable e) {
|
||||
if (e instanceof InvocationTargetException)
|
||||
e = ((InvocationTargetException) e).getTargetException();
|
||||
IStatus status = null;
|
||||
if (e instanceof CoreException)
|
||||
status = ((CoreException) e).getStatus();
|
||||
else
|
||||
status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, e.getMessage(), e);
|
||||
log(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return set of Autotool configuration options for a given build configuration id.
|
||||
*
|
||||
* @param project existing autotools project
|
||||
* @param cfgId configuration id
|
||||
* @return a copy of Autotools configurations for the given configuration id
|
||||
* @throws CoreException if project is not valid Autotools project or cfgId does not exist
|
||||
* @since 1.2
|
||||
*/
|
||||
public Map<String, IAutotoolsOption> getAutotoolCfgOptions(IProject project, String cfgId) throws CoreException {
|
||||
return AutotoolsConfigurationManager.getInstance().getAutotoolsCfgOptions(project, cfgId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Autotool configuration options for a specified build configuration
|
||||
*
|
||||
* @param project existing autotools project
|
||||
* @param cfgId configuation id
|
||||
* @param options set of updated Autotool configuration options
|
||||
* @throws CoreException if project is not valid Autotools project or cfgId does not exist
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public void updateAutotoolCfgOptions(IProject project, String cfgId, Map<String, IAutotoolsOption> options)
|
||||
throws CoreException {
|
||||
AutotoolsConfigurationManager.getInstance().updateAutotoolCfgOptions(project, cfgId, options);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.autotools.core;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
public interface IAutotoolsOption {
|
||||
int CATEGORY = 0;
|
||||
int BIN = 1;
|
||||
int STRING = 2;
|
||||
int INTERNAL = 3;
|
||||
int MULTIARG = 4;
|
||||
int TOOL = 5;
|
||||
int FLAG = 6;
|
||||
int FLAGVALUE = 7;
|
||||
/**
|
||||
* @since 2.0
|
||||
*/
|
||||
int ENVVAR = 8;
|
||||
|
||||
int getType();
|
||||
|
||||
boolean canUpdate();
|
||||
|
||||
void setValue(String value) throws CoreException;
|
||||
|
||||
String getValue();
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
#################################################################################
|
||||
# Copyright (c) 2006, 2007, 2009 Red Hat, Inc.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License 2.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
# IBM Rational Software - ManagedMakeMessages copied to AutotoolsMakefileBuilder
|
||||
#################################################################################
|
||||
MakeCWizard.title=C/Make Project
|
||||
MakeCWizard.description=Create a New C Project using 'make' to build it
|
||||
|
||||
WARNING_UNSUPPORTED_CONFIGURATION=Warning: unsupported configuration
|
||||
|
||||
AutotoolsMakefileBuilder.message.finished=Build complete for project {0}
|
||||
AutotoolsMakefileBuilder.message.stopped=Build stopped
|
||||
AutotoolsMakefileBuilder.type.clean=Clean-only build
|
||||
AutotoolsMakefileBuilder.message.clean.deleting.output=Removing build artifacts from {0}
|
||||
AutotoolsMakefileBuilder.message.console.header=**** {0} of configuration {1} for project {2} ****
|
||||
|
||||
MakeGenerator.makefile.built=Makefile built
|
||||
MakeGenerator.refresh=Refresh
|
||||
MakeGenerator.refresh.error=Refresh error
|
||||
MakeGenerator.generation.error=Configuration failed with error
|
||||
MakeGenerator.configuring=Configuring
|
||||
MakeGenerator.make.message=Invoking {0} for project {1}
|
||||
MakeGenerator.config.error=Error {0} occurred while running {1}
|
||||
MakeGenerator.createdir.error=Error creating build directory: {0}
|
||||
MakeGenerator.run.config.status=Running config.status in build directory: {0}
|
||||
MakeGenerator.makefile.cvs=Invoking Makefile.cvs in build directory: {0}
|
||||
MakeGenerator.autogen.sh=Invoking autogen.sh in build directory: {0}
|
||||
MakeGenerator.autoreconf=Invoking autoreconf in build directory: {0}
|
||||
MakeGenerator.gen.makefile=Generating Makefile in build directory: {0}
|
||||
MakeGenerator.clean.builddir=Cleaning build directory: {0}
|
||||
MakeGenerator.clean.topdir=Cleaning top-level source directory to allow other configuration to run
|
||||
MakeGenerator.gen.configure=Generating configure
|
||||
MakeGenerator.unsupportedConfig=Warning: unsupported configuration {0}
|
||||
MakeGenerator.success=[Operation successful]
|
||||
MakeGenerator.didnt.generate=No Makefile generated
|
||||
MakeGenerator.refresh.MakeTargets=Refreshing Make Targets
|
||||
MakeGenerator.commandline.envvars=Command-line environment variables:
|
||||
|
||||
BuildDir.apply=Build directory already in use
|
||||
BuildDir.default=Default build directory to unused value?
|
||||
BuildDir.yes=Yes
|
||||
BuildDir.no=No
|
||||
|
||||
WizardAutotoolsProjectConversion.title=Convert to CVS C/C++ Autotools Project
|
||||
WizardAutotoolsProjectConversion.description=Convert a CVS source repository to C/C++ Autotools Project
|
||||
WizardAutotoolsProjectConversion.message.add_nature=Adding C/C++ Autotools Managed Project Nature
|
||||
WizardAutotoolsProjectConversion.message.add_builder=Adding C/C++ Autotools Managed Project Builder
|
||||
WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting Project...
|
||||
WizardAutotoolsConversion=CVS C/C++ Autotools Conversion
|
||||
WizardAutotoolsConversion.windowTitle=Conversion to CVS C/C++ Autotools Project
|
||||
WizardAutotoolsConversion.config.title=Select a configuration
|
||||
WizardAutotoolsConversion.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsConversion.options.title=Additional Project Settings
|
||||
WizardAutotoolsConversion.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsConversion.message.save=Saving new build options
|
||||
|
||||
WizardAutotoolsNewCProject.title=Autotools C Project
|
||||
WizardAutotoolsNewCProject.description=Create a new C Autotools project
|
||||
WizardAutotoolsNewCProject.monitor.creatingProject=Creating Project...
|
||||
WizardAutotoolsNewCProject.windowTitle=GNU Autotools C Project
|
||||
WizardAutotoolsNewCProject.config.title=Select a configuration
|
||||
WizardAutotoolsNewCProject.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsNewCProject.options.title=Additional Project Settings
|
||||
WizardAutotoolsNewCProject.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsNewCProject.message.save=Saving new build options
|
||||
|
||||
WizardAutotoolsNewCProjectV2.title=Autotools C Project V2
|
||||
WizardAutotoolsNewCProjectV2.description=Create a new C Autotools project
|
||||
WizardAutotoolsNewCProjectV2.monitor.creatingProject=Creating Project...
|
||||
WizardAutotoolsNewCProjectV2.windowTitle=GNU Autotools C Project V2
|
||||
WizardAutotoolsNewCProjectV2.config.title=Select a configuration
|
||||
WizardAutotoolsNewCProjectV2.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsNewCProjectV2.options.title=Additional Project Settings
|
||||
WizardAutotoolsNewCProjectV2.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsNewCProjectV2.message.save=Saving new build options
|
||||
|
||||
WizardAutotoolsNewCCProject.title=Autotools C++ Project
|
||||
WizardAutotoolsNewCCProject.description=Create a new C++ Autotools project
|
||||
WizardAutotoolsNewCCProject.monitor.creatingProject=Creating Project...
|
||||
WizardAutotoolsNewCCProject.windowTitle=GNU Autotools C++ Project
|
||||
WizardAutotoolsNewCCProject.config.title=Select a configuration
|
||||
WizardAutotoolsNewCCProject.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsNewCCProject.options.title=Additional Project Settings
|
||||
WizardAutotoolsNewCCProject.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsNewCCProject.message.save=Saving new build options
|
||||
|
||||
|
||||
BuildTargetDialog.title.buildTarget=Build Special Targets
|
||||
BuildTargetDialog.title.makeTargetsFor=Make targets for\u0020
|
||||
BuildTargetDialog.button.build=Build
|
||||
|
||||
TargetListViewer.button.add=Add...
|
||||
TargetListViewer.button.remove=Remove
|
||||
TargetListViewer.button.edit=Edit...
|
||||
TargetListViewer.label.target=Target
|
||||
TargetListViewer.label.location=Location
|
||||
TargetListViewer.exception.error=Error
|
||||
TargetListViewer.exception.message=An error occurred performing the selected action
|
||||
|
||||
AutotoolsPreferencePage.useAutotoolsFileScanner.label=Use make -w for includepath scanning
|
||||
MakeTargetPreferencePage.buildTargetInBackground.label=Build target in background
|
||||
|
||||
SetAutotoolsStringOptionValue.error=SetAutotoolsStringOptionValue failure: {0}
|
||||
|
||||
UpdatePackage.msg=Update package: {0}
|
|
@ -0,0 +1,176 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.resources.ACBuilder;
|
||||
import org.eclipse.cdt.core.resources.IConsole;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.IAConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.MultiStatus;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
|
||||
public class AutotoolsConfigurationBuilder extends ACBuilder {
|
||||
|
||||
public static final String BUILDER_NAME = "genmakebuilderV2"; //$NON-NLS-1$
|
||||
public static final String BUILDER_ID = AutotoolsPlugin.getPluginId() + "." + BUILDER_NAME; //$NON-NLS-1$
|
||||
public static final String OLD_BUILDER_ID = "org.eclipse.linuxtools.cdt.autotools.core.genmakebuilderV2"; //$NON-NLS-1$
|
||||
|
||||
private static final String BUILD_STOPPED = "AutotoolsMakefileBuilder.message.stopped"; //$NON-NLS-1$
|
||||
private AutotoolsNewMakeGenerator generator;
|
||||
|
||||
public AutotoolsConfigurationBuilder() {
|
||||
super();
|
||||
generator = new AutotoolsNewMakeGenerator();
|
||||
}
|
||||
|
||||
protected boolean isCdtProjectCreated(IProject project) {
|
||||
ICProjectDescription des = CoreModel.getDefault().getProjectDescription(project, false);
|
||||
return des != null && !des.isCdtProjectCreating();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException {
|
||||
IProject project = getProject();
|
||||
if (!isCdtProjectCreated(project))
|
||||
return project.getReferencedProjects();
|
||||
|
||||
boolean bPerformBuild = true;
|
||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||
if (!shouldBuild(kind, info)) {
|
||||
return new IProject[0];
|
||||
}
|
||||
if (kind == IncrementalProjectBuilder.AUTO_BUILD) {
|
||||
IResourceDelta delta = getDelta(getProject());
|
||||
if (delta != null) {
|
||||
IResource res = delta.getResource();
|
||||
if (res != null) {
|
||||
bPerformBuild = res.getProject().equals(getProject());
|
||||
}
|
||||
} else {
|
||||
bPerformBuild = false;
|
||||
}
|
||||
IConfiguration cfg = info.getDefaultConfiguration();
|
||||
if (cfg != null) {
|
||||
IAConfiguration acfg = AutotoolsConfigurationManager.getInstance().findCfg(project, cfg.getName());
|
||||
if (acfg == null || acfg.isDirty())
|
||||
bPerformBuild = true;
|
||||
}
|
||||
}
|
||||
if (bPerformBuild) {
|
||||
MultiStatus result = performMakefileGeneration(project, info, monitor);
|
||||
if (result.getSeverity() == IStatus.ERROR) {
|
||||
// Failure to create Makefile, output error message to console.
|
||||
IConsole console = CCorePlugin.getDefault().getConsole();
|
||||
console.start(project);
|
||||
|
||||
OutputStream cos = console.getOutputStream();
|
||||
String errormsg = AutotoolsPlugin.getResourceString(BUILD_STOPPED);
|
||||
StringBuilder buf = new StringBuilder(errormsg);
|
||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append("(").append(result.getMessage()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
try {
|
||||
cos.write(buf.toString().getBytes());
|
||||
cos.flush();
|
||||
cos.close();
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkCancel(monitor);
|
||||
return getProject().getReferencedProjects();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clean(IProgressMonitor monitor) {
|
||||
IProject project = getProject();
|
||||
final IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(getProject());
|
||||
if (shouldBuild(CLEAN_BUILD, info)) {
|
||||
IConfiguration icfg = info.getDefaultConfiguration();
|
||||
if (icfg instanceof IMultiConfiguration) {
|
||||
IMultiConfiguration mcfg = (IMultiConfiguration) icfg;
|
||||
IConfiguration[] cfgs = (IConfiguration[]) mcfg.getItems();
|
||||
for (int i = 0; i < cfgs.length; ++i) {
|
||||
IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project,
|
||||
icfg.getName());
|
||||
cfg.setDirty(true);
|
||||
}
|
||||
} else {
|
||||
IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project,
|
||||
icfg.getName());
|
||||
cfg.setDirty(true); // Mark Configuration dirty so next build will do full reconfigure
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected MultiStatus performMakefileGeneration(IProject project, IManagedBuildInfo info,
|
||||
IProgressMonitor monitor) {
|
||||
MultiStatus result;
|
||||
|
||||
try {
|
||||
generator.initialize(project, info, monitor);
|
||||
result = generator.regenerateMakefiles(false);
|
||||
} catch (CoreException e) {
|
||||
String errMsg = AutotoolsPlugin.getResourceString("MakeGenerator.didnt.generate"); //$NON-NLS-1$
|
||||
result = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR, errMsg, e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the build has been canceled.
|
||||
*/
|
||||
public void checkCancel(IProgressMonitor monitor) {
|
||||
if (monitor != null && monitor.isCanceled())
|
||||
throw new OperationCanceledException();
|
||||
}
|
||||
|
||||
protected boolean shouldBuild(int kind, IManagedBuildInfo info) {
|
||||
IConfiguration cfg = info.getDefaultConfiguration();
|
||||
IBuilder builder = null;
|
||||
if (cfg != null) {
|
||||
builder = cfg.getEditableBuilder();
|
||||
switch (kind) {
|
||||
case IncrementalProjectBuilder.AUTO_BUILD:
|
||||
return builder.isAutoBuildEnable();
|
||||
case IncrementalProjectBuilder.INCREMENTAL_BUILD: // now treated as the same!
|
||||
case IncrementalProjectBuilder.FULL_BUILD:
|
||||
return builder.isFullBuildEnabled() | builder.isIncrementalBuildEnabled();
|
||||
case IncrementalProjectBuilder.CLEAN_BUILD:
|
||||
return builder.isCleanBuildEnabled();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 Ericson and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Marc-Andre Laperle (Ericsson) - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.core.envvar.EnvironmentVariable;
|
||||
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
|
||||
import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
|
||||
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
|
||||
|
||||
/**
|
||||
* Supplies some default environment variables for the Autotools toolchain. For
|
||||
* example, V=1 to enable verbose output necessary for proper GCC output
|
||||
* parsing.
|
||||
*
|
||||
* @noreference This class is not intended to be referenced by clients.
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
public class AutotoolsEnvironmentVariableSupplier implements IConfigurationEnvironmentVariableSupplier {
|
||||
|
||||
private static class VerboseEnvironmentVariable extends EnvironmentVariable implements IBuildEnvironmentVariable {
|
||||
private static final String VERBOSE_VAR_NAME = "V"; //$NON-NLS-1$
|
||||
private static final String VERBOSE_VAR_VALUE = "1"; //$NON-NLS-1$
|
||||
|
||||
private VerboseEnvironmentVariable(String name, String value, int op, String delimiter) {
|
||||
super(name, value, op, delimiter);
|
||||
}
|
||||
|
||||
private static boolean isVar(String name) {
|
||||
return name.equals(VerboseEnvironmentVariable.VERBOSE_VAR_NAME);
|
||||
}
|
||||
|
||||
private static IBuildEnvironmentVariable create() {
|
||||
return new VerboseEnvironmentVariable(VERBOSE_VAR_NAME, VERBOSE_VAR_VALUE,
|
||||
IEnvironmentVariable.ENVVAR_PREPEND, null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBuildEnvironmentVariable[] getVariables(IConfiguration configuration,
|
||||
IEnvironmentVariableProvider provider) {
|
||||
IBuildEnvironmentVariable path = VerboseEnvironmentVariable.create();
|
||||
return new IBuildEnvironmentVariable[] { path };
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBuildEnvironmentVariable getVariable(String variableName, IConfiguration configuration,
|
||||
IEnvironmentVariableProvider provider) {
|
||||
if (VerboseEnvironmentVariable.isVar(variableName)) {
|
||||
return VerboseEnvironmentVariable.create();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 Siemens AG.
|
||||
*
|
||||
* This content and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Norbert Ploett - Initial implementation
|
||||
* Red Hat Inc. - Modified for use with autotools plug-in
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
||||
/**
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
public class AutotoolsProblemMarkerInfo {
|
||||
|
||||
public static enum Type {
|
||||
PACKAGE, HEADER, PROG,
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
LIB, FILE, GENERIC
|
||||
}
|
||||
|
||||
private ProblemMarkerInfo marker;
|
||||
|
||||
public AutotoolsProblemMarkerInfo(IResource file, String description, int severity, String name, Type type) {
|
||||
this(file, -1, description, severity, null, null, name, type);
|
||||
}
|
||||
|
||||
public AutotoolsProblemMarkerInfo(IResource file, int lineNumber, String description, int severity,
|
||||
String variableName, Type type) {
|
||||
this(file, lineNumber, description, severity, variableName, null, null, type);
|
||||
}
|
||||
|
||||
public AutotoolsProblemMarkerInfo(IResource file, int lineNumber, String description, int severity,
|
||||
String variableName, IPath externalPath, String libraryInfo, Type type) {
|
||||
this.marker = new ProblemMarkerInfo(file, lineNumber, description, severity, variableName, externalPath);
|
||||
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_PROBLEM_TYPE, type.name());
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO, libraryInfo);
|
||||
|
||||
marker.setType(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER);
|
||||
}
|
||||
|
||||
public ProblemMarkerInfo getMarker() {
|
||||
return marker;
|
||||
}
|
||||
|
||||
public String getProblemType() {
|
||||
return marker.getAttribute(IAutotoolsMarker.MARKER_PROBLEM_TYPE);
|
||||
}
|
||||
|
||||
public String getLibraryInfo() {
|
||||
return marker.getAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
|
||||
public class AutotoolsPropertyConstants {
|
||||
|
||||
static final String PREFIX = AutotoolsPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$
|
||||
static final String PREFIX_COMPAT = "org.eclipse.linuxtools.cdt.autotools."; //$NON-NLS-1$
|
||||
public static final String AUTOMAKE_VERSION_STRING = "AutoconfEditorAutomakeVersion"; //$NON-NLS-1$
|
||||
public static final QualifiedName AUTOMAKE_VERSION = new QualifiedName(PREFIX, AUTOMAKE_VERSION_STRING);
|
||||
public static final QualifiedName AUTOMAKE_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT,
|
||||
AUTOMAKE_VERSION_STRING);
|
||||
public static final String AUTOCONF_VERSION_STRING = "AutoconfEditorAutoconfVersion"; //$NON-NLS-1$
|
||||
public static final QualifiedName AUTOCONF_VERSION = new QualifiedName(PREFIX, AUTOCONF_VERSION_STRING);
|
||||
public static final QualifiedName AUTOCONF_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT,
|
||||
AUTOCONF_VERSION_STRING);
|
||||
public static final String AUTOCONF_MACRO_VERSIONING = "AutoconfEditorMacroVersioning"; //$NON-NLS-1$
|
||||
public static final QualifiedName AUTOCONF_TOOL = new QualifiedName(PREFIX, "AutoconfToolPath"); //$NON-NLS-1$
|
||||
public static final QualifiedName AUTOMAKE_TOOL = new QualifiedName(PREFIX, "AutomakeToolPath"); //$NON-NLS-1$
|
||||
public static final QualifiedName ACLOCAL_TOOL = new QualifiedName(PREFIX, "AclocalToolPath"); //$NON-NLS-1$
|
||||
public static final QualifiedName AUTOHEADER_TOOL = new QualifiedName(PREFIX, "AutoheaderToolPath"); //$NON-NLS-1$
|
||||
public static final QualifiedName AUTORECONF_TOOL = new QualifiedName(PREFIX, "AutoreconfToolPath"); //$NON-NLS-1$
|
||||
public static final QualifiedName LIBTOOLIZE_TOOL = new QualifiedName(PREFIX, "LibtoolizePath"); //$NON-NLS-1$
|
||||
public static final QualifiedName CLEAN_DELETE = new QualifiedName(PREFIX, "CleanDelete"); //$NON-NLS-1$
|
||||
public static final QualifiedName CLEAN_MAKE_TARGET = new QualifiedName(PREFIX, "CleanMakeTarget"); //$NON-NLS-1$
|
||||
public static final QualifiedName SCANNER_USE_MAKE_W = new QualifiedName(PREFIX, "ScannerUseMakeW"); //$NON-NLS-1$
|
||||
public static final QualifiedName AUTO_BUILD_NAME = new QualifiedName(PREFIX, "AutoBuildName"); //$NON-NLS-1$
|
||||
public static final QualifiedName OPEN_INCLUDE = new QualifiedName(PREFIX, "IncludeResourceMapping"); //$NON-NLS-1$
|
||||
public static final QualifiedName OPEN_INCLUDE_P = new QualifiedName(PREFIX, "PersistentIncludeResourceMapping"); //$NON-NLS-1$
|
||||
public static final QualifiedName SCANNER_INFO_DIRTY = new QualifiedName(PREFIX, "ScannerInfoDirty"); //$NON-NLS-1$
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public static final String[] fACVersions = { "2.13", "2.59", "2.61", "2.67", "2.68" }; //$NON-NLS-1$
|
||||
public static final String AC_VERSION_2_13 = fACVersions[0];
|
||||
public static final String AC_VERSION_2_59 = fACVersions[1];
|
||||
public static final String AC_VERSION_2_61 = fACVersions[2];
|
||||
public static final String AC_VERSION_2_67 = fACVersions[3];
|
||||
public static final String AC_VERSION_2_68 = fACVersions[4];
|
||||
public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public static final String[] fAMVersions = { "1.4-p6", "1.9.5", "1.9.6", "1.11.1" }; //$NON-NLS-1$
|
||||
public static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
|
||||
|
||||
public static final String CLEAN_MAKE_TARGET_DEFAULT = "distclean"; //$NON-NLS-1$
|
||||
|
||||
public static final String TRUE = "true"; //$NON-NLS-1$
|
||||
public static final String FALSE = "false"; //$NON-NLS-1$
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.LineNumberReader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.IErrorParser;
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
// This class would normally extend IErrorParser and use the CDT error parser
|
||||
// extension. However, we want an extended IMarker that contains library info and
|
||||
// possibly other data in the future. The standard CDT ErrorParserManager doesn't allow
|
||||
// us to pass an extended ProblemMarkerInfo, so we are forced to have our own mechanism
|
||||
// which is similar to the CDT one.
|
||||
public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
||||
public static final String ID = AutotoolsPlugin.PLUGIN_ID + ".errorParser"; //$NON-NLS-1$
|
||||
private Pattern pkgconfigError = Pattern
|
||||
.compile(".*?(configure:\\s+error:\\s+Package requirements\\s+\\((.*?)\\)\\s+were not met).*"); //$NON-NLS-1$
|
||||
private Pattern genconfigError = Pattern.compile(".*?configure:\\s+error:\\s+(.*)"); //$NON-NLS-1$
|
||||
private Pattern checkingFail = Pattern.compile("checking for (.*)\\.\\.\\. no"); //$NON-NLS-1$
|
||||
|
||||
private Pattern changingConfigDirectory = Pattern.compile("Configuring in (.*)"); //$NON-NLS-1$
|
||||
|
||||
private IPath buildDir;
|
||||
private IPath sourcePath;
|
||||
private IProject project;
|
||||
|
||||
public ErrorParser() {
|
||||
}
|
||||
|
||||
public ErrorParser(IPath sourcePath, IPath buildPath) {
|
||||
this.buildDir = buildPath;
|
||||
this.sourcePath = sourcePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processLine(String line, org.eclipse.cdt.core.ErrorParserManager eoParser) {
|
||||
|
||||
if (this.project == null)
|
||||
this.project = eoParser.getProject();
|
||||
|
||||
if (this.buildDir == null)
|
||||
this.buildDir = new Path(eoParser.getWorkingDirectoryURI().getPath());
|
||||
|
||||
if (this.sourcePath == null)
|
||||
this.sourcePath = eoParser.getProject().getLocation();
|
||||
|
||||
AutotoolsProblemMarkerInfo marker = processLine(line);
|
||||
if (marker != null) {
|
||||
// Check to see if addProblemMarker exists.
|
||||
try {
|
||||
Method method = eoParser.getClass().getMethod("addProblemMarker", ProblemMarkerInfo.class); //$NON-NLS-1$
|
||||
try {
|
||||
method.invoke(eoParser, marker);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (SecurityException | NoSuchMethodException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean processLine(String line, ErrorParserManager eoParser) {
|
||||
if (this.project == null)
|
||||
this.project = eoParser.getProject();
|
||||
|
||||
AutotoolsProblemMarkerInfo marker = processLine(line);
|
||||
if (marker != null) {
|
||||
eoParser.addProblemMarker(marker);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public AutotoolsProblemMarkerInfo processLine(String line) {
|
||||
Matcher m;
|
||||
|
||||
m = changingConfigDirectory.matcher(line);
|
||||
if (m.matches()) {
|
||||
// set configuration directory.
|
||||
this.buildDir = this.buildDir.append(m.group(1));
|
||||
this.sourcePath = this.sourcePath.append(m.group(1));
|
||||
return null;
|
||||
}
|
||||
|
||||
m = pkgconfigError.matcher(line);
|
||||
if (m.matches()) {
|
||||
return new AutotoolsProblemMarkerInfo(getProject(), -1, m.group(1), SEVERITY_ERROR_BUILD, null, null,
|
||||
m.group(2), AutotoolsProblemMarkerInfo.Type.PACKAGE);
|
||||
}
|
||||
|
||||
m = genconfigError.matcher(line);
|
||||
if (m.matches()) {
|
||||
return new AutotoolsProblemMarkerInfo(getProject(), -1, m.group(1), SEVERITY_ERROR_BUILD, null,
|
||||
AutotoolsProblemMarkerInfo.Type.GENERIC);
|
||||
}
|
||||
|
||||
m = checkingFail.matcher(line);
|
||||
if (m.matches()) {
|
||||
// We know that there is a 'checking for ...' fail.
|
||||
// Find the log file containing this check
|
||||
AutotoolsProblemMarkerInfo.Type type = getCheckType(m.group(1));
|
||||
if (type != null)
|
||||
return new AutotoolsProblemMarkerInfo(getProject(), "Missing " + type + " " + m.group(1), SEVERITY_INFO,
|
||||
m.group(1), type);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the name of the filed check object, look for it in the log file
|
||||
* file and then examine the configure script to figure out what the type of
|
||||
* the check was.
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private AutotoolsProblemMarkerInfo.Type getCheckType(String name) {
|
||||
int lineNumber = getErrorConfigLineNumber(name);
|
||||
|
||||
// now open configure file.
|
||||
File file = new File(sourcePath + "/configure"); //$NON-NLS-1$
|
||||
// If the log file is not present there is nothing we can do.
|
||||
if (!file.exists())
|
||||
return null;
|
||||
|
||||
try (LineNumberReader reader = new LineNumberReader(new FileReader(file))) {
|
||||
|
||||
// look for something like:
|
||||
// if test "${ac_cv_prog_WINDRES+set}" = set; then :
|
||||
Pattern errorPattern = Pattern.compile(".*ac_cv_([a-z]*)_.*"); //$NON-NLS-1$
|
||||
|
||||
// skip to the line
|
||||
String line = reader.readLine();
|
||||
for (int i = 0; i < lineNumber + 10 && line != null; i++) {
|
||||
if (i < lineNumber) {
|
||||
line = reader.readLine();
|
||||
continue;
|
||||
}
|
||||
Matcher m = errorPattern.matcher(line);
|
||||
if (m.matches()) {
|
||||
String typeString = m.group(1);
|
||||
if (typeString.equals("prog")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.PROG;
|
||||
if (typeString.equals("header")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.HEADER;
|
||||
if (typeString.equals("file")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.FILE;
|
||||
if (typeString.equals("lib")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.LIB;
|
||||
|
||||
return null;
|
||||
}
|
||||
line = reader.readLine();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the log file for the check for the given name and return the line
|
||||
* number in configure where the check occurs.
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private int getErrorConfigLineNumber(String name) {
|
||||
File file = new File(buildDir + "/config.log"); //$NON-NLS-1$
|
||||
// If the log file is not present there is nothing we can do.
|
||||
if (!file.exists())
|
||||
return -1;
|
||||
try (LineNumberReader reader = new LineNumberReader(new FileReader(file))) {
|
||||
Pattern errorPattern = Pattern.compile("configure:(\\d+): checking for " + name); //$NON-NLS-1$
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
Matcher m = errorPattern.matcher(line);
|
||||
if (m.matches()) {
|
||||
return Integer.parseInt(m.group(1));
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProject getProject() {
|
||||
return this.project;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,459 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2015 IBM Corporation and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
* James Blackburn (Broadcom) - Bug 247838
|
||||
* Andrew Gvozdev (Quoin Inc)
|
||||
* Dmitry Kozlov (CodeSourcery) - Build error highlighting and navigation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.IErrorParser;
|
||||
import org.eclipse.cdt.core.IErrorParser2;
|
||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.cdt.internal.core.IErrorMarkeredOutputStream;
|
||||
import org.eclipse.cdt.utils.EFSExtensionManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.URIUtil;
|
||||
|
||||
/**
|
||||
* The purpose of ErrorParserManager is to delegate the work of error parsing
|
||||
* build output to {@link IErrorParser}s, assist in finding {@link IResource}s, and
|
||||
* help create appropriate error/warning/info markers to be displayed
|
||||
* by the Problems view.
|
||||
*
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class ErrorParserManager extends OutputStream {
|
||||
/**
|
||||
* The list of error parsers stored in .project for 3.X projects
|
||||
* as key/value pair with key="org.eclipse.cdt.core.errorOutputParser"
|
||||
* @deprecated since CDT 4.0.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Delimiter for error parsers presented in one string.
|
||||
* @since 5.2
|
||||
*/
|
||||
public static final char ERROR_PARSER_DELIMITER = ';';
|
||||
|
||||
private int nOpens;
|
||||
private int lineCounter = 0;
|
||||
|
||||
private final IProject fProject;
|
||||
private final MarkerGenerator fMarkerGenerator;
|
||||
|
||||
private Map<String, ErrorParser> fErrorParsers;
|
||||
private List<ProblemMarkerInfo> fErrors;
|
||||
|
||||
private Vector<URI> fDirectoryStack;
|
||||
private final URI fBaseDirectoryURI;
|
||||
|
||||
private String previousLine;
|
||||
private OutputStream outputStream;
|
||||
private final StringBuilder currentLine = new StringBuilder();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param project - project being built.
|
||||
* @param markerGenerator - marker generator able to create markers.
|
||||
*/
|
||||
public ErrorParserManager(IProject project, MarkerGenerator markerGenerator) {
|
||||
this(project, project.getLocationURI(), markerGenerator);
|
||||
}
|
||||
|
||||
/**
|
||||
* URI based constructor.
|
||||
*
|
||||
* @param project - project being built.
|
||||
* @param baseDirectoryURI - absolute location URI of working directory of where the build is performed.
|
||||
* @param markerGenerator - marker generator able to create markers.
|
||||
* @since 2.0
|
||||
*/
|
||||
public ErrorParserManager(IProject project, URI baseDirectoryURI, MarkerGenerator markerGenerator) {
|
||||
fProject = project;
|
||||
fMarkerGenerator = markerGenerator;
|
||||
fDirectoryStack = new Vector<>();
|
||||
fErrors = new ArrayList<>();
|
||||
fErrorParsers = new LinkedHashMap<>();
|
||||
|
||||
if (baseDirectoryURI != null)
|
||||
fBaseDirectoryURI = baseDirectoryURI;
|
||||
else
|
||||
fBaseDirectoryURI = project.getLocationURI();
|
||||
}
|
||||
|
||||
public void addErrorParser(String id, ErrorParser parser) {
|
||||
fErrorParsers.put(id, parser);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current project.
|
||||
*/
|
||||
public IProject getProject() {
|
||||
return fProject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the current URI location where the build is being performed
|
||||
* @since 5.1
|
||||
*/
|
||||
public URI getWorkingDirectoryURI() {
|
||||
if (!fDirectoryStack.isEmpty())
|
||||
return fDirectoryStack.lastElement();
|
||||
|
||||
// Fall back to the Project Location / Build directory
|
||||
return fBaseDirectoryURI;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #pushDirectory} and {@link #popDirectory} are used to change working directory
|
||||
* from where file name is searched (see {@link #findFileInWorkspace}).
|
||||
* The intention is to handle make output of commands "pushd dir" and "popd".
|
||||
*
|
||||
* @param dir - another directory level to keep in stack -- corresponding to 'pushd'.
|
||||
*/
|
||||
public void pushDirectory(IPath dir) {
|
||||
if (dir != null) {
|
||||
URI uri;
|
||||
URI workingDirectoryURI = getWorkingDirectoryURI();
|
||||
if (!dir.isAbsolute())
|
||||
uri = URIUtil.append(workingDirectoryURI, dir.toString());
|
||||
else {
|
||||
uri = toURI(dir);
|
||||
if (uri == null) // Shouldn't happen; error logged
|
||||
return;
|
||||
}
|
||||
pushDirectoryURI(uri);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #pushDirectoryURI} and {@link #popDirectoryURI} are used to change working directory
|
||||
* from where file name is searched (see {@link #findFileInWorkspace}).
|
||||
* The intention is to handle make output of commands "pushd dir" and "popd".
|
||||
*
|
||||
* @param dir - another directory level to keep in stack -- corresponding to 'pushd'.
|
||||
* @since 5.1
|
||||
*/
|
||||
public void pushDirectoryURI(URI dir) {
|
||||
if (dir != null) {
|
||||
if (dir.isAbsolute())
|
||||
fDirectoryStack.addElement(dir);
|
||||
else
|
||||
fDirectoryStack.addElement(URIUtil.makeAbsolute(dir, getWorkingDirectoryURI()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #pushDirectoryURI(URI)} and {@link #popDirectoryURI()} are used to change working directory
|
||||
* from where file name is searched (see {@link #findFileInWorkspace(IPath)}).
|
||||
* The intention is to handle make output of commands "pushd" and "popd".
|
||||
*
|
||||
* @return previous build directory location corresponding 'popd' command.
|
||||
* @since 5.1
|
||||
*/
|
||||
public URI popDirectoryURI() {
|
||||
int i = fDirectoryStack.size();
|
||||
if (i != 0) {
|
||||
URI dir = fDirectoryStack.lastElement();
|
||||
fDirectoryStack.removeElementAt(i - 1);
|
||||
return dir;
|
||||
}
|
||||
return fBaseDirectoryURI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return number of directories in the stack.
|
||||
*/
|
||||
public int getDirectoryLevel() {
|
||||
return fDirectoryStack.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the input and tries to generate error or warning markers
|
||||
*/
|
||||
private void processLine(String line) {
|
||||
String lineTrimmed = line.trim();
|
||||
lineCounter++;
|
||||
|
||||
ProblemMarkerInfo marker = null;
|
||||
|
||||
for (ErrorParser parser : fErrorParsers.values()) {
|
||||
ErrorParser curr = parser;
|
||||
int types = IErrorParser2.NONE;
|
||||
if (curr instanceof IErrorParser2) {
|
||||
types = ((IErrorParser2) curr).getProcessLineBehaviour();
|
||||
}
|
||||
if ((types & IErrorParser2.KEEP_LONGLINES) == 0) {
|
||||
// long lines are not given to parsers, unless it wants it
|
||||
if (lineTrimmed.length() > 1000)
|
||||
continue;
|
||||
}
|
||||
// standard behavior (pre 5.1) is to trim the line
|
||||
String lineToParse = lineTrimmed;
|
||||
if ((types & IErrorParser2.KEEP_UNTRIMMED) != 0) {
|
||||
// untrimmed lines
|
||||
lineToParse = line;
|
||||
}
|
||||
|
||||
boolean consume = false;
|
||||
// Protect against rough parsers who may accidentally
|
||||
// throw an exception on a line they can't handle.
|
||||
// It should not stop parsing of the rest of output.
|
||||
try {
|
||||
consume = curr.processLine(lineToParse, this);
|
||||
} catch (Exception e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
} finally {
|
||||
if (fErrors.size() > 0) {
|
||||
if (marker == null)
|
||||
marker = fErrors.get(0);
|
||||
fErrors.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (consume)
|
||||
break;
|
||||
}
|
||||
outputLine(line, marker);
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditionally output line to outputStream. If stream
|
||||
* supports error markers, use it, otherwise use conventional stream
|
||||
*/
|
||||
private void outputLine(String line, ProblemMarkerInfo marker) {
|
||||
String l = line + '\n';
|
||||
if (outputStream == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (marker != null) {
|
||||
if (outputStream instanceof IErrorMarkeredOutputStream) {
|
||||
IErrorMarkeredOutputStream mos = (IErrorMarkeredOutputStream) outputStream;
|
||||
mos.write(l, marker);
|
||||
}
|
||||
}
|
||||
byte[] b = l.getBytes();
|
||||
outputStream.write(b, 0, b.length);
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return counter counting processed lines of output
|
||||
* @since 5.2
|
||||
*/
|
||||
public int getLineCounter() {
|
||||
return lineCounter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add marker to the list of error markers.
|
||||
*
|
||||
* @param file - resource to add the new marker.
|
||||
* @param lineNumber - line number of the error.
|
||||
* @param desc - description of the error.
|
||||
* @param severity - severity of the error.
|
||||
* @param varName - variable name.
|
||||
*/
|
||||
public void generateMarker(IResource file, int lineNumber, String desc, int severity, String varName,
|
||||
AutotoolsProblemMarkerInfo.Type type) {
|
||||
generateExternalMarker(file, lineNumber, desc, severity, varName, null, null, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add marker to the list of error markers.
|
||||
*
|
||||
* @param file - resource to add the new marker.
|
||||
* @param lineNumber - line number of the error.
|
||||
* @param desc - description of the error.
|
||||
* @param severity - severity of the error, one of
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_INFO},
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_WARNING},
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_ERROR_RESOURCE},
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_ERROR_BUILD}
|
||||
* @param varName - variable name.
|
||||
* @param externalPath - external path pointing to a file outside the workspace.
|
||||
*/
|
||||
public void generateExternalMarker(IResource file, int lineNumber, String desc, int severity, String varName,
|
||||
IPath externalPath, String libraryInfo, AutotoolsProblemMarkerInfo.Type type) {
|
||||
AutotoolsProblemMarkerInfo problemMarkerInfo = new AutotoolsProblemMarkerInfo(file, lineNumber, desc, severity,
|
||||
varName, externalPath, libraryInfo, type);
|
||||
addProblemMarker(problemMarkerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given marker to the list of error markers.
|
||||
*
|
||||
* @param problemMarkerInfo - The marker to be added
|
||||
*/
|
||||
public void addProblemMarker(AutotoolsProblemMarkerInfo problemMarkerInfo) {
|
||||
fErrors.add(problemMarkerInfo.getMarker());
|
||||
fMarkerGenerator.addMarker(problemMarkerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the error parsers.
|
||||
* @return the previous line, save in the working buffer.
|
||||
*/
|
||||
public String getPreviousLine() {
|
||||
return previousLine == null ? "" : previousLine; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* Method setOutputStream.
|
||||
* Note: you have to close this stream explicitly
|
||||
* don't rely on ErrorParserManager.close().
|
||||
* @param os - output stream
|
||||
*/
|
||||
public void setOutputStream(OutputStream os) {
|
||||
outputStream = os;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method getOutputStream.
|
||||
* Note: you have to close this stream explicitly
|
||||
* don't rely on ErrorParserManager.close().
|
||||
* @return OutputStream
|
||||
*/
|
||||
public OutputStream getOutputStream() {
|
||||
nOpens++;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.io.OutputStream#close()
|
||||
* Note: don't rely on this method to close underlying OutputStream,
|
||||
* close it explicitly
|
||||
*/
|
||||
@Override
|
||||
public synchronized void close() {
|
||||
if (nOpens > 0 && --nOpens == 0) {
|
||||
checkLine(true);
|
||||
fDirectoryStack.removeAllElements();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.io.OutputStream#flush()
|
||||
*/
|
||||
@Override
|
||||
public void flush() throws IOException {
|
||||
if (outputStream != null)
|
||||
outputStream.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(int b) {
|
||||
currentLine.append((char) b);
|
||||
checkLine(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(byte[] b, int off, int len) {
|
||||
if (b == null) {
|
||||
throw new NullPointerException();
|
||||
} else if (off != 0 || (len < 0) || (len > b.length)) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
} else if (len == 0) {
|
||||
return;
|
||||
}
|
||||
currentLine.append(new String(b, 0, len));
|
||||
checkLine(false);
|
||||
}
|
||||
|
||||
// This method examines contents of currentLine buffer
|
||||
// if it contains whole line this line is checked by error
|
||||
// parsers (processLine method).
|
||||
// If flush is true rest of line is checked by error parsers.
|
||||
private void checkLine(boolean flush) {
|
||||
String buffer = currentLine.toString();
|
||||
int i = 0;
|
||||
while ((i = buffer.indexOf('\n')) != -1) {
|
||||
String line = buffer.substring(0, i);
|
||||
// get rid of any trailing '\r'
|
||||
if (line.endsWith("\r")) //$NON-NLS-1$
|
||||
line = line.substring(0, line.length() - 1);
|
||||
processLine(line);
|
||||
previousLine = line;
|
||||
buffer = buffer.substring(i + 1); // skip the \n and advance
|
||||
}
|
||||
currentLine.setLength(0);
|
||||
if (flush) {
|
||||
if (buffer.length() > 0) {
|
||||
processLine(buffer);
|
||||
previousLine = buffer;
|
||||
}
|
||||
} else {
|
||||
currentLine.append(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a location {@link IPath} to an {@link URI}. Contrary to
|
||||
* {@link URIUtil#toURI(IPath)} this method does not assume that the path belongs
|
||||
* to local file system.
|
||||
*
|
||||
* The returned URI uses the scheme and authority of the current working directory
|
||||
* as returned by {@link #getWorkingDirectoryURI()}
|
||||
*
|
||||
* @param path - the path to convert to URI.
|
||||
* @return URI
|
||||
* @since 5.1
|
||||
*/
|
||||
private URI toURI(IPath path) {
|
||||
// try {
|
||||
URI baseURI = getWorkingDirectoryURI();
|
||||
String uriString = path.toString();
|
||||
|
||||
// On Windows "C:/folder/" -> "/C:/folder/"
|
||||
if (path.isAbsolute() && uriString.charAt(0) != IPath.SEPARATOR)
|
||||
uriString = IPath.SEPARATOR + uriString;
|
||||
|
||||
return EFSExtensionManager.getDefault().createNewURIFromPath(baseURI, uriString);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ids - array of error parser IDs
|
||||
* @return error parser IDs delimited with error parser delimiter ";"
|
||||
* @since 5.2
|
||||
*/
|
||||
public static String toDelimitedString(String[] ids) {
|
||||
String result = ""; //$NON-NLS-1$
|
||||
for (String id : ids) {
|
||||
if (result.length() == 0) {
|
||||
result = id;
|
||||
} else {
|
||||
result += ERROR_PARSER_DELIMITER + id;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
|
||||
public interface IAutotoolsMarker {
|
||||
String AUTOTOOLS_PROBLEM_MARKER = AutotoolsPlugin.PLUGIN_ID + ".problem"; //$NON-NLS-1$
|
||||
String MARKER_VARIABLE = "problem.variable"; //$NON-NLS-1$
|
||||
String MARKER_EXTERNAL_LOCATION = "problem.externalLocation"; //$NON-NLS-1$
|
||||
String MARKER_LIBRARY_INFO = "problem.libraryInfo"; //$NON-NLS-1$
|
||||
String MARKER_PROBLEM_TYPE = "problem.type"; //$NON-NLS-1$
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
|
||||
public interface IConfigurationCloneListener {
|
||||
/**
|
||||
* Notified when a configuration gets cloned.
|
||||
* @param cloneName - name of the cloned configuration
|
||||
* @param c - the clone
|
||||
*/
|
||||
void cloneCfg(String cloneName, IConfiguration c);
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2012 QNX Software Systems and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class MakeMessages {
|
||||
|
||||
private static final String RESOURCE_BUNDLE = MakeMessages.class.getName();
|
||||
private static ResourceBundle fgResourceBundle;
|
||||
static {
|
||||
try {
|
||||
fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
|
||||
} catch (MissingResourceException x) {
|
||||
fgResourceBundle = null;
|
||||
}
|
||||
}
|
||||
|
||||
private MakeMessages() {
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return fgResourceBundle.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
} catch (NullPointerException e) {
|
||||
return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a string from the resource bundle and formats it with the argument
|
||||
*
|
||||
* @param key the string used to get the bundle value, must not be null
|
||||
*/
|
||||
public static String getFormattedString(String key, Object arg) {
|
||||
return MessageFormat.format(getString(key), new Object[] { arg });
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a string from the resource bundle and formats it with arguments
|
||||
*/
|
||||
public static String getFormattedString(String key, Object[] args) {
|
||||
return MessageFormat.format(getString(key), args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public abstract class MarkerGenerator {
|
||||
|
||||
static final int SEVERITY_INFO = IMarkerGenerator.SEVERITY_INFO;
|
||||
static final int SEVERITY_WARNING = IMarkerGenerator.SEVERITY_WARNING;
|
||||
static final int SEVERITY_ERROR_RESOURCE = IMarkerGenerator.SEVERITY_ERROR_RESOURCE;
|
||||
static final int SEVERITY_ERROR_BUILD = IMarkerGenerator.SEVERITY_ERROR_BUILD;
|
||||
|
||||
/**
|
||||
* Constructor for MarkerGenerator
|
||||
*/
|
||||
public MarkerGenerator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* callback from Output Parser
|
||||
*/
|
||||
public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
|
||||
|
||||
try {
|
||||
IMarker[] cur = file.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
|
||||
/*
|
||||
* Try to find matching markers and don't put in duplicates
|
||||
*/
|
||||
if ((cur != null) && (cur.length > 0)) {
|
||||
for (int i = 0; i < cur.length; i++) {
|
||||
int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
|
||||
int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
|
||||
String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
|
||||
if (line == lineNumber && sev == mapMarkerSeverity(severity) && mesg.equals(errorDesc)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IMarker marker = file.createMarker(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER);
|
||||
marker.setAttribute(IMarker.LOCATION, lineNumber);
|
||||
marker.setAttribute(IMarker.MESSAGE, errorDesc);
|
||||
marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(severity));
|
||||
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
|
||||
marker.setAttribute(IMarker.CHAR_START, -1);
|
||||
marker.setAttribute(IMarker.CHAR_END, -1);
|
||||
if (errorVar != null) {
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_VARIABLE, errorVar);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
AutotoolsPlugin.log(e.getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract IProject getProject();
|
||||
|
||||
public boolean hasMarkers(IResource file) {
|
||||
IMarker[] markers;
|
||||
try {
|
||||
markers = file.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
|
||||
} catch (CoreException e) {
|
||||
return false;
|
||||
}
|
||||
return markers.length > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* callback from Output Parser
|
||||
*/
|
||||
public void addMarker(AutotoolsProblemMarkerInfo autotoolsMarker) {
|
||||
|
||||
ProblemMarkerInfo info = autotoolsMarker.getMarker();
|
||||
|
||||
try {
|
||||
IResource markerResource = info.file;
|
||||
if (markerResource == null) {
|
||||
markerResource = getProject();
|
||||
}
|
||||
IMarker[] cur = markerResource.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, true,
|
||||
IResource.DEPTH_ONE);
|
||||
// IMarker[] cur = markerResource.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ONE);
|
||||
/*
|
||||
* Try to find matching markers and don't put in duplicates
|
||||
*/
|
||||
if ((cur != null) && (cur.length > 0)) {
|
||||
for (int i = 0; i < cur.length; i++) {
|
||||
int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
|
||||
int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
|
||||
String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
|
||||
if (line == info.lineNumber && sev == mapMarkerSeverity(info.severity)
|
||||
&& mesg.equals(info.description)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IMarker marker = markerResource.createMarker(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER);
|
||||
// IMarker marker = markerResource.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
|
||||
marker.setAttribute(IMarker.LOCATION, info.lineNumber);
|
||||
marker.setAttribute(IMarker.MESSAGE, info.description);
|
||||
marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(info.severity));
|
||||
marker.setAttribute(IMarker.LINE_NUMBER, info.lineNumber);
|
||||
marker.setAttribute(IMarker.CHAR_START, -1);
|
||||
marker.setAttribute(IMarker.CHAR_END, -1);
|
||||
if (info.variableName != null) {
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_VARIABLE, info.variableName);
|
||||
}
|
||||
if (info.externalPath != null) {
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_EXTERNAL_LOCATION, info.externalPath.toOSString());
|
||||
}
|
||||
|
||||
// Add all other client defined attributes.
|
||||
Map<String, String> attributes = info.getAttributes();
|
||||
if (attributes != null) {
|
||||
for (Entry<String, String> entry : attributes.entrySet()) {
|
||||
marker.setAttribute(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (CoreException e) {
|
||||
AutotoolsPlugin.log(e.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
private int mapMarkerSeverity(int severity) {
|
||||
switch (severity) {
|
||||
case SEVERITY_ERROR_BUILD:
|
||||
case SEVERITY_ERROR_RESOURCE:
|
||||
return IMarker.SEVERITY_ERROR;
|
||||
case SEVERITY_INFO:
|
||||
return IMarker.SEVERITY_INFO;
|
||||
case SEVERITY_WARNING:
|
||||
return IMarker.SEVERITY_WARNING;
|
||||
}
|
||||
return IMarker.SEVERITY_ERROR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the IMarkers for the project specified in the argument if the
|
||||
* project exists, and is open.
|
||||
*
|
||||
* @param project
|
||||
*/
|
||||
public void removeAllMarkers(IProject project) {
|
||||
if (project == null || !project.isAccessible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear out the problem markers
|
||||
IWorkspace workspace = project.getWorkspace();
|
||||
IMarker[] markers;
|
||||
try {
|
||||
markers = project.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
|
||||
// markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
|
||||
} catch (CoreException e) {
|
||||
// Handled just about every case in the sanity check
|
||||
return;
|
||||
}
|
||||
if (markers != null) {
|
||||
try {
|
||||
workspace.deleteMarkers(markers);
|
||||
} catch (CoreException e) {
|
||||
// The only situation that might cause this is some sort of resource change event
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.ui.IMarkerResolution;
|
||||
import org.eclipse.ui.IMarkerResolutionGenerator;
|
||||
|
||||
public class MarkerResolutionGenerator implements IMarkerResolutionGenerator {
|
||||
|
||||
@Override
|
||||
public IMarkerResolution[] getResolutions(IMarker marker) {
|
||||
// System.out.println("in marker resolution, library info is " + marker.getAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO, ""));
|
||||
// String libraryInfo = marker.getAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO, null);
|
||||
// if (libraryInfo != null) {
|
||||
// return new IMarkerResolution[] {new PkgconfigErrorResolution(libraryInfo)};
|
||||
// };
|
||||
return new IMarkerResolution[0];
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.ICommandLauncher;
|
||||
import org.eclipse.cdt.remote.core.RemoteCommandLauncher;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.ui.IMarkerResolution;
|
||||
|
||||
public class PkgconfigErrorResolution implements IMarkerResolution {
|
||||
|
||||
private static class ConsoleOutputStream extends OutputStream {
|
||||
|
||||
protected StringBuffer fBuffer;
|
||||
|
||||
public ConsoleOutputStream() {
|
||||
fBuffer = new StringBuffer();
|
||||
}
|
||||
|
||||
public synchronized String readBuffer() {
|
||||
String buf = fBuffer.toString();
|
||||
fBuffer.setLength(0);
|
||||
return buf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(int c) {
|
||||
byte ascii[] = new byte[1];
|
||||
ascii[0] = (byte) c;
|
||||
fBuffer.append(new String(ascii));
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(byte[] b, int off, int len) {
|
||||
fBuffer.append(new String(b, off, len));
|
||||
}
|
||||
}
|
||||
|
||||
private static final String PKG_UPDATE_MSG = "UpdatePackage.msg"; //$NON-NLS-1$
|
||||
private String pkgName;
|
||||
|
||||
public PkgconfigErrorResolution(String pkgconfigRequirement) {
|
||||
// Get the pkgconfig package name from the requirement message.
|
||||
Pattern p = Pattern.compile("(.*?)[\\s,>,<,=].*"); //$NON-NLS-1$
|
||||
Matcher m = p.matcher(pkgconfigRequirement);
|
||||
if (m.matches()) {
|
||||
pkgName = m.group(1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return AutotoolsPlugin.getFormattedString(PKG_UPDATE_MSG, new String[] { pkgName });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(IMarker marker) {
|
||||
// We have a pkgconfig library missing requirement for "pkg". Now, "pkg" does
|
||||
// not necessarily match the actual system package needed to be updated (e.g.
|
||||
// gtk+-2.0 is the name of the pkgconfig file for gtk2).
|
||||
// We can try and find the "pkg.pc" file and look at what real package provides
|
||||
// it. Updating that package will update the actual package in question as well
|
||||
// as updating the pkgconfig info for "pkg".
|
||||
// Note, that we won't have any pkgconfig path settings from the configure call
|
||||
// so we can't handle the situation where the user doesn't have pkgconfig files
|
||||
// stored in the usual place.
|
||||
IPath pkgconfigPath = new Path("/usr/lib/pkgconfig").append(pkgName + ".pc"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// Get a launcher for the config command
|
||||
RemoteCommandLauncher launcher = new RemoteCommandLauncher();
|
||||
IPath commandPath = new Path("rpm"); //$NON-NLS-1$
|
||||
String[] commandArgs = new String[] { "-q", //$NON-NLS-1$
|
||||
"--queryformat", //$NON-NLS-1$
|
||||
"%{NAME}", //$NON-NLS-1$
|
||||
"--whatprovides", //$NON-NLS-1$
|
||||
pkgconfigPath.toOSString() };
|
||||
try {
|
||||
// Use CDT launcher to run rpm to query the package that provides
|
||||
// the pkgconfig .pc file for the package in question.
|
||||
ConsoleOutputStream output = new ConsoleOutputStream();
|
||||
Process proc = launcher.execute(commandPath, commandArgs, null, new Path("."), new NullProgressMonitor()); //$NON-NLS-1$
|
||||
if (proc != null) {
|
||||
try {
|
||||
// Close the input of the process since we will never write to
|
||||
// it
|
||||
proc.getOutputStream().close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
if (launcher.waitAndRead(output, output, new NullProgressMonitor()) != ICommandLauncher.OK) {
|
||||
AutotoolsPlugin.logErrorMessage(launcher.getErrorMessage());
|
||||
} else {
|
||||
String result = output.readBuffer();
|
||||
if (!result.startsWith("error:")) //$NON-NLS-1$
|
||||
System.out.println("need to execute update of " + result); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
} catch (CoreException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2012 Red Hat, Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
public class VersionComparator {
|
||||
|
||||
/**
|
||||
* Compare two version numbers if
|
||||
* return -1 if v1 is older than v2 0 if they are the same and +1
|
||||
* if v1 is newer than v2
|
||||
*
|
||||
* Version numbers are expected to be in the format x.y.z...
|
||||
*
|
||||
* So:
|
||||
* VersionComparator.compare("1.0", "1.2") return -1
|
||||
* VersionComparator.compare("1.5", "1.2") returns 1
|
||||
* VersionComparator.compare("1.5.1", "1.5.5") returns -1
|
||||
* VersionComparator.compare("1.5", "1.5.1") returns 1
|
||||
* VersionComparator.compare("1.5.1", "1.5.1") returns 0
|
||||
*/
|
||||
public static int compare(String v1, String v2) {
|
||||
String[] v1digits = v1.split("\\."); //$NON-NLS-1$
|
||||
String[] v2digits = v2.split("\\."); //$NON-NLS-1$
|
||||
|
||||
for (int i = 0; i < v1digits.length && i < v2digits.length; i++) {
|
||||
int d1 = Integer.valueOf(v1digits[i]);
|
||||
int d2 = Integer.valueOf(v2digits[i]);
|
||||
|
||||
if (d1 < d2)
|
||||
return -1;
|
||||
|
||||
if (d1 > d2)
|
||||
return 1;
|
||||
}
|
||||
|
||||
// At this point all digits have the same value
|
||||
// so the version with the longer string wins
|
||||
|
||||
if (v1digits.length < v2digits.length)
|
||||
return -1;
|
||||
|
||||
if (v1digits.length > v2digits.length)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractConfigurationOption implements IConfigureOption {
|
||||
|
||||
protected String name;
|
||||
private String msgName;
|
||||
protected AutotoolsConfiguration cfg;
|
||||
|
||||
public AbstractConfigurationOption(String name, AutotoolsConfiguration cfg) {
|
||||
this(name, name, cfg);
|
||||
}
|
||||
|
||||
public AbstractConfigurationOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
this.name = name;
|
||||
this.msgName = msgName;
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ConfigureMessages.getConfigureDescription(msgName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToolTip() {
|
||||
return ConfigureMessages.getConfigureTip(msgName);
|
||||
}
|
||||
|
||||
public String getMsgName() {
|
||||
return msgName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public AutotoolsConfiguration getCfg() {
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getParameters() {
|
||||
List<String> parameters = new ArrayList<>();
|
||||
if (isParmSet())
|
||||
parameters.add(getParameter());
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public String getParameterName() {
|
||||
return "--" + getName(); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCategory() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlag() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlagValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMultiArg() {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,422 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsOptionConstants;
|
||||
import org.eclipse.cdt.core.CCProjectNature;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuildObjectProperties;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public class AutotoolsConfiguration implements IAConfiguration {
|
||||
|
||||
public static class Option {
|
||||
private String name;
|
||||
private String transformedName;
|
||||
private String superClassId;
|
||||
private int type;
|
||||
private String defaultValue;
|
||||
|
||||
public Option(String name, int type) {
|
||||
this(name, name, type);
|
||||
}
|
||||
|
||||
public Option(String name, String transformedName, int type) {
|
||||
this.name = name;
|
||||
this.transformedName = transformedName;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Option(String name, String transformedName, String defaultValue, int type) {
|
||||
this.name = name;
|
||||
this.transformedName = transformedName;
|
||||
this.type = type;
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public Option(String name, String transformedName, String defaultValue, String superClassId, int type) {
|
||||
this.name = name;
|
||||
this.transformedName = transformedName;
|
||||
this.type = type;
|
||||
this.defaultValue = defaultValue;
|
||||
this.superClassId = superClassId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public String getSuperClassId() {
|
||||
return superClassId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return ConfigureMessages.getConfigureDescription(transformedName);
|
||||
}
|
||||
|
||||
public String getToolTip() {
|
||||
return ConfigureMessages.getConfigureTip(transformedName);
|
||||
}
|
||||
}
|
||||
|
||||
// Configure options and categories. List below is ordered.
|
||||
// All options following a category are children of that category
|
||||
// in a tree view, up to the next category.
|
||||
private static Option[] configOpts = new Option[] {
|
||||
new Option(AutotoolsOptionConstants.TOOL_CONFIGURE, IConfigureOption.TOOL),
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_GENERAL, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_CONFIGDIR, IConfigureOption.INTERNAL),
|
||||
new Option(AutotoolsOptionConstants.OPT_CACHE_FILE, "cache_file", IConfigureOption.STRING), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_HELP, IConfigureOption.BIN),
|
||||
new Option(AutotoolsOptionConstants.OPT_NO_CREATE, "no_create", IConfigureOption.BIN), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_QUIET, IConfigureOption.BIN),
|
||||
new Option(AutotoolsOptionConstants.OPT_VERSION, IConfigureOption.BIN),
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_PLATFORM, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_HOST, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_BUILD, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_TARGET, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_DIRECTORIES, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_PREFIX, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_EXEC_PREFIX, "exec_prefix", IConfigureOption.STRING), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_LIBDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_BINDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_SBINDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_INCLUDEDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_DATADIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_SYSCONFDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_INFODIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_MANDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_SRCDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_LOCALSTATEDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_SHAREDSTATEDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_LIBEXECDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.OPT_OLDINCLUDEDIR, IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_FILENAMES, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_PROGRAM_PREFIX, "program_prefix", IConfigureOption.STRING), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_PROGRAM_SUFFIX, "program_suffix", IConfigureOption.STRING), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_PROGRAM_TRANSFORM_NAME, "program_transform_name", //$NON-NLS-1$
|
||||
IConfigureOption.STRING),
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_ENVVAR, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_ENVVAR, IConfigureOption.ENVVAR),
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_FEATURES, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_ENABLE_MAINTAINER_MODE, "enable_maintainer_mode", //$NON-NLS-1$
|
||||
IConfigureOption.BIN),
|
||||
new Option(AutotoolsOptionConstants.FLAG_CFLAGS, "cflags", AutotoolsOptionConstants.FLAG_CFLAGS_FLAGS, //$NON-NLS-1$
|
||||
IConfigureOption.FLAG),
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_DEBUG, "cflags_debug", IConfigureOption.FLAGVALUE), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_GPROF, "cflags_gprof", IConfigureOption.FLAGVALUE), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_GCOV, "cflags_gcov", IConfigureOption.FLAGVALUE), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_USER, IConfigureOption.MULTIARG),
|
||||
new Option(AutotoolsOptionConstants.TOOL_AUTOGEN, "autogen", "autogen.sh", IConfigureOption.TOOL), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_OPTIONS, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_AUTOGENOPTS, IConfigureOption.MULTIARG), };
|
||||
|
||||
private static Option[] toolList;
|
||||
|
||||
private String id;
|
||||
private boolean isDirty;
|
||||
private boolean isParmsDirty;
|
||||
private IProject project;
|
||||
private Map<String, IConfigureOption> configOptions;
|
||||
private ArrayList<String> configParms = new ArrayList<>();
|
||||
|
||||
public AutotoolsConfiguration(String name) {
|
||||
this(null, name, true);
|
||||
}
|
||||
|
||||
public AutotoolsConfiguration(IProject project, String name) {
|
||||
this(project, name, true);
|
||||
}
|
||||
|
||||
private AutotoolsConfiguration(IProject project, String name, boolean initialize) {
|
||||
this.id = name;
|
||||
this.project = project;
|
||||
configOptions = new HashMap<>();
|
||||
if (initialize)
|
||||
initConfigOptions();
|
||||
isParmsDirty = true;
|
||||
}
|
||||
|
||||
private void initConfigOptions() {
|
||||
// Put configure options in hash map. Ignore categories.
|
||||
ArrayList<Option> tools = new ArrayList<>();
|
||||
FlagConfigureOption lastFlag = null;
|
||||
IConfiguration configuration = null;
|
||||
IBuildObjectProperties buildProperties = null;
|
||||
if (project != null) {
|
||||
ICConfigurationDescription cfgd = CoreModel.getDefault().getProjectDescription(project)
|
||||
.getConfigurationById(id);
|
||||
|
||||
configuration = ManagedBuildManager.getConfigurationForDescription(cfgd);
|
||||
if (configuration != null)
|
||||
buildProperties = configuration.getBuildProperties();
|
||||
}
|
||||
for (int i = 0; i < configOpts.length; ++i) {
|
||||
Option opt = configOpts[i];
|
||||
String defaultValue = opt.getDefaultValue();
|
||||
int type = opt.type;
|
||||
switch (type) {
|
||||
case IConfigureOption.BIN:
|
||||
BinConfigureOption b = new BinConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
b.setValue(defaultValue);
|
||||
configOptions.put(opt.name, b);
|
||||
break;
|
||||
case IConfigureOption.STRING:
|
||||
StringConfigureOption s = new StringConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
s.setValue(defaultValue);
|
||||
configOptions.put(opt.name, s);
|
||||
break;
|
||||
case IConfigureOption.INTERNAL:
|
||||
InternalConfigureOption io = new InternalConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
io.setValue(defaultValue);
|
||||
configOptions.put(opt.name, io);
|
||||
break;
|
||||
case IConfigureOption.MULTIARG:
|
||||
MultiArgConfigureOption m = new MultiArgConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (buildProperties != null) {
|
||||
// Check to see if we have a Debug configuration in which
|
||||
// case, default the compiler flags
|
||||
// appropriately (for C or C/C++).
|
||||
if (opt.name.equals("user")) { //$NON-NLS-1$
|
||||
if (buildProperties.containsValue("org.eclipse.cdt.build.core.buildType", //$NON-NLS-1$
|
||||
"org.eclipse.linuxtools.cdt.autotools.core.buildType.debug")) { //$NON-NLS-1$
|
||||
defaultValue = "CFLAGS='-g -O0'"; //$NON-NLS-1$
|
||||
try {
|
||||
if (project.hasNature(CCProjectNature.CC_NATURE_ID))
|
||||
defaultValue += " CXXFLAGS='-g -O0'"; //$NON-NLS-1$
|
||||
} catch (CoreException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (defaultValue != null)
|
||||
m.setValue(defaultValue);
|
||||
configOptions.put(opt.name, m);
|
||||
break;
|
||||
case IConfigureOption.TOOL:
|
||||
tools.add(opt);
|
||||
ConfigureTool t = new ConfigureTool(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
t.setValue(defaultValue);
|
||||
configOptions.put(opt.name, t);
|
||||
break;
|
||||
case IConfigureOption.CATEGORY:
|
||||
configOptions.put(opt.name, new ConfigureOptionCategory(opt.name));
|
||||
break;
|
||||
case IConfigureOption.FLAG:
|
||||
FlagConfigureOption f = new FlagConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
f.setValue(defaultValue);
|
||||
lastFlag = f;
|
||||
configOptions.put(opt.name, f);
|
||||
break;
|
||||
case IConfigureOption.FLAGVALUE:
|
||||
FlagValueConfigureOption fv = new FlagValueConfigureOption(opt.name, opt.transformedName, this,
|
||||
ConfigureMessages.getParameter(opt.transformedName));
|
||||
if (defaultValue != null)
|
||||
fv.setValue(defaultValue);
|
||||
lastFlag.addChild(opt.name);
|
||||
configOptions.put(opt.name, fv);
|
||||
break;
|
||||
case IConfigureOption.ENVVAR:
|
||||
VariableConfigureOption v = new VariableConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
v.setValue(defaultValue);
|
||||
configOptions.put(opt.name, v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
toolList = tools.toArray(new Option[tools.size()]);
|
||||
}
|
||||
|
||||
public static Option[] getOptionList() {
|
||||
return configOpts.clone();
|
||||
}
|
||||
|
||||
public static Option[] getChildOptions(String name) {
|
||||
ArrayList<Option> options = new ArrayList<>();
|
||||
for (int i = 0; i < configOpts.length; ++i) {
|
||||
Option opt = configOpts[i];
|
||||
if (opt.getName().equals(name)) {
|
||||
if (opt.getType() == IConfigureOption.CATEGORY) {
|
||||
for (int j = i + 1; j < configOpts.length; ++j) {
|
||||
Option o = configOpts[j];
|
||||
int type = o.getType();
|
||||
if (type != IConfigureOption.CATEGORY && type != IConfigureOption.TOOL)
|
||||
options.add(o);
|
||||
else
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
} else if (opt.getType() == IConfigureOption.TOOL) {
|
||||
for (int j = i + 1; j < configOpts.length; ++j) {
|
||||
Option o = configOpts[j];
|
||||
int type = o.getType();
|
||||
if (type == IConfigureOption.CATEGORY)
|
||||
options.add(o);
|
||||
else if (type == IConfigureOption.TOOL)
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
|
||||
public static Option[] getTools() {
|
||||
return toolList.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption getOption(String name) {
|
||||
return configOptions.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAConfiguration copy() {
|
||||
return copy(this.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAConfiguration copy(String newId) {
|
||||
AutotoolsConfiguration cfg = new AutotoolsConfiguration(project, newId, false);
|
||||
Collection<IConfigureOption> oldValues = configOptions.values();
|
||||
for (Iterator<IConfigureOption> i = oldValues.iterator(); i.hasNext();) {
|
||||
IConfigureOption opt = i.next();
|
||||
cfg.configOptions.put(opt.getName(), opt.copy(cfg));
|
||||
}
|
||||
if (getId().equals(newId))
|
||||
cfg.setDirty(isDirty()); // copying with same id, do not change dirty attribute
|
||||
else
|
||||
cfg.setDirty(true); // we are cloning with a new id, treat it as never built/dirty
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDirty() {
|
||||
return isDirty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDirty(boolean value) {
|
||||
isDirty = value;
|
||||
if (isDirty)
|
||||
isParmsDirty = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, IConfigureOption> getOptions() {
|
||||
return configOptions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToolParameters(String name) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
Option[] options = getChildOptions(name);
|
||||
for (int i = 0; i < options.length; ++i) {
|
||||
IConfigureOption option = getOption(options[i].getName());
|
||||
if (option.getType() == IConfigureOption.CATEGORY) {
|
||||
Option[] childOptions = getChildOptions(option.getName());
|
||||
for (int j = 0; j < childOptions.length; ++j) {
|
||||
IConfigureOption childOption = getOption(childOptions[j].getName());
|
||||
String parameter = childOption.getParameter();
|
||||
if (!parameter.isEmpty())
|
||||
buf.append(' ').append(parameter);
|
||||
}
|
||||
} else {
|
||||
String parameter = option.getParameter();
|
||||
if (!parameter.isEmpty())
|
||||
buf.append(' ').append(parameter);
|
||||
}
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getToolArgs(String name) {
|
||||
if (isParmsDirty) {
|
||||
configParms = new ArrayList<>();
|
||||
Option[] options = getChildOptions(name);
|
||||
for (int i = 0; i < options.length; ++i) {
|
||||
IConfigureOption option = getOption(options[i].getName());
|
||||
if (option.getType() == IConfigureOption.CATEGORY) {
|
||||
Option[] childOptions = getChildOptions(option.getName());
|
||||
for (int j = 0; j < childOptions.length; ++j) {
|
||||
IConfigureOption childOption = getOption(childOptions[j].getName());
|
||||
List<String> parameters = childOption.getParameters();
|
||||
configParms.addAll(parameters);
|
||||
}
|
||||
} else {
|
||||
List<String> parameters = option.getParameters();
|
||||
configParms.addAll(parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
return configParms;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOption(String name, String value) {
|
||||
IConfigureOption option = configOptions.get(name);
|
||||
if (option != null) {
|
||||
if (!option.getValue().equals(value)) {
|
||||
option.setValue(value);
|
||||
setDirty(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfigToolDirectory(String configToolDirectory) {
|
||||
setOption("configdir", configToolDirectory); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigToolDirectory() {
|
||||
IConfigureOption option = configOptions.get("configdir"); //$NON-NLS-1$
|
||||
return option.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultOptions() {
|
||||
initConfigOptions();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,683 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature;
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.autotools.core.IAutotoolsOption;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfiguration.Option;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceChangeEvent;
|
||||
import org.eclipse.core.resources.IResourceChangeListener;
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
||||
|
||||
public static final String CFG_FILE_NAME = ".autotools"; //$NON-NLS-1$
|
||||
private static final String CFG_CANT_SAVE = "Configure.Error.NoProjectToSave"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
public static final String INVALID_AUTOTOOLS_PROJECT = "CfgOptions.Invalid.Project"; //$NON-NLS-1$
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public static final String INVALID_AUTOTOOLS_CONFIG_ID = "CfgOptions.Invalid.Config"; //$NON-NLS-1$
|
||||
|
||||
private static AutotoolsConfigurationManager instance;
|
||||
private static Random rand = new Random();
|
||||
|
||||
private boolean isSyncing;
|
||||
|
||||
private static Map<String, Map<String, IAConfiguration>> configs;
|
||||
private static Map<String, Map<String, IAConfiguration>> tmpConfigs;
|
||||
|
||||
private AutotoolsConfigurationManager() {
|
||||
configs = new HashMap<>();
|
||||
tmpConfigs = new HashMap<>();
|
||||
ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
|
||||
}
|
||||
|
||||
public static AutotoolsConfigurationManager getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new AutotoolsConfigurationManager();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public synchronized IAConfiguration createDefaultConfiguration(String id) {
|
||||
return new AutotoolsConfiguration(id);
|
||||
}
|
||||
|
||||
public synchronized IAConfiguration createDefaultConfiguration(IProject project, String id) {
|
||||
return new AutotoolsConfiguration(project, id);
|
||||
}
|
||||
|
||||
public synchronized IAConfiguration findCfg(IProject p, String id) {
|
||||
Map<String, IAConfiguration> cfgs = getConfigurations(p);
|
||||
return cfgs.get(id);
|
||||
}
|
||||
|
||||
public synchronized IAConfiguration getConfiguration(IProject p, String cfgId) {
|
||||
return getConfiguration(p, cfgId, true);
|
||||
}
|
||||
|
||||
public synchronized IAConfiguration getConfiguration(IProject p, String cfgId, boolean persist) {
|
||||
IAConfiguration cfg = findCfg(p, cfgId);
|
||||
if (cfg == null) {
|
||||
cfg = createDefaultConfiguration(p, cfgId);
|
||||
if (persist) {
|
||||
addConfiguration(p, cfg);
|
||||
}
|
||||
} else {
|
||||
if (!persist) {
|
||||
cfg = cfg.copy();
|
||||
}
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
||||
public synchronized boolean isConfigurationAlreadySaved(IProject project, ICConfigurationDescription cfgd) {
|
||||
Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
|
||||
if (cfgs != null)
|
||||
return cfgs.get(cfgd.getId()) != null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public synchronized void addConfiguration(IProject project, IAConfiguration cfg) {
|
||||
String projectName = project.getName();
|
||||
Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
|
||||
if (cfgs == null) {
|
||||
cfgs = new HashMap<>();
|
||||
configs.put(projectName, cfgs);
|
||||
}
|
||||
cfgs.put(cfg.getId(), cfg);
|
||||
saveConfigs(project);
|
||||
}
|
||||
|
||||
public synchronized boolean isSyncing() {
|
||||
return isSyncing;
|
||||
}
|
||||
|
||||
private synchronized void setSyncing(boolean value) {
|
||||
isSyncing = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronize the current set of configurations for the project with the
|
||||
* Autotools saved configuration data. This is required when configuration
|
||||
* management occurs outside of the Autotools Configure Settings page in the
|
||||
* Property menu.
|
||||
*
|
||||
* @param project to synchronize configurations for
|
||||
*
|
||||
*/
|
||||
public synchronized void syncConfigurations(IProject project) {
|
||||
setSyncing(true);
|
||||
clearTmpConfigurations(project);
|
||||
ICProjectDescription pd = CoreModel.getDefault().getProjectDescription(project);
|
||||
ICConfigurationDescription[] cfgs = pd.getConfigurations();
|
||||
Map<String, IAConfiguration> newCfgList = new HashMap<>();
|
||||
for (int i = 0; i < cfgs.length; ++i) {
|
||||
cfgs[i].getConfigurationData();
|
||||
IAConfiguration acfg = getTmpConfiguration(project, cfgs[i]);
|
||||
newCfgList.put(cfgs[i].getId(), acfg);
|
||||
}
|
||||
setSyncing(false);
|
||||
clearTmpConfigurations(project);
|
||||
replaceProjectConfigurations(project, newCfgList);
|
||||
}
|
||||
|
||||
public synchronized void replaceProjectConfigurations(IProject project, Map<String, IAConfiguration> cfgs) {
|
||||
String projectName = project.getName();
|
||||
configs.put(projectName, cfgs);
|
||||
saveConfigs(project);
|
||||
}
|
||||
|
||||
public synchronized void replaceProjectConfigurations(IProject project, Map<String, IAConfiguration> cfgs,
|
||||
ICConfigurationDescription[] cfgds) {
|
||||
String projectName = project.getName();
|
||||
configs.put(projectName, cfgs);
|
||||
saveConfigs(project, cfgds);
|
||||
}
|
||||
|
||||
private Map<String, IAConfiguration> getSavedConfigs(IProject project) {
|
||||
String projectName = project.getName();
|
||||
Map<String, IAConfiguration> list = configs.get(projectName);
|
||||
if (list == null) {
|
||||
try {
|
||||
IPath fileLocation = project.getLocation().append(CFG_FILE_NAME);
|
||||
File dirFile = fileLocation.toFile();
|
||||
Map<String, IAConfiguration> cfgList = new HashMap<>();
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
if (dirFile.exists()) {
|
||||
Document d = db.parse(dirFile);
|
||||
Element e = d.getDocumentElement();
|
||||
// Get the stored configuration data
|
||||
NodeList cfgs = e.getElementsByTagName("configuration"); //$NON-NLS-1$
|
||||
for (int x = 0; x < cfgs.getLength(); ++x) {
|
||||
Node n = cfgs.item(x);
|
||||
NamedNodeMap attrs = n.getAttributes();
|
||||
// Originally we used the configuration name, but now we use
|
||||
// the ConfigurationDescription id which is unique. Check for
|
||||
// id first, but fall back to name for older .autotools files.
|
||||
Node nameNode = attrs.getNamedItem("name"); //$NON-NLS-1$
|
||||
Node cfgIdNode = attrs.getNamedItem("id"); //$NON-NLS-1$
|
||||
String cfgId = null;
|
||||
if (cfgIdNode != null)
|
||||
cfgId = cfgIdNode.getNodeValue();
|
||||
else if (nameNode != null) {
|
||||
String cfgName = nameNode.getNodeValue();
|
||||
ICConfigurationDescription cfgd = CoreModel.getDefault().getProjectDescription(project)
|
||||
.getConfigurationByName(cfgName);
|
||||
if (cfgd != null)
|
||||
cfgId = cfgd.getId();
|
||||
else
|
||||
continue; // have to punt, this doesn't map to real cfg
|
||||
}
|
||||
IAConfiguration cfg = new AutotoolsConfiguration(project, cfgId);
|
||||
NodeList l = n.getChildNodes();
|
||||
for (int y = 0; y < l.getLength(); ++y) {
|
||||
Node child = l.item(y);
|
||||
if (child.getNodeName().equals("option")) { //$NON-NLS-1$
|
||||
NamedNodeMap optionAttrs = child.getAttributes();
|
||||
Node id = optionAttrs.getNamedItem("id"); //$NON-NLS-1$
|
||||
Node value = optionAttrs.getNamedItem("value"); //$NON-NLS-1$
|
||||
if (id != null && value != null)
|
||||
cfg.setOption(id.getNodeValue(), value.getNodeValue());
|
||||
} else if (child.getNodeName().equals("flag")) { //$NON-NLS-1$
|
||||
// read in flag values
|
||||
NamedNodeMap optionAttrs = child.getAttributes();
|
||||
Node id = optionAttrs.getNamedItem("id"); //$NON-NLS-1$
|
||||
String idValue = id.getNodeValue();
|
||||
IConfigureOption opt = cfg.getOption(idValue);
|
||||
if (opt instanceof FlagConfigureOption) {
|
||||
NodeList l2 = child.getChildNodes();
|
||||
for (int z = 0; z < l2.getLength(); ++z) {
|
||||
Node flagChild = l2.item(z);
|
||||
if (flagChild.getNodeName().equals("flagvalue")) { //$NON-NLS-1$
|
||||
NamedNodeMap optionAttrs2 = flagChild.getAttributes();
|
||||
Node id2 = optionAttrs2.getNamedItem("id"); //$NON-NLS-1$
|
||||
Node value = optionAttrs2.getNamedItem("value"); //$NON-NLS-1$
|
||||
cfg.setOption(id2.getNodeValue(), value.getNodeValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cfg.setDirty(false);
|
||||
cfgList.put(cfg.getId(), cfg);
|
||||
}
|
||||
if (cfgList.size() > 0) {
|
||||
configs.put(projectName, cfgList);
|
||||
list = cfgList;
|
||||
}
|
||||
}
|
||||
} catch (ParserConfigurationException | SAXException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public synchronized IAConfiguration getTmpConfiguration(IProject p, ICConfigurationDescription cfgd) {
|
||||
Map<String, IAConfiguration> list = getTmpConfigs(p);
|
||||
IAConfiguration acfg = list.get(cfgd.getId());
|
||||
if (acfg != null) {
|
||||
return acfg;
|
||||
}
|
||||
IAConfiguration oldCfg = getConfiguration(p, cfgd.getId(), false);
|
||||
list.put(cfgd.getId(), oldCfg);
|
||||
return oldCfg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone a configuration and put it on the tmp list if it is not already a saved configuration
|
||||
* and not already on the tmp list.
|
||||
*
|
||||
* @param p project
|
||||
* @param oldId the id of the old configuration to clone
|
||||
* @param cfgd the configuration descriptor for the clone
|
||||
* @return true if the configuration is already saved, false otherwise
|
||||
*/
|
||||
public synchronized boolean cloneCfg(IProject p, String oldId, ICConfigurationDescription cfgd) {
|
||||
if (isConfigurationAlreadySaved(p, cfgd))
|
||||
return true;
|
||||
Map<String, IAConfiguration> tmpList = getTmpConfigs(p);
|
||||
String newId = cfgd.getId();
|
||||
// Don't bother if the new configuration is already on the tmp list
|
||||
IAConfiguration cfg = tmpList.get(newId);
|
||||
if (cfg != null)
|
||||
return false;
|
||||
// Otherwise, try and find the old id to copy the configuration from
|
||||
// or punt if not found
|
||||
IAConfiguration oldCfg = null;
|
||||
Map<String, IAConfiguration> savedList = getSavedConfigs(p);
|
||||
if (savedList != null)
|
||||
oldCfg = savedList.get(oldId);
|
||||
if (oldCfg != null) {
|
||||
IAConfiguration newCfg = oldCfg.copy(newId);
|
||||
tmpList.put(cfgd.getId(), newCfg);
|
||||
// Check to see if the new configuration is already stored as part of the project description.
|
||||
// If yes, it should already be saved. This can occur if the configuration was added as part of
|
||||
// another CDT Property page and the Autotools Property page was never opened.
|
||||
if (CoreModel.getDefault().getProjectDescription(p).getConfigurationById(newId) != null) {
|
||||
addConfiguration(p, newCfg);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Map<String, IAConfiguration> getTmpConfigs(IProject p) {
|
||||
Map<String, IAConfiguration> tmpList = tmpConfigs.get(p.getName());
|
||||
if (tmpList == null) {
|
||||
tmpList = new HashMap<>();
|
||||
tmpConfigs.put(p.getName(), tmpList);
|
||||
}
|
||||
return tmpList;
|
||||
}
|
||||
|
||||
public synchronized void clearTmpConfigurations(IProject p) {
|
||||
tmpConfigs.remove(p.getName());
|
||||
}
|
||||
|
||||
public synchronized void saveConfigs(IProject project) {
|
||||
synchronized (project) {
|
||||
ICConfigurationDescription[] cfgds = CoreModel.getDefault().getProjectDescription(project)
|
||||
.getConfigurations();
|
||||
saveConfigs(project, cfgds);
|
||||
}
|
||||
}
|
||||
|
||||
private void syncNameField(ICConfigurationDescription cfgd) {
|
||||
IConfiguration icfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
|
||||
String id = cfgd.getId();
|
||||
if (icfg != null) {
|
||||
IToolChain toolchain = icfg.getToolChain();
|
||||
ITool[] tools = toolchain.getTools();
|
||||
for (int j = 0; j < tools.length; ++j) {
|
||||
ITool tool = tools[j];
|
||||
if (tool.getName().equals("configure")) { //$NON-NLS-1$
|
||||
IOption option = tool
|
||||
.getOptionBySuperClassId("org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"); //$NON-NLS-1$
|
||||
IHoldsOptions h = tool;
|
||||
try {
|
||||
IOption optionToSet = h.getOptionToSet(option, false);
|
||||
optionToSet.setValue(id);
|
||||
} catch (BuildException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String xmlEscape(String value) {
|
||||
value = value.replaceAll("\\&", "&"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\\"", """); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\\'", "'"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\<", "<"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\>", ">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return value;
|
||||
}
|
||||
|
||||
private void saveConfigs(IProject project, ICConfigurationDescription[] cfgds) {
|
||||
try {
|
||||
String projectName = project.getName();
|
||||
IPath output = project.getLocation().append(CFG_FILE_NAME);
|
||||
File f = output.toFile();
|
||||
if (!f.exists())
|
||||
f.createNewFile();
|
||||
if (f.exists()) {
|
||||
try (PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)))) {
|
||||
Map<String, IAConfiguration> cfgs = configs.get(projectName);
|
||||
p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
|
||||
p.println("<configurations>"); //$NON-NLS-1$
|
||||
Option[] optionList = AutotoolsConfiguration.getOptionList();
|
||||
// Before saving, force any cloning to occur via the option
|
||||
// value handler.
|
||||
setSyncing(true);
|
||||
for (int i = 0; i < cfgds.length; ++i) {
|
||||
@SuppressWarnings("unused")
|
||||
CConfigurationData data = cfgds[i].getConfigurationData();
|
||||
}
|
||||
setSyncing(false);
|
||||
for (int i = 0; i < cfgds.length; ++i) {
|
||||
ICConfigurationDescription cfgd = cfgds[i];
|
||||
String id = cfgd.getId();
|
||||
IAConfiguration cfg = cfgs.get(id);
|
||||
if (cfg == null) {
|
||||
cfg = createDefaultConfiguration(project, id);
|
||||
}
|
||||
p.println("<configuration id=\"" + cfg.getId() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
for (int j = 0; j < optionList.length; ++j) {
|
||||
Option option = optionList[j];
|
||||
IConfigureOption opt = cfg.getOption(option.getName());
|
||||
if (opt.isFlag()) {
|
||||
p.println("<flag id=\"" + option.getName() + "\" value=\"" //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ xmlEscape(option.getDefaultValue()) + "\">"); //$NON-NLS-1$
|
||||
FlagConfigureOption fco = (FlagConfigureOption) opt;
|
||||
List<String> children = fco.getChildren();
|
||||
for (int k = 0; k < children.size(); ++k) {
|
||||
String childName = children.get(k);
|
||||
IConfigureOption childopt = cfg.getOption(childName);
|
||||
p.println("<flagvalue id=\"" + childopt.getName() + "\" value=\"" //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ xmlEscape(childopt.getValue()) + "\"/>"); //$NON-NLS-1$
|
||||
}
|
||||
p.println("</flag>"); //$NON-NLS-1$
|
||||
} else if (!opt.isCategory() && !opt.isFlagValue())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + xmlEscape(opt.getValue()) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ "\"/>"); //$NON-NLS-1$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
// Sync name field as this configuration is now
|
||||
// officially saved
|
||||
syncNameField(cfgd);
|
||||
}
|
||||
p.println("</configurations>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Perform apply of configuration changes. This rewrites out the current known list of configurations
|
||||
// with any changes currently that have been made to them. If a configuration has been renamed, but this
|
||||
// has not yet been confirmed by the end-user, then only the changes to the configuration are made. The
|
||||
// name currently remains the same in the output file.
|
||||
public synchronized void applyConfigs(String projectName, ICConfigurationDescription[] cfgds) {
|
||||
try {
|
||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||
IResource res = root.findMember(projectName, false);
|
||||
if (res == null || res.getType() != IResource.PROJECT) {
|
||||
AutotoolsPlugin.logErrorMessage(
|
||||
ConfigureMessages.getFormattedString(CFG_CANT_SAVE, new String[] { projectName }));
|
||||
return;
|
||||
}
|
||||
IProject project = (IProject) res;
|
||||
IPath output = project.getLocation().append(CFG_FILE_NAME);
|
||||
File f = output.toFile();
|
||||
if (!f.exists())
|
||||
f.createNewFile();
|
||||
if (f.exists()) {
|
||||
try (PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)))) {
|
||||
Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
|
||||
if (cfgs == null)
|
||||
return;
|
||||
p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
|
||||
p.println("<configurations>"); //$NON-NLS-1$
|
||||
Option[] optionList = AutotoolsConfiguration.getOptionList();
|
||||
HashSet<String> savedIds = new HashSet<>();
|
||||
setSyncing(true);
|
||||
for (int x = 0; x < cfgds.length; ++x) {
|
||||
ICConfigurationDescription cfgd = cfgds[x];
|
||||
@SuppressWarnings("unused")
|
||||
CConfigurationData data = cfgd.getConfigurationData();
|
||||
String id = cfgd.getId();
|
||||
savedIds.add(id);
|
||||
IAConfiguration cfg = getTmpConfiguration(project, cfgd);
|
||||
cfgs.put(id, cfg); // add to list in case we have a new configuration not yet added to Project Description
|
||||
p.println("<configuration id=\"" + id + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
for (int j = 0; j < optionList.length; ++j) {
|
||||
Option option = optionList[j];
|
||||
IConfigureOption opt = cfg.getOption(option.getName());
|
||||
if (!opt.isCategory())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + opt.getValue() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
syncNameField(cfgd);
|
||||
}
|
||||
setSyncing(false);
|
||||
|
||||
// Put all the remaining configurations already saved back into the file.
|
||||
// These represent deleted configurations, but confirmation has not occurred.
|
||||
for (Entry<String, IAConfiguration> i : cfgs.entrySet()) {
|
||||
String id = i.getKey();
|
||||
// A remaining id won't appear in our savedIds list.
|
||||
if (!savedIds.contains(id)) {
|
||||
IAConfiguration cfg = i.getValue();
|
||||
p.println("<configuration id=\"" + id + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
for (int j = 0; j < optionList.length; ++j) {
|
||||
Option option = optionList[j];
|
||||
IConfigureOption opt = cfg.getOption(option.getName());
|
||||
if (!opt.isCategory())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + opt.getValue() //$NON-NLS-1$//$NON-NLS-2$
|
||||
+ "\"/>"); //$NON-NLS-1$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
p.println("</configurations>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized Map<String, IAConfiguration> getConfigurations(IProject project) {
|
||||
Map<String, IAConfiguration> list = getSavedConfigs(project);
|
||||
if (list == null) {
|
||||
list = new HashMap<>();
|
||||
configs.put(project.getName(), list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void resourceChanged(IResourceChangeEvent event) {
|
||||
IResource res = event.getResource();
|
||||
if (!(res instanceof IProject))
|
||||
return;
|
||||
String name = res.getName();
|
||||
IResourceDelta delta = event.getDelta();
|
||||
if (delta == null)
|
||||
return;
|
||||
int kind = delta.getKind();
|
||||
if (configs.containsKey(name)) {
|
||||
if (kind == IResourceDelta.REMOVED) {
|
||||
configs.remove(name);
|
||||
tmpConfigs.remove(name);
|
||||
} else if (kind == IResourceDelta.CHANGED) {
|
||||
int flags = delta.getFlags();
|
||||
if ((flags & IResourceDelta.MOVED_TO) != 0) {
|
||||
IPath path = delta.getMovedToPath();
|
||||
Map<String, IAConfiguration> cfgs = configs.get(name);
|
||||
String newName = path.lastSegment();
|
||||
configs.remove(name);
|
||||
configs.put(newName, cfgs);
|
||||
Map<String, IAConfiguration> tmpcfgs = tmpConfigs.get(name);
|
||||
tmpConfigs.remove(name);
|
||||
tmpConfigs.put(newName, tmpcfgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class AutotoolsOption implements IAutotoolsOption {
|
||||
|
||||
private IConfigureOption option;
|
||||
private final static String UNMODIFIABLE_CONFIG_OPTION = "CfgOptions.Unmodifiable.Option"; //$NON-NLS-1$
|
||||
|
||||
public AutotoolsOption(IConfigureOption option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return option.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
int type = getType();
|
||||
switch (type) {
|
||||
case STRING:
|
||||
case BIN:
|
||||
case TOOL:
|
||||
case FLAGVALUE:
|
||||
case MULTIARG:
|
||||
case INTERNAL:
|
||||
case ENVVAR:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String value) throws CoreException {
|
||||
if (!canUpdate()) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, AutotoolsPlugin.PLUGIN_ID,
|
||||
ConfigureMessages.getString(UNMODIFIABLE_CONFIG_OPTION)));
|
||||
}
|
||||
synchronized (option) {
|
||||
option.setValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
synchronized (option) {
|
||||
return option.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String createDummyId() {
|
||||
for (;;) {
|
||||
String id = "TEMP_" + rand.nextInt(); //$NON-NLS-1$
|
||||
if (tmpConfigs.get(id) == null)
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized Map<String, IAutotoolsOption> getAutotoolsCfgOptions(IProject project, String cfgId)
|
||||
throws CoreException {
|
||||
|
||||
// Verify project is valid Autotools project
|
||||
if (project == null || !project.hasNature(AutotoolsNewProjectNature.AUTOTOOLS_NATURE_ID)) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, AutotoolsPlugin.PLUGIN_ID,
|
||||
ConfigureMessages.getString(INVALID_AUTOTOOLS_PROJECT)));
|
||||
}
|
||||
|
||||
// Verify configuration id is valid
|
||||
ICConfigurationDescription cfgd = CoreModel.getDefault().getProjectDescription(project)
|
||||
.getConfigurationById(cfgId);
|
||||
IConfiguration icfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
|
||||
if (icfg == null) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, AutotoolsPlugin.PLUGIN_ID,
|
||||
ConfigureMessages.getString(INVALID_AUTOTOOLS_CONFIG_ID)));
|
||||
}
|
||||
|
||||
IAConfiguration cfg = getConfiguration(project, cfgId);
|
||||
HashMap<String, IAutotoolsOption> options = new HashMap<>();
|
||||
|
||||
// Get set of configuration options and convert to set of IAutotoolOptions
|
||||
Map<String, IConfigureOption> cfgOptions = cfg.getOptions();
|
||||
IAConfiguration dummyCfg = createDefaultConfiguration(project, createDummyId());
|
||||
for (Iterator<Entry<String, IConfigureOption>> i = cfgOptions.entrySet().iterator(); i.hasNext();) {
|
||||
Map.Entry<String, IConfigureOption> entry = i.next();
|
||||
String name = entry.getKey();
|
||||
IAutotoolsOption configOption = new AutotoolsOption(
|
||||
entry.getValue().copy((AutotoolsConfiguration) dummyCfg));
|
||||
options.put(name, configOption);
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized void updateAutotoolCfgOptions(IProject project, String cfgId,
|
||||
Map<String, IAutotoolsOption> options) throws CoreException {
|
||||
|
||||
// Verify project is valid Autotools project
|
||||
if (project == null || !project.hasNature(AutotoolsNewProjectNature.AUTOTOOLS_NATURE_ID)) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, AutotoolsPlugin.PLUGIN_ID,
|
||||
ConfigureMessages.getString(INVALID_AUTOTOOLS_PROJECT)));
|
||||
}
|
||||
|
||||
// Verify configuration id is valid
|
||||
IAConfiguration cfg = findCfg(project, cfgId);
|
||||
if (cfg == null) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, AutotoolsPlugin.PLUGIN_ID,
|
||||
ConfigureMessages.getString(INVALID_AUTOTOOLS_CONFIG_ID)));
|
||||
}
|
||||
|
||||
// Get set of configuration options and convert to set of IAutotoolOptions
|
||||
for (Iterator<Entry<String, IAutotoolsOption>> i = options.entrySet().iterator(); i.hasNext();) {
|
||||
Map.Entry<String, IAutotoolsOption> entry = i.next();
|
||||
String name = entry.getKey();
|
||||
IAutotoolsOption option = entry.getValue();
|
||||
IConfigureOption cfgOption = cfg.getOption(name);
|
||||
if (cfgOption != null) {
|
||||
cfgOption.setValue(option.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Save changes
|
||||
saveConfigs(project);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.internal.autotools.core.AutotoolsPropertyConstants;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public class AutotoolsOptionValueHandler extends ManagedOptionValueHandler implements IOptionApplicability {
|
||||
|
||||
public static final String DEFAULT_BUILD_DIR = "build"; //$NON-NLS-1$
|
||||
public static final String CONFIGURE_TOOL_ID = "org.eclipse.linuxtools.cdt.autotools.core.gnu.toolchain.tool.configure"; //$NON-NLS-1$
|
||||
public static final String BUILD_DIR_OPTION_ID = "org.eclipse.linuxtools.cdt.autotools.core.option.configure.builddir"; //$NON-NLS-1$
|
||||
public static final String BUILD_DIR_APPLY = "BuildDir.apply"; //$NON-NLS-1$
|
||||
public static final String BUILD_DIR_DEFAULT_QUESTION = "BuildDir.default"; //$NON-NLS-1$
|
||||
public static final String BUILD_DIR_YES = "BuildDir.yes"; //$NON-NLS-1$
|
||||
public static final String BUILD_DIR_NO = "BuildDir.no"; //$NON-NLS-1$
|
||||
|
||||
//FIXME: Use holder to set option value, not the "option" parameter
|
||||
@Override
|
||||
public boolean handleValue(IBuildObject buildObject, IHoldsOptions holder, IOption option, String extraArgument,
|
||||
int event) {
|
||||
// Get the current value of the build dir option.
|
||||
String value = (String) option.getValue();
|
||||
|
||||
if (buildObject instanceof IConfiguration && (event == IManagedOptionValueHandler.EVENT_OPEN)) {
|
||||
// SortedSet<Integer> nums = new TreeSet<Integer>();
|
||||
IConfiguration configuration = (IConfiguration) buildObject;
|
||||
ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(configuration);
|
||||
if (option.getName().equals("Name") && cfgd != null) { //$NON-NLS-1$
|
||||
String cfgId = cfgd.getId();
|
||||
if (!value.isEmpty() && !value.equals(cfgId)) {
|
||||
// we have a cloned configuration and we know that the
|
||||
// clonee's name is the value of the option
|
||||
IProject project = (IProject) configuration.getManagedProject().getOwner();
|
||||
String autoName = null;
|
||||
String autoNameTemplate = null;
|
||||
// Check if we are supposed to automatically name the build directory for any
|
||||
// new configuration. If yes, generate a build directory under the project using
|
||||
// the configuration name which must be unique.
|
||||
try {
|
||||
autoName = project.getPersistentProperty(AutotoolsPropertyConstants.AUTO_BUILD_NAME);
|
||||
} catch (CoreException e) {
|
||||
// ignore
|
||||
}
|
||||
if (autoName == null || autoName.equals(AutotoolsPropertyConstants.TRUE)) {
|
||||
autoNameTemplate = "${workspace_loc:/" + project.getName() + //$NON-NLS-1$
|
||||
"}/build-" + fixName(configuration.getName()); //$NON-NLS-1$
|
||||
IBuilder cfgBuilder = configuration.getEditableBuilder();
|
||||
cfgBuilder.setBuildPath(autoNameTemplate);
|
||||
}
|
||||
// Clone old configuration to tmp configuration list
|
||||
boolean isSaved = AutotoolsConfigurationManager.getInstance().cloneCfg(project, value, cfgd);
|
||||
// Check to see if we should patch up the name option. If we aren't synchronizing
|
||||
// configurations or the configuration isn't already saved, we leave the name field alone
|
||||
// so we will trigger this again when the clone will get used.
|
||||
if (!isSaved && !AutotoolsConfigurationManager.getInstance().isSyncing()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
try {
|
||||
IOption optionToSet = holder.getOptionToSet(option, false);
|
||||
optionToSet.setValue(cfgId);
|
||||
} catch (BuildException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The event was not handled, thus return false
|
||||
return true;
|
||||
}
|
||||
|
||||
private String fixName(String cfgName) {
|
||||
// Replace whitespace with underscores.
|
||||
return cfgName.replaceAll("\\s", "_"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
// IOptionApplicability methods
|
||||
|
||||
@Override
|
||||
public boolean isOptionEnabled(IBuildObject configuration, IHoldsOptions holder, IOption option) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOptionUsedInCommandLine(IBuildObject configuration, IHoldsOptions holder, IOption option) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOptionVisible(IBuildObject configuration, IHoldsOptions holder, IOption option) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public class BinConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private boolean value;
|
||||
|
||||
public BinConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
}
|
||||
|
||||
public BinConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
}
|
||||
|
||||
private BinConfigureOption(String name, AutotoolsConfiguration cfg, boolean value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
if (isParmSet())
|
||||
return getParameterName();
|
||||
else
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return Boolean.toString(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String value) {
|
||||
boolean oldValue = this.value;
|
||||
if (value.equals("true")) //$NON-NLS-1$
|
||||
this.value = true;
|
||||
else
|
||||
this.value = false;
|
||||
if (this.value != oldValue)
|
||||
cfg.setDirty(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new BinConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return BIN;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2012 Red Hat Inc..
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class ConfigureMessages {
|
||||
private static final String BUNDLE_NAME = ConfigureMessages.class.getName();
|
||||
|
||||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
|
||||
|
||||
private ConfigureMessages() {
|
||||
}
|
||||
|
||||
public static String getConfigureDescription(String name) {
|
||||
return getString("Option.configure." + name); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static String getConfigureTip(String name) {
|
||||
return getString("Option.configure." + name + ".tip"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
public static String getParameter(String name) {
|
||||
return getString("Option.configure." + name + ".parm"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string from the resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return RESOURCE_BUNDLE.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the formatted string from the resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @param args an array of substituition strings
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getFormattedString(String key, String[] args) {
|
||||
return MessageFormat.format(getString(key), (Object[]) args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
################################################################################
|
||||
# Copyright (c) 2009, 2012 Red Hat, Inc.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License 2.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
################################################################################
|
||||
Option.configure.configure=configure
|
||||
Option.configure.general=General
|
||||
Option.configure.builddir=Build directory
|
||||
Option.configure.builddir.tip=Subdirectory off of project where build will occur
|
||||
Option.configure.configdir=Configure tool directory
|
||||
Option.configure.configdir.tip=Subdirectory off of project where configure script resides
|
||||
Option.configure.cache_file=Name of cache file (--cache-file)
|
||||
Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
|
||||
Option.configure.no_create=Turn off file creation <not advised> (--no-create)
|
||||
Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
|
||||
Option.configure.quiet=Turn off checking messages (--quiet)
|
||||
Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
|
||||
Option.configure.help=Display help contents (--help)
|
||||
Option.configure.help.tip=Ask configuration file to display its help documentation
|
||||
Option.configure.version=Display version of autotools used (--version)
|
||||
Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
|
||||
|
||||
Option.configure.platform=Platform specifiers
|
||||
Option.configure.host=Host platform (--host)
|
||||
Option.configure.host.tip=Platform that project will run on
|
||||
Option.configure.target=Target platform (--target)
|
||||
Option.configure.target.tip=Platform that project will target output for
|
||||
Option.configure.build=Build platform (--build)
|
||||
Option.configure.build.tip=Platform where project is being built
|
||||
|
||||
Option.configure.directories=Directory specifiers
|
||||
Option.configure.prefix=Arch-independent install directory (--prefix)
|
||||
Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
|
||||
Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
|
||||
Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
|
||||
Option.configure.libdir=Object code library directory (--libdir)
|
||||
Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
|
||||
Option.configure.bindir=User executable directory (--bindir)
|
||||
Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
|
||||
Option.configure.sbindir=System admin executable directory (--sbindir)
|
||||
Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
|
||||
Option.configure.includedir=C Header file directory (--includdir)
|
||||
Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
|
||||
Option.configure.datadir=Read-only arch-independent data (--datadir)
|
||||
Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
|
||||
Option.configure.sysconfdir=Read-only single-machine data directory (--sysconfdir)
|
||||
Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
|
||||
Option.configure.infodir=Info file directory (--infodir)
|
||||
Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
|
||||
Option.configure.mandir=Man file documentation directory (--mandir)
|
||||
Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
|
||||
Option.configure.srcdir=Sources directory (--srcdir)
|
||||
Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
|
||||
Option.configure.localstatedir=Single-machine data directory (--localstatedir)
|
||||
Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
|
||||
Option.configure.sharedstatedir=Arch-independent data directory (--sharedstatedir)
|
||||
Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com]
|
||||
Option.configure.libexecdir=Program executable directory (--libexecdir)
|
||||
Option.configure.libexecdir.tip=Place where program executables will be installed [EPREFIX/libexec]
|
||||
Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
|
||||
Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
|
||||
|
||||
Option.configure.filenames=File-name transformations
|
||||
Option.configure.program_prefix=Program prefix (--program-prefix)
|
||||
Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
|
||||
Option.configure.program_suffix=Program suffix (--program-suffix)
|
||||
Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
|
||||
Option.configure.program_transform_name=Program name transform (--program-transform-name)
|
||||
Option.configure.program_transform_name.tip=A sed string used to transform installed program names
|
||||
|
||||
Option.configure.features=Advanced
|
||||
Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
|
||||
Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
|
||||
Option.configure.user=Additional command-line options
|
||||
Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
|
||||
|
||||
Option.configure.cflags_debug=Debug (-g)
|
||||
Option.configure.cflags_debug.tip=Specify this to generate debugging info when building
|
||||
Option.configure.cflags_debug.parm=-g
|
||||
Option.configure.cflags_gprof=Gprof support (-pg)
|
||||
Option.configure.cflags_gprof.tip=Specify this to compile your executable so it will generate gprof data when run
|
||||
Option.configure.cflags_gprof.parm=-pg
|
||||
Option.configure.cflags_gcov=Gcov support (-fprofile-arcs -ftest-coverage)
|
||||
Option.configure.cflags_gcov.tip=Specify this to compile your executable so it will generate gcov coverage data when run
|
||||
Option.configure.cflags_gcov.parm=-fprofile-arcs -ftest-coverage
|
||||
|
||||
Option.configure.cflags=Compiler Flags:
|
||||
|
||||
Option.configure.cat_envvar=Environment variables
|
||||
Option.configure.env_vars=Export environment variables
|
||||
Option.configure.env_vars.tip=Environment variables to be used during configuration
|
||||
|
||||
Option.configure.autogen=autogen
|
||||
Option.configure.options=Options
|
||||
Option.configure.autogenOpts=Additional command-line options
|
||||
Option.configure.autogenOpts.tip=Specify any additional options required
|
||||
|
||||
Tool.command=Command
|
||||
Tool.allopts=All Options
|
||||
|
||||
Configure.Error.AlreadyExists="A configuration named {0} already exists"
|
||||
Configure.Error.NoProjectToSave="Project: {0} does not exist at time of saving configuration"
|
||||
|
||||
CfgOptions.Invalid.Project=Specified project is not a valid existing Autotools project
|
||||
CfgOptions.Invalid.Config=Specified configuration id does not correspond to an existing configuration
|
||||
CfgOptions.Unmodifiable.Option=Attempting to modify an unmodifiable Autotools configure option
|
|
@ -0,0 +1,95 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ConfigureOptionCategory implements IConfigureOption {
|
||||
|
||||
private String name;
|
||||
|
||||
public ConfigureOptionCategory(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new ConfigureOptionCategory(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ConfigureMessages.getConfigureDescription(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> getParameters() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToolTip() {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return "null"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCategory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String value) {
|
||||
// Do nothing..nothing to set
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMultiArg() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlag() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlagValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return CATEGORY;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ConfigureTool extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public ConfigureTool(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = name;
|
||||
}
|
||||
|
||||
public ConfigureTool(String name, String transformedName, AutotoolsConfiguration cfg) {
|
||||
super(name, transformedName, cfg);
|
||||
this.value = name;
|
||||
}
|
||||
|
||||
private ConfigureTool(String name, AutotoolsConfiguration cfg, String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> getParameters() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new ConfigureTool(name, config, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return TOOL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2016 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
* Red Hat Inc. - add support for specifying multiple flag names at once
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FlagConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
private ArrayList<String> children = new ArrayList<>();
|
||||
|
||||
public FlagConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = name;
|
||||
}
|
||||
|
||||
public FlagConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = name;
|
||||
}
|
||||
|
||||
private FlagConfigureOption(String name, AutotoolsConfiguration cfg, String value, ArrayList<String> children) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
this.children = new ArrayList<>(children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
StringBuilder parms = new StringBuilder();
|
||||
// Multiple flags are designated by putting multiple flags together using "|" as delimiter
|
||||
String[] flagNames = getValue().split("\\|"); //$NON-NLS-1$
|
||||
String flagSeparator = ""; //$NON-NLS-1$
|
||||
for (String flagName : flagNames) {
|
||||
parms.append(flagSeparator);
|
||||
flagSeparator = " "; //$NON-NLS-1$
|
||||
StringBuilder parm = new StringBuilder(flagName).append("=\""); //$NON-NLS-1$
|
||||
boolean haveParm = false;
|
||||
if (isParmSet()) {
|
||||
String separator = ""; //$NON-NLS-1$
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
String fvname = children.get(i);
|
||||
IConfigureOption o = cfg.getOption(fvname);
|
||||
if (o.isParmSet()) {
|
||||
if (o instanceof IFlagConfigureValueOption) {
|
||||
parm.append(separator).append(((IFlagConfigureValueOption) o).getFlags());
|
||||
separator = " "; //$NON-NLS-1$
|
||||
haveParm = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (haveParm) {
|
||||
parm.append('"');
|
||||
parms.append(parm);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parms.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameterName() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
String s = children.get(i);
|
||||
IConfigureOption o = cfg.getOption(s);
|
||||
if (o.isParmSet())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new FlagConfigureOption(name, config, value, children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return FLAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addChild(String name) {
|
||||
children.add(name);
|
||||
}
|
||||
|
||||
public List<String> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FlagValueConfigureOption extends BinConfigureOption implements IFlagConfigureValueOption {
|
||||
|
||||
private String flags;
|
||||
|
||||
public FlagValueConfigureOption(String name, String msgName, AutotoolsConfiguration cfg, String flags) {
|
||||
super(name, msgName, cfg);
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
private FlagValueConfigureOption(String name, AutotoolsConfiguration cfg, String value, String flags) {
|
||||
super(name, cfg);
|
||||
this.setValue(value);
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> getParameters() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration cfg) {
|
||||
return new FlagValueConfigureOption(name, cfg, getValue(), flags);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return FLAGVALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFlags() {
|
||||
return flags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlagValue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IAConfiguration {
|
||||
IConfigureOption getOption(String name);
|
||||
|
||||
String getId();
|
||||
|
||||
boolean isDirty();
|
||||
|
||||
void setDirty(boolean value);
|
||||
|
||||
Map<String, IConfigureOption> getOptions();
|
||||
|
||||
String getToolParameters(String name);
|
||||
|
||||
List<String> getToolArgs(String name);
|
||||
|
||||
void setOption(String name, String value);
|
||||
|
||||
void setConfigToolDirectory(String configToolDirectory);
|
||||
|
||||
String getConfigToolDirectory();
|
||||
|
||||
IAConfiguration copy();
|
||||
|
||||
IAConfiguration copy(String id);
|
||||
|
||||
void setDefaultOptions();
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2015 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.IAutotoolsOption;
|
||||
|
||||
public interface IConfigureOption {
|
||||
|
||||
int CATEGORY = IAutotoolsOption.CATEGORY;
|
||||
int BIN = IAutotoolsOption.BIN;
|
||||
int STRING = IAutotoolsOption.STRING;
|
||||
int INTERNAL = IAutotoolsOption.INTERNAL;
|
||||
int MULTIARG = IAutotoolsOption.MULTIARG;
|
||||
int TOOL = IAutotoolsOption.TOOL;
|
||||
int FLAG = IAutotoolsOption.FLAG;
|
||||
int FLAGVALUE = IAutotoolsOption.FLAGVALUE;
|
||||
/**
|
||||
* @since 2.0
|
||||
*/
|
||||
int ENVVAR = IAutotoolsOption.ENVVAR;
|
||||
|
||||
String getName();
|
||||
|
||||
String getParameter();
|
||||
|
||||
List<String> getParameters();
|
||||
|
||||
boolean isParmSet();
|
||||
|
||||
String getDescription();
|
||||
|
||||
String getToolTip();
|
||||
|
||||
void setValue(String value);
|
||||
|
||||
IConfigureOption copy(AutotoolsConfiguration cfg);
|
||||
|
||||
String getValue();
|
||||
|
||||
boolean isCategory();
|
||||
|
||||
boolean isMultiArg();
|
||||
|
||||
boolean isFlag();
|
||||
|
||||
boolean isFlagValue();
|
||||
|
||||
int getType();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2012 Red Hat Inc.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public interface IFlagConfigureValueOption {
|
||||
|
||||
String getFlags();
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public class InternalConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public InternalConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public InternalConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private InternalConfigureOption(String name, AutotoolsConfiguration cfg, String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new InternalConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return INTERNAL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MultiArgConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
private List<String> userArgs;
|
||||
private boolean isDirty;
|
||||
|
||||
public MultiArgConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public MultiArgConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private MultiArgConfigureOption(String name, AutotoolsConfiguration cfg, String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
isDirty = true;
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return value.length() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMultiArg() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getParameters() {
|
||||
// May be multiple user-specified options in which case we
|
||||
// need to split them up into individual options
|
||||
if (!isDirty && userArgs != null)
|
||||
return userArgs;
|
||||
// Otherwise, we need to calculate userArgs
|
||||
userArgs = new ArrayList<>();
|
||||
isDirty = false;
|
||||
int lastArgIndex = -1;
|
||||
int i = 0;
|
||||
while (i < value.length()) {
|
||||
char ch = value.charAt(i);
|
||||
// Skip white-space
|
||||
while (Character.isWhitespace(ch)) {
|
||||
++i;
|
||||
if (i < value.length())
|
||||
ch = value.charAt(i);
|
||||
else // Otherwise we are done
|
||||
return userArgs;
|
||||
}
|
||||
|
||||
// Simplistic parser. We break up into strings delimited
|
||||
// by blanks. If quotes are used, we ignore blanks within.
|
||||
// If a backslash is used, we ignore the next character and
|
||||
// pass it through.
|
||||
lastArgIndex = i;
|
||||
boolean inString = false;
|
||||
while (i < value.length()) {
|
||||
ch = value.charAt(i);
|
||||
if (ch == '\\') // escape character
|
||||
++i; // skip over the next character
|
||||
else if (ch == '\"') { // double quotes
|
||||
inString = !inString;
|
||||
} else if (Character.isWhitespace(ch)) {
|
||||
if (!inString) {
|
||||
userArgs.add(value.substring(lastArgIndex, i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
// Look for the case where we ran out of chars for the last
|
||||
// token.
|
||||
if (i >= value.length())
|
||||
userArgs.add(value.substring(lastArgIndex));
|
||||
++i;
|
||||
}
|
||||
return userArgs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new MultiArgConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return MULTIARG;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2016 Red Hat Inc. and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public class StringConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public StringConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public StringConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private StringConfigureOption(String name, AutotoolsConfiguration cfg, String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return value.length() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
if (isParmSet())
|
||||
return getParameterName() + "=" + getValue(); //$NON-NLS-1$
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new StringConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return STRING;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2016 IBM Corporation and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Wainer dos Santos Moschetta - initial implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
/**
|
||||
* This class represents a a list of environment variables as NAME="VALUE"
|
||||
*
|
||||
* @since 2.0
|
||||
*
|
||||
*/
|
||||
public class VariableConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public VariableConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public VariableConfigureOption(String name, String transformedName, AutotoolsConfiguration autotoolsConfiguration) {
|
||||
super(name, transformedName, autotoolsConfiguration);
|
||||
this.value = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public VariableConfigureOption(String name, AutotoolsConfiguration cfg, String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
if (isParmSet())
|
||||
return this.value;
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParmSet() {
|
||||
return !this.value.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigureOption copy(AutotoolsConfiguration cfg) {
|
||||
return new VariableConfigureOption(name, cfg, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return ENVVAR;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2016 Symbian Software Limited and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Bala Torati (Symbian) - Initial API and implementation
|
||||
* Red Hat Inc - Modification to use with Autotools project
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.wizards;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.templateengine.TemplateCore;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
|
||||
import org.eclipse.cdt.core.templateengine.process.processes.Messages;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.templateengine.ProjectCreatedActions;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
/**
|
||||
* Creates a new Project in the workspace.
|
||||
*/
|
||||
public class NewAutotoolsProject extends ProcessRunner {
|
||||
protected boolean savedAutoBuildingValue;
|
||||
protected ProjectCreatedActions pca;
|
||||
protected IManagedBuildInfo info;
|
||||
|
||||
public NewAutotoolsProject() {
|
||||
pca = new ProjectCreatedActions();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor)
|
||||
throws ProcessFailureException {
|
||||
String projectName = args[0].getSimpleValue();
|
||||
String location = args[1].getSimpleValue();
|
||||
String artifactExtension = args[2].getSimpleValue();
|
||||
String isCProjectValue = args[3].getSimpleValue();
|
||||
boolean isCProject = Boolean.valueOf(isCProjectValue).booleanValue();
|
||||
|
||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
|
||||
|
||||
try {
|
||||
if (!project.exists()) {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
turnOffAutoBuild(workspace);
|
||||
|
||||
IPath locationPath = null;
|
||||
if (location != null && !location.trim().isEmpty()) {
|
||||
locationPath = Path.fromPortableString(location);
|
||||
}
|
||||
|
||||
List<?> configs = template.getTemplateInfo().getConfigurations();
|
||||
if (configs == null || configs.isEmpty()) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.4") + projectName); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
pca.setProject(project);
|
||||
pca.setProjectLocation(locationPath);
|
||||
pca.setConfigs(configs.toArray(new IConfiguration[configs.size()]));
|
||||
pca.setArtifactExtension(artifactExtension);
|
||||
info = pca.createProject(monitor, CCorePlugin.DEFAULT_INDEXER, isCProject);
|
||||
|
||||
AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
|
||||
|
||||
// For each IConfiguration, create a corresponding Autotools Configuration
|
||||
IConfiguration[] cfgs = pca.getConfigs();
|
||||
for (int i = 0; i < cfgs.length; ++i) {
|
||||
IConfiguration cfg = cfgs[i];
|
||||
ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
||||
String id = cfgd.getId();
|
||||
AutotoolsConfigurationManager.getInstance().getConfiguration(project, id, true);
|
||||
}
|
||||
AutotoolsConfigurationManager.getInstance().saveConfigs(project);
|
||||
|
||||
info.setValid(true);
|
||||
ManagedBuildManager.saveBuildInfo(project, true);
|
||||
|
||||
restoreAutoBuild(workspace);
|
||||
|
||||
} else {
|
||||
AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
|
||||
}
|
||||
} catch (CoreException | BuildException e) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
savedAutoBuildingValue = workspaceDesc.isAutoBuilding();
|
||||
workspaceDesc.setAutoBuilding(false);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
protected final void restoreAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
workspaceDesc.setAutoBuilding(savedAutoBuildingValue);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
/**
|
||||
* setOptionValue
|
||||
* @param config
|
||||
* @param option
|
||||
* @param val
|
||||
* @throws BuildException
|
||||
*/
|
||||
protected void setOptionValue(IConfiguration config, IOption option, String val) throws BuildException {
|
||||
if (val != null) {
|
||||
if (!option.isExtensionElement()) {
|
||||
option.setValue(val);
|
||||
} else {
|
||||
IOption newOption = config.getToolChain().createOption(option,
|
||||
option.getId() + "." + ManagedBuildManager.getRandomNumber(), option.getName(), false); //$NON-NLS-1$
|
||||
newOption.setValue(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2015 Symbian Software Limited and others.
|
||||
*
|
||||
* This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License 2.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Bala Torati (Symbian) - Initial API and implementation
|
||||
* Jon Beniston - Add support for Autotools
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core.wizards;
|
||||
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.templateengine.TemplateCore;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.IAConfiguration;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
public class SetAutotoolsStringOptionValue extends ProcessRunner {
|
||||
|
||||
@Override
|
||||
public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) {
|
||||
String projectName = args[0].getSimpleValue();
|
||||
IProject projectHandle = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
boolean autoBuilding = workspaceDesc.isAutoBuilding();
|
||||
workspaceDesc.setAutoBuilding(false);
|
||||
try {
|
||||
workspace.setDescription(workspaceDesc);
|
||||
} catch (CoreException e) {//ignore
|
||||
}
|
||||
|
||||
ProcessArgument[][] resourcePathObjects = args[1].getComplexArrayValue();
|
||||
for (int i = 0; i < resourcePathObjects.length; i++) {
|
||||
ProcessArgument[] resourcePathObject = resourcePathObjects[i];
|
||||
String id = resourcePathObject[0].getSimpleValue();
|
||||
String value = resourcePathObject[1].getSimpleValue();
|
||||
setOptionValue(projectHandle, id, value);
|
||||
}
|
||||
|
||||
workspaceDesc.setAutoBuilding(autoBuilding);
|
||||
try {
|
||||
workspace.setDescription(workspaceDesc);
|
||||
} catch (CoreException e) {//ignore
|
||||
}
|
||||
}
|
||||
|
||||
private void setOptionValue(IProject projectHandle, String id, String value) {
|
||||
|
||||
AutotoolsConfigurationManager.getInstance().syncConfigurations(projectHandle);
|
||||
ICConfigurationDescription[] cfgds = CoreModel.getDefault().getProjectDescription(projectHandle)
|
||||
.getConfigurations();
|
||||
if (cfgds != null && cfgds.length >= 1) {
|
||||
IAConfiguration iaConfig = AutotoolsConfigurationManager.getInstance().getConfiguration(projectHandle,
|
||||
cfgds[0].getId());
|
||||
iaConfig.setOption(id, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
6
build/org.eclipse.cdt.autotools.docs/.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
bin
|
||||
@dot
|
||||
javaCompiler...args
|
||||
build.xml
|
||||
target
|
||||
/workspace/
|
22
build/org.eclipse.cdt.autotools.docs/.project
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.autotools.docs</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,184 @@
|
|||
ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
|
||||
API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
|
||||
API_USE_SCAN_FIELD_SEVERITY=Error
|
||||
API_USE_SCAN_METHOD_SEVERITY=Error
|
||||
API_USE_SCAN_TYPE_SEVERITY=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
|
||||
CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
|
||||
CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
|
||||
ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
|
||||
FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
|
||||
FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
|
||||
FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error
|
||||
FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
|
||||
ILLEGAL_EXTEND=Warning
|
||||
ILLEGAL_IMPLEMENT=Warning
|
||||
ILLEGAL_INSTANTIATE=Warning
|
||||
ILLEGAL_OVERRIDE=Warning
|
||||
ILLEGAL_REFERENCE=Warning
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
|
||||
INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
|
||||
INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
INVALID_ANNOTATION=Ignore
|
||||
INVALID_JAVADOC_TAG=Error
|
||||
INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
|
||||
LEAK_EXTEND=Warning
|
||||
LEAK_FIELD_DECL=Warning
|
||||
LEAK_IMPLEMENT=Warning
|
||||
LEAK_METHOD_PARAM=Warning
|
||||
LEAK_METHOD_RETURN_TYPE=Warning
|
||||
METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
|
||||
METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
|
||||
METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
|
||||
METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
|
||||
MISSING_EE_DESCRIPTIONS=Warning
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
|
||||
TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
|
||||
UNUSED_PROBLEM_FILTERS=Warning
|
||||
automatically_removed_unused_problem_filters=false
|
||||
changed_execution_env=Error
|
||||
eclipse.preferences.version=1
|
||||
incompatible_api_component_version=Error
|
||||
incompatible_api_component_version_include_major_without_breaking_change=Disabled
|
||||
incompatible_api_component_version_include_minor_without_api_change=Disabled
|
||||
incompatible_api_component_version_report_major_without_breaking_change=Warning
|
||||
incompatible_api_component_version_report_minor_without_api_change=Warning
|
||||
invalid_since_tag_version=Error
|
||||
malformed_since_tag=Error
|
||||
missing_since_tag=Error
|
||||
report_api_breakage_when_major_version_incremented=Disabled
|
||||
report_resolution_errors_api_component=Warning
|
|
@ -0,0 +1,35 @@
|
|||
compilers.f.unresolved-features=1
|
||||
compilers.f.unresolved-plugins=1
|
||||
compilers.incompatible-environment=1
|
||||
compilers.p.build=1
|
||||
compilers.p.build.bin.includes=1
|
||||
compilers.p.build.encodings=2
|
||||
compilers.p.build.java.compiler=2
|
||||
compilers.p.build.java.compliance=1
|
||||
compilers.p.build.missing.output=2
|
||||
compilers.p.build.output.library=1
|
||||
compilers.p.build.source.library=1
|
||||
compilers.p.build.src.includes=1
|
||||
compilers.p.deprecated=1
|
||||
compilers.p.discouraged-class=1
|
||||
compilers.p.internal=1
|
||||
compilers.p.missing-packages=2
|
||||
compilers.p.missing-version-export-package=2
|
||||
compilers.p.missing-version-import-package=2
|
||||
compilers.p.missing-version-require-bundle=2
|
||||
compilers.p.no-required-att=0
|
||||
compilers.p.no.automatic.module=1
|
||||
compilers.p.not-externalized-att=1
|
||||
compilers.p.service.component.without.lazyactivation=1
|
||||
compilers.p.unknown-attribute=1
|
||||
compilers.p.unknown-class=1
|
||||
compilers.p.unknown-element=1
|
||||
compilers.p.unknown-identifier=1
|
||||
compilers.p.unknown-resource=1
|
||||
compilers.p.unresolved-ex-points=0
|
||||
compilers.p.unresolved-import=0
|
||||
compilers.s.create-docs=false
|
||||
compilers.s.doc-folder=doc
|
||||
compilers.s.open-tags=1
|
||||
compilers.use-project=true
|
||||
eclipse.preferences.version=1
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Building</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Building</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Special Editors</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Make Targets</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Building">Building</h1>
|
||||
<p>As mentioned, an Autotools project is an extended CDT Makefile project. Building the project is done the same as for any Makefile project. You can kick off a build manually by clicking on the Project -> Build Project menu item or if you choose, you can set up builds to occur automatically when resources are changed by checking off the Project -> Build Automatically menu item. The former build option is disabled when automatic builds are selected. By default, a
|
||||
<b>make all</b> is performed following the Autotools configure step.
|
||||
</p>
|
||||
<p>The build is performed on the active build configuration. A build configuration is a CDT construct which is a group of settings for a particular build. This is not to be confused with an Autotools configuration which is just the settings passed to the configure script. The CDT build configuration is saved across Eclipse sessions and includes environment variable settings, build macros, build location, tool settings, etc... used to perform a build. A project may have multiple build configurations. For example, a build with debugging info and a regular optimized build. As such, one configuration is designated the active configuration and as previously stated, is the one used for the build.</p>
|
||||
<p>The Autotools configure script parameters and the autogen.sh script parameters are treated as part of the CDT build configuration. While CDT settings are stored in the .cproject file within the project, the Autotools parameters are stored in a special file: .autotools. There is a one-to-one mapping of Autotools configuration parameters to a build configuration. By default, each Autotools project starts with a base build configuration named
|
||||
<b>Build (GNU)</b> which configures and builds in the top-level project directory. This is common for Autotools projects to have the user configure and build directly in the top-level source directory. The location of the build can be changed in the C/C++ Build properties:
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsCBuildProperties.png"/>
|
||||
</p>
|
||||
<p>Notice how the default is ${workspace_loc:/xxxx} where xxxx is the project name. This represents the project's location which may or may not be physically under the workspace root directory. To change the build location, it is recommended that you add a directory following the project location: e.g. ${workspace_loc:/xxxx}/yyyy. </p>
|
||||
<p>It should be noted that the configure script automatically checks to see if a configuration has been performed in the source directory. It does so by looking for the
|
||||
<b>config.status</b> file existing in the same directory as the configure script. If configuring in a different directory and the configure script finds
|
||||
<b>config.status</b> in the source directories, it will stop and report a failure. Such is the case if you originally configure and build the default configuration and either change the build location or add a new configuration later and try to build it. The second configuration fails and recommends running
|
||||
<b>make distclean</b> first. A
|
||||
<b>make distclean</b> performs a clean and in addition removes configuration files such as
|
||||
<b>config.status</b>. The Autotools plug-in recognizes when this situation is about to occur during the configure step and will automatically issue a
|
||||
<b>make distclean</b> on your behalf to avoid the failure. The cleaning operation is recorded in the Configure console. Since it also removes build artefacts for the default configuration, these may have to be regenerated by a future configure/build with the default configuration marked active. If you know you will be creating multiple configurations for the project, you can either specify the default build location to something other than the top-level project directory or else you can avoid using the default configuration and only build configurations you have added yourself.
|
||||
</p>
|
||||
<p>CDT build configurations are managed via the Managed Configurations dialog. The dialog is accessed via a button that can be found on any property page that alters data that is part of the build configuration. This includes the Project -> Properties -> Autotools -> Configure Settings page. Pressing the button results in the Manage Configurations dialog:</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsManageConfigurations.png"/>
|
||||
</p>
|
||||
<p>From the dialog, it is possible to create a new configuration, rename a configuration, delete a configuration, or set a particular configuration as being the active one. Deletion is disabled when there is only one configuration. Likewise, if there is only one configuration, it is active by default. When you choose to create a new configuration (hit the New... button), you are given a number of choices. You can:</p>
|
||||
<ol>
|
||||
<li>create a new one based on the default configuration
|
||||
<ul>
|
||||
<li>In the case of Autotools this is the default Build (GNU) configuration before any modifications were made.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>copy from an existing configuration
|
||||
<ul>
|
||||
<li>This copies all settings made.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>import from an existing project
|
||||
<ul>
|
||||
<li>This is unsupported if the project is not also an Autotools project in which case undefined behavior occurs.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>import a predefined configuration
|
||||
<ul>
|
||||
<li>This is not supported as it offers non-Autotools configurations. Undefined behavior will result if one of these are chosen.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsNewConfiguration.png"/>
|
||||
</p>
|
||||
<p>Copying a configuration copies all of its settings, including the Autotools configuration parameters. Copying all settings would normally include the build location (the directory where the build will be performed), but the Autotools plug-in, by default, intercedes and for every new configuration subsequent to the initial one, it sets the build location to build-xxxx where xxxx is the unique configuration name. The Autotools plug-in replaces any white-space in the configuration name with underscores so it is possible if you have named two configurations similarly with different white-space characters or one with underscores that you might result in a build location collision. The replacement of white-space is done because the build directory will get placed in the generated Makefile where white-space is used as delimiters and undefined behaviour would therefore occur. The automatic build directory naming behaviour can be turned off from the Project -> Properties -> Autotools page, but it is discouraged since switching between different configurations and building in the same directory can cause undefined behaviour.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsProperties.png"/>
|
||||
</p>
|
||||
<p>Note: changes to configurations are not performed unless the Ok or Apply buttons are pressed from a Property page with the Manage Configurations button on it. That is, pressing Ok from the Manage Configurations dialog does not make the changes permanent. You could add new configurations, delete others, and then hit the Cancel button from the corresponding property page and the changes would be reverted.</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Special Editors</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Make Targets</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,125 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Configuration</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Configuration</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Creating an Autotools Project</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Invoking Autotools</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Configuration">Configuration</h1>
|
||||
<p>Prior to running a build, the Autotools plug-in runs the configure script. Parameters to be passed to configure may be
|
||||
entered via the Project -> Properties -> Autotools -> Configure Settings UI shown below:</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsConfigureSettings.png"/>
|
||||
</p>
|
||||
<p>If the top-level tree item: "Configure" is selected, you will notice how the actual configure script name is editable. It is not recommended you change the name of the configure script as this is standard for Autotool projects. However, you can use this text input to add environment variables to set prior to invoking the configure script. For example, you might set the command to:
|
||||
<b>CFLAGS="-g -debug" configure</b> to have the CFLAGS environment variable overridden while configuring. The same applies to the autogen.sh script settings. On the advanced options page, there are a few prepared compilation options such as: compiling for debugging, compiling for the gcov tool, and compiling for the gprof tool. One can also specify these options directly in the additional command-line options field as demonstrated in the screen-shot above.
|
||||
</p>
|
||||
<p>For configure, there are a number of standard parameters that apply to generated configure scripts. Each parameter has its command line name presented so you can look it up in Autotools documentation. In addition, tool-tip hover help is provided.</p>
|
||||
<p>Under the Advanced category, there is a free-form line called "Additional command-line options" where you may enter any options in their command-line format. This is useful for entering custom options that your configure script supports (e.g. --enable-feature-x or --with-lib-y). It can also be used for any of the standard parameters as well if that is more familiar tor you. Parameters in this list are appended to the end of parameters derived from the standard option entries (i.e. you could get two specifications of a parameter). In the case of multiple specification, behaviour is the same as it is on the command line. You can optionally check off the "Display help contents (--help)" option under the General category to see all the standard and custom options the configure script accepts. As the configure script help is a product of how it is written, it is sometimes possible that the help is out of date with regards to added features.</p>
|
||||
<p>In some cases, a project may choose not to invoke the Autotools ahead of time and instead
|
||||
require this be done prior to configuration. The input files that are fed to the Autotools are provided, but the output of
|
||||
the Autotools are not. This may be
|
||||
done to lower the download size and additionally to avoid having to constantly regenerate the output files as the Autotools are
|
||||
updated. In such cases, an autogen.sh script may be provided which is simply a script that runs the various Autotools
|
||||
required. This script may or may not run the configure script at the end. Alternatively, there is also the
|
||||
<i>autoreconf</i>
|
||||
tool which can be invoked to recursively run through the source tree and run all Autotools where the input files are newer than
|
||||
the output files (this includes the case where no output file is present). Any options required when invoking the Autotools
|
||||
can be encoded within the input files themselves.
|
||||
</p>
|
||||
<p>The following defines a priority list of scenarios that the Autotools plug-in checks for when performing the configure step and how each one is handled.</p>
|
||||
<ol>
|
||||
<li>A config.status file exists and configure script options have not changed since the last configuration
|
||||
<ul>
|
||||
<li>The config.status file is created as part of running a generated configure script. It itself is a script file and indicates a configuration has already been performed. If the configure options have not changed since that configuration, there is no need to do a full reconfigure. A simple check is performed by calling the config.status script with the --recheck option. This will verify that the generated Makefile exists and is up to date.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>A configure script exists
|
||||
<ul>
|
||||
<li>In this case, the configure script is run with any configuration options specified in the project properties.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>An autogen script exists
|
||||
<ul>
|
||||
<li>In this case, the autogen.sh script is run and following that, a check is made to see if config.status has been created, indicating that the configure script was run. If has not configured, the configure script is run automatically if it was successfully created.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>A Makefile.cvs file exists
|
||||
<ul>
|
||||
<li>A Makefile.cvs is an alternate form of autogen.sh/configure script. In this case, the file is fed to the make command. If a configure script is created and not run as part of this process, it is run automatically.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>default case
|
||||
<ul>
|
||||
<li>At this point, there is no configure script or autogen.sh script and configure has not been run previously. A last resort is to run the autoreconf command with -i to recursively search the source tree and invoke Autotools for any input file that is older than its output target (or if the target is missing). If this generates a configure script, it is run automatically.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>If after all of this, the top-level Makefile is not created, an error is generated and building stops. </p>
|
||||
<p>The configure process can be manually forced for a project via right-clicking on any file in the project to get the Context menu and selecting the Reconfigure Project menu item. A reconfigure runs the configure script even if a config.status file is found indicating a prior configuration was successful.</p>
|
||||
<p>The entire configuration step is performed by a special builder that is added when an Autotools project is created or converted from another project. The special builder runs the configure step and is positioned in the builder order to run prior to the Makefile builder.</p>
|
||||
<p>From the Project -> Properties -> Builders tab for a project you will see:</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsBuilders.png"/>
|
||||
</p>
|
||||
<p>Do not un-check the Autotools Makefile builder nor change the order of the builders. Modifying this will result in undefined behaviour.</p>
|
||||
<p>The configure step output goes to a special Configuration console added by the Autotools plug-in. This console is separate from the C-Build console which is used to display the results of the make command invocation.</p>
|
||||
<p>To see the Configure console, click on the console selector button (icon looks like a T.V.) found in the Console View and choose an entry which starts with "Configure" and has the project name.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsConfigureConsole.png"/>
|
||||
</p>
|
||||
<p>Note that configure console output is per project and shows configuration output for the last build of the project. It is not saved between Eclipse sessions.</p>
|
||||
<p>The Autotools console is an instance of a CDT Build console so the console preferences set in Window -> Preferences -> C/C++ -> Build Console apply as well.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsBuildConsole.png"/>
|
||||
</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Creating an Autotools Project</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Invoking Autotools</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,92 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Creating an Autotools Project</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Creating an Autotools Project</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Supported Environments</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Configuration</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Creating_an_Autotools_Project">Creating an Autotools Project</h1>
|
||||
<p>There a number of ways to create an Autotools project. </p>
|
||||
<h2 id="Creating_New_Project_From_Scratch">Creating New Project From Scratch</h2>
|
||||
<p>The first method is through the CDT C and C++ Project wizards which can be activated from the File -> New -> C Project and File -> New -> C++ Project menu items, respectively, which are available while in the C/C++ Perspective. These two wizards can also be located by clicking on the File -> New -> Project... menu item and then opening the C/C++ folder found there.</p>
|
||||
<p>Looking at the C Wizard, we see that there is a GNU Autotools category.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsNewCProjectWizard.png"/>
|
||||
</p>
|
||||
<p>Opening the category, there are three choices: Empty Project, Autotools Shared Library Project, or Hello World Ansi C Autotools Project. The Empty Project template means that no files will be supplied to the new project while the Hello World project will supply a sample hello world program that uses Autotools for configuring the build. The Autotools Shared Library project is an example of how to use Autotools to create a shared library. The C++ Project Wizard also has the same GNU Autotools category and the three project templates: an Empty Project, Autotools Shared Library, and a Hello World C++ Autotools sample program. If you are creating a project from scratch, it is recommended that you use either the Hello World sample project or the Autotools Shared Library sample project and make modifications. Otherwise, you will need to create a configure script for the Autotools plug-in to invoke at build time or provide a Makefile so the configuration step does not fail.</p>
|
||||
<h2 id="Creating_New_Project_When_Importing">Creating New Project When Importing</h2>
|
||||
<p>The C and C++ Wizards can also be used when importing an existing Autotools project. For example, when importing a project from CVS using File -> Import... -> CVS -> you are given the choice to "Check out as a project configured by the new project wizard".</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsCheckOutAs.png"/>
|
||||
</p>
|
||||
<p>From the New Project menu, open the C/C++ category and choose either a C Project or C++ Project, depending on the type of project being imported. If the code is both C and C++, choose C++ Project.</p>
|
||||
<p>Let's say you have a C application using Autotools and select C Project. This will bring up the C Project Wizard as displayed earlier. In this case, choose the Empty Project from the GNU Autotools category as you already have all the configuration files in place.</p>
|
||||
<h2 id="Converting_Exist_Project_After_Importing">Converting Exist Project After Importing</h2>
|
||||
<p>Another method to create an Autotools project is to convert an existing project. For example, if we import a project from SVN or CVS and do not configure using the new project wizard, the project will simply be downloaded into the workspace. At this point, it cannot be built or access various tools from the CDT.</p>
|
||||
<p>To convert it, select the project in the Project Explorer and open the File -> New -> Convert to C/C++ Project menu item as found in the C/C++ Perspective. If in another perspective, this same wizard can be found by selecting File -> New -> Other... -> C/C++ -> Convert to a C/C++ Project. This brings up the C/C++ Conversion wizard.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsConvertToCProject.png"/>
|
||||
</p>
|
||||
<p>Note how there is a set of projects that are candidates for conversion. This list contains any projects that are not already C or C++ projects. A C or C++ project includes regular CDT Managed Make and Makefile projects. Also note that the project you selected is automatically selected when the wizard opens.</p>
|
||||
<p>There is a choice of C or C++ project and a set of project types to choose from. For Autotools, select the GNU Autotools category and this will convert to an Autotools project. Once converted, this project will not show up as a candidate project in the conversion wizard.</p>
|
||||
<h2 id="Converting_Exist_Project_.28Any.29">Converting Exist Project (Any)</h2>
|
||||
<p>The final way to create an Autotools project is to use the Autotools Conversion wizard. This wizard allows one to convert from any form of project to an Autotools project. Obviously, converting a project that isn't actually C or C++ and using Autotools will result in undefined behaviour. You need to first select the project you wish to convert. After selecting, go to File -> New -> Other... -> C/C++, open the category, select "Convert to a C/C++ Autotools Project" and hit the Next button. </p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsConvertWizard.png"/>
|
||||
</p>
|
||||
<p>This brings up the following dialog:</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsConvertProject.png"/>
|
||||
</p>
|
||||
<p>Again, there are candidates for conversion. This list contains all projects that are not currently C or C++ Autotool projects. You are given the choice of C or C++ as with the standard C/C++ conversion wizard. Hitting the Finish button is all that is needed, but if you hit the Next button and continue on you can select referenced projects, if desired. </p>
|
||||
<p>Once converted to an Autotools project, there is no UI method to convert back to a regular C/C++ project. If this is desired, you need to manually remove the .project, .cproject, and .autotools files from the project directory. This will effectively remove the natures and CDT settings for the project, allowing you to convert it again however you want.</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Supported Environments</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Configuration</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,129 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Invoking Autotools</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Invoking Autotools</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Configuration</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Special Editors</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Invoking_Autotools">Invoking Autotools</h1>
|
||||
<p>To invoke the Autotools, a special sub-menu has been added to the project Context menu. Select any file in the project and then click on Invoke Autotools. There you will find a set of menu items to invoke the various Autotools for your project. The output of the tool invocation is presented in a special Autotools Console. Like the Configure and C-Build Consoles, the Autotools console is per-project and is not saved across Eclipse sessions. The console, if present, can be accessed via the "Display Selected Console" button in the Console View.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsConsole.png"/>
|
||||
</p>
|
||||
<p>The tools provided are:</p>
|
||||
<ol>
|
||||
<li>Invoke Autoconf
|
||||
<ul>
|
||||
<li>The autoconf tool is run in the current directory for the current file or folder selected for the project. There are no parameters. Autoconf can also be run by right-clicking a configure.in or configure.ac file and selected Invoke Autoconf.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Automake
|
||||
<ul>
|
||||
<li>The automake tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<br/>
|
||||
<img border="0" src="images/AutotoolsAutomake.png"/>
|
||||
<br/>The first text entry is for options while the 2nd text window is for Makefiles targets to generate. The automake tool should be invoked where the configure script is found that will generate the Makefile(s). There may be multiple Makefiles to generate in the current directory or lower. Each target location should be a Makefile and should have a corresponding Makefile.am file at the relative location specified. For example, automake x/Makefile y/Makefile Makefile specifies three targets. It is expected that there is an x/Makefile.am, y/Makefile.am, and a Makefile.am relative to the current directory. For details on automake, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Aclocal
|
||||
<ul>
|
||||
<li>The aclocal tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<br/>
|
||||
<img border="0" src="images/AutotoolsAclocal.png"/>
|
||||
<br/>The first text entry is for options while the 2nd text window is for directories to search for m4 macros. The directories can also be specified directly in the options parameters using the -I option. For details, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Autoheader
|
||||
<ul>
|
||||
<li>The autoheader tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<br/>
|
||||
<img border="0" src="images/AutotoolsAutoheader.png"/>
|
||||
<br/>The tool is used to create a template for generated header files. It should be run in a directory containing a configure script as it gets its information from there. For details, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Autoreconf
|
||||
<ul>
|
||||
<li>The autoreconf tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<br/>
|
||||
<img border="0" src="images/AutotoolsAutoreconf.png"/>
|
||||
<br/>The most useful option is the -i option to recursively call Autotools for all input files out of date with respect to their outputs. For details, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Libtoolize
|
||||
<ul>
|
||||
<li>The libtoolize tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<br/>
|
||||
<img border="0" src="images/AutotoolsLibtoolize.png"/>.
|
||||
<br/>The tool is used to add libtool support to a package. Libtool provides macros to allow a package to create a shared library without having to know all the details required for the current platform. This might include special compiler flags or linker options or special tools. For details on libtoolize, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
<br/>
|
||||
By default, the autotools are invoked simply by their names; expecting that the path has been set up appropriately. In some instances, you might want to specify a specific location for the autotools. For example, your project may require old versions of the tools which you have installed locally, but do not wish to be on your path. To set these for your project, select your project or a file/folder within it and go to Project -> Properties -> Autotools -> General and select the Tool Settings tab.
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsToolSettings.png"/>
|
||||
</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Configuration</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Special Editors</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Make Targets</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Make Targets</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Updating-This-Document.html" title="Updating This Document">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Building</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Make_Targets">Make Targets</h1>
|
||||
<p>A Makefile has a set of targets that can be built. Typically, every Makefile has an
|
||||
<b>all</b> target which builds all targets, but there may be optional targets as well. A CDT Makefile project enables one to invoke the various make targets via the Make Targets dialog. Since an Autotools project is a form of Makefile project, it too supports the Make Targets dialog.
|
||||
Make Targets are important for an Autotool project because there are a large number of make targets added to the Makefile automatically by configuration. Typically, a project is built by running
|
||||
<b>make all</b>, but it is installed by invoking
|
||||
<b>make install</b>. The install target places files in standard locations; usually system directories on a Linux system. For example, header files would be installed in /usr/include and made available to all users of the system. The install prefix (/usr) can be overridden using the configure --prefix parameter or else by specifying prefix=xxxx on the call to make (e.g. make install prefix=/my/local/directory) so that testing can be performed without modifying the whole system.
|
||||
</p>
|
||||
<p>A regular CDT Makefile project requires users to add their own Make Targets, however, the Autotools plug-in analyzes the top-level Makefile for you and creates top-level Make Targets for the project. As mentioned, these automatically added targets can be numerous. If you wish to create targets to run in sub-directories of the main build directory, you must add these manually. For example, you might wish to build docs in a lower-level sub-directory, but not for the entire project.</p>
|
||||
<p>The Make Targets dialog can be displayed in two ways:</p>
|
||||
<ol>
|
||||
<li>Selecting a file or folder in a project and clicking on the Project -> Make Target menu item</li>
|
||||
<li>Right clicking on a file or folder in a project and selecting Make Target</li>
|
||||
</ol>
|
||||
<p>This brings up a sub-menu containing Create... and Build.... to either create a new Make Target or build an existing Make Target, respectively.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsMakeTargetMenu.png"/>
|
||||
</p>
|
||||
<p>Creating a Make Target is relatively straight-forward:</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsCreateMakeTarget.png"/>
|
||||
</p>
|
||||
<p>There is nothing different in the Make Target dialog for Autotools, however, a few concepts need to be clarified.</p>
|
||||
<p>For Make Targets added as part of the Project -> Make Target menu item, the target is for the top-level Makefile for the current build. This means that if you add a Make Target this way, it will persist across configurations and will try and run the
|
||||
<b>make</b> command in the top-level build location specified for the active configuration.
|
||||
</p>
|
||||
<p>Make Targets added by using the right-click Make Target menu are location sensitive. This means that the
|
||||
<b>make</b> command will attempt to run in that directory where the right-click was performed, regardless of whether there is a Makefile present there. Let's say you want to add your own Make Target that performed a
|
||||
<b>make all install</b> (i.e. you want to group multiple targets together into one). If you are in configuration X with build directory build-X, you want to right-click in a directory that is build-X or a sub-directory of build-X. This target will issue a
|
||||
<b>make all install</b> in that particular directory. If you wanted the same target for another configuration, you would have to right-click in its build directory or lower and add another Make Target. Obviously, for top-level Make Targets, using the Project -> Make Target menu item makes the most sense since it applies to all configurations. If you add a Make Target to a source directory, it will likely fail when run because it will try and run
|
||||
<b>make</b> in that directory which will probably only contain a Makefile.in or Makefile.am file and not a Makefile which is only generated at configure time.
|
||||
</p>
|
||||
<p>The Make Target dialog can be used to override various flags within the Makefile. For example, to perform a
|
||||
<b>make install</b> and reset the prefix to /my/local/directory, you would first select the
|
||||
<b>install</b> target from the Build... dialog.
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsBuildMakeTarget.png"/>
|
||||
</p>
|
||||
<p>Then, you would click the Edit button to edit the Make Target. You can then override the prefix by specifying its value after the
|
||||
<b>make</b> command. You edit the build command by first un-checking "Use Builder Settings" which enables text entry.
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsModifyMakeTarget.png"/>
|
||||
</p>
|
||||
<p>The check-box that says "Run all project builders" should be left un-checked. By default, we only want the CDT Makefile builder to run and not the Autotools configure builder or any other builder.</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Updating-This-Document.html" title="Updating This Document">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Building</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Special Editors</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Special Editors</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Invoking Autotools</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Building</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Special_Editors">Special Editors</h1>
|
||||
<p>The Autotools plug-in provides two special editors for editing Autotool input files. The first is the Autoconf Editor. This editor is invoked when opening configure.in, configure.ac files as well as the resultant configure scripts that autoconf creates. Support includes full colourization, outline view, rudimentary error parsing, and hover help/completion.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsAutoconfEditor.png"/>
|
||||
</p>
|
||||
<p>The outline view shows macro references and program control statements such as if, else, for, etc... Hover help with text completion is provided for the various AC-prefixed and AM-prefixed macros that are provided as standard. As the macros vary from release to release of autoconf and automake, the editor uses an autoconf and automake version property to determine which set of macros it should adhere to. The versions selected affect the parsing which will issue warnings for macros that do not have enough parameters or too many parameters. To set the autoconf and automake versions for the Autoconf Editor, go to the Project -> Properties -> Autotools -> General page and select the Editors tab.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsEditorsTab.png"/>
|
||||
</p>
|
||||
<p>There you will find a pull-down of the various versions supported. Future releases may add new versions.</p>
|
||||
<p>The default autoconf and automake versions to use for editing can be set as a preference. Go to Window -> Preferences -> C/C++ -> Autotools -> Autoconf Editor and click on the Versions tab.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsEditorPreferences.png"/>
|
||||
</p>
|
||||
<p>Under the Syntax tab of the same preference page, you can change the colours used for the various elements shown in the editor.</p>
|
||||
<p>A second editor, the Automake Editor is also provided by the Autotools plug-in. This editor is invoked when opening a Makefile.am or Makefile.in file. Support includes full colourization, outline view, rudimentary error parsing, and hover help.</p>
|
||||
<p>
|
||||
<img border="0" src="images/AutotoolsAutomakeEditor.png"/>
|
||||
</p>
|
||||
<p>In the example shown, one can see the $ variable references are displayed when hovered over. This is particularly useful for $< and $@ in make targets to understand what is being referenced. In some instances, you will see reference to variables surrounded by the @ symbol (e.g. @srcdir@). This represents a variable that is to be substituted by the configure script.</p>
|
||||
<p>Rudimentary error parsing looks for syntax errors. As with the Autoconf editor, colourization can be controlled by preferences. Go to Window -> Preferences -> C/C++ -> Autotools -> Automake Editor and click on the Syntax tab.</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Invoking Autotools</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Building</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Supported Environments</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Supported Environments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Autotools Plug-in User Guide</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Creating an Autotools Project</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Supported_Environments">Supported Environments</h1>
|
||||
<p>While the Autotools should work on any Unix-based system, it has only been extensively tested on Linux as the plugins originally came from the Linux Tools project. OS-specific bugs or problems that are not reproducible on Linux may require a user work-around. For example, users of Cygwin or MinGW may require setting modifications to get the plug-in working for their project. The Autotools plug-in is not supported under a regular Windows environment (i.e. without Cygwin or MinGW).</p>
|
||||
<p>To use the Autotools plug-in, it is required that you have the base CDT (C/C++ Development Tools) installed in Eclipse, the GNU Autotools installed on your system, and a "sh" (shell) command must be available. The "sh" command is required to invoke the configure script.</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Autotools Plug-in User Guide</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Creating an Autotools Project</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Updating This Document</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Updating This Document</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Make Targets</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top"></td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Updating_This_Document">Updating This Document</h1>
|
||||
<p>This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit
|
||||
|
||||
<a href="https://wiki.eclipse.org/CDT/Autotools/User_Guide">https://wiki.eclipse.org/CDT/Autotools/User_Guide</a>
|
||||
</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Make Targets</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Autotools Plug-in User Guide</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Supported Environments</td>
|
||||
</tr>
|
||||
</table><hr class="navigation-separator"/>
|
||||
<h1 id="Introduction">Introduction</h1>
|
||||
<p>The Autotools plug-in for Eclipse is an optional feature of the CDT (C/C++ Development Tools) that adds support for maintaining and
|
||||
building C/C++ projects that use GNU Autotools. The Autotools plug-ins were migrated from the Linux Tools project into the CDT as part of the Eclipse Juno release.</p>
|
||||
<p>The GNU Autotools are a set of tools used to make a project portable to multiple systems or build environments. The tools aid the developer to create
|
||||
a configure script which is meant to be invoked prior to performing the build. The configure script may perform tests such as testing the current platform, the OS, what is locally installed, or any number of things. Parameters can be passed as well to provide information that is not calculable (e.g. what will be the target platform the project will be run on). Results of tests and parameters are used to create the Makefiles for the build or in some cases, additional files such as header files or code sequences. </p>
|
||||
<p>What gets tested is fully controllable by the developer by way of special input files which
|
||||
are fed to the Autotools. Typically, the most commonly used Autotools are 'autoconf', 'automake', and 'aclocal'. The 'autoconf' tool takes a 'configure.in' or 'configure.ac' input file and creates the 'configure' script previously discussed. It is possible to have multiple configure scripts in various subdirectories, but a project should be designed so there is one top-level configure script that calls any lower-level ones automatically.</p>
|
||||
<p>The 'automake' tool takes a 'Makefile.am' input file and creates a 'Makefile.in' file which is used at configuration time by the configure script as a template for creating a Makefile. Each Makefile will have its own corresponding Makefile.in file. There may be if/else logic used to determine what ends up in the Makefile or there may be requests to directly substitute variables calculated in the configure step.</p>
|
||||
<p>The 'aclocal' tool creates a repository of macros that are specified directly or indirectly in the 'autoconf' input files. Such macros are provided to perform commonly used tests or actions (e.g. test that a certain header file
|
||||
exists or find the C compiler). The macros are written in a language called m4 and the developer is free to create their own macros to add to the repository. </p>
|
||||
<p>The Autotools plug-in adds support for running the configure script prior to the build. As well, support is added for invoking the Autotools themselves as well as maintaining the files they use. An Autotools project extends a CDT Makefile project. Therefore, functionality in the CDT for supporting such a project applies to an Autotools project as well (e.g. C/C++ Property pages).</p>
|
||||
<p>For more details on the GNU Autotools, see
|
||||
<a href="https://www.gnu.org/software/autoconf/">https://www.gnu.org/software/autoconf/</a> and
|
||||
|
||||
<a href="https://www.gnu.org/software/automake/">https://www.gnu.org/software/automake/</a>
|
||||
</p><hr class="navigation-separator"/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Supported Environments</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 45 KiB |