diff --git a/doc/plugins/org.polarsys.capella.studio.doc/html/extension/cdoxml.html b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/cdoxml.html new file mode 100644 index 00000000..3c0cd817 --- /dev/null +++ b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/cdoxml.html @@ -0,0 +1,8 @@ +cdoxml

Generate viewpoints for CDO platforms including metadata descriptions as XML content

The support for CDO platform is the same as the one provided by the CDO generation.
+It adds the generation of a [viewpoint_name].connector plugin containing XXX.data.vptext data content description using XML format.

Prerequisite


+One of the generated bundles is specific to the CDO platforms. Thus, it requires the bundle org.eclipse.emf.cdo which is not available into Capella Studio. +A new target platform is needed. To configure it:

  1. Open the preference page Menu Window > Plug-in development > Target platform.
  2. Click on the Add... button. Then on the wizard press the Next button.
  3. Click on the Add button and select the installation item and press the Next button.
  4. Provide the path of your CDO platform and click on Finish button.

Setup new viewpoint


+To enable it into a new project, select the target application labeled CDO and XML Metadata for Capella.

+

Setup existing viewpoint


+To enable it into an existing project, open the XXX.conf.vptext file and use the content assistant to select the target application labeled CDO and XML Metadata for Capella.

+

\ No newline at end of file diff --git a/doc/plugins/org.polarsys.capella.studio.doc/html/extension/cdoxml.mediawiki b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/cdoxml.mediawiki new file mode 100644 index 00000000..241333d8 --- /dev/null +++ b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/cdoxml.mediawiki @@ -0,0 +1,29 @@ + += Generate viewpoints for CDO platforms including metadata descriptions as XML content = + +The support for CDO platform is the same as the one provided by the CDO generation.
+It adds the generation of a [viewpoint_name].connector plugin containing XXX.data.vptext data content description using XML format. + +* [[#Prerequisite|Prerequisite]] +* [[#Setup_new_viewpoint|Setup new viewpoint]] +* [[#Setup_existing_viewpoint|Setup existing viewpoint]] + +==Prerequisite== +---- +One of the generated bundles is specific to the CDO platforms. Thus, it requires the bundle org.eclipse.emf.cdo which is not available into Capella Studio. +A new target platform is needed. To configure it: +#Open the preference page Menu Window > Preferences > Plug-in development > Target platform. +#Click on the ''Add...'' button. Then on the wizard press the ''Next'' button. +#Click on the ''Add'' button and select the ''installation'' item and press the ''Next'' button. +#Provide the path of your CDO platform and click on ''Finish'' button. +#Select the newly created target platform and click on ''Apply and Close'' button. + +==Setup new viewpoint== +---- +To enable it into a new project, select the '''target application''' labeled ''CDO and XML Metadata for Capella''.

+[[File:img/newVPDSLprojectCDOXML.png]]

+ +==Setup existing viewpoint== +---- +To enable it into an existing project, open the XXX.conf.vptext file and use the content assistant to select the '''target application''' labeled ''CDO and XML Metadata for Capella''.

+[[File:img/existingVPDSLprojectCDOXML.png]]

\ No newline at end of file diff --git a/doc/plugins/org.polarsys.capella.studio.doc/html/extension/img/existingVPDSLprojectCDOXML.png b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/img/existingVPDSLprojectCDOXML.png new file mode 100644 index 00000000..6416d997 Binary files /dev/null and b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/img/existingVPDSLprojectCDOXML.png differ diff --git a/doc/plugins/org.polarsys.capella.studio.doc/html/extension/img/newVPDSLprojectCDOXML.png b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/img/newVPDSLprojectCDOXML.png new file mode 100644 index 00000000..26976610 Binary files /dev/null and b/doc/plugins/org.polarsys.capella.studio.doc/html/extension/img/newVPDSLprojectCDOXML.png differ diff --git a/doc/plugins/org.polarsys.capella.studio.doc/html/introduction.mediawiki b/doc/plugins/org.polarsys.capella.studio.doc/html/introduction.mediawiki index 65b92998..784126c4 100644 --- a/doc/plugins/org.polarsys.capella.studio.doc/html/introduction.mediawiki +++ b/doc/plugins/org.polarsys.capella.studio.doc/html/introduction.mediawiki @@ -2,7 +2,7 @@ = Introduction = -Capella Studio provides a full-integrated development environment whitch aims at facilitating the development of extensions for Capella MBSE. +Capella Studio provides a full-integrated development environment which aims at facilitating the development of extensions for Capella MBSE. It provides developers with a platform containing both: diff --git a/doc/plugins/org.polarsys.capella.studio.doc/studio.xml b/doc/plugins/org.polarsys.capella.studio.doc/studio.xml index 0dae83a1..85bd7857 100644 --- a/doc/plugins/org.polarsys.capella.studio.doc/studio.xml +++ b/doc/plugins/org.polarsys.capella.studio.doc/studio.xml @@ -16,6 +16,8 @@ Contributors: + + diff --git a/releng/features/org.polarsys.capella.studio.releng.capella.feature/feature.xml b/releng/features/org.polarsys.capella.studio.releng.capella.feature/feature.xml index c9f05ab1..331de296 100644 --- a/releng/features/org.polarsys.capella.studio.releng.capella.feature/feature.xml +++ b/releng/features/org.polarsys.capella.studio.releng.capella.feature/feature.xml @@ -84,4 +84,12 @@ id="org.polarsys.capella.docgen.feature" version="0.0.0"/> + + + + diff --git a/releng/plugins/org.polarsys.capella.studio.releng.aggregator/pom.xml b/releng/plugins/org.polarsys.capella.studio.releng.aggregator/pom.xml index c64e3559..911b59a3 100644 --- a/releng/plugins/org.polarsys.capella.studio.releng.aggregator/pom.xml +++ b/releng/plugins/org.polarsys.capella.studio.releng.aggregator/pom.xml @@ -54,6 +54,11 @@ ../../../vpdsl/plugins/org.polarsys.capella.ta.viewpoint.dsl.extension ../../../vpdsl/plugins/org.polarsys.capella.cdo.ta.definition ../../../vpdsl/plugins/org.polarsys.capella.cdo.ta.ext + ../../../vpdsl/plugins/org.polarsys.capella.cdoxml.ta + ../../../vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain + ../../../vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model + ../../../vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit + ../../../vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio ../../../doc/plugins/org.polarsys.capella.studio.doc @@ -61,6 +66,7 @@ ../../../product/features/org.polarsys.capella.studio.product.feature ../../../vpdsl/features/org.polarsys.capella.ta.viewpoint.dsl.feature ../../../vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature + ../../../vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature ../../../releng/features/org.polarsys.capella.studio.releng.eclipse.feature ../../../releng/features/org.polarsys.capella.studio.releng.capella.feature ../../../releng/features/org.polarsys.capella.studio.releng.kitalpha.feature diff --git a/releng/plugins/org.polarsys.capella.studio.releng.updatesite/category.xml b/releng/plugins/org.polarsys.capella.studio.releng.updatesite/category.xml index ff3004fc..3d6bd11e 100644 --- a/releng/plugins/org.polarsys.capella.studio.releng.updatesite/category.xml +++ b/releng/plugins/org.polarsys.capella.studio.releng.updatesite/category.xml @@ -24,5 +24,11 @@ + + + + + + diff --git a/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.properties b/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.properties index 64e2bec0..935711ec 100644 --- a/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.properties +++ b/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.properties @@ -14,6 +14,7 @@ # "providerName" property - name of the company that provides the feature providerName=www.polarsys.org +featureName=CDO for Capella Target Application Definition Feature # "description" property - description of the feature description=CDO for Capella Target Application Definition Feature diff --git a/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.xml b/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.xml index d1ccc301..29ea2124 100644 --- a/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.xml +++ b/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/feature.xml @@ -12,7 +12,7 @@ --> diff --git a/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/.project b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/.project new file mode 100644 index 00000000..b3e6ca98 --- /dev/null +++ b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/.project @@ -0,0 +1,17 @@ + + + org.polarsys.capella.cdoxml.ta.definition.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/build.properties b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/build.properties new file mode 100644 index 00000000..b6ee32cd --- /dev/null +++ b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/build.properties @@ -0,0 +1,15 @@ +# ============================================================================= +# Copyright (c) 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales Global Services S.A.S - initial API and implementation +# ============================================================================= +bin.includes = feature.xml,\ + epl-2.0.html,\ + license.html,\ + feature.properties diff --git a/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/epl-2.0.html b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/epl-2.0.html new file mode 100644 index 00000000..637a181d --- /dev/null +++ b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/epl-2.0.html @@ -0,0 +1,300 @@ + + + + + Eclipse Public License - Version 2.0 + + + +

Eclipse Public License - v 2.0

+

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +

+

1. DEFINITIONS

+

“Contribution” means:

+
    +
  • a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and +
  • +
  • + b) in the case of each subsequent Contributor: +
      +
    • i) changes to the Program, and
    • +
    • ii) additions to the Program;
    • +
    + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + “originates” from a Contributor if it was added to the Program by such + Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. +
  • +
+

“Contributor” means any person or entity that Distributes the Program.

+

“Licensed Patents” mean patent claims licensable by a Contributor which + are necessarily infringed by the use or sale of its Contribution alone + or when combined with the Program. +

+

“Program” means the Contributions Distributed in accordance with this + Agreement. +

+

“Recipient” means anyone who receives the Program under this Agreement + or any Secondary License (as applicable), including Contributors. +

+

“Derivative Works” shall mean any work, whether in Source Code or other + form, that is based on (or derived from) the Program and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. +

+

“Modified Works” shall mean any work in Source Code or other form that + results from an addition to, deletion from, or modification of the + contents of the Program, including, for purposes of clarity any new file + in Source Code form that contains any contents of the Program. Modified + Works shall not include works that contain only declarations, interfaces, + types, classes, structures, or files of the Program solely in each case + in order to link to, bind by name, or subclass the Program or Modified + Works thereof. +

+

“Distribute” means the acts of a) distributing or b) making available + in any manner that enables the transfer of a copy. +

+

“Source Code” means the form of a Program preferred for making + modifications, including but not limited to software source code, + documentation source, and configuration files. +

+

“Secondary License” means either the GNU General Public License, + Version 2.0, or any later versions of that license, including any + exceptions or additional permissions as identified by the initial + Contributor. +

+

2. GRANT OF RIGHTS

+
    +
  • a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. +
  • +
  • b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, + at the time the Contribution is added by the Contributor, such + addition of the Contribution causes such combination to be covered + by the Licensed Patents. The patent license shall not apply to any + other combinations which include the Contribution. No hardware per + se is licensed hereunder. +
  • +
  • c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the rights + and licenses granted hereunder, each Recipient hereby assumes sole + responsibility to secure any other intellectual property rights needed, + if any. For example, if a third party patent license is required to + allow Recipient to Distribute the Program, it is Recipient's + responsibility to acquire that license before distributing the Program. +
  • +
  • d) Each Contributor represents that to its knowledge it has sufficient + copyright rights in its Contribution, if any, to grant the copyright + license set forth in this Agreement. +
  • +
  • e) Notwithstanding the terms of any Secondary License, no Contributor + makes additional grants to any Recipient (other than those set forth + in this Agreement) as a result of such Recipient's receipt of the + Program under the terms of a Secondary License (if permitted under + the terms of Section 3). +
  • +
+

3. REQUIREMENTS

+

3.1 If a Contributor Distributes the Program in any form, then:

