diff options
| author | cbrun | 2015-01-21 17:13:33 +0000 |
|---|---|---|
| committer | cbrun | 2015-03-04 10:12:09 +0000 |
| commit | fbf8869240014b6cebf5c94d05eba12eda1adbe5 (patch) | |
| tree | cc2243152cafd8fa50042ec39816edb7e3c5d658 | |
| parent | 68d0c222913f9566d750de9954122f4ebde7c601 (diff) | |
| download | org.eclipse.sirius-fbf8869240014b6cebf5c94d05eba12eda1adbe5.tar.gz org.eclipse.sirius-fbf8869240014b6cebf5c94d05eba12eda1adbe5.tar.xz org.eclipse.sirius-fbf8869240014b6cebf5c94d05eba12eda1adbe5.zip | |
[458024] Introduce a bridge to the Acceleo3 light implementation
Add the plugins required to use the Acceleo3 light implementation from
Sirius :
- a core interpreter : o.e.s.common.acceleo.aql
- an ui plugin to delegate the code completion :
o.e.s.common.acceleo.aql.ide
- features to install and try this implementation, labelled as
"Experimental" so far.
Updates the category.xml definitions to include those features.
Updates the targetplatform definitions to add the AQL dependency on
every platform (through the use of a specific module)
Bug: 458024
Change-Id: I20d5052f474f54433b6357c0c060032784a6b6fc
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr>
62 files changed, 3053 insertions, 9 deletions
diff --git a/packaging/org.eclipse.sirius.headless.update/category.xml b/packaging/org.eclipse.sirius.headless.update/category.xml index 8b3adcb0ac..6d39894561 100644 --- a/packaging/org.eclipse.sirius.headless.update/category.xml +++ b/packaging/org.eclipse.sirius.headless.update/category.xml @@ -12,9 +12,15 @@ <feature id="org.eclipse.sirius.runtime.acceleo" version="0.0.0"> <category name="Sirius"/> </feature> + <feature id="org.eclipse.sirius.runtime.aql" version="0.0.0"> + <category name="Sirius"/> + </feature> <feature id="org.eclipse.sirius.runtime.acceleo.source" version="0.0.0"> <category name="Sirius.SDK"/> </feature> + <feature id="org.eclipse.sirius.runtime.aql.source" version="0.0.0"> + <category name="Sirius.SDK"/> + </feature> <feature id="org.eclipse.sirius.runtime.ocl" version="0.0.0"> <category name="Sirius"/> </feature> diff --git a/packaging/org.eclipse.sirius.parent/pom.xml b/packaging/org.eclipse.sirius.parent/pom.xml index efdb3d9d53..81b3967243 100644 --- a/packaging/org.eclipse.sirius.parent/pom.xml +++ b/packaging/org.eclipse.sirius.parent/pom.xml @@ -249,6 +249,7 @@ <module>../../plugins/org.eclipse.sirius</module> <module>../../plugins/org.eclipse.sirius.common</module> <module>../../plugins/org.eclipse.sirius.common.acceleo.mtl</module> + <module>../../plugins/org.eclipse.sirius.common.acceleo.aql</module> <module>../../plugins/org.eclipse.sirius.common.ocl</module> <module>../../plugins/org.eclipse.sirius.diagram</module> <module>../../plugins/org.eclipse.sirius.diagram.layoutdata</module> @@ -260,6 +261,7 @@ <!-- features --> <module>../../packaging/org.eclipse.sirius.runtime</module> <module>../../packaging/org.eclipse.sirius.runtime.acceleo</module> + <module>../../packaging/org.eclipse.sirius.runtime.aql</module> <module>../../packaging/org.eclipse.sirius.runtime.ocl</module> <!-- update sites --> @@ -284,6 +286,7 @@ <module>../../plugins/org.eclipse.sirius.ext.jface</module> <module>../../plugins/org.eclipse.sirius.ext.swt</module> <module>../../plugins/org.eclipse.sirius.common.acceleo.mtl.ide</module> + <module>../../plugins/org.eclipse.sirius.common.acceleo.aql.ide</module> <module>../../plugins/org.eclipse.sirius.common.ui</module> <module>../../plugins/org.eclipse.sirius.common.xtext</module> <module>../../plugins/org.eclipse.sirius.diagram.sequence.edit</module> @@ -318,6 +321,7 @@ <module>../../packaging/org.eclipse.sirius.runtime.ide.xtext</module> <module>../../packaging/org.eclipse.sirius.samples</module> <module>../../packaging/org.eclipse.sirius.specifier.ide.ui.acceleo</module> + <module>../../packaging/org.eclipse.sirius.specifier.ide.ui.aql</module> <module>../../packaging/org.eclipse.sirius.specifier.ide.ui</module> <module>../../packaging/org.eclipse.sirius.tests.support</module> diff --git a/packaging/org.eclipse.sirius.runtime.aql/.project b/packaging/org.eclipse.sirius.runtime.aql/.project new file mode 100644 index 0000000000..f58e10cd27 --- /dev/null +++ b/packaging/org.eclipse.sirius.runtime.aql/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.runtime.aql</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> diff --git a/packaging/org.eclipse.sirius.runtime.aql/build.properties b/packaging/org.eclipse.sirius.runtime.aql/build.properties new file mode 100644 index 0000000000..32a9748c8b --- /dev/null +++ b/packaging/org.eclipse.sirius.runtime.aql/build.properties @@ -0,0 +1,13 @@ +# ==================================================================== +# Copyright (c) 2015 Obeo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== +bin.includes = feature.xml,\ + feature.properties,\ + epl-v10.html diff --git a/packaging/org.eclipse.sirius.runtime.aql/epl-v10.html b/packaging/org.eclipse.sirius.runtime.aql/epl-v10.html new file mode 100644 index 0000000000..ed4b196655 --- /dev/null +++ b/packaging/org.eclipse.sirius.runtime.aql/epl-v10.html @@ -0,0 +1,328 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" +xmlns:w="urn:schemas-microsoft-com:office:word" +xmlns="http://www.w3.org/TR/REC-html40"> + +<head> +<meta http-equiv=Content-Type content="text/html; charset=windows-1252"> +<meta name=ProgId content=Word.Document> +<meta name=Generator content="Microsoft Word 9"> +<meta name=Originator content="Microsoft Word 9"> +<link rel=File-List +href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"> +<title>Eclipse Public License - Version 1.0</title> +<!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style> +</head> + +<body lang=EN-US style='tab-interval:.5in'> + +<div class=Section1> + +<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p> + +<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear=left> +b) in the case of each subsequent Contributor:</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) +changes to the Program, and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) +additions to the Program;</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>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 additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style='font-size:10.0pt'>"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style='font-size:10.0pt'>"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. </span></p> + +<p><span style='font-size:10.0pt'>"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style='font-size:10.0pt'>"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span +style='color:red'> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style='color:green'> </span>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 and object code 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. </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>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.</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>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. </span></p> + +<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p> + +<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) +its license agreement:</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) +effectively disclaims on behalf of all 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; </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style='color:blue'> </span></span></p> + +<p><span style='font-size:10.0pt'>When the Program is made available in source +code form:</span> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +it must be made available under this Agreement; and </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style='font-size:10.0pt'>Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p> + +<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, 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. </span></p> + +<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, 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.</span> </p> + +<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><span style='font-size:10.0pt'>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. </span></p> + +<p><span style='font-size:10.0pt'>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. </span></p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> + +</div> + +</body> + +</html>
\ No newline at end of file diff --git a/packaging/org.eclipse.sirius.runtime.aql/feature.properties b/packaging/org.eclipse.sirius.runtime.aql/feature.properties new file mode 100644 index 0000000000..55b0095b6d --- /dev/null +++ b/packaging/org.eclipse.sirius.runtime.aql/feature.properties @@ -0,0 +1,21 @@ +# ==================================================================== +# Copyright (c) 2015 Obeo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== +featureName = Sirius Runtime Support for AQL (Experimental) +providerName = Eclipse Modeling Project +copyright=\ +Copyright (c) 2015 Obeo and others.\n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/legal/epl-v10.html\n\ +\n\ +Contributors:\n\ + Obeo - initial API and implementation\n diff --git a/packaging/org.eclipse.sirius.runtime.aql/feature.xml b/packaging/org.eclipse.sirius.runtime.aql/feature.xml new file mode 100644 index 0000000000..08dec8cc24 --- /dev/null +++ b/packaging/org.eclipse.sirius.runtime.aql/feature.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Obeo + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> +<feature + id="org.eclipse.sirius.runtime.aql" + label="%featureName" + version="3.0.0.qualifier" + provider-name="%providerName" + plugin="org.eclipse.sirius.common.acceleo.aql" + license-feature="org.eclipse.license" + license-feature-version="0.0.0"> + + <description url="http://www.eclipse.org/sirius"> + Sirius runtime support for interpreting Acceleo expression in Viewpoint Specification Models using the AQL light interpreter. + Install this if you want to use the AQL light interpreter. + </description> + + <copyright> + %copyright + </copyright> + + <license url="%licenseURL"> + %license + </license> + + <plugin + id="org.eclipse.sirius.common.acceleo.aql" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + +</feature> diff --git a/packaging/org.eclipse.sirius.runtime.aql/pom.xml b/packaging/org.eclipse.sirius.runtime.aql/pom.xml new file mode 100644 index 0000000000..fcc4582241 --- /dev/null +++ b/packaging/org.eclipse.sirius.runtime.aql/pom.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Obeo + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>3.0.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.runtime.aql</artifactId> + <packaging>eclipse-feature</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho.extras</groupId> + <artifactId>tycho-source-feature-plugin</artifactId> + <version>${tycho-extras-version}</version> + <executions> + <execution> + <id>source-feature</id> + <phase>package</phase> + <goals> + <goal>source-feature</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-p2-plugin</artifactId> + <version>${tycho-version}</version> + <executions> + <execution> + <id>attached-p2-metadata</id> + <phase>package</phase> + <goals> + <goal>p2-metadata</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> diff --git a/packaging/org.eclipse.sirius.specifier.ide.ui.aql/.project b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/.project new file mode 100644 index 0000000000..5ce4d2fa8e --- /dev/null +++ b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.specifier.ide.ui.aql</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> diff --git a/packaging/org.eclipse.sirius.specifier.ide.ui.aql/build.properties b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/build.properties new file mode 100644 index 0000000000..46d2ca1a70 --- /dev/null +++ b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/build.properties @@ -0,0 +1,13 @@ +# ==================================================================== +# Copyright (c) 2007, 2014 THALES GLOBAL SERVICES +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== +bin.includes = feature.xml,\ + feature.properties,\ + epl-v10.html diff --git a/packaging/org.eclipse.sirius.specifier.ide.ui.aql/epl-v10.html b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/epl-v10.html new file mode 100644 index 0000000000..ed4b196655 --- /dev/null +++ b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/epl-v10.html @@ -0,0 +1,328 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" +xmlns:w="urn:schemas-microsoft-com:office:word" +xmlns="http://www.w3.org/TR/REC-html40"> + +<head> +<meta http-equiv=Content-Type content="text/html; charset=windows-1252"> +<meta name=ProgId content=Word.Document> +<meta name=Generator content="Microsoft Word 9"> +<meta name=Originator content="Microsoft Word 9"> +<link rel=File-List +href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"> +<title>Eclipse Public License - Version 1.0</title> +<!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style> +</head> + +<body lang=EN-US style='tab-interval:.5in'> + +<div class=Section1> + +<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p> + +<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear=left> +b) in the case of each subsequent Contributor:</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) +changes to the Program, and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) +additions to the Program;</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>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 additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style='font-size:10.0pt'>"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style='font-size:10.0pt'>"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. </span></p> + +<p><span style='font-size:10.0pt'>"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style='font-size:10.0pt'>"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span +style='color:red'> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style='color:green'> </span>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 and object code 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. </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>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.</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>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. </span></p> + +<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p> + +<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) +its license agreement:</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) +effectively disclaims on behalf of all 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; </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style='color:blue'> </span></span></p> + +<p><span style='font-size:10.0pt'>When the Program is made available in source +code form:</span> </p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) +it must be made available under this Agreement; and </span></p> + +<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style='font-size:10.0pt'>Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p> + +<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, 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. </span></p> + +<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, 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.</span> </p> + +<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><span style='font-size:10.0pt'>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. </span></p> + +<p><span style='font-size:10.0pt'>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. </span></p> + +<p><span style='font-size:10.0pt'>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.</span> </p> + +<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> + +</div> + +</body> + +</html>
\ No newline at end of file diff --git a/packaging/org.eclipse.sirius.specifier.ide.ui.aql/feature.properties b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/feature.properties new file mode 100644 index 0000000000..708c1f7721 --- /dev/null +++ b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/feature.properties @@ -0,0 +1,21 @@ +# ==================================================================== +# Copyright (c) 2015 Obeo and others +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== +featureName = Sirius Specification Editor Support for AQL (Experimental) +providerName = Eclipse Modeling Project +copyright=\ +Copyright (c) 2015 Obeo and others.\n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/legal/epl-v10.html\n\ +\n\ +Contributors:\n\ + Obeo - initial API and implementation\n diff --git a/packaging/org.eclipse.sirius.specifier.ide.ui.aql/feature.xml b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/feature.xml new file mode 100644 index 0000000000..32d1792c6b --- /dev/null +++ b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/feature.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2007, 2014 THALES GLOBAL SERVICES and others + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> +<feature + id="org.eclipse.sirius.specifier.ide.ui.aql" + label="%featureName" + version="3.0.0.qualifier" + provider-name="%providerName" + plugin="org.eclipse.sirius.common.acceleo.aql.ide" + license-feature="org.eclipse.license" + license-feature-version="0.0.0"> + + <description url="http://www.eclipse.org/sirius"> + Provides completion and validation for Acceleo Query Language expressions in the VSM editor using the experimental light interpreter. + Install this if you want to try the light interpreter. + </description> + + <copyright> + %copyright + </copyright> + + <license url="%licenseURL"> + %license + </license> + + <plugin + id="org.eclipse.sirius.common.acceleo.aql.ide" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + +</feature> diff --git a/packaging/org.eclipse.sirius.specifier.ide.ui.aql/pom.xml b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/pom.xml new file mode 100644 index 0000000000..99b08f02a6 --- /dev/null +++ b/packaging/org.eclipse.sirius.specifier.ide.ui.aql/pom.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Obeo + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>3.0.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.specifier.ide.ui.aql</artifactId> + <packaging>eclipse-feature</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho.extras</groupId> + <artifactId>tycho-source-feature-plugin</artifactId> + <version>${tycho-extras-version}</version> + <executions> + <execution> + <id>source-feature</id> + <phase>package</phase> + <goals> + <goal>source-feature</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-p2-plugin</artifactId> + <version>${tycho-version}</version> + <executions> + <execution> + <id>attached-p2-metadata</id> + <phase>package</phase> + <goals> + <goal>p2-metadata</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> diff --git a/packaging/org.eclipse.sirius.update/category.xml b/packaging/org.eclipse.sirius.update/category.xml index 221e33030e..65cfe59936 100644 --- a/packaging/org.eclipse.sirius.update/category.xml +++ b/packaging/org.eclipse.sirius.update/category.xml @@ -12,9 +12,15 @@ <feature id="org.eclipse.sirius.runtime.acceleo" version="0.0.0"> <category name="Sirius"/> </feature> + <feature id="org.eclipse.sirius.runtime.aql" version="0.0.0"> + <category name="Sirius"/> + </feature> <feature id="org.eclipse.sirius.runtime.acceleo.source" version="0.0.0"> <category name="Sirius.SDK"/> </feature> + <feature id="org.eclipse.sirius.runtime.aql.source" version="0.0.0"> + <category name="Sirius.SDK"/> + </feature> <feature id="org.eclipse.sirius.runtime.ocl" version="0.0.0"> <category name="Sirius"/> </feature> @@ -54,9 +60,15 @@ <feature id="org.eclipse.sirius.specifier.ide.ui.acceleo" version="0.0.0"> <category name="Sirius"/> </feature> + <feature id="org.eclipse.sirius.specifier.ide.ui.aql" version="0.0.0"> + <category name="Sirius"/> + </feature> <feature id="org.eclipse.sirius.specifier.ide.ui.acceleo.source" version="0.0.0"> <category name="Sirius.SDK"/> </feature> + <feature id="org.eclipse.sirius.specifier.ide.ui.aql.source" version="0.0.0"> + <category name="Sirius.SDK"/> + </feature> <feature id="org.eclipse.sirius.doc.feature" version="0.0.0"> <category name="Sirius"/> </feature> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.checkstyle b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.checkstyle new file mode 100644 index 0000000000..3c756ff819 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.checkstyle @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false"> + <local-check-config name="Sirius Checks" location="/org.eclipse.sirius.settings/CheckstyleConfiguration.xml" type="project" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="all" enabled="true" check-config-name="Sirius Checks" local="true"> + <file-match-pattern match-pattern="." include-pattern="true"/> + </fileset> + <filter name="FilesFromPackage" enabled="true"> + <filter-data value="src-gen"/> + </filter> +</fileset-config> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.classpath b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.classpath @@ -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-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.project b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.project new file mode 100644 index 0000000000..6d4f889262 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.common.acceleo.aql.ide</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>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..c537b63063 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..8948a3c186 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,62 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +org.eclipse.jdt.ui.javadoc=false +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**{@inheritDoc}\n *\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2013, 2014 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n * \n * Contributors\:\n * Obeo - initial API and implementation\n *******************************************************************************/\n${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></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=false +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_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=false +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=false +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 +sp_cleanup.use_type_arguments=false diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..163441778d --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.common.acceleo.aql.ide;singleton:=true +Bundle-Version: 3.0.0.qualifier +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: org.eclipse.sirius.common;bundle-version="2.0.0", + org.eclipse.sirius.common.acceleo.mtl;bundle-version="2.0.0", + org.eclipse.acceleo.query;bundle-version="3.5.0", + org.eclipse.sirius.common.acceleo.aql;bundle-version="2.0.0", + com.google.guava;bundle-version="[11.0.2,16.0)", + org.eclipse.emf.ecore;bundle-version="2.8.0" +Bundle-Localization: plugin +Import-Package: org.eclipse.sirius.ecore.extender.business.api.accessor diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/about.html b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/about.html new file mode 100644 index 0000000000..420ad0f930 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/about.html @@ -0,0 +1,27 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<!-- saved from url=(0043)http://www.eclipse.org/legal/epl/about.html --> +<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>June 5, 2006</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 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</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>
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties new file mode 100644 index 0000000000..3b33c50276 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + modeling32.png,\ + plugin.properties,\ + about.html diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/modeling32.png b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/modeling32.png Binary files differnew file mode 100644 index 0000000000..6b08de2ada --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/modeling32.png diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/plugin.properties b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/plugin.properties new file mode 100644 index 0000000000..600c2b54e5 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/plugin.properties @@ -0,0 +1,13 @@ +# ==================================================================== +# Copyright (c) 2015 Obeo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== + +pluginName = Sirius IDE Support for AQL Expressions +providerName = Eclipse Modeling Project diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/plugin.xml b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/plugin.xml new file mode 100644 index 0000000000..b342fc89ac --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/plugin.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.sirius.common.proposalProvider"> + <proposalProvider + class="org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider" + interpreter="org.eclipse.sirius.common.acceleo.aql.AcceleoAQLInterpreter"> + </proposalProvider> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/pom.xml b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/pom.xml new file mode 100644 index 0000000000..1766053d0b --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/pom.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Obeo + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>3.0.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.common.acceleo.aql.ide</artifactId> + <version>3.0.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> + +</project> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/proposal/AQLProposalProvider.java b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/proposal/AQLProposalProvider.java new file mode 100644 index 0000000000..724ba3459a --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/proposal/AQLProposalProvider.java @@ -0,0 +1,140 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.ide.proposal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.acceleo.query.runtime.ICompletionProposal; +import org.eclipse.acceleo.query.runtime.ICompletionResult; +import org.eclipse.acceleo.query.runtime.IQueryEnvironment; +import org.eclipse.acceleo.query.runtime.impl.BasicFilter; +import org.eclipse.acceleo.query.runtime.impl.QueryCompletionEngine; +import org.eclipse.acceleo.query.validation.type.EClassifierType; +import org.eclipse.acceleo.query.validation.type.IType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.sirius.common.acceleo.aql.business.api.AQLConstants; +import org.eclipse.sirius.common.acceleo.aql.business.api.ExpressionTrimmer; +import org.eclipse.sirius.common.acceleo.aql.business.api.TypesUtil; +import org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter; +import org.eclipse.sirius.common.tools.api.contentassist.ContentContext; +import org.eclipse.sirius.common.tools.api.contentassist.ContentInstanceContext; +import org.eclipse.sirius.common.tools.api.contentassist.ContentProposal; +import org.eclipse.sirius.common.tools.api.contentassist.IProposalProvider; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter; +import org.eclipse.sirius.ecore.extender.business.api.accessor.EcoreMetamodelDescriptor; +import org.eclipse.sirius.ecore.extender.business.api.accessor.MetamodelDescriptor; + +import com.google.common.collect.Lists; + +/** + * This implementation of the {@link IProposalProvider} interface will be used + * in order to provide completion for Acceleo Query expressions. + * + * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a> + */ +public class AQLProposalProvider implements IProposalProvider { + + /** + * {@inheritDoc} + * + */ + public ContentProposal getNewEmtpyExpression() { + return new ContentProposal(AQLConstants.AQL_PREFIX, AQLConstants.AQL_PREFIX, "New acceleo query language expression.", AQLConstants.AQL_PREFIX.length()); + } + + /** + * {@inheritDoc} + * + */ + public List<ContentProposal> getProposals(IInterpreter interpreter, ContentContext context) { + List<ContentProposal> proposals = new ArrayList(); + if (interpreter instanceof AQLSiriusInterpreter) { + /* + * the instance of interpreter has actually been created for the + * purpose of the completion and can be modified at will with no + * risks. + */ + ExpressionTrimmer trimer = new ExpressionTrimmer(context.getContents()); + if (trimer.positionIsWithinAQL(context.getPosition())) { + AQLSiriusInterpreter aqlInterpreter = (AQLSiriusInterpreter) interpreter; + setupInterpreter(context, aqlInterpreter); + Map<String, Set<IType>> variableTypes = TypesUtil.createAQLVariableTypesFromInterpreterContext(context.getInterpreterContext(), aqlInterpreter.getQueryEnvironment()); + + addProposals(proposals, trimer, context.getPosition(), aqlInterpreter.getQueryEnvironment(), variableTypes); + } + } + return proposals; + } + + private void setupInterpreter(ContentContext context, AQLSiriusInterpreter interpreter) { + Collection<MetamodelDescriptor> metamodels = new ArrayList<MetamodelDescriptor>(); + for (EPackage pak : context.getInterpreterContext().getAvailableEPackages()) { + if (pak != null) { + metamodels.add(new EcoreMetamodelDescriptor(pak)); + } + } + interpreter.activateMetamodels(metamodels); + Resource vsmResource = context.getInterpreterContext().getElement().eResource(); + if (vsmResource != null) { + interpreter.setProperty(IInterpreter.FILES, Lists.newArrayList(vsmResource.getURI().toPlatformString(true))); + } + for (String imp : context.getInterpreterContext().getDependencies()) { + interpreter.addImport(imp); + } + } + + private void addProposals(List<ContentProposal> proposals, ExpressionTrimmer trimmer, int position, IQueryEnvironment queryEnvironment, Map<String, Set<IType>> variableTypes) { + QueryCompletionEngine engine = new QueryCompletionEngine(queryEnvironment); + final ICompletionResult completionResult = engine.getCompletion(trimmer.getExpression(), trimmer.getPositionWithinAQL(position), variableTypes); + /* + * completionResult.sort(new ProposalComparator()); + */ + final List<ICompletionProposal> proposal = completionResult.getProposals(new BasicFilter(completionResult)); + + for (ICompletionProposal propFromAQL : proposal) { + ContentProposal propForSirius = new ContentProposal(propFromAQL.getProposal(), propFromAQL.getProposal(), propFromAQL.getClass().getSimpleName(), propFromAQL.getCursorOffset()); + proposals.add(propForSirius); + } + } + + /** + * {@inheritDoc} + * + */ + public List<ContentProposal> getProposals(IInterpreter interpreter, ContentInstanceContext context) { + List<ContentProposal> proposals = new ArrayList(); + if (interpreter instanceof AQLSiriusInterpreter) { + IQueryEnvironment queryEnvironment = ((AQLSiriusInterpreter) interpreter).getQueryEnvironment(); + + Map<String, Set<IType>> variableTypes = new LinkedHashMap<String, Set<IType>>(); + if (context.getCurrentSelected() != null) { + queryEnvironment.registerEPackage(context.getCurrentSelected().eClass().getEPackage()); + final Set<IType> potentialTypes = new LinkedHashSet<IType>(1); + potentialTypes.add(new EClassifierType(context.getCurrentSelected().eClass())); + variableTypes.put("self", potentialTypes); + } + + ExpressionTrimmer trimer = new ExpressionTrimmer(context.getTextSoFar()); + if (trimer.positionIsWithinAQL(context.getCursorPosition())) { + addProposals(proposals, trimer, context.getCursorPosition(), queryEnvironment, variableTypes); + } + + } + return proposals; + } +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/.checkstyle b/plugins/org.eclipse.sirius.common.acceleo.aql/.checkstyle new file mode 100644 index 0000000000..3c756ff819 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/.checkstyle @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false"> + <local-check-config name="Sirius Checks" location="/org.eclipse.sirius.settings/CheckstyleConfiguration.xml" type="project" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="all" enabled="true" check-config-name="Sirius Checks" local="true"> + <file-match-pattern match-pattern="." include-pattern="true"/> + </fileset> + <filter name="FilesFromPackage" enabled="true"> + <filter-data value="src-gen"/> + </filter> +</fileset-config> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/.classpath b/plugins/org.eclipse.sirius.common.acceleo.aql/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/.classpath @@ -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-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/.project b/plugins/org.eclipse.sirius.common.acceleo.aql/.project new file mode 100644 index 0000000000..630d337662 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.common.acceleo.aql</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>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.common.acceleo.aql/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..320ca7a4d2 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +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_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +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_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_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=1 +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.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +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=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=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=true +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_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=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=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not 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=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not 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_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_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=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_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_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_unary_operator=do not 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_binary_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_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_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_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_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=200 +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.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=space +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_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.sirius.common.acceleo.aql/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..b8e88380f6 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,127 @@ +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=true +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=true +cleanup.correct_indentation=true +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=true +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=true +cleanup.qualify_static_method_accesses_with_declaring_class=true +cleanup.remove_private_constructors=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=true +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=true +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.use_type_arguments=false +cleanup_profile=_Sirius +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_Sirius +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com;fr;java;javax;org; +org.eclipse.jdt.ui.javadoc=false +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**{@inheritDoc}\n *\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2013, 2014 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n * \n * Contributors\:\n * Obeo - initial API and implementation\n *******************************************************************************/\n${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></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=false +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_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=false +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=false +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 +sp_cleanup.use_type_arguments=false diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..1be8ff9001 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.common.acceleo.aql;singleton:=true +Bundle-Version: 3.0.0.qualifier +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: org.eclipse.acceleo.query;bundle-version="3.5.0", + org.eclipse.sirius.common;bundle-version="2.0.0", + org.eclipse.core.resources;bundle-version="3.4.0", + org.eclipse.core.runtime;bundle-version="3.4.0", + com.google.guava;bundle-version="[11.0.2,16.0)", + org.eclipse.sirius.ecore.extender;bundle-version="2.0.0", + org.eclipse.emf.ecore;bundle-version="2.8.0" +Export-Package: org.eclipse.sirius.common.acceleo.aql.business.api, + org.eclipse.sirius.common.acceleo.aql.business.internal +Bundle-Localization: plugin +Bundle-Activator: org.eclipse.sirius.common.acceleo.aql.business.AQLSiriusPlugin$Implementation +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/about.html b/plugins/org.eclipse.sirius.common.acceleo.aql/about.html new file mode 100644 index 0000000000..420ad0f930 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/about.html @@ -0,0 +1,27 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<!-- saved from url=(0043)http://www.eclipse.org/legal/epl/about.html --> +<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>June 5, 2006</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 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</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>
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/build.properties b/plugins/org.eclipse.sirius.common.acceleo.aql/build.properties new file mode 100644 index 0000000000..872c87f8aa --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties,\ + modeling32.png,\ + about.html diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/modeling32.png b/plugins/org.eclipse.sirius.common.acceleo.aql/modeling32.png Binary files differnew file mode 100644 index 0000000000..6b08de2ada --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/modeling32.png diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/plugin.properties b/plugins/org.eclipse.sirius.common.acceleo.aql/plugin.properties new file mode 100644 index 0000000000..ffc532596e --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/plugin.properties @@ -0,0 +1,13 @@ +# ==================================================================== +# Copyright (c) 2015 Obeo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== + +pluginName = Sirius Support for AQL Expressions +providerName = Eclipse Modeling Project diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/plugin.xml b/plugins/org.eclipse.sirius.common.acceleo.aql/plugin.xml new file mode 100644 index 0000000000..7a765c5d78 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/plugin.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<!-- + Copyright (c) 2015 OBEO + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> + +<plugin> + <extension + id="org.eclipse.sirius.common.acceleo.aql.AcceleoAQLInterpreter" + point="org.eclipse.sirius.common.expressionInterpreter"> + <expressionInterpreterProvider + interpreterProviderClass="org.eclipse.sirius.common.acceleo.aql.business.internal.AcceleoAQLInterpreterProvider"> + </expressionInterpreterProvider> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/pom.xml b/plugins/org.eclipse.sirius.common.acceleo.aql/pom.xml new file mode 100644 index 0000000000..26e854ab23 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/pom.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Obeo + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + Obeo - Initial API and implementation +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>3.0.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.common.acceleo.aql</artifactId> + <version>3.0.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> + +</project> diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java new file mode 100644 index 0000000000..6976f9dece --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +public final class AQLSiriusPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + */ + public static final AQLSiriusPlugin INSTANCE = new AQLSiriusPlugin(); + + /** + * Keep track of the singleton. + */ + private static Implementation plugin; + + /** + * Create the instance. + */ + public AQLSiriusPlugin() { + super(new ResourceLocator[0]); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/AQLConstants.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/AQLConstants.java new file mode 100644 index 0000000000..952b80dcd9 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/AQLConstants.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2013, 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business.api; + +/** + * Some constants for the AQL evaluation engine. + * + * @author cedric + */ +public final class AQLConstants { + + /** + * A suffix to explicit the use of the AQL evaluation engine. + */ + public static final String AQL_PREFIX = "aql:"; + + /** + * This class should not be instantiated as it only contains constants. + */ + private AQLConstants() { + + } + +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/ExpressionTrimmer.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/ExpressionTrimmer.java new file mode 100644 index 0000000000..3daa8329e8 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/ExpressionTrimmer.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business.api; + +/** + * An utility class which trims expressions by removing prefix/suffixes while + * maintaining index positions. + * + * @author cedric + */ +public class ExpressionTrimmer { + + /** + * This represents the prefix of an Acceleo 3 expression. + * + */ + private static final String ACCELEO_EXPRESSION_PREFIX = "["; + + /** + * This represents the suffix of an Acceleo 3 expression. + * + */ + private static final String ACCELEO_EXPRESSION_SUFFIX = "/]"; + + private int removedFromStart; + + private int removedFromEnd; + + private String expression; + + /** + * Create a new trimmer with the given expression and a position within this + * expression. + * + * @param anyExpression + * the original expression which might contains prefixes or + * suffixes. + */ + public ExpressionTrimmer(String anyExpression) { + this.expression = anyExpression; + trim(); + } + + private void trim() { + if (expression != null) { + if (expression.startsWith(AQLConstants.AQL_PREFIX)) { + expression = expression.substring(AQLConstants.AQL_PREFIX.length()); + removedFromStart += AQLConstants.AQL_PREFIX.length(); + } + if (expression.startsWith(ACCELEO_EXPRESSION_PREFIX)) { + expression = expression.substring(ACCELEO_EXPRESSION_PREFIX.length()); + removedFromStart += ACCELEO_EXPRESSION_PREFIX.length(); + } + if (expression.endsWith(ACCELEO_EXPRESSION_SUFFIX)) { + expression = expression.substring(0, expression.length() - ACCELEO_EXPRESSION_SUFFIX.length()); + removedFromEnd += ACCELEO_EXPRESSION_SUFFIX.length(); + + } + } + } + + /** + * return true if the cursor position given is within the AQL expression. + * false if it is part of the suffix/prefixes. + * + * @param position + * : the cursor position. + * @return true if the cursor position given is within the AQL expression. + * false if it was part of the suffix/prefixes. + */ + public boolean positionIsWithinAQL(int position) { + return position - removedFromStart <= expression.length() - removedFromEnd; + } + + /** + * Return the cursor position after removing the prefix/suffixes. It might + * return -1 if the cursor position before trimming was not within the + * expression. + * + * @param positionWithinExpression + * a cursor position within the global expression. + * @return the cursor position afeter removing the prefix/suffixes. -1 when + * the original position was not within the expression. + */ + public int getPositionWithinAQL(int positionWithinExpression) { + if (positionIsWithinAQL(positionWithinExpression)) { + return positionWithinExpression - removedFromStart; + } + return -1; + } + + /** + * The expression with no suffix/prefix. + * + * @return The expression with no suffix/prefix. + */ + public String getExpression() { + return expression; + } + + /** + * Return the cursor position within the global expression from a position + * within the AQL expression. + * + * @param cursorOffset + * a cursor position valid within the AQL expression. + * @return the corresponding cursor offset within the non-trimmed + * expression. + */ + public int getPositionInExpression(int cursorOffset) { + return cursorOffset + removedFromStart; + } + +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/TypesUtil.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/TypesUtil.java new file mode 100644 index 0000000000..8005006fe2 --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/api/TypesUtil.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business.api; + +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.eclipse.acceleo.query.runtime.IQueryEnvironment; +import org.eclipse.acceleo.query.validation.type.ClassType; +import org.eclipse.acceleo.query.validation.type.EClassifierType; +import org.eclipse.acceleo.query.validation.type.IType; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterContext; + +/** + * An utility class to convert types denotations. + * + * @author cedric + */ +public final class TypesUtil { + + private TypesUtil() { + + } + + /** + * Create a map of IType suitable for the AQL engine from a sirius + * {@link IInterpreterContext}. + * + * @param context + * the sirius interpreter context. + * @param queryEnvironment + * the environment to use to retrieve types from their name. + * @return a map populated with variable descriptions matching the + * {@link IInterpreterContext} variables. + */ + public static Map<String, Set<IType>> createAQLVariableTypesFromInterpreterContext(IInterpreterContext context, IQueryEnvironment queryEnvironment) { + Map<String, Set<IType>> variableTypes = new LinkedHashMap<String, Set<IType>>(); + final Set<IType> selfTyping = new LinkedHashSet<IType>(2); + for (String targetTypeName : context.getTargetTypes()) { + EClassifierType found = searchEClassifierType(queryEnvironment, targetTypeName); + if (found != null) { + selfTyping.add(found); + } + + } + if (selfTyping.size() == 0) { + selfTyping.add(new ClassType(EObject.class)); + } + variableTypes.put("self", selfTyping); + for (Entry<String, String> varDef : context.getVariables().entrySet()) { + String typeName = varDef.getValue(); + if (typeName != null) { + EClassifierType found = searchEClassifierType(queryEnvironment, typeName); + if (found != null) { + final Set<IType> potentialTypes = new LinkedHashSet<IType>(2); + potentialTypes.add(found); + variableTypes.put(varDef.getKey(), potentialTypes); + } + } + } + return variableTypes; + } + + private static EClassifierType searchEClassifierType(IQueryEnvironment queryEnvironment, String targetTypeName) { + EClassifier found = null; + int separatorPosition = targetTypeName.indexOf('.'); + if (separatorPosition > -1) { + String typeName = targetTypeName.substring(separatorPosition + 1); + String nsPrefix = targetTypeName.substring(0, separatorPosition); + found = queryEnvironment.getEPackageProvider().getType(nsPrefix, typeName); + } else { + found = queryEnvironment.getEPackageProvider().getType(targetTypeName); + } + if (found != null) { + return new EClassifierType(found); + } + return null; + } +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java new file mode 100644 index 0000000000..a252ca9ada --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java @@ -0,0 +1,437 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business.internal; + +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ExecutionException; + +import org.eclipse.acceleo.query.ast.Expression; +import org.eclipse.acceleo.query.parser.AstEvaluator; +import org.eclipse.acceleo.query.runtime.AcceleoQueryEvaluationException; +import org.eclipse.acceleo.query.runtime.AcceleoQueryValidationException; +import org.eclipse.acceleo.query.runtime.CrossReferenceProvider; +import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine; +import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine.AstResult; +import org.eclipse.acceleo.query.runtime.IQueryEnvironment; +import org.eclipse.acceleo.query.runtime.IValidationMessage; +import org.eclipse.acceleo.query.runtime.IValidationResult; +import org.eclipse.acceleo.query.runtime.InvalidAcceleoPackageException; +import org.eclipse.acceleo.query.runtime.impl.EvaluationServices; +import org.eclipse.acceleo.query.runtime.impl.Nothing; +import org.eclipse.acceleo.query.runtime.impl.QueryBuilderEngine; +import org.eclipse.acceleo.query.runtime.impl.QueryEnvironment; +import org.eclipse.acceleo.query.runtime.impl.QueryValidationEngine; +import org.eclipse.acceleo.query.validation.type.IType; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EPackage.Registry; +import org.eclipse.emf.ecore.EStructuralFeature.Setting; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.util.ECrossReferenceAdapter; +import org.eclipse.sirius.common.acceleo.aql.business.AQLSiriusPlugin; +import org.eclipse.sirius.common.acceleo.aql.business.api.AQLConstants; +import org.eclipse.sirius.common.acceleo.aql.business.api.ExpressionTrimmer; +import org.eclipse.sirius.common.acceleo.aql.business.api.TypesUtil; +import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterContext; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterStatus; +import org.eclipse.sirius.common.tools.api.interpreter.InterpreterStatusFactory; +import org.eclipse.sirius.ecore.extender.business.api.accessor.EcoreMetamodelDescriptor; +import org.eclipse.sirius.ecore.extender.business.api.accessor.MetamodelDescriptor; +import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor; +import org.osgi.framework.Bundle; + +/** + * A Sirius interpreter using the Acceleo Query Language. It only supports + * expressions which are not using implicit variables. + * + * @author cedric + */ +public class AQLSiriusInterpreter extends AcceleoAbstractInterpreter { + + private final Collection<String> imports = new LinkedHashSet<String>(); + + private LoadingCache<String, AstResult> parsedExpressions; + + private IQueryEnvironment queryEnvironment; + + private ECrossReferenceAdapter siriusXref; + + private CrossReferenceProvider xRef = new CrossReferenceProvider() { + + @Override + public Collection<Setting> getInverseReferences(EObject self) { + if (siriusXref != null) { + return siriusXref.getInverseReferences(self); + + } else { + return Collections.EMPTY_SET; + } + } + }; + + /** + * Create a new interpreter supporting the AQL evaluation engine. + */ + public AQLSiriusInterpreter() { + this.queryEnvironment = new QueryEnvironment(xRef); + final IQueryBuilderEngine builder = new QueryBuilderEngine(queryEnvironment); + this.parsedExpressions = CacheBuilder.newBuilder().maximumSize(500).build(new CacheLoader<String, AstResult>() { + + @Override + public AstResult load(String key) throws Exception { + return builder.build(key); + } + + }); + this.queryEnvironment.registerEPackage(EcorePackage.eINSTANCE); + registerEcoreModels(EPackage.Registry.INSTANCE); + + } + + @Override + public void activateMetamodels(Collection<MetamodelDescriptor> metamodels) { + Set<EPackage> additionalEPackages = Sets.newLinkedHashSet(); + for (MetamodelDescriptor descriptor : metamodels) { + if (descriptor instanceof EcoreMetamodelDescriptor) { + EPackage pkg = ((EcoreMetamodelDescriptor) descriptor).resolve(); + if (pkg != null) { + additionalEPackages.add(pkg); + } + } + } + for (EPackage ePackage : additionalEPackages) { + this.queryEnvironment.getEPackageProvider().registerPackage(ePackage); + } + } + + @Override + public void addImport(String dependency) { + if (dependency != null && dependency.contains(".") && !imports.contains(dependency)) { + imports.add(dependency); + } + updateServiceClasses(); + } + + private void updateServiceClasses() { + List<Class> classesToLoad = Lists.newArrayList(); + for (String qualifiedName : this.imports) { + Class found = null; + Iterator<String> it = viewpointPlugins.iterator(); + while (found == null && it.hasNext()) { + String bundleID = it.next(); + found = loadClassInBundle(bundleID, qualifiedName); + } + if (found != null) { + classesToLoad.add(found); + + } + + } + for (Class found : classesToLoad) { + try { + queryEnvironment.getLookupEngine().addServices(found); + } catch (InvalidAcceleoPackageException e) { + AQLSiriusPlugin.getPlugin().log(new Status(IStatus.WARNING, AQLSiriusPlugin.getPlugin().getSymbolicName(), e.getMessage(), e)); + } + } + + } + + private Class loadClassInBundle(String bundleID, String qualifiedName) { + Bundle requiredBundle = Platform.getBundle(bundleID); + if (requiredBundle != null) { + return loadClassInBundle(requiredBundle, qualifiedName); + } + return null; + + } + + private Class loadClassInBundle(Bundle bundle, String qualifiedName) { + try { + return bundle.loadClass(qualifiedName); + } catch (ClassNotFoundException e) { + /* + * nothing to report, move along to the next bundle. + */ + } catch (NoClassDefFoundError e) { + /* + * nothing to report, move along to the next bundle. + */ + } + return null; + } + + @Override + public void clearImports() { + this.imports.clear(); + updateServiceClasses(); + } + + @Override + public void dispose() { + super.dispose(); + } + + @Override + public Object evaluate(EObject target, String fullExpression) throws EvaluationException { + String expression = new ExpressionTrimmer(fullExpression).getExpression(); + Map<String, Object> variables = Maps.newLinkedHashMap(getVariables()); + variables.put("self", target); + if (target != null && target.eResource() != null && target.eResource().getResourceSet() != null) { + registerEcoreModels(target.eResource().getResourceSet().getPackageRegistry()); + } + AstResult build; + try { + build = parsedExpressions.get(expression); + Expression ast = build.getAst(); + AstEvaluator evaluator = new AstEvaluator(new EvaluationServices(queryEnvironment, false)); + Object result = evaluator.eval(variables, ast); + if (result instanceof Nothing) { + result = null; + } + return result; + } catch (ExecutionException e) { + throw new EvaluationException(e.getCause()); + } + } + + private void registerEcoreModels(Registry packageRegistry) { + for (String nsURI : packageRegistry.keySet()) { + EPackage pak = packageRegistry.getEPackage(nsURI); + if (pak != null && this.queryEnvironment.getEPackageProvider().getEPackage(pak.getNsPrefix()) == null) { + this.queryEnvironment.getEPackageProvider().registerPackage(pak); + } + } + } + + @Override + public boolean evaluateBoolean(EObject context, String expression) throws EvaluationException { + Object result = evaluate(context, expression); + final Boolean coerced; + if (result instanceof Boolean) { + coerced = (Boolean) result; + } else { + coerced = coerceValue(result, Boolean.class); + } + + if (coerced != null) { + return coerced.booleanValue(); + } + return false; + } + + @Override + public Collection<EObject> evaluateCollection(EObject context, String expression) throws EvaluationException { + Object result = evaluate(context, expression); + Collection<EObject> coercedResult = Lists.newArrayList(); + if (result instanceof Collection<?>) { + Iterables.addAll(coercedResult, Iterables.filter((Collection<?>) result, EObject.class)); + } else if (result != null && result.getClass().isArray()) { + Iterables.addAll(coercedResult, Iterables.filter(Lists.newArrayList((Object[]) result), EObject.class)); + } else { + EObject coerced = coerceValue(result, EObject.class); + if (coerced != null) { + coercedResult.add(coerced); + } + } + + return coercedResult; + } + + @Override + public EObject evaluateEObject(EObject context, String expression) throws EvaluationException { + Object result = evaluate(context, expression); + EObject coerced = coerceValue(result, EObject.class); + return coerced; + } + + @Override + public Integer evaluateInteger(EObject context, String expression) throws EvaluationException { + Object result = evaluate(context, expression); + Integer coerced = coerceValue(result, Integer.class); + return coerced; + } + + @Override + public String evaluateString(EObject context, String expression) throws EvaluationException { + Object result = evaluate(context, expression); + if (result != null) { + return result.toString(); + } + return null; + } + + @Override + public Collection<String> getImports() { + return Collections.<String> unmodifiableCollection(this.imports); + } + + @Override + public String getVariablePrefix() { + /* + * no variable prefix for this interpreter. + */ + return null; + } + + @Override + public void removeImport(String dependency) { + if (this.imports.contains(dependency)) { + this.imports.remove(dependency); + } + updateServiceClasses(); + } + + @Override + public void setCrossReferencer(ECrossReferenceAdapter crossReferencer) { + this.siriusXref = crossReferencer; + } + + @Override + public void setModelAccessor(ModelAccessor modelAccessor) { + /* + * nothing to do + */ + } + + @Override + public void setProperty(Object key, Object value) { + super.setProperty(key, value); + if (IInterpreter.FILES.equals(key)) { + /* + * this.viewpointPlugins and/or this.viewpointProjects might have + * been updated. We have to update the loaded classes. + */ + updateServiceClasses(); + } + } + + @Override + public boolean supportsValidation() { + return true; + } + + @Override + public Collection<IInterpreterStatus> validateExpression(IInterpreterContext context, String fullExpression) { + String trimmedExpression = new ExpressionTrimmer(fullExpression).getExpression(); + + for (EPackage pak : context.getAvailableEPackages()) { + if (pak != null) { + queryEnvironment.registerEPackage(pak); + } + } + Map<String, Set<IType>> variableTypes = TypesUtil.createAQLVariableTypesFromInterpreterContext(context, queryEnvironment); + + List<IInterpreterStatus> statuses = Lists.newArrayList(); + QueryValidationEngine validator = new QueryValidationEngine(this.queryEnvironment); + try { + IValidationResult validationResult = validator.validate(trimmedExpression, variableTypes); + for (IValidationMessage message : validationResult.getMessages()) { + IInterpreterStatus status = InterpreterStatusFactory.createInterpreterStatus(context, IInterpreterStatus.WARNING, message.getMessage()); + statuses.add(status); + } + } catch (AcceleoQueryValidationException e) { + statuses.add(InterpreterStatusFactory.createInterpreterStatus(context, IInterpreterStatus.ERROR, e.getMessage())); + AQLSiriusPlugin.getPlugin().log(new Status(IStatus.ERROR, AQLSiriusPlugin.getPlugin().getSymbolicName(), e.getMessage(), e)); + } catch (AcceleoQueryEvaluationException e) { + statuses.add(InterpreterStatusFactory.createInterpreterStatus(context, IInterpreterStatus.ERROR, e.getMessage())); + } + if (statuses.size() == 0) { + // TODO check the return type of the expression matches or will be + // adapted to the expected type + } + return statuses; + } + + /** + * return the cross reference provider used by this interpreter instance. + * + * @return the cross reference provider used by this interpreter instance. + */ + public CrossReferenceProvider getCrossReferenceProvider() { + return xRef; + } + + @Override + public String getPrefix() { + return AQLConstants.AQL_PREFIX; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean provides(String expression) { + return expression != null && expression.startsWith(AQLConstants.AQL_PREFIX); + } + + /** + * Tries and coerce the given <em>object</em> to an instance of the given + * class. + * + * @param <T> + * Type to which we need to coerce <em>object</em>. + * @param object + * The object we need to coerce to a given {@link Class}. + * @param clazz + * Class to which we are to cast <em>object</em>. + * @return <em>object</em> cast to type <em>T</em> if possible, + * <code>null</code> if not. + */ + @SuppressWarnings("unchecked") + protected static <T> T coerceValue(Object object, Class<T> clazz) { + if (object == null) { + return null; + } + + T result = null; + if (clazz.isInstance(object)) { + result = (T) object; + } else if (object instanceof IAdaptable) { + result = (T) ((IAdaptable) object).getAdapter(clazz); + } + + if (result == null) { + result = (T) Platform.getAdapterManager().getAdapter(object, clazz); + } + + return result; + } + + /** + * The query environment currently used by this interpreter. + * + * @return The query environment currently used by this interpreter. + */ + public IQueryEnvironment getQueryEnvironment() { + return this.queryEnvironment; + } +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AcceleoAQLInterpreterProvider.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AcceleoAQLInterpreterProvider.java new file mode 100644 index 0000000000..be18c4e0fd --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AcceleoAQLInterpreterProvider.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business.internal; + +import org.eclipse.sirius.common.acceleo.aql.business.api.AQLConstants; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterProvider; + +/** + * This will be used in order to provides interpreters for Acceleo Query + * Language expressions to the compound interpreter. + * + * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a> + */ +public class AcceleoAQLInterpreterProvider implements IInterpreterProvider { + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreterProvider#createInterpreter() + */ + public IInterpreter createInterpreter() { + return new AQLSiriusInterpreter(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreterProvider#provides(java.lang.String) + */ + public boolean provides(String expression) { + if (expression != null) { + return expression.startsWith(AQLConstants.AQL_PREFIX); + } + return false; + } +} diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AcceleoAbstractInterpreter.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AcceleoAbstractInterpreter.java new file mode 100644 index 0000000000..c35529f7ce --- /dev/null +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AcceleoAbstractInterpreter.java @@ -0,0 +1,260 @@ +/******************************************************************************* + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.common.acceleo.aql.business.internal; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Iterables; +import com.google.common.collect.ListMultimap; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Collection; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Path; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter; +import org.eclipse.sirius.common.tools.api.interpreter.IVariableStatusListener; + +/** + * An abstract class which handles the variables and classloading status. + * + * @author cedric + */ +public abstract class AcceleoAbstractInterpreter implements IInterpreter { + + /** + * This will be updated with the list of accessible viewpoint plugins, if + * any. + */ + protected final Set<String> viewpointPlugins = Sets.newLinkedHashSet(); + + /** + * This will be updated with the list of accessible viewpoint projects + * present in the workspace, if any. + */ + protected final Set<String> viewpointProjects = Sets.newLinkedHashSet(); + + /** + * This map will hold the values associated to given variable names. Note + * that even if this is a multimap, the variables are considered as a stack + * in order to be coherent with other interpreters : evaluation will + * consider the value to be a Collection, but setting/unsetting will only + * work one object by one object. + */ + private ListMultimap<String, Object> variables = ArrayListMultimap.create(); + + /** This will contain the listeners interested in our variables' status. */ + private final Set<IVariableStatusListener> variableStatusListeners = Sets.newHashSet(); + + /** + * Checks whether the given path exists in the plugins. + * + * @param path + * The path we need to check. + * @return <code>true</code> if <em>path</em> denotes an existing plugin + * resource, <code>false</code> otherwise. + */ + private static boolean existsInPlugins(String path) { + try { + URL url = new URL(path); + return FileLocator.find(url) != null; + } catch (MalformedURLException e) { + return false; + } + } + + /** + * Checks whether the given path exists in the workspace. + * + * @param path + * The path we need to check. + * @return <code>true</code> if <em>path</em> denotes an existing workspace + * resource, <code>false</code> otherwise. + */ + private static boolean existsInWorkspace(String path) { + if (path == null || path.length() == 0 || EcorePlugin.getWorkspaceRoot() == null) { + return false; + } + return ResourcesPlugin.getWorkspace().getRoot().exists(new Path(path)); + } + + /** + * Returns the last value of the given list. + * <p> + * Makes no effort to try and check whether the argument is valid. + * </p> + * + * @param values + * List from which we need the last value. + * @param <V> + * Type of the list's values. + * @return The last value of the given list. + */ + private static <V> V getLast(List<V> values) { + final ListIterator<V> iterator = values.listIterator(values.size()); + return iterator.previous(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#addVariableStatusListener(org.eclipse.sirius.common.tools.api.interpreter.IVariableStatusListener) + */ + @Override + public void addVariableStatusListener(IVariableStatusListener newListener) { + variableStatusListeners.add(newListener); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#clearVariables() + */ + @Override + public void clearVariables() { + variables.clear(); + notifyVariableListeners(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#dispose() + */ + @Override + public void dispose() { + variables.clear(); + variableStatusListeners.clear(); + viewpointPlugins.clear(); + viewpointProjects.clear(); + + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#getVariable(java.lang.String) + */ + @Override + public Object getVariable(String name) { + if (variables.containsKey(name)) { + final List<Object> values = variables.get(name); + if (!values.isEmpty()) { + return AcceleoAbstractInterpreter.getLast(values); + } + } + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#getVariables() + */ + @Override + public Map<String, ?> getVariables() { + Map<String, Object> topMostValues = Maps.newHashMap(); + for (String varName : variables.keySet()) { + topMostValues.put(varName, getVariable(varName)); + } + return topMostValues; + } + + /** + * Notifies all of the registered variable status listener of our current + * variable status. This will be called internally whenever we change the + * variable map. + */ + private void notifyVariableListeners() { + for (IVariableStatusListener variableStatusListener : variableStatusListeners) { + variableStatusListener.notifyChanged(getVariables()); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#removeVariableStatusListener(org.eclipse.sirius.common.tools.api.interpreter.IVariableStatusListener) + */ + @Override + public void removeVariableStatusListener(IVariableStatusListener listener) { + variableStatusListeners.remove(listener); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#setProperty(java.lang.Object, + * java.lang.Object) + */ + @Override + public void setProperty(Object key, Object value) { + /* + * This is called by the framework with the FILES key in order to pass + * us all the VSM files as a Collection. + */ + if (IInterpreter.FILES.equals(key)) { + if (value == null) { + viewpointProjects.clear(); + viewpointPlugins.clear(); + } else if (value instanceof Collection<?>) { + for (final String odesignPath : Iterables.filter((Collection<?>) value, String.class)) { + final URI workspaceCandidate = URI.createPlatformResourceURI(odesignPath, true); + final URI pluginCandidate = URI.createPlatformPluginURI(odesignPath, true); + if (AcceleoAbstractInterpreter.existsInWorkspace(workspaceCandidate.toPlatformString(true))) { + viewpointProjects.add(workspaceCandidate.segment(1)); + } else if (AcceleoAbstractInterpreter.existsInPlugins(URI.decode(pluginCandidate.toString()))) { + viewpointPlugins.add(pluginCandidate.segment(1)); + } + } + } + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#setVariable(java.lang.String, + * java.lang.Object) + */ + @Override + public void setVariable(String name, Object value) { + variables.put(name, value); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.sirius.common.tools.api.interpreter.IInterpreter#unSetVariable(java.lang.String) + */ + @Override + public void unSetVariable(String name) { + if (variables.containsKey(name)) { + final List<Object> values = variables.get(name); + if (!values.isEmpty()) { + final ListIterator<?> iterator = values.listIterator(values.size()); + iterator.previous(); + iterator.remove(); + notifyVariableListeners(); + } + } + } + +} diff --git a/releng/org.eclipse.sirius.targets/modules/aql-3.6.tpd b/releng/org.eclipse.sirius.targets/modules/aql-3.6.tpd new file mode 100644 index 0000000000..d2668d3671 --- /dev/null +++ b/releng/org.eclipse.sirius.targets/modules/aql-3.6.tpd @@ -0,0 +1,8 @@ +target "aql-3.6" + +with source, requirements + +location Acceleo-LastSuccessful "https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/" { + org.eclipse.acceleo.query.feature.group lazy + org.antlr.runtime [4.3.0,4.4.0) +} diff --git a/releng/org.eclipse.sirius.targets/sirius_canary.target b/releng/org.eclipse.sirius.targets/sirius_canary.target index 0dd77c54f4..b0afc5d3be 100644 --- a/releng/org.eclipse.sirius.targets/sirius_canary.target +++ b/releng/org.eclipse.sirius.targets/sirius_canary.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_canary" sequenceNumber="1423469940"> +<target name="sirius_canary" sequenceNumber="1423479706"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.license.feature.group" version="0.0.0"/> @@ -74,6 +74,7 @@ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.acceleo.feature.group" version="0.0.0"/> <unit id="org.eclipse.acceleo.ide.ui" version="0.0.0"/> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> diff --git a/releng/org.eclipse.sirius.targets/sirius_canary.targetplatform b/releng/org.eclipse.sirius.targets/sirius_canary.targetplatform index c7d4cf64a9..a4f9d23149 100644 --- a/releng/org.eclipse.sirius.targets/sirius_canary.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_canary.targetplatform @@ -71,6 +71,7 @@ location EEF-LastSuccessful "https://hudson.eclipse.org/hudson/job/emf-eef-maste location Acceleo-LastSuccessful "https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/" { org.eclipse.acceleo.feature.group lazy org.eclipse.acceleo.ide.ui lazy + org.eclipse.acceleo.query.feature.group lazy } location EMF-Compare-Nightly "http://download.eclipse.org/modeling/emf/compare/updates/nightly/latest/" { diff --git a/releng/org.eclipse.sirius.targets/sirius_juno.targetplatform b/releng/org.eclipse.sirius.targets/sirius_juno.targetplatform index 69f0b0f835..5039a9868b 100644 --- a/releng/org.eclipse.sirius.targets/sirius_juno.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_juno.targetplatform @@ -7,6 +7,7 @@ include "modules/orbit.tpd" include "modules/swtbot-2.1.tpd" include "modules/xtext-2.3.tpd" include "modules/shared-license.tpd" +include "modules/aql-3.6.tpd" with source, requirements diff --git a/releng/org.eclipse.sirius.targets/sirius_kepler.target b/releng/org.eclipse.sirius.targets/sirius_kepler.target index 90ca503c78..11d29cb3ab 100644 --- a/releng/org.eclipse.sirius.targets/sirius_kepler.target +++ b/releng/org.eclipse.sirius.targets/sirius_kepler.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_kepler" sequenceNumber="1411724014"> +<target name="sirius_kepler" sequenceNumber="1421859896"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.acceleo.doc.feature.group" version="3.4.1.201309031307"/> @@ -38,6 +38,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201412161120"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="com.google.guava" version="15.0.0.v201403281430"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.easymock" version="2.4.0.v20090202-0900"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_kepler.targetplatform b/releng/org.eclipse.sirius.targets/sirius_kepler.targetplatform index 2e3a33a89c..1f4a8eb28e 100644 --- a/releng/org.eclipse.sirius.targets/sirius_kepler.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_kepler.targetplatform @@ -7,6 +7,7 @@ include "modules/orbit.tpd" include "modules/swtbot-2.1.tpd" include "modules/xtext-2.4.tpd" include "modules/shared-license.tpd" +include "modules/aql-3.6.tpd" with source, requirements diff --git a/releng/org.eclipse.sirius.targets/sirius_luna.target b/releng/org.eclipse.sirius.targets/sirius_luna.target index 7aaafd4e70..b2df64def5 100644 --- a/releng/org.eclipse.sirius.targets/sirius_luna.target +++ b/releng/org.eclipse.sirius.targets/sirius_luna.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_luna" sequenceNumber="1425303387"> +<target name="sirius_luna" sequenceNumber="1425461075"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> @@ -25,6 +25,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201502022030"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="com.google.guava" version="15.0.0.v201403281430"/> <unit id="com.ibm.icu" version="52.1.1.v201501240615"/> <unit id="org.eclipse.acceleo.feature.group" version="3.5.1.201409021433"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_luna.targetplatform b/releng/org.eclipse.sirius.targets/sirius_luna.targetplatform index 8fa3227389..1ee1d448fa 100644 --- a/releng/org.eclipse.sirius.targets/sirius_luna.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_luna.targetplatform @@ -3,6 +3,7 @@ target "sirius_luna" include "modules/orbit.tpd" include "modules/swtbot-2.1.tpd" include "modules/shared-license.tpd" +include "modules/aql-3.6.tpd" with source, requirements diff --git a/releng/org.eclipse.sirius.targets/sirius_mars.target b/releng/org.eclipse.sirius.targets/sirius_mars.target index 3dd984be09..aae512752e 100644 --- a/releng/org.eclipse.sirius.targets/sirius_mars.target +++ b/releng/org.eclipse.sirius.targets/sirius_mars.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_mars" sequenceNumber="1423474100"> +<target name="sirius_mars" sequenceNumber="1423479716"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> @@ -25,6 +25,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201502022030"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="com.google.guava" version="15.0.0.v201403281430"/> <unit id="com.ibm.icu" version="54.1.1.v201501272100"/> <unit id="org.eclipse.acceleo.feature.group" version="3.6.0.201502030917"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_mars.targetplatform b/releng/org.eclipse.sirius.targets/sirius_mars.targetplatform index 1bc6954989..14a33998cf 100644 --- a/releng/org.eclipse.sirius.targets/sirius_mars.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_mars.targetplatform @@ -3,6 +3,7 @@ target "sirius_mars" include "modules/orbit.tpd" include "modules/swtbot-2.1.tpd" include "modules/shared-license.tpd" +include "modules/aql-3.6.tpd" with source, requirements diff --git a/releng/org.eclipse.sirius.targets/sirius_tests_canary.target b/releng/org.eclipse.sirius.targets/sirius_tests_canary.target index c8aaed7a27..417197f58a 100644 --- a/releng/org.eclipse.sirius.targets/sirius_tests_canary.target +++ b/releng/org.eclipse.sirius.targets/sirius_tests_canary.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_tests_canary" sequenceNumber="1423469940"> +<target name="sirius_tests_canary" sequenceNumber="1423485784"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.license.feature.group" version="0.0.0"/> @@ -74,6 +74,7 @@ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.acceleo.feature.group" version="0.0.0"/> <unit id="org.eclipse.acceleo.ide.ui" version="0.0.0"/> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> diff --git a/releng/org.eclipse.sirius.targets/sirius_tests_juno.target b/releng/org.eclipse.sirius.targets/sirius_tests_juno.target index 18a01e5163..a8ce59ea37 100644 --- a/releng/org.eclipse.sirius.targets/sirius_tests_juno.target +++ b/releng/org.eclipse.sirius.targets/sirius_tests_juno.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_tests_juno" sequenceNumber="1412000642"> +<target name="sirius_tests_juno" sequenceNumber="1423485811"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.acceleo.doc.feature.group" version="3.4.1.201309031307"/> @@ -38,6 +38,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201502022030"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="com.google.guava" version="15.0.0.v201403281430"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.easymock" version="2.4.0.v20090202-0900"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_tests_kepler.target b/releng/org.eclipse.sirius.targets/sirius_tests_kepler.target index ca5a3354ba..988c6a9ff2 100644 --- a/releng/org.eclipse.sirius.targets/sirius_tests_kepler.target +++ b/releng/org.eclipse.sirius.targets/sirius_tests_kepler.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_tests_kepler" sequenceNumber="1412000633"> +<target name="sirius_tests_kepler" sequenceNumber="1423485786"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.acceleo.doc.feature.group" version="3.4.1.201309031307"/> @@ -38,6 +38,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201502022030"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="com.google.guava" version="15.0.0.v201403281430"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.easymock" version="2.4.0.v20090202-0900"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_tests_luna.target b/releng/org.eclipse.sirius.targets/sirius_tests_luna.target index 03e763caf4..9afc261f45 100644 --- a/releng/org.eclipse.sirius.targets/sirius_tests_luna.target +++ b/releng/org.eclipse.sirius.targets/sirius_tests_luna.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_tests_luna" sequenceNumber="1425303388"> +<target name="sirius_tests_luna" sequenceNumber="1425463792"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> @@ -25,6 +25,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201502022030"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.sirius.query.legacy.feature.feature.group" version="0.0.0"/> <repository id="Sirius-Legacy" location="http://download.eclipse.org/sirius/updates/legacy/"/> </location> diff --git a/releng/org.eclipse.sirius.targets/sirius_tests_mars.target b/releng/org.eclipse.sirius.targets/sirius_tests_mars.target index c8cf824aa3..205cbf94a2 100644 --- a/releng/org.eclipse.sirius.targets/sirius_tests_mars.target +++ b/releng/org.eclipse.sirius.targets/sirius_tests_mars.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_tests_mars" sequenceNumber="1423474100"> +<target name="sirius_tests_mars" sequenceNumber="1423485769"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> @@ -25,6 +25,11 @@ <repository id="Eclipse-Shared-License" location="http://download.eclipse.org/cbi/updates/license"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> + <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/> + <unit id="org.antlr.runtime" version="4.3.0.v201502022030"/> + <repository id="Acceleo-LastSuccessful" location="https://hudson.eclipse.org/acceleo/job/acceleo-master/lastSuccessfulBuild/artifact/releng/org.eclipse.acceleo-updatesite/target/repository/"/> + </location> + <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.sirius.query.legacy.feature.feature.group" version="0.0.0"/> <repository id="Sirius-Legacy" location="http://download.eclipse.org/sirius/updates/legacy/"/> </location> |