+
    +
  • a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and +
  • +
  • + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: +
      +
    • i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including warranties + or conditions of title and non-infringement, and implied warranties + or conditions of merchantability and fitness for a particular purpose; +
    • +
    • ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, incidental + and consequential damages, such as lost profits; +
    • +
    • iii) does not attempt to limit or alter the recipients' rights in the + Source Code under section 3.2; and +
    • +
    • iv) requires any subsequent distribution of the Program by any party + to be under a license that satisfies the requirements of this section 3. +
    • +
    +
  • +
+

3.2 When the Program is Distributed as Source Code:

+
    +
  • a) it must be made available under this Agreement, or if the Program (i) + is combined with other material in a separate file or files made available + under a Secondary License, and (ii) the initial Contributor attached to + the Source Code the notice described in Exhibit A of this Agreement, + then the Program may be made available under the terms of such + Secondary Licenses, and +
  • +
  • b) a copy of this Agreement must be included with each copy of the Program.
  • +
+

3.3 Contributors may not remove or alter any copyright, patent, trademark, + attribution notices, disclaimers of warranty, or limitations of liability + (‘notices’) contained within the Program from any copy of the Program which + they Distribute, provided that Contributors may add their own appropriate + notices. +

+

4. COMMERCIAL DISTRIBUTION

+

Commercial distributors of software may accept certain responsibilities + with respect to end users, business partners and the like. While this + license is intended to facilitate the commercial use of the Program, the + Contributor who includes the Program in a commercial product offering should + do so in a manner which does not create potential liability for other + Contributors. Therefore, if a Contributor includes the Program in a + commercial product offering, such Contributor (“Commercial Contributor”) + hereby agrees to defend and indemnify every other Contributor + (“Indemnified Contributor”) against any losses, damages and costs + (collectively “Losses”) arising from claims, lawsuits and other legal actions + brought by a third party against the Indemnified Contributor to the extent + caused by the acts or omissions of such Commercial Contributor in connection + with its distribution of the Program in a commercial product offering. + The obligations in this section do not apply to any claims or Losses relating + to any actual or alleged intellectual property infringement. In order to + qualify, an Indemnified Contributor must: a) promptly notify the + Commercial Contributor in writing of such claim, and b) allow the Commercial + Contributor to control, and cooperate with the Commercial Contributor in, + the defense and any related settlement negotiations. The Indemnified + Contributor may participate in any such claim at its own expense. +

+

For example, a Contributor might include the Program + in a commercial product offering, Product X. That Contributor is then a + Commercial Contributor. If that Commercial Contributor then makes performance + claims, or offers warranties related to Product X, those performance claims + and warranties are such Commercial Contributor's responsibility alone. + Under this section, the Commercial Contributor would have to defend claims + against the other Contributors related to those performance claims and + warranties, and if a court requires any other Contributor to pay any damages + as a result, the Commercial Contributor must pay those damages. +

+

5. NO WARRANTY

+

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED + BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, + WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is + solely responsible for determining the appropriateness of using and + distributing the Program and assumes all risks associated with its + exercise of rights under this Agreement, including but not limited to the + risks and costs of program errors, compliance with applicable laws, damage + to or loss of data, programs or equipment, and unavailability or + interruption of operations. +

+

6. DISCLAIMER OF LIABILITY

+

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED + BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY + LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS + GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +

+

7. GENERAL

+

If any provision of this Agreement is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of the + remainder of the terms of this Agreement, and without further action by the + parties hereto, such provision shall be reformed to the minimum extent + necessary to make such provision valid and enforceable. +

+

If Recipient institutes patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Program itself + (excluding combinations of the Program with other software or hardware) + infringes such Recipient's patent(s), then such Recipient's rights granted + under Section 2(b) shall terminate as of the date such litigation is filed. +

+

All Recipient's rights under this Agreement shall terminate if it fails to + comply with any of the material terms or conditions of this Agreement and + does not cure such failure in a reasonable period of time after becoming + aware of such noncompliance. If all Recipient's rights under this Agreement + terminate, Recipient agrees to cease use and distribution of the Program + as soon as reasonably practicable. However, Recipient's obligations under + this Agreement and any licenses granted by Recipient relating to the + Program shall continue and survive. +

+

Everyone is permitted to copy and distribute copies of this Agreement, + but in order to avoid inconsistency the Agreement is copyrighted and may + only be modified in the following manner. The Agreement Steward reserves + the right to publish new versions (including revisions) of this Agreement + from time to time. No one other than the Agreement Steward has the right + to modify this Agreement. The Eclipse Foundation is the initial Agreement + Steward. The Eclipse Foundation may assign the responsibility to serve as + the Agreement Steward to a suitable separate entity. Each new version of + the Agreement will be given a distinguishing version number. The Program + (including Contributions) may always be Distributed subject to the version + of the Agreement under which it was received. In addition, after a new + version of the Agreement is published, Contributor may elect to Distribute + the Program (including its Contributions) under the new version. +

+

Except as expressly stated in Sections 2(a) and 2(b) above, Recipient + receives no rights or licenses to the intellectual property of any + Contributor under this Agreement, whether expressly, by implication, + estoppel or otherwise. All rights in the Program not expressly granted + under this Agreement are reserved. Nothing in this Agreement is intended + to be enforceable by any entity that is not a Contributor or Recipient. + No third-party beneficiary rights are created under this Agreement. +

+

Exhibit A – Form of Secondary Licenses Notice

+

“This Source Code may also be made available under the following + Secondary Licenses when the conditions for such availability set forth + in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), + version(s), and exceptions or additional permissions here}.” +

+
+

Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. +

+

If it is not possible or desirable to put the notice in a particular file, + then You may include the notice in a location (such as a LICENSE file in a + relevant directory) where a recipient would be likely to look for + such a notice. +

+

You may add additional accurate notices of copyright ownership.

+
+ + \ No newline at end of file diff --git a/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/feature.properties b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/feature.properties new file mode 100644 index 00000000..6fa4b2f4 --- /dev/null +++ b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/feature.properties @@ -0,0 +1,182 @@ +# ============================================================================= +# Copyright (c) 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales - initial API and implementation +# ============================================================================= + +# NLS_MESSAGEFORMAT_VAR + +# "providerName" property - name of the company that provides the feature +providerName=www.polarsys.org +featureName=CDO and XML for Capella Target Application Definition Feature + +# "description" property - description of the feature +description=CDO and XML for Capella Target Application Definition Feature + +# "copyright" property - text of the "Feature Update Copyright" +copyright=\ Copyright (c) 2021 THALES GLOBAL SERVICES.\n\ +\n\ + This program and the accompanying materials are made available under the\n\ + terms of the Eclipse Public License 2.0 which is available at\n\ + http://www.eclipse.org/legal/epl-2.0\n\ +\n\ + SPDX-License-Identifier: EPL-2.0\n\ + \n\ + Contributors:\n\ + Thales - initial API and implementation\n +################ end of copyright property #################################### + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +\n\ +November 22, 2017\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\ +AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\ +THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\ +TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\ +BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\ +AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\ +APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\ +MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\ +is provided to you under the terms and conditions of the Eclipse Public License\n\ +Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\ +available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\ +"Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code, documentation\n\ +and other files maintained in the Eclipse Foundation source code repository\n\ +("Repository") in software modules ("Modules") and made available as\n\ +downloadable archives ("Downloads").\n\ +\n\ +- Content may be structured and packaged into modules to facilitate\n\ + delivering, extending, and upgrading the Content. Typical modules may\n\ + include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\ + features ("Features").\n\ +- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\ + (Java\u2122 ARchive) in a directory named "plugins".\n\ +- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\ + associated material. Each Feature may be packaged as a sub-directory in a\n\ + directory named "features". Within a Feature, files named "feature.xml" may\n\ + contain a list of the names and version numbers of the Plug-ins and/or\n\ + Fragments associated with that Feature.\n\ +- Features may also include other Features ("Included Features"). Within a\n\ + Feature, files named "feature.xml" may contain a list of the names and\n\ + version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be contained in\n\ +files named "about.html" ("Abouts"). The terms and conditions governing Features\n\ +and Included Features should be contained in files named "license.html"\n\ +("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\ +directory of a Download or Module including, but not limited to the following\n\ +locations:\n\ +\n\ +- The top-level (root) directory\n\ +- Plug-in and Fragment directories\n\ +- Inside Plug-ins and Fragments packaged as JARs\n\ +- Sub-directories of the directory named "src" of certain Plug-ins\n\ +- Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using\n\ +the Provisioning Technology (as defined below), you must agree to a license\n\ +("Feature Update License") during the installation process. If the Feature\n\ +contains Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform you\n\ +where you can locate them. Feature Update Licenses may be found in the "license"\n\ +property of files named "feature.properties" found within a Feature. Such\n\ +Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\ +conditions (or references to such terms and conditions) that govern your use of\n\ +the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\ +OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\ +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ +- Eclipse Public License Version 1.0 (available at\n\ + http://www.eclipse.org/legal/epl-v10.html)\n\ +- Eclipse Distribution License Version 1.0 (available at\n\ + http://www.eclipse.org/licenses/edl-v1.0.html)\n\ +- Common Public License Version 1.0 (available at\n\ + http://www.eclipse.org/legal/cpl-v10.html)\n\ +- Apache Software License 1.1 (available at\n\ + http://www.apache.org/licenses/LICENSE)\n\ +- Apache Software License 2.0 (available at\n\ + http://www.apache.org/licenses/LICENSE-2.0)\n\ +- Mozilla Public License Version 1.1 (available at\n\ + http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\ +USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\ +provided, please contact the Eclipse Foundation to determine what terms and\n\ +conditions govern that particular Content.\n\ +\n\ +Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which\n\ +include, but are not limited to, p2 and the Eclipse Update Manager\n\ +("Provisioning Technology") for the purpose of allowing users to install\n\ +software, documentation, information and/or other materials (collectively\n\ +"Installable Software"). This capability is provided with the intent of allowing\n\ +such users to install, extend and update Eclipse-based products. Information\n\ +about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install\n\ +Installable Software. You shall be responsible for enabling the applicable\n\ +license agreements relating to the Installable Software to be presented to, and\n\ +accepted by, the users of the Provisioning Technology in accordance with the\n\ +Specification. By using Provisioning Technology in such a manner and making it\n\ +available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the\n\ +following:\n\ +\n\ +1. A series of actions may occur ("Provisioning Process") in which a user may\n\ + execute the Provisioning Technology on a machine ("Target Machine") with the\n\ + intent of installing, extending or updating the functionality of an\n\ + Eclipse-based product.\n\ +2. During the Provisioning Process, the Provisioning Technology may cause third\n\ + party Installable Software or a portion thereof to be accessed and copied to\n\ + the Target Machine.\n\ +3. Pursuant to the Specification, you will provide to the user the terms and\n\ + conditions that govern the use of the Installable Software ("Installable\n\ + Software Agreement") and such Installable Software Agreement shall be\n\ + accessed from the Target Machine in accordance with the Specification. Such\n\ + Installable Software Agreement must inform the user of the terms and\n\ + conditions that govern the Installable Software and must solicit acceptance\n\ + by the end user in the manner prescribed in such Installable\n\ + Software Agreement. Upon such indication of agreement by the user, the\n\ + provisioning Technology will complete installation of the\n\ + Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are currently\n\ +may have restrictions on the import, possession, and use, and/or re-export to\n\ +another country, of encryption software. BEFORE using any encryption software,\n\ +please check the country's laws, regulations and policies concerning the import,\n\ +possession, or use, and re-export of encryption software, to see if this is\n\ +permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\ +United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/feature.xml b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/feature.xml new file mode 100644 index 00000000..3783dc28 --- /dev/null +++ b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/feature.xml @@ -0,0 +1,66 @@ + + + + + + %description + + + + %copyright + + + + %license + + + + + + + + + + + + + diff --git a/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/license.html b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/license.html new file mode 100644 index 00000000..008b8018 --- /dev/null +++ b/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/license.html @@ -0,0 +1,189 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

November 22, 2017

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, + INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY + THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED + BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS + GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY + APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED + BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS + AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE + AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT + USE THE CONTENT.

+ +

Applicable Licenses

+ +

+ Unless otherwise indicated, all Content made available by the Eclipse + Foundation is provided to you under the terms and conditions of the + Eclipse Public License Version 2.0 ("EPL"). A copy of the + EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

Content includes, but is not limited to, source code, object + code, documentation and other files maintained in the Eclipse + Foundation source code repository ("Repository") in software + modules ("Modules") and made available as downloadable + archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to + facilitate delivering, extending, and upgrading the Content. Typical + modules may include plug-ins ("Plug-ins"), plug-in + fragments ("Fragments"), and features + ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory + or JAR (Java™ ARchive) in a directory named + "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or + Fragments and associated material. Each Feature may be packaged as a + sub-directory in a directory named "features". Within a + Feature, files named "feature.xml" may contain a list of + the names and version numbers of the Plug-ins and/or Fragments + associated with that Feature.
  • +
  • Features may also include other Features ("Included + Features"). Within a Feature, files named + "feature.xml" may contain a list of the names and version + numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should + be contained in files named "about.html" + ("Abouts"). The terms and conditions governing Features and + Included Features should be contained in files named + "license.html" ("Feature Licenses"). Abouts and + Feature Licenses may be located in any directory of a Download or + Module including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of + certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is + installed using the Provisioning Technology (as defined below), you + must agree to a license ("Feature Update License") during + the installation process. If the Feature contains Included Features, + the Feature Update License should either provide you with the terms + and conditions governing the Included Features or inform you where you + can locate them. Feature Update Licenses may be found in the + "license" property of files named + "feature.properties" found within a Feature. Such Abouts, + Feature Licenses, and Feature Update Licenses contain the terms and + conditions (or references to such terms and conditions) that govern + your use of the associated Content in that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY + REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND + CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT + ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND + CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, + or Feature Update License is provided, please contact the Eclipse + Foundation to determine what terms and conditions govern that + particular Content.

+ + +

Use of Provisioning Technology

+ +

+ The Eclipse Foundation makes available provisioning software, examples + of which include, but are not limited to, p2 and the Eclipse Update + Manager ("Provisioning Technology") for the purpose of + allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This + capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about + packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification"). +

+ +

You may use Provisioning Technology to allow other parties to + install Installable Software. You shall be responsible for enabling + the applicable license agreements relating to the Installable Software + to be presented to, and accepted by, the users of the Provisioning + Technology in accordance with the Specification. By using Provisioning + Technology in such a manner and making it available in accordance with + the Specification, you further acknowledge your agreement to, and the + acquisition of all necessary rights to permit the following:

+ +
    +
  1. A series of actions may occur ("Provisioning + Process") in which a user may execute the Provisioning + Technology on a machine ("Target Machine") with the intent + of installing, extending or updating the functionality of an + Eclipse-based product.
  2. +
  3. During the Provisioning Process, the Provisioning Technology + may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
  4. +
  5. Pursuant to the Specification, you will provide to the user + the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such + Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable + Software Agreement must inform the user of the terms and conditions + that govern the Installable Software and must solicit acceptance by + the end user in the manner prescribed in such Installable Software + Agreement. Upon such indication of agreement by the user, the + provisioning Technology will complete installation of the Installable + Software.
  6. +
+ +

Cryptography

+ +

Content may contain encryption software. The country in which + you are currently may have restrictions on the import, possession, and + use, and/or re-export to another country, of encryption software. + BEFORE using any encryption software, please check the country's laws, + regulations and policies concerning the import, possession, or use, + and re-export of encryption software, to see if this is permitted.

+ +

+ Java and all Java-based trademarks are trademarks of + Oracle Corporation in the United States, other countries, or both. +

+ + diff --git a/vpdsl/plugins/org.polarsys.capella.ad.viewpoint.dsl.generation.ui/generated/org/polarsys/capella/ad/viewpoint/dsl/generation/ui/common/UIAbstractPattern.java b/vpdsl/plugins/org.polarsys.capella.ad.viewpoint.dsl.generation.ui/generated/org/polarsys/capella/ad/viewpoint/dsl/generation/ui/common/UIAbstractPattern.java index 817a5396..bbb20a94 100644 --- a/vpdsl/plugins/org.polarsys.capella.ad.viewpoint.dsl.generation.ui/generated/org/polarsys/capella/ad/viewpoint/dsl/generation/ui/common/UIAbstractPattern.java +++ b/vpdsl/plugins/org.polarsys.capella.ad.viewpoint.dsl.generation.ui/generated/org/polarsys/capella/ad/viewpoint/dsl/generation/ui/common/UIAbstractPattern.java @@ -1,4 +1,4 @@ -//Generated with EGF 1.4.1.v20161010-1511 +//Generated with EGF 1.6.2.202001031546 package org.polarsys.capella.ad.viewpoint.dsl.generation.ui.common; import org.eclipse.egf.common.helper.*; diff --git a/vpdsl/plugins/org.polarsys.capella.cdo.ta.definition/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdo.ta.definition/plugin.xml index 8ad41bc5..8c54cc65 100644 --- a/vpdsl/plugins/org.polarsys.capella.cdo.ta.definition/plugin.xml +++ b/vpdsl/plugins/org.polarsys.capella.cdo.ta.definition/plugin.xml @@ -1,4 +1,15 @@ + -# -# -# $Id$ - - pluginName = CDO for Capella vpDSL Extension providerName = www.polarsys.org diff --git a/vpdsl/plugins/org.polarsys.capella.cdo.ta.ext/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdo.ta.ext/plugin.xml index 8740fabf..9de17d0c 100644 --- a/vpdsl/plugins/org.polarsys.capella.cdo.ta.ext/plugin.xml +++ b/vpdsl/plugins/org.polarsys.capella.cdo.ta.ext/plugin.xml @@ -1,4 +1,15 @@ + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.project b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.project new file mode 100644 index 00000000..10690a27 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.project @@ -0,0 +1,28 @@ + + + org.polarsys.capella.cdoxml.ta.genchain.model.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.settings/org.eclipse.jdt.core.prefs b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..9f6ece88 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/META-INF/MANIFEST.MF b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/META-INF/MANIFEST.MF new file mode 100644 index 00000000..3c669d75 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.polarsys.capella.cdoxml.ta.genchain.model.edit;singleton:=true +Bundle-Version: 5.2.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.polarsys.capella.cdoxml.ta.genchain.connectorextension.provider.ConnectorExtensionEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.polarsys.capella.cdoxml.ta.genchain.connectorextension.provider +Require-Bundle: org.eclipse.core.runtime, + org.polarsys.capella.cdoxml.ta.genchain.model;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + org.eclipse.egf.portfolio.genchain;visibility:=reexport, + org.eclipse.egf.portfolio.genchain.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy +Automatic-Module-Name: org.polarsys.capella.cdoxml.ta.genchain.model.edit +Bundle-Localization: plugin diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/about.html b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/about.html new file mode 100644 index 00000000..164f781a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ 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 http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/build.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/build.properties new file mode 100644 index 00000000..baa3b2a8 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/build.properties @@ -0,0 +1,14 @@ + +# +# +# +# $Id$ + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/icons/full/ctool16/CreateGenerationChain_elements_ConnectorGeneration.gif b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/icons/full/ctool16/CreateGenerationChain_elements_ConnectorGeneration.gif new file mode 100644 index 00000000..c575cb55 Binary files /dev/null and b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/icons/full/ctool16/CreateGenerationChain_elements_ConnectorGeneration.gif differ diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/icons/full/obj16/ConnectorGeneration.gif b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/icons/full/obj16/ConnectorGeneration.gif new file mode 100644 index 00000000..a385c9b7 Binary files /dev/null and b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/icons/full/obj16/ConnectorGeneration.gif differ diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/plugin.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/plugin.properties new file mode 100644 index 00000000..5e05a8f4 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/plugin.properties @@ -0,0 +1,31 @@ +# ============================================================================= +# Copyright (c) 2006, 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales - initial API and implementation +# ============================================================================= +pluginName=CDO and XML Target Application DSL Viewpoint User Interface generator Model Edit Support +providerName=www.polarsys.org + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_ConnectorGeneration_type = Connector Generation +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_ConnectorGeneration_addConnectorEAnnotations_feature = Add Connector EAnnotations +_UI_Unknown_feature = Unspecified + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/plugin.xml new file mode 100644 index 00000000..25c3e8a3 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/plugin.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorExtensionEditPlugin.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorExtensionEditPlugin.java new file mode 100644 index 00000000..0750e4d8 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorExtensionEditPlugin.java @@ -0,0 +1,92 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.provider; + +import org.eclipse.egf.portfolio.genchain.generationChain.provider.GenerationChainEditPlugin; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the ConnectorExtension edit plugin. + * + * + * @generated + */ +public final class ConnectorExtensionEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ConnectorExtensionEditPlugin INSTANCE = new ConnectorExtensionEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ConnectorExtensionEditPlugin() { + super + (new ResourceLocator [] { + GenerationChainEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorExtensionItemProviderAdapterFactory.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorExtensionItemProviderAdapterFactory.java new file mode 100644 index 00000000..d744832f --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorExtensionItemProviderAdapterFactory.java @@ -0,0 +1,309 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.provider; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationChain; +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationChainPackage; + +import org.eclipse.egf.portfolio.genchain.generationChain.util.GenerationChainSwitch; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.edit.command.CommandParameter; + +import org.eclipse.emf.edit.domain.EditingDomain; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IChildCreationExtender; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionFactory; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.util.ConnectorExtensionAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class ConnectorExtensionItemProviderAdapterFactory extends ConnectorExtensionAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public ConnectorExtensionItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration} instances. + * + * + * @generated + */ + protected ConnectorGenerationItemProvider connectorGenerationItemProvider; + + /** + * This creates an adapter for a {@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration}. + * + * + * @generated + */ + @Override + public Adapter createConnectorGenerationAdapter() { + if (connectorGenerationItemProvider == null) { + connectorGenerationItemProvider = new ConnectorGenerationItemProvider(this); + } + + return connectorGenerationItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + @Override + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + @Override + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + @Override + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + @Override + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + @Override + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + @Override + public void dispose() { + if (connectorGenerationItemProvider != null) connectorGenerationItemProvider.dispose(); + } + + /** + * A child creation extender for the {@link GenerationChainPackage}. + * + * + * @generated + */ + public static class GenerationChainChildCreationExtender implements IChildCreationExtender { + /** + * The switch for creating child descriptors specific to each extended class. + * + * + * @generated + */ + protected static class CreationSwitch extends GenerationChainSwitch { + /** + * The child descriptors being populated. + * + * + * @generated + */ + protected List newChildDescriptors; + + /** + * The domain in which to create the children. + * + * + * @generated + */ + protected EditingDomain editingDomain; + + /** + * Creates the a switch for populating child descriptors in the given domain. + * + * + * @generated + */ + CreationSwitch(List newChildDescriptors, EditingDomain editingDomain) { + this.newChildDescriptors = newChildDescriptors; + this.editingDomain = editingDomain; + } + /** + * + * + * @generated + */ + @Override + public Object caseGenerationChain(GenerationChain object) { + newChildDescriptors.add + (createChildParameter + (GenerationChainPackage.Literals.GENERATION_CHAIN__ELEMENTS, + ConnectorExtensionFactory.eINSTANCE.createConnectorGeneration())); + + return null; + } + + /** + * + * + * @generated + */ + protected CommandParameter createChildParameter(Object feature, Object child) { + return new CommandParameter(null, feature, child); + } + + } + + /** + * + * + * @generated + */ + public Collection getNewChildDescriptors(Object object, EditingDomain editingDomain) { + ArrayList result = new ArrayList(); + new CreationSwitch(result, editingDomain).doSwitch((EObject)object); + return result; + } + + /** + * + * + * @generated + */ + public ResourceLocator getResourceLocator() { + return ConnectorExtensionEditPlugin.INSTANCE; + } + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorGenerationItemProvider.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorGenerationItemProvider.java new file mode 100644 index 00000000..ae2a0d37 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/provider/ConnectorGenerationItemProvider.java @@ -0,0 +1,147 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.egf.portfolio.genchain.generationChain.provider.EcoreElementItemProvider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage; +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration; + +/** + * This is the item provider adapter for a {@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration} object. + * + * + * @generated + */ +public class ConnectorGenerationItemProvider extends EcoreElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ConnectorGenerationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addAddConnectorEAnnotationsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Add Connector EAnnotations feature. + * + * + * @generated + */ + protected void addAddConnectorEAnnotationsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ConnectorGeneration_addConnectorEAnnotations_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ConnectorGeneration_addConnectorEAnnotations_feature", "_UI_ConnectorGeneration_type"), + ConnectorExtensionPackage.Literals.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns ConnectorGeneration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ConnectorGeneration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ConnectorGeneration)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ConnectorGeneration_type") : + getString("_UI_ConnectorGeneration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ConnectorGeneration.class)) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ConnectorExtensionEditPlugin.INSTANCE; + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.classpath b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.classpath new file mode 100644 index 00000000..eca7bdba --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.project b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.project new file mode 100644 index 00000000..c842fce1 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.project @@ -0,0 +1,28 @@ + + + org.polarsys.capella.cdoxml.ta.genchain.model + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.settings/org.eclipse.jdt.core.prefs b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..9f6ece88 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/META-INF/MANIFEST.MF b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/META-INF/MANIFEST.MF new file mode 100644 index 00000000..d301dbb5 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.polarsys.capella.cdoxml.ta.genchain.model;singleton:=true +Bundle-Version: 5.2.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.polarsys.capella.cdoxml.ta.genchain.connectorextension, + org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl, + org.polarsys.capella.cdoxml.ta.genchain.connectorextension.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.egf.portfolio.genchain;visibility:=reexport +Bundle-ActivationPolicy: lazy +Automatic-Module-Name: org.polarsys.capella.cdoxml.ta.genchain.model +Bundle-Localization: plugin diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/about.html b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/about.html new file mode 100644 index 00000000..164f781a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ 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 http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/build.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/build.properties new file mode 100644 index 00000000..a7494373 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/build.properties @@ -0,0 +1,13 @@ + +# +# +# +# $Id$ + +bin.includes = .,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/plugin.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/plugin.properties new file mode 100644 index 00000000..5791a1aa --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/plugin.properties @@ -0,0 +1,13 @@ +# ============================================================================= +# Copyright (c) 2006, 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales Global Services S.A.S - initial API and implementation +# ============================================================================= +pluginName=CDO and XML Target Application DSL Viewpoint User Interface generator model +providerName=www.polarsys.org diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/plugin.xml new file mode 100644 index 00000000..c58794b9 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/plugin.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorExtensionFactory.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorExtensionFactory.java new file mode 100644 index 00000000..2736d86d --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorExtensionFactory.java @@ -0,0 +1,42 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage + * @generated + */ +public interface ConnectorExtensionFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ConnectorExtensionFactory eINSTANCE = org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorExtensionFactoryImpl.init(); + + /** + * Returns a new object of class 'Connector Generation'. + * + * + * @return a new object of class 'Connector Generation'. + * @generated + */ + ConnectorGeneration createConnectorGeneration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ConnectorExtensionPackage getConnectorExtensionPackage(); + +} //ConnectorExtensionFactory diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorExtensionPackage.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorExtensionPackage.java new file mode 100644 index 00000000..9c6d2fa6 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorExtensionPackage.java @@ -0,0 +1,178 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension; + +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationChainPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionFactory + * @model kind="package" + * @generated + */ +public interface ConnectorExtensionPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "connectorextension"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.polarsys.org/capella/cdoxml/genchain/extension/connector/1.0.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "connectorextension"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ConnectorExtensionPackage eINSTANCE = org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorExtensionPackageImpl.init(); + + /** + * The meta object id for the '{@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorGenerationImpl Connector Generation}' class. + * + * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorGenerationImpl + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorExtensionPackageImpl#getConnectorGeneration() + * @generated + */ + int CONNECTOR_GENERATION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONNECTOR_GENERATION__NAME = GenerationChainPackage.ECORE_ELEMENT__NAME; + + /** + * The feature id for the 'Container' container reference. + * + * + * @generated + * @ordered + */ + int CONNECTOR_GENERATION__CONTAINER = GenerationChainPackage.ECORE_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Model Path' attribute. + * + * + * @generated + * @ordered + */ + int CONNECTOR_GENERATION__MODEL_PATH = GenerationChainPackage.ECORE_ELEMENT__MODEL_PATH; + + /** + * The feature id for the 'Add Connector EAnnotations' attribute. + * + * + * @generated + * @ordered + */ + int CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS = GenerationChainPackage.ECORE_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Connector Generation' class. + * + * + * @generated + * @ordered + */ + int CONNECTOR_GENERATION_FEATURE_COUNT = GenerationChainPackage.ECORE_ELEMENT_FEATURE_COUNT + 1; + + + /** + * Returns the meta object for class '{@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration Connector Generation}'. + * + * + * @return the meta object for class 'Connector Generation'. + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration + * @generated + */ + EClass getConnectorGeneration(); + + /** + * Returns the meta object for the attribute '{@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration#isAddConnectorEAnnotations Add Connector EAnnotations}'. + * + * + * @return the meta object for the attribute 'Add Connector EAnnotations'. + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration#isAddConnectorEAnnotations() + * @see #getConnectorGeneration() + * @generated + */ + EAttribute getConnectorGeneration_AddConnectorEAnnotations(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ConnectorExtensionFactory getConnectorExtensionFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorGenerationImpl Connector Generation}' class. + * + * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorGenerationImpl + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorExtensionPackageImpl#getConnectorGeneration() + * @generated + */ + EClass CONNECTOR_GENERATION = eINSTANCE.getConnectorGeneration(); + + /** + * The meta object literal for the 'Add Connector EAnnotations' attribute feature. + * + * + * @generated + */ + EAttribute CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS = eINSTANCE.getConnectorGeneration_AddConnectorEAnnotations(); + + } + +} //ConnectorExtensionPackage diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorGeneration.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorGeneration.java new file mode 100644 index 00000000..a4256843 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/ConnectorGeneration.java @@ -0,0 +1,48 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension; + +import org.eclipse.egf.portfolio.genchain.generationChain.EcoreElement; +import org.eclipse.egf.portfolio.genchain.generationChain.PluginProvider; + +/** + * + * A representation of the model object 'Connector Generation'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration#isAddConnectorEAnnotations Add Connector EAnnotations}
  • + *
+ * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage#getConnectorGeneration() + * @model + * @generated + */ +public interface ConnectorGeneration extends EcoreElement, PluginProvider { + /** + * Returns the value of the 'Add Connector EAnnotations' attribute. + * The default value is "false". + * + * + * @return the value of the 'Add Connector EAnnotations' attribute. + * @see #setAddConnectorEAnnotations(boolean) + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage#getConnectorGeneration_AddConnectorEAnnotations() + * @model default="false" + * @generated + */ + boolean isAddConnectorEAnnotations(); + + /** + * Sets the value of the '{@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration#isAddConnectorEAnnotations Add Connector EAnnotations}' attribute. + * + * + * @param value the new value of the 'Add Connector EAnnotations' attribute. + * @see #isAddConnectorEAnnotations() + * @generated + */ + void setAddConnectorEAnnotations(boolean value); + +} // ConnectorGeneration diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorExtensionFactoryImpl.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorExtensionFactoryImpl.java new file mode 100644 index 00000000..5cc77908 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorExtensionFactoryImpl.java @@ -0,0 +1,97 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ConnectorExtensionFactoryImpl extends EFactoryImpl implements ConnectorExtensionFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ConnectorExtensionFactory init() { + try { + ConnectorExtensionFactory theConnectorExtensionFactory = (ConnectorExtensionFactory)EPackage.Registry.INSTANCE.getEFactory(ConnectorExtensionPackage.eNS_URI); + if (theConnectorExtensionFactory != null) { + return theConnectorExtensionFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ConnectorExtensionFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ConnectorExtensionFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION: return createConnectorGeneration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public ConnectorGeneration createConnectorGeneration() { + ConnectorGenerationImpl connectorGeneration = new ConnectorGenerationImpl(); + return connectorGeneration; + } + + /** + * + * + * @generated + */ + @Override + public ConnectorExtensionPackage getConnectorExtensionPackage() { + return (ConnectorExtensionPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ConnectorExtensionPackage getPackage() { + return ConnectorExtensionPackage.eINSTANCE; + } + +} //ConnectorExtensionFactoryImpl diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorExtensionPackageImpl.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorExtensionPackageImpl.java new file mode 100644 index 00000000..cb5c5d3e --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorExtensionPackageImpl.java @@ -0,0 +1,190 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl; + +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationChainPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionFactory; +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage; +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ConnectorExtensionPackageImpl extends EPackageImpl implements ConnectorExtensionPackage { + /** + * + * + * @generated + */ + private EClass connectorGenerationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage#eNS_URI + * @see #init() + * @generated + */ + private ConnectorExtensionPackageImpl() { + super(eNS_URI, ConnectorExtensionFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ConnectorExtensionPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ConnectorExtensionPackage init() { + if (isInited) return (ConnectorExtensionPackage)EPackage.Registry.INSTANCE.getEPackage(ConnectorExtensionPackage.eNS_URI); + + // Obtain or create and register package + Object registeredConnectorExtensionPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + ConnectorExtensionPackageImpl theConnectorExtensionPackage = registeredConnectorExtensionPackage instanceof ConnectorExtensionPackageImpl ? (ConnectorExtensionPackageImpl)registeredConnectorExtensionPackage : new ConnectorExtensionPackageImpl(); + + isInited = true; + + // Initialize simple dependencies + GenerationChainPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theConnectorExtensionPackage.createPackageContents(); + + // Initialize created meta-data + theConnectorExtensionPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theConnectorExtensionPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ConnectorExtensionPackage.eNS_URI, theConnectorExtensionPackage); + return theConnectorExtensionPackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getConnectorGeneration() { + return connectorGenerationEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConnectorGeneration_AddConnectorEAnnotations() { + return (EAttribute)connectorGenerationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public ConnectorExtensionFactory getConnectorExtensionFactory() { + return (ConnectorExtensionFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + connectorGenerationEClass = createEClass(CONNECTOR_GENERATION); + createEAttribute(connectorGenerationEClass, CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + GenerationChainPackage theGenerationChainPackage = (GenerationChainPackage)EPackage.Registry.INSTANCE.getEPackage(GenerationChainPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + connectorGenerationEClass.getESuperTypes().add(theGenerationChainPackage.getEcoreElement()); + connectorGenerationEClass.getESuperTypes().add(theGenerationChainPackage.getPluginProvider()); + + // Initialize classes and features; add operations and parameters + initEClass(connectorGenerationEClass, ConnectorGeneration.class, "ConnectorGeneration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getConnectorGeneration_AddConnectorEAnnotations(), ecorePackage.getEBoolean(), "addConnectorEAnnotations", "false", 0, 1, ConnectorGeneration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ConnectorExtensionPackageImpl diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorGenerationImpl.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorGenerationImpl.java new file mode 100644 index 00000000..2e243cdb --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/impl/ConnectorGenerationImpl.java @@ -0,0 +1,181 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl; + +import org.eclipse.egf.portfolio.genchain.generationChain.impl.EcoreElementImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage; +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration; + +/** + * + * An implementation of the model object 'Connector Generation'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.impl.ConnectorGenerationImpl#isAddConnectorEAnnotations Add Connector EAnnotations}
  • + *
+ * + * @generated + */ +public class ConnectorGenerationImpl extends EcoreElementImpl implements ConnectorGeneration { + /** + * The default value of the '{@link #isAddConnectorEAnnotations() Add Connector EAnnotations}' attribute. + * + * + * @see #isAddConnectorEAnnotations() + * @generated + * @ordered + */ + protected static final boolean ADD_CONNECTOR_EANNOTATIONS_EDEFAULT = false; + + /** + * The cached value of the '{@link #isAddConnectorEAnnotations() Add Connector EAnnotations}' attribute. + * + * + * @see #isAddConnectorEAnnotations() + * @generated + * @ordered + */ + protected boolean addConnectorEAnnotations = ADD_CONNECTOR_EANNOTATIONS_EDEFAULT; + + /** + * + * + * @generated + */ + protected ConnectorGenerationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConnectorExtensionPackage.Literals.CONNECTOR_GENERATION; + } + + /** + * + * + * @generated + */ + @Override + public boolean isAddConnectorEAnnotations() { + return addConnectorEAnnotations; + } + + /** + * + * + * @generated + */ + @Override + public void setAddConnectorEAnnotations(boolean newAddConnectorEAnnotations) { + boolean oldAddConnectorEAnnotations = addConnectorEAnnotations; + addConnectorEAnnotations = newAddConnectorEAnnotations; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConnectorExtensionPackage.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS, oldAddConnectorEAnnotations, addConnectorEAnnotations)); + } + + /** + * + * + * @generated + */ + @Override + public EList getPluginNames(EList domains) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS: + return isAddConnectorEAnnotations(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS: + setAddConnectorEAnnotations((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS: + setAddConnectorEAnnotations(ADD_CONNECTOR_EANNOTATIONS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION__ADD_CONNECTOR_EANNOTATIONS: + return addConnectorEAnnotations != ADD_CONNECTOR_EANNOTATIONS_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (addConnectorEAnnotations: "); + result.append(addConnectorEAnnotations); + result.append(')'); + return result.toString(); + } + +} //ConnectorGenerationImpl diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/util/ConnectorExtensionAdapterFactory.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/util/ConnectorExtensionAdapterFactory.java new file mode 100644 index 00000000..f3dba4d6 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/util/ConnectorExtensionAdapterFactory.java @@ -0,0 +1,178 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.util; + +import org.eclipse.egf.portfolio.genchain.generationChain.EcoreElement; +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationElement; +import org.eclipse.egf.portfolio.genchain.generationChain.PluginProvider; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage + * @generated + */ +public class ConnectorExtensionAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ConnectorExtensionPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ConnectorExtensionAdapterFactory() { + if (modelPackage == null) { + modelPackage = ConnectorExtensionPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ConnectorExtensionSwitch modelSwitch = + new ConnectorExtensionSwitch() { + @Override + public Adapter caseConnectorGeneration(ConnectorGeneration object) { + return createConnectorGenerationAdapter(); + } + @Override + public Adapter caseGenerationElement(GenerationElement object) { + return createGenerationElementAdapter(); + } + @Override + public Adapter caseEcoreElement(EcoreElement object) { + return createEcoreElementAdapter(); + } + @Override + public Adapter casePluginProvider(PluginProvider object) { + return createPluginProviderAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration Connector Generation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration + * @generated + */ + public Adapter createConnectorGenerationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.egf.portfolio.genchain.generationChain.GenerationElement Generation Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.egf.portfolio.genchain.generationChain.GenerationElement + * @generated + */ + public Adapter createGenerationElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.egf.portfolio.genchain.generationChain.EcoreElement Ecore Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.egf.portfolio.genchain.generationChain.EcoreElement + * @generated + */ + public Adapter createEcoreElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.egf.portfolio.genchain.generationChain.PluginProvider Plugin Provider}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.egf.portfolio.genchain.generationChain.PluginProvider + * @generated + */ + public Adapter createPluginProviderAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ConnectorExtensionAdapterFactory diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/util/ConnectorExtensionSwitch.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/util/ConnectorExtensionSwitch.java new file mode 100644 index 00000000..22b299f5 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/src/org/polarsys/capella/cdoxml/ta/genchain/connectorextension/util/ConnectorExtensionSwitch.java @@ -0,0 +1,162 @@ +/** + */ +package org.polarsys.capella.cdoxml.ta.genchain.connectorextension.util; + +import org.eclipse.egf.portfolio.genchain.generationChain.EcoreElement; +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationElement; +import org.eclipse.egf.portfolio.genchain.generationChain.PluginProvider; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionPackage + * @generated + */ +public class ConnectorExtensionSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ConnectorExtensionPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ConnectorExtensionSwitch() { + if (modelPackage == null) { + modelPackage = ConnectorExtensionPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ConnectorExtensionPackage.CONNECTOR_GENERATION: { + ConnectorGeneration connectorGeneration = (ConnectorGeneration)theEObject; + T result = caseConnectorGeneration(connectorGeneration); + if (result == null) result = caseEcoreElement(connectorGeneration); + if (result == null) result = casePluginProvider(connectorGeneration); + if (result == null) result = caseGenerationElement(connectorGeneration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Connector Generation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Connector Generation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConnectorGeneration(ConnectorGeneration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Generation Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Generation Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGenerationElement(GenerationElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Ecore Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Ecore Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEcoreElement(EcoreElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Plugin Provider'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Plugin Provider'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePluginProvider(PluginProvider object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ConnectorExtensionSwitch diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.classpath b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.classpath new file mode 100644 index 00000000..a694d8b1 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.project b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.project new file mode 100644 index 00000000..c44a281f --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.project @@ -0,0 +1,34 @@ + + + org.polarsys.capella.cdoxml.ta.genchain + + + + + + org.eclipse.egf.pattern.ui.PatternBuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.egf.core.EGFNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.settings/org.eclipse.jdt.core.prefs b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..9f6ece88 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/META-INF/MANIFEST.MF b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/META-INF/MANIFEST.MF new file mode 100644 index 00000000..e411b7a4 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.polarsys.capella.cdoxml.ta.genchain;singleton:=true +Bundle-Version: 5.2.0.qualifier +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.egf.portfolio.genchain, + org.polarsys.capella.cdoxml.ta.genchain.model, + org.eclipse.egf.pattern;visibility:=reexport, + org.eclipse.egf.pattern.ftask;visibility:=reexport, + org.eclipse.egf.model.fprod, + org.eclipse.egf.portfolio.genchain.tools, + org.polarsys.capella.cdoxml.ta.portfolio;bundle-version="5.2.0" +Export-Package: org.polarsys.capella.cdoxml.ta.genchain +Automatic-Module-Name: org.polarsys.capella.cdoxml.ta.genchain +Bundle-Localization: plugin diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/about.html b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/about.html new file mode 100644 index 00000000..164f781a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ 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 http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/build.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/build.properties new file mode 100644 index 00000000..09b2bea7 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/build.properties @@ -0,0 +1,9 @@ +source.. = src/,\ + generated/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + egf/,\ + model/,\ + templates/ diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/egf/capellaConnectorExtension.fcore b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/egf/capellaConnectorExtension.fcore new file mode 100644 index 00000000..c7b94ddb --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/egf/capellaConnectorExtension.fcore @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/generated/org/polarsys/capella/cdoxml/ta/genchain/CapellaConnector.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/generated/org/polarsys/capella/cdoxml/ta/genchain/CapellaConnector.java new file mode 100644 index 00000000..f74fda12 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/generated/org/polarsys/capella/cdoxml/ta/genchain/CapellaConnector.java @@ -0,0 +1,130 @@ +//Generated with EGF 1.6.2.202001031546 +package org.polarsys.capella.cdoxml.ta.genchain; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.egf.model.pattern.Node; +import org.eclipse.egf.model.domain.DomainFactory; +import org.eclipse.egf.model.domain.EMFDomain; +import org.eclipse.egf.model.domain.DomainViewpoint; +import org.eclipse.egf.model.domain.TypeDomain; +import org.eclipse.egf.model.fcore.Activity; +import org.eclipse.egf.model.fcore.FactoryComponent; +import org.eclipse.egf.model.fcore.OrchestrationParameter; +import org.eclipse.egf.model.fprod.ProductionPlan; +import org.eclipse.egf.model.pattern.PatternContext; +import org.eclipse.egf.model.types.Type; +import org.eclipse.egf.pattern.execution.*; +import org.eclipse.egf.pattern.query.IQuery; +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationElement; +import org.eclipse.egf.portfolio.genchain.tools.FcoreBuilderConstants; +import org.eclipse.egf.portfolio.genchain.tools.utils.ActivityInvocationHelper; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; + +public class CapellaConnector { + + public CapellaConnector() { + //Here is the constructor + // add initialisation of the pattern variables (declaration has been already done). + + } + + public void generate(Object argument) throws Exception { + InternalPatternContext ctx = (InternalPatternContext) argument; + IQuery.ParameterDescription paramDesc = null; + Map queryCtx = null; + Node.Container currentNode = ctx.getNode(); + List parameterList = null; + //this pattern can only be called by another (i.e. it's not an entry point in execution) + + for (Object parameterParameter : parameterList) { + + this.parameter = (org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration) parameterParameter; + + if (preCondition(ctx)) { + ctx.setNode(new Node.Container(currentNode, getClass())); + orchestration((PatternContext) argument); + + } + } + if (ctx.useReporter()) { + ctx.getReporter().executionFinished(OutputManager.computeExecutionOutput(ctx), ctx); + } + } + + public String orchestration(PatternContext ctx) throws Exception { + InternalPatternContext ictx = (InternalPatternContext) ctx; + Node.Container currentNode = ictx.getNode(); + method_body(new StringBuffer(), ictx); + ictx.setNode(currentNode); + if (ictx.useReporter()) { + Map parameterValues = new HashMap(); + parameterValues.put("parameter", this.parameter); + String outputWithCallBack = OutputManager.computeLoopOutput(ictx); + String loop = OutputManager.computeLoopOutputWithoutCallback(ictx); + ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues); + } + return null; + } + + protected void method_body(final StringBuffer out, final PatternContext ctx) throws Exception { + Map fcs = (Map) ctx + .getValue(FcoreBuilderConstants.CURRENT_FCORE); + FactoryComponent fc = fcs.get((GenerationElement) (parameter.eContainer())); + + ProductionPlan pp = (ProductionPlan) fc.getOrchestration(); + DomainViewpoint dvp = (DomainViewpoint) fc.getViewpointContainer().getViewpoint(DomainViewpoint.class); + ResourceSet resourceSet = fc.eResource().getResourceSet(); + + URI uri = URI.createPlatformResourceURI(parameter.getModelPath(), false); + EMFDomain ecoreDomain = ActivityInvocationHelper.getDomain(dvp, uri); + + if (parameter.isAddConnectorEAnnotations()) { + Map contracts1 = new HashMap(); + Map parameters1 = new HashMap(); + + TypeDomain typeDomain1 = DomainFactory.eINSTANCE.createTypeDomain(); + typeDomain1.setDomain(ecoreDomain); + contracts1.put("ecoreModel", typeDomain1); + + String activity1 = "platform:/plugin/org.polarsys.capella.cdoxml.ta.portfolio/egf/addEAnnotations.fcore#_3jrwsRIEEeKTuJ3Ft5PbJQ"; + ActivityInvocationHelper.addInvocation(pp, + (Activity) resourceSet.getEObject(URI.createURI(activity1, false), true), contracts1, parameters1); + } + + Map contracts2 = new HashMap(); + Map parameters2 = new HashMap(); + + TypeDomain typeDomain2 = DomainFactory.eINSTANCE.createTypeDomain(); + typeDomain2.setDomain(ecoreDomain); + contracts2.put("ecoreModel", typeDomain2); + + String activity2 = "platform:/plugin/org.polarsys.capella.cdoxml.ta.portfolio/egf/connectorAdditionalDescription.fcore#_n2ZGgBIGEeKTuJ3Ft5PbJQ"; + ActivityInvocationHelper.addInvocation(pp, + (Activity) resourceSet.getEObject(URI.createURI(activity2, false), true), contracts2, parameters2); + + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "body", out.toString()); + } + + public boolean preCondition(PatternContext ctx) throws Exception { + return true; + } + + protected org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration parameter; + + public void set_parameter( + org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration parameter) { + this.parameter = parameter; + } + + public Map getParameters() { + Map parameters = new HashMap(); + parameters.put("parameter", this.parameter); + return parameters; + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/model/connectorExtension.ecore b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/model/connectorExtension.ecore new file mode 100644 index 00000000..116e5fb9 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/model/connectorExtension.ecore @@ -0,0 +1,9 @@ + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/model/connectorExtension.genmodel b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/model/connectorExtension.genmodel new file mode 100644 index 00000000..79e03c0c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/model/connectorExtension.genmodel @@ -0,0 +1,20 @@ + + + connectorExtension.ecore + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/plugin.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/plugin.properties new file mode 100644 index 00000000..5955e51e --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/plugin.properties @@ -0,0 +1,13 @@ +# ============================================================================= +# Copyright (c) 2006, 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales Global Services S.A.S - initial API and implementation +# ============================================================================= +pluginName=CDO and XML Target Application DSL Viewpoint User Interface generator +providerName=www.polarsys.org \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/plugin.xml new file mode 100644 index 00000000..3344fb32 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/plugin.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/src/org/polarsys/capella/cdoxml/ta/genchain/CapellaConnectorExtension.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/src/org/polarsys/capella/cdoxml/ta/genchain/CapellaConnectorExtension.java new file mode 100644 index 00000000..f193bb0c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/src/org/polarsys/capella/cdoxml/ta/genchain/CapellaConnectorExtension.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2021 Thales Global Services. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales Global Services - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.cdoxml.ta.genchain; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.eclipse.egf.core.domain.TargetPlatformResourceSet; +import org.eclipse.egf.model.pattern.Pattern; +import org.eclipse.egf.model.pattern.PatternFactory; +import org.eclipse.egf.model.pattern.Substitution; +import org.eclipse.egf.portfolio.genchain.extension.ExtensionHelper; +import org.eclipse.egf.portfolio.genchain.generationChain.EcoreElement; +import org.eclipse.emf.common.util.URI; +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorExtensionFactory; +import org.polarsys.capella.cdoxml.ta.genchain.connectorextension.ConnectorGeneration; + +/** + * @author Matthieu Helleboid + */ +public class CapellaConnectorExtension extends ExtensionHelper { + private static final URI PATTERN_CONNECTOR = URI.createURI("platform:/plugin/org.polarsys.capella.cdoxml.ta.genchain/egf/capellaConnectorExtension.fcore#_heLDYBIKEeKYHMigmt5qAQ", false); + + @Override + public EcoreElement createEcoreElement(Map properties) { + ConnectorGeneration elt = ConnectorExtensionFactory.eINSTANCE.createConnectorGeneration(); + String modelPath = properties.get(MODEL_PATH); + elt.setModelPath(modelPath); + return elt; + } + + @Override + public List getSubstitutions() { + TargetPlatformResourceSet set = new TargetPlatformResourceSet(); + List substitutions = new ArrayList(); + final Substitution substitution = PatternFactory.eINSTANCE.createSubstitution(); + substitutions.add(substitution); + Pattern pattern = (Pattern) set.getEObject(PATTERN_CONNECTOR, true); + substitution.getReplacement().add(pattern); + return substitutions; + } + + @Override + public String getLabel() { + return "Capella Connector Add-on Generation"; + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDYhIKEeKYHMigmt5qAQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDYhIKEeKYHMigmt5qAQ.pt new file mode 100644 index 00000000..aa07d6d0 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDYhIKEeKYHMigmt5qAQ.pt @@ -0,0 +1,33 @@ +package PACKAGE; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.egf.model.pattern.Node; +import org.eclipse.egf.model.domain.DomainFactory; +import org.eclipse.egf.model.domain.EMFDomain; +import org.eclipse.egf.model.domain.DomainViewpoint; +import org.eclipse.egf.model.domain.TypeDomain; +import org.eclipse.egf.model.fcore.Activity; +import org.eclipse.egf.model.fcore.FactoryComponent; +import org.eclipse.egf.model.fcore.OrchestrationParameter; +import org.eclipse.egf.model.fprod.ProductionPlan; +import org.eclipse.egf.model.pattern.PatternContext; +import org.eclipse.egf.model.types.Type; +import org.eclipse.egf.pattern.execution.*; +import org.eclipse.egf.pattern.query.IQuery; +import org.eclipse.egf.portfolio.genchain.generationChain.GenerationElement; +import org.eclipse.egf.portfolio.genchain.tools.FcoreBuilderConstants; +import org.eclipse.egf.portfolio.genchain.tools.utils.ActivityInvocationHelper; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; + + +public class CLASS { + + public CLASS() { + //Here is the constructor + } + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDYxIKEeKYHMigmt5qAQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDYxIKEeKYHMigmt5qAQ.pt new file mode 100644 index 00000000..24650d7a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDYxIKEeKYHMigmt5qAQ.pt @@ -0,0 +1 @@ +// add initialisation of the pattern variables (declaration has been already done). diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZBIKEeKYHMigmt5qAQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZBIKEeKYHMigmt5qAQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZRIKEeKYHMigmt5qAQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZRIKEeKYHMigmt5qAQ.pt new file mode 100644 index 00000000..f1f3fde0 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZRIKEeKYHMigmt5qAQ.pt @@ -0,0 +1,33 @@ + Map fcs = (Map) ctx.getValue(FcoreBuilderConstants.CURRENT_FCORE); + FactoryComponent fc = fcs.get((GenerationElement) (parameter.eContainer())); + + ProductionPlan pp = (ProductionPlan) fc.getOrchestration(); + DomainViewpoint dvp = (DomainViewpoint) fc.getViewpointContainer().getViewpoint(DomainViewpoint.class); + ResourceSet resourceSet = fc.eResource().getResourceSet(); + + URI uri = URI.createPlatformResourceURI(parameter.getModelPath(), false); + EMFDomain ecoreDomain = ActivityInvocationHelper.getDomain(dvp, uri); + + if (parameter.isAddConnectorEAnnotations()) { + Map contracts1 = new HashMap(); + Map parameters1 = new HashMap(); + + TypeDomain typeDomain1 = DomainFactory.eINSTANCE.createTypeDomain(); + typeDomain1.setDomain(ecoreDomain); + contracts1.put("ecoreModel", typeDomain1); + + String activity1 = "platform:/plugin/org.polarsys.capella.cdoxml.ta.portfolio/egf/addEAnnotations.fcore#_3jrwsRIEEeKTuJ3Ft5PbJQ"; + ActivityInvocationHelper.addInvocation(pp, (Activity) resourceSet.getEObject(URI.createURI(activity1, false), true), contracts1, parameters1); + } + + + Map contracts2 = new HashMap(); + Map parameters2 = new HashMap(); + + TypeDomain typeDomain2 = DomainFactory.eINSTANCE.createTypeDomain(); + typeDomain2.setDomain(ecoreDomain); + contracts2.put("ecoreModel", typeDomain2); + + String activity2 = "platform:/plugin/org.polarsys.capella.cdoxml.ta.portfolio/egf/connectorAdditionalDescription.fcore#_n2ZGgBIGEeKTuJ3Ft5PbJQ"; + ActivityInvocationHelper.addInvocation(pp, (Activity) resourceSet.getEObject(URI.createURI(activity2, false), true), contracts2, parameters2); + \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZhIKEeKYHMigmt5qAQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZhIKEeKYHMigmt5qAQ.pt new file mode 100644 index 00000000..ff30235f --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/templates/pattern._heLDYBIKEeKYHMigmt5qAQ/method._heLDZhIKEeKYHMigmt5qAQ.pt @@ -0,0 +1 @@ +} \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.classpath b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.classpath new file mode 100644 index 00000000..a694d8b1 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.project b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.project new file mode 100644 index 00000000..45340ec1 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.project @@ -0,0 +1,34 @@ + + + org.polarsys.capella.cdoxml.ta.portfolio + + + + + + org.eclipse.egf.pattern.ui.PatternBuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.egf.core.EGFNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.settings/org.eclipse.jdt.core.prefs b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..9f6ece88 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/META-INF/MANIFEST.MF b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/META-INF/MANIFEST.MF new file mode 100644 index 00000000..7989beea --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.polarsys.capella.cdoxml.ta.portfolio;singleton:=true +Bundle-Version: 5.2.0.qualifier +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.egf.pattern;visibility:=reexport, + org.eclipse.egf.pattern.ftask;visibility:=reexport, + org.eclipse.egf.model.ftask;visibility:=reexport +Export-Package: org.polarsys.capella.cdoxml.ta.portfolio +Automatic-Module-Name: org.polarsys.capella.cdoxml.ta.portfolio +Bundle-Localization: plugin diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/about.html b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/about.html new file mode 100644 index 00000000..164f781a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ 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 http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/build.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/build.properties new file mode 100644 index 00000000..23b21b89 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/build.properties @@ -0,0 +1,8 @@ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + egf/,\ + plugin.xml,\ + templates/ +source.. = src/,\ + generated/ diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/egf/addEAnnotations.fcore b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/egf/addEAnnotations.fcore new file mode 100644 index 00000000..73d4e446 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/egf/addEAnnotations.fcore @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/egf/connectorAdditionalDescription.fcore b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/egf/connectorAdditionalDescription.fcore new file mode 100644 index 00000000..f0736bad --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/egf/connectorAdditionalDescription.fcore @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/AbstractDescription.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/AbstractDescription.java new file mode 100644 index 00000000..a6e47c8d --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/AbstractDescription.java @@ -0,0 +1,125 @@ +//Generated with EGF 1.6.2.202001031546 +package org.polarsys.capella.cdoxml.ta.portfolio; + +import org.eclipse.egf.common.helper.*; +import java.util.*; +import org.eclipse.emf.ecore.*; +import org.eclipse.egf.model.pattern.*; +import org.eclipse.egf.pattern.execution.*; +import org.eclipse.egf.pattern.query.*; + +public class AbstractDescription { + protected static String nl; + + public static synchronized AbstractDescription create(String lineSeparator) { + nl = lineSeparator; + AbstractDescription result = new AbstractDescription(); + nl = null; + return result; + } + + public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; + protected final String TEXT_1 = "//default content"; + protected final String TEXT_2 = NL; + + public AbstractDescription() { + //Here is the constructor + StringBuffer stringBuffer = new StringBuffer(); + + // add initialisation of the pattern variables (declaration has been already done). + + } + + public String generate(Object argument) throws Exception { + final StringBuffer stringBuffer = new StringBuffer(); + + InternalPatternContext ctx = (InternalPatternContext) argument; + Map queryCtx = null; + IQuery.ParameterDescription paramDesc = null; + Node.Container currentNode = ctx.getNode(); + + List eClassList = null; + //this pattern can only be called by another (i.e. it's not an entry point in execution) + + for (Object eClassParameter : eClassList) { + + this.eClass = (org.eclipse.emf.ecore.EClass) eClassParameter; + + if (preCondition(ctx)) { + ctx.setNode(new Node.Container(currentNode, getClass())); + orchestration(ctx); + } + + } + ctx.setNode(currentNode); + if (ctx.useReporter()) { + ctx.getReporter().executionFinished(OutputManager.computeExecutionOutput(ctx), ctx); + } + + stringBuffer.append(TEXT_2); + stringBuffer.append(TEXT_2); + return stringBuffer.toString(); + } + + public String orchestration(PatternContext ctx) throws Exception { + InternalPatternContext ictx = (InternalPatternContext) ctx; + + method_body(new StringBuffer(), ictx); + + method_setFileName(new StringBuffer(), ictx); + + method_putFileNameInContext(new StringBuffer(), ictx); + + if (ictx.useReporter()) { + Map parameterValues = new HashMap(); + parameterValues.put("eClass", this.eClass); + String outputWithCallBack = OutputManager.computeLoopOutput(ictx); + String loop = OutputManager.computeLoopOutputWithoutCallback(ictx); + ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues); + } + return null; + } + + protected java.lang.String fileName = null; + + public void set_fileName(java.lang.String object) { + this.fileName = object; + } + + protected org.eclipse.emf.ecore.EClass eClass = null; + + public void set_eClass(org.eclipse.emf.ecore.EClass object) { + this.eClass = object; + } + + public Map getParameters() { + final Map parameters = new HashMap(); + parameters.put("eClass", this.eClass); + return parameters; + } + + protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx) throws Exception { + + stringBuffer.append(TEXT_1); + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "body", stringBuffer.toString()); + } + + protected void method_setFileName(final StringBuffer stringBuffer, final PatternContext ctx) throws Exception { + + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "setFileName", stringBuffer.toString()); + } + + protected void method_putFileNameInContext(final StringBuffer stringBuffer, final PatternContext ctx) + throws Exception { + + ctx.setValue("fileName", fileName); + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "putFileNameInContext", stringBuffer.toString()); + } + + public boolean preCondition(PatternContext ctx) throws Exception { + return true; + } +} \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/AddEAnnotations.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/AddEAnnotations.java new file mode 100644 index 00000000..a0a18574 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/AddEAnnotations.java @@ -0,0 +1,91 @@ +//Generated with EGF 1.6.2.202001031546 +package org.polarsys.capella.cdoxml.ta.portfolio; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.egf.model.pattern.Node; +import org.eclipse.egf.model.pattern.PatternContext; +import org.eclipse.egf.pattern.execution.InternalPatternContext; +import org.eclipse.egf.pattern.execution.OutputManager; +import org.eclipse.egf.pattern.query.IQuery; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcoreFactory; + +public class AddEAnnotations { + + public AddEAnnotations() { + //Here is the constructor + // add initialisation of the pattern variables (declaration has been already done). + + } + + public void generate(Object argument) throws Exception { + InternalPatternContext ctx = (InternalPatternContext) argument; + IQuery.ParameterDescription paramDesc = null; + Map queryCtx = null; + Node.Container currentNode = ctx.getNode(); + List eClassList = null; + //this pattern can only be called by another (i.e. it's not an entry point in execution) + + for (Object eClassParameter : eClassList) { + + this.eClass = (org.eclipse.emf.ecore.EClass) eClassParameter; + + if (preCondition(ctx)) { + ctx.setNode(new Node.Container(currentNode, getClass())); + orchestration((PatternContext) argument); + + } + } + if (ctx.useReporter()) { + ctx.getReporter().executionFinished(OutputManager.computeExecutionOutput(ctx), ctx); + } + } + + public String orchestration(PatternContext ctx) throws Exception { + InternalPatternContext ictx = (InternalPatternContext) ctx; + Node.Container currentNode = ictx.getNode(); + method_body(new StringBuffer(), ictx); + ictx.setNode(currentNode); + if (ictx.useReporter()) { + Map parameterValues = new HashMap(); + parameterValues.put("eClass", this.eClass); + String outputWithCallBack = OutputManager.computeLoopOutput(ictx); + String loop = OutputManager.computeLoopOutputWithoutCallback(ictx); + ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues); + } + return null; + } + + protected void method_body(final StringBuffer out, final PatternContext ctx) throws Exception { + for (EReference eReference : eClass.getEAllReferences()) { + EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); + eAnnotation.setSource("http://com.thalesgroup.mde/simplifiedM2/Navigable"); + eReference.getEAnnotations().add(eAnnotation); + eClass.eResource().save(java.util.Collections.EMPTY_MAP); + } + + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "body", out.toString()); + } + + public boolean preCondition(PatternContext ctx) throws Exception { + return true; + } + + protected org.eclipse.emf.ecore.EClass eClass; + + public void set_eClass(org.eclipse.emf.ecore.EClass eClass) { + this.eClass = eClass; + } + + public Map getParameters() { + Map parameters = new HashMap(); + parameters.put("eClass", this.eClass); + return parameters; + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/ArtifactsDescription.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/ArtifactsDescription.java new file mode 100644 index 00000000..0cd5018d --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/ArtifactsDescription.java @@ -0,0 +1,105 @@ +//Generated with EGF 1.6.2.202001031546 +package org.polarsys.capella.cdoxml.ta.portfolio; + +import org.eclipse.egf.common.helper.*; +import java.util.*; +import org.eclipse.emf.ecore.*; +import org.eclipse.egf.model.pattern.*; +import org.eclipse.egf.pattern.execution.*; +import org.eclipse.egf.pattern.query.*; + +public class ArtifactsDescription extends org.polarsys.capella.cdoxml.ta.portfolio.AbstractDescription { + protected static String nl; + + public static synchronized ArtifactsDescription create(String lineSeparator) { + nl = lineSeparator; + ArtifactsDescription result = new ArtifactsDescription(); + nl = null; + return result; + } + + public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; + protected final String TEXT_1 = "" + + NL; + protected final String TEXT_4 = NL; + + public ArtifactsDescription() { + //Here is the constructor + StringBuffer stringBuffer = new StringBuffer(); + + // add initialisation of the pattern variables (declaration has been already done). + + } + + public String generate(Object argument) throws Exception { + final StringBuffer stringBuffer = new StringBuffer(); + + InternalPatternContext ctx = (InternalPatternContext) argument; + Map queryCtx = null; + IQuery.ParameterDescription paramDesc = null; + Node.Container currentNode = ctx.getNode(); + + List eClassList = null; + //this pattern can only be called by another (i.e. it's not an entry point in execution) + + for (Object eClassParameter : eClassList) { + + this.eClass = (org.eclipse.emf.ecore.EClass) eClassParameter; + + if (preCondition(ctx)) { + ctx.setNode(new Node.Container(currentNode, getClass())); + orchestration(ctx); + } + + } + ctx.setNode(currentNode); + if (ctx.useReporter()) { + ctx.getReporter().executionFinished(OutputManager.computeExecutionOutput(ctx), ctx); + } + + stringBuffer.append(TEXT_4); + stringBuffer.append(TEXT_4); + return stringBuffer.toString(); + } + + public String orchestration(PatternContext ctx) throws Exception { + InternalPatternContext ictx = (InternalPatternContext) ctx; + + super.orchestration(new SuperOrchestrationContext(ictx)); + + if (ictx.useReporter()) { + Map parameterValues = new HashMap(); + parameterValues.put("eClass", this.eClass); + String outputWithCallBack = OutputManager.computeLoopOutput(ictx); + String loop = OutputManager.computeLoopOutputWithoutCallback(ictx); + ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues); + } + return null; + } + + public Map getParameters() { + final Map parameters = new HashMap(); + parameters.put("eClass", this.eClass); + return parameters; + } + + protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx) throws Exception { + + stringBuffer.append(TEXT_1); + stringBuffer.append(eClass.getName()); + stringBuffer.append(TEXT_2); + stringBuffer.append(eClass.getName()); + stringBuffer.append(TEXT_3); + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "body", stringBuffer.toString()); + } + + protected void method_setFileName(final StringBuffer stringBuffer, final PatternContext ctx) throws Exception { + + fileName = "artifacts_description_Capella.xml"; + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "setFileName", stringBuffer.toString()); + } +} \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/TypeDescription.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/TypeDescription.java new file mode 100644 index 00000000..ee41f5e6 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/generated/org/polarsys/capella/cdoxml/ta/portfolio/TypeDescription.java @@ -0,0 +1,109 @@ +//Generated with EGF 1.6.2.202001031546 +package org.polarsys.capella.cdoxml.ta.portfolio; + +import org.eclipse.egf.common.helper.*; +import java.util.*; +import org.eclipse.emf.ecore.*; +import org.eclipse.egf.model.pattern.*; +import org.eclipse.egf.pattern.execution.*; +import org.eclipse.egf.pattern.query.*; + +public class TypeDescription extends org.polarsys.capella.cdoxml.ta.portfolio.AbstractDescription { + protected static String nl; + + public static synchronized TypeDescription create(String lineSeparator) { + nl = lineSeparator; + TypeDescription result = new TypeDescription(); + nl = null; + return result; + } + + public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; + protected final String TEXT_1 = " " + NL + " " + NL + + " " + + NL + " " + NL + " " + NL; + protected final String TEXT_5 = NL; + + public TypeDescription() { + //Here is the constructor + StringBuffer stringBuffer = new StringBuffer(); + + // add initialisation of the pattern variables (declaration has been already done). + + } + + public String generate(Object argument) throws Exception { + final StringBuffer stringBuffer = new StringBuffer(); + + InternalPatternContext ctx = (InternalPatternContext) argument; + Map queryCtx = null; + IQuery.ParameterDescription paramDesc = null; + Node.Container currentNode = ctx.getNode(); + + List eClassList = null; + //this pattern can only be called by another (i.e. it's not an entry point in execution) + + for (Object eClassParameter : eClassList) { + + this.eClass = (org.eclipse.emf.ecore.EClass) eClassParameter; + + if (preCondition(ctx)) { + ctx.setNode(new Node.Container(currentNode, getClass())); + orchestration(ctx); + } + + } + ctx.setNode(currentNode); + if (ctx.useReporter()) { + ctx.getReporter().executionFinished(OutputManager.computeExecutionOutput(ctx), ctx); + } + + stringBuffer.append(TEXT_5); + stringBuffer.append(TEXT_5); + return stringBuffer.toString(); + } + + public String orchestration(PatternContext ctx) throws Exception { + InternalPatternContext ictx = (InternalPatternContext) ctx; + + super.orchestration(new SuperOrchestrationContext(ictx)); + + if (ictx.useReporter()) { + Map parameterValues = new HashMap(); + parameterValues.put("eClass", this.eClass); + String outputWithCallBack = OutputManager.computeLoopOutput(ictx); + String loop = OutputManager.computeLoopOutputWithoutCallback(ictx); + ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues); + } + return null; + } + + public Map getParameters() { + final Map parameters = new HashMap(); + parameters.put("eClass", this.eClass); + return parameters; + } + + protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx) throws Exception { + + stringBuffer.append(TEXT_1); + stringBuffer.append(eClass.getName()); + stringBuffer.append(TEXT_2); + stringBuffer.append(eClass.getName()); + stringBuffer.append(TEXT_3); + stringBuffer.append(eClass.getName()); + stringBuffer.append(TEXT_4); + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "body", stringBuffer.toString()); + } + + protected void method_setFileName(final StringBuffer stringBuffer, final PatternContext ctx) throws Exception { + + fileName = "Types_description_Capella.xml"; + InternalPatternContext ictx = (InternalPatternContext) ctx; + new Node.DataLeaf(ictx.getNode(), getClass(), "setFileName", stringBuffer.toString()); + } +} \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/plugin.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/plugin.properties new file mode 100644 index 00000000..a106dc72 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/plugin.properties @@ -0,0 +1,13 @@ +# ============================================================================= +# Copyright (c) 2006, 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales Global Services S.A.S - initial API and implementation +# ============================================================================= +pluginName=CDO and XML Target Application Portfolio +providerName=www.polarsys.org \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/plugin.xml new file mode 100644 index 00000000..a096bd8c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/src/org/polarsys/capella/cdoxml/ta/portfolio/DescriptionReporter.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/src/org/polarsys/capella/cdoxml/ta/portfolio/DescriptionReporter.java new file mode 100644 index 00000000..3c989883 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/src/org/polarsys/capella/cdoxml/ta/portfolio/DescriptionReporter.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2021 Thales Global Services. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales Global Services - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.cdoxml.ta.portfolio; + +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.egf.model.pattern.PatternContext; +import org.eclipse.egf.model.pattern.PatternExecutionReporter; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.resource.Resource; + + +/** + * @author Matthieu Helleboid + */ +public class DescriptionReporter implements PatternExecutionReporter { + + private static Collection generatedFiles = new ArrayList(); + + public void executionFinished(String output, PatternContext context) { + generatedFiles.clear(); + } + + public void loopFinished(String output, String outputWithCallBack, PatternContext context, Map parameterValues) { + EClass eClass = (EClass) parameterValues.get("eClass"); + Resource eResource = eClass.eResource(); + String projectName = new Path(eResource.getURI().toPlatformString(false)).segment(0) + ".connector"; + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); + try { + if (!project.exists()) { + project.create(new NullProgressMonitor()); + } + if (!project.isOpen()) { + project.open(new NullProgressMonitor()); + } + } catch (CoreException e) { + throw new IllegalStateException("Unable to find project " + projectName, e); + } + + IFile file = project.getFile((String) context.getValue("fileName")); + try { + boolean append = generatedFiles.contains(file); + BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file.getRawLocation().toFile(), append)); + bufferedWriter.append(output); + bufferedWriter.close(); + generatedFiles.add(file); + } catch (IOException e) { + throw new IllegalStateException("Unable to find file " + file, e); + } + + try { + project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); + } catch (CoreException e) { + throw new IllegalStateException("Unable to refresh project " + projectName, e); + } + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhAhIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhAhIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..dbc5974c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhAhIGEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%@ jet package="PACKAGE" class="CLASS" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*" %> \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhAxIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhAxIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..d6300533 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhAxIGEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%// add initialisation of the pattern variables (declaration has been already done).%> diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBBIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBBIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBRIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBRIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..c1ccf5bf --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBRIGEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1,5 @@ + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBhIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._-cFhBhIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._YB-goBIIEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._YB-goBIIEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..3593ff0c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._-cFhABIGEeKTuJ3Ft5PbJQ/method._YB-goBIIEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%fileName = "Types_description_Capella.xml";%> \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4khIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4khIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..dbc5974c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4khIGEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%@ jet package="PACKAGE" class="CLASS" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*" %> \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4kxIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4kxIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..d6300533 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4kxIGEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%// add initialisation of the pattern variables (declaration has been already done).%> diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lBIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lBIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lRIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lRIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..99b09bb9 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lRIGEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lhIGEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._66V4lhIGEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._SzTcUBIIEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._SzTcUBIIEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..28754297 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._66V4kBIGEeKTuJ3Ft5PbJQ/method._SzTcUBIIEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%fileName = "artifacts_description_Capella.xml";%> \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyIhIFEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyIhIFEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..ad68cf77 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyIhIFEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1,23 @@ +package PACKAGE; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.egf.model.pattern.Node; +import org.eclipse.egf.model.pattern.PatternContext; +import org.eclipse.egf.pattern.execution.InternalPatternContext; +import org.eclipse.egf.pattern.execution.OutputManager; +import org.eclipse.egf.pattern.query.IQuery; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcoreFactory; + + +public class CLASS { + + public CLASS() { + //Here is the constructor + } + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyIxIFEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyIxIFEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..24650d7a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyIxIFEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +// add initialisation of the pattern variables (declaration has been already done). diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJBIFEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJBIFEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJRIFEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJRIFEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..c4bad47b --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJRIFEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1,6 @@ +for (EReference eReference : eClass.getEAllReferences()) { + EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); + eAnnotation.setSource("http://com.thalesgroup.mde/simplifiedM2/Navigable"); + eReference.getEAnnotations().add(eAnnotation); + eClass.eResource().save(java.util.Collections.EMPTY_MAP); +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJhIFEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJhIFEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..ff30235f --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._elTyIBIFEeKTuJ3Ft5PbJQ/method._elTyJhIFEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +} \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._KDB5gBIIEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._KDB5gBIIEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._eq2UQBIXEeKYHMigmt5qAQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._eq2UQBIXEeKYHMigmt5qAQ.pt new file mode 100644 index 00000000..8a240ea6 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._eq2UQBIXEeKYHMigmt5qAQ.pt @@ -0,0 +1 @@ +<%ctx.setValue("fileName", fileName);%> \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeYhIHEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeYhIHEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..dbc5974c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeYhIHEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%@ jet package="PACKAGE" class="CLASS" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*" %> \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeYxIHEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeYxIHEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..d6300533 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeYxIHEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +<%// add initialisation of the pattern variables (declaration has been already done).%> diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZBIHEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZBIHEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZRIHEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZRIHEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..8d16cca6 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZRIHEeKTuJ3Ft5PbJQ.pt @@ -0,0 +1 @@ +//default content \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZhIHEeKTuJ3Ft5PbJQ.pt b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/templates/pattern._h2OeYBIHEeKTuJ3Ft5PbJQ/method._h2OeZhIHEeKTuJ3Ft5PbJQ.pt new file mode 100644 index 00000000..e69de29b diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.classpath b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.classpath new file mode 100644 index 00000000..eca7bdba --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.project b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.project new file mode 100644 index 00000000..27ae7d93 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.project @@ -0,0 +1,28 @@ + + + org.polarsys.capella.cdoxml.ta + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.settings/org.eclipse.jdt.core.prefs b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..9f6ece88 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/META-INF/MANIFEST.MF b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/META-INF/MANIFEST.MF new file mode 100644 index 00000000..ba32130a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.polarsys.capella.cdoxml.ta;singleton:=true +Bundle-Version: 5.1.0.qualifier +Bundle-Activator: org.polarsys.capella.cdoxml.ta.Activator +Bundle-Vendor: %providerName +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.polarsys.kitalpha.ad.ta, + org.polarsys.capella.ta;bundle-version="5.1.0", + org.eclipse.emf;bundle-version="2.8.0", + org.eclipse.egf.portfolio.genchain;bundle-version="1.6.2", + org.eclipse.egf.portfolio.genchain.cdo, + org.polarsys.kitalpha.ad.viewpoint.dsl.generation.core, + org.polarsys.kitalpha.ad.viewpoint.dsl.as.desc.model, + org.polarsys.kitalpha.ad.viewpoint.dsl.as.ui.model, + org.polarsys.capella.cdoxml.ta.genchain +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Automatic-Module-Name: org.polarsys.capella.cdoxml.ta +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/about.html b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/about.html new file mode 100644 index 00000000..164f781a --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ 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 http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/build.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/build.properties new file mode 100644 index 00000000..e9863e28 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/plugin.properties b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/plugin.properties new file mode 100644 index 00000000..1d7e1a8b --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/plugin.properties @@ -0,0 +1,13 @@ +# ============================================================================= +# Copyright (c) 2006, 2021 THALES GLOBAL SERVICES. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Thales Global Services S.A.S - initial API and implementation +# ============================================================================= +pluginName=CDO and XML Target Application Definition +providerName=www.polarsys.org diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/plugin.xml b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/plugin.xml new file mode 100644 index 00000000..221ca412 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/plugin.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/Activator.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/Activator.java new file mode 100644 index 00000000..274ca78f --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/Activator.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2021 Thales Global Services. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales Global Services - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.cdoxml.ta; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.polarsys.capella.cdoxml.ta"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/CapellaCDOandXMLTargetApplication.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/CapellaCDOandXMLTargetApplication.java new file mode 100644 index 00000000..fecfb79c --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/CapellaCDOandXMLTargetApplication.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2021 Thales Global Services. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales Global Services - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.cdoxml.ta; + +import org.polarsys.capella.cdoxml.ta.genchain.CapellaConnectorExtension; +import org.polarsys.capella.ta.definition.CapellaTargetApplication; + +import java.util.List; +import org.eclipse.egf.portfolio.genchain.extension.ExtensionHelper; +import org.eclipse.egf.portfolio.genchain.cdo.CdoGenerationExtension; + +public class CapellaCDOandXMLTargetApplication extends CapellaTargetApplication { + + @Override + public List getGenerationExtensionHelpers() { + List generationExtensionHelpers = super.getGenerationExtensionHelpers(); + generationExtensionHelpers.add(new CdoGenerationExtension()); + generationExtensionHelpers.add(new CapellaConnectorExtension()); + return generationExtensionHelpers; + } + +} diff --git a/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/UIAspectFilter.java b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/UIAspectFilter.java new file mode 100644 index 00000000..daa5dc14 --- /dev/null +++ b/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/src/org/polarsys/capella/cdoxml/ta/UIAspectFilter.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2021 Thales Global Services. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales Global Services - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.cdoxml.ta; + +import org.polarsys.kitalpha.ad.viewpoint.dsl.generation.core.extension.AbstractAspectExtensionFilter; +import org.polarsys.kitalpha.ad.viewpoint.dsl.as.model.vpdesc.Aspect; +import org.polarsys.kitalpha.ad.viewpoint.dsl.as.model.vpui.UIDescription; + + +public class UIAspectFilter extends AbstractAspectExtensionFilter { + + @Override + public boolean acceptAspect(Aspect aspect) { + return aspect instanceof UIDescription; + } + +}