OSDN Git Service

first commit main
authorTAKAHASHI Shinya <bchuukai@users.osdn.me>
Wed, 12 Jan 2022 11:18:41 +0000 (11:18 +0000)
committerTAKAHASHI Shinya <bchuukai@users.osdn.me>
Wed, 12 Jan 2022 11:18:41 +0000 (11:18 +0000)
31 files changed:
JDSmessages.zip [new file with mode: 0644]
LICENSE [new file with mode: 0644]
README.md [new file with mode: 0644]
about.bmp [new file with mode: 0644]
about.png [new file with mode: 0644]
all-in-one.bonitastudio-features.product [new file with mode: 0644]
all-in-one.installer.installer.properties [new file with mode: 0644]
all-in-one.installer.installer_project_template.xml [new file with mode: 0644]
bonita-studio.pom.xml [new file with mode: 0644]
build-script.sh [new file with mode: 0644]
bundles.features.rootfiles-feature.build.properties [new file with mode: 0644]
bundles.features.studio-feature.feature.xml [new file with mode: 0644]
bundles.plugins.application.plugin.xml [new file with mode: 0644]
bundles.plugins.application.src.org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor.java [new file with mode: 0644]
bundles.plugins.application.src.org.bonitasoft.studio.application.actions.OpenIntroCommandHnadler.java [new file with mode: 0644]
bundles.plugins.application.src.org.bonitasoft.studio.application.coolbar.WelcomeCoolbarItem.java [new file with mode: 0644]
bundles.plugins.engine.plugin.xml [new file with mode: 0644]
bundles.plugins.engine.src.org.bonitasoft.studio.engine.BOSEngineManager.java [new file with mode: 0644]
bundles.plugins.intro.content.introContent.xml [new file with mode: 0644]
bundles.plugins.intro.content.welcome.html [new file with mode: 0644]
bundles.plugins.intro.plugin.properties [new file with mode: 0644]
bundles.plugins.intro.plugin.xml [new file with mode: 0644]
bundles.plugins.pom.xml [new file with mode: 0644]
bundles.plugins.studio-product.plugin.xml [new file with mode: 0644]
console.libs.build.properties [new file with mode: 0644]
console.libs.pom.xml [new file with mode: 0644]
jds.ico [new file with mode: 0644]
jdsicons.zip [new file with mode: 0644]
splash.bmp [new file with mode: 0644]
splash.png [new file with mode: 0644]
studio-product.pom.xml [new file with mode: 0644]

diff --git a/JDSmessages.zip b/JDSmessages.zip
new file mode 100644 (file)
index 0000000..4510dd7
Binary files /dev/null and b/JDSmessages.zip differ
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..d7f1051
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    {description}
+    Copyright (C) {year}  {fullname}
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  {signature of Ty Coon}, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..ed68beb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,175 @@
+# Build Bonita from sources
+
+[![Linux build](https://img.shields.io/travis/Bonitasoft-Community/Build-Bonita/master?label=Linux%20build&logo=travis)](https://travis-ci.org/Bonitasoft-Community/Build-Bonita)
+
+[![MacOS and Windows build](https://github.com/Bonitasoft-Community/Build-Bonita/workflows/MacOS%20and%20Windows%20Build/badge.svg)](https://github.com/Bonitasoft-Community/Build-Bonita/actions)
+
+
+## Overview
+
+A bash script is provided to build the whole Bonita Community Edition solution from sources publicly available.
+
+It clones Git repositories and build all Bonita components in the right order to let you generate the Bonita Bundle and
+the Bonita Studio.
+
+
+## Requirements
+
+- Disk space: around 15 GB free space. Around 4 GB of dependencies will be downloaded (sources, 3rd party dependencies,
+...). A fast internet connection is recommended.
+- OS: Linux, MacOS and Windows (see test environments list below)
+- Java: Oracle/OpenJDK Java 8 (⚠ you cannot use Java 11 to build Bonita).
+
+
+## Instructions
+
+1. Clone this repository
+1. Checkout the [branch/tag](#branches-and-tags) related to the Bonita version you want to build
+1. Run `bash build-script.sh` in a terminal (on Windows, use git-bash as terminal i.e. the bash shell included with Git for Windows)
+1. Once finished, the following binaries are available
+    1. Bonita Studio (aka Bonita Development Suite): `bonita-studio/all-in-one/target` (only zip archive, no installer)
+    1. Bonita Bundle (aka Bonita Runtime): `bonita-distrib/tomcat/target`
+
+**Notes**
+- If you want to make 100% sure that you do a clean build from scratch, run the following commands:
+```bash
+rm -rf ~/.m2/repository/org/bonitasoft/
+rm -rf ~/.m2/repository/.cache
+rm -rf ~/.m2/repository/.meta
+rm -rf ~/.gradle/caches
+find -type d -name ".gradle" -prune -exec rm -rf {} \;
+find -type d -name target -prune -exec rm -rf {} \;
+```
+- No tests are run by the script (at least no back end tests). If you want to run some tests, go to the directory
+ related to the Bonita component you want to test, and follow instructions (generally available in README file)
+- The script does not produce Studio installers (required license for proprietary software).
+
+
+## Test environments
+
+CI builds are run on push to master/dev branches and Pull Requests (see badges on top of this page)
+- Linux: Ubuntu 18.04 (Travis CI)
+- MacOS: Catalina (GitHub Actions)
+- Windows: Windows Server 2019 DataCenter (GitHub Actions)
+
+
+## Issues
+
+If you face any issue with this build script or for any question, please report it on the [build-bonita GitHub issues tracker](https://github.com/Bonitasoft-Community/Build-Bonita/issues).
+
+You can also ask for help on [Bonita Community forum](https://community.bonitasoft.com/questions-and-answers).
+
+
+## <a name="branches-and-tags"></a> Branches and Tags
+
+The use of `Build-Bonita` branch or tag depends of the Bonita version you want to build.
+
+| Bonita version | Build-Bonita branch or tag |
+| -------- | ----- |
+| latest maintenance version | `master` branch |
+| old version | related tag (see the [tags](#tags) section below) |
+| next Bonita GA version | `dev` branch |
+
+**Notes**
+- `Build-Bonita` currently does not provide support for building Bonita SNAPSHOT versions aka next maintenance or
+development versions. See [#41](https://github.com/Bonitasoft-Community/Build-Bonita/issue/41) for such a support
+
+
+### Branches
+
+`Build-Bonita` uses the same branch names as the Bonita repositories
+- `master` for latest available GA or maintenance version. It also contains latest build improvements related to the
+solution provided by `Build-Bonita`
+- `dev` for next Bonita version while developments are in progress
+
+
+### Tags
+
+Tags are only available to build Bonita GA (i.e. 7.9.0, 7.10.0, ....) or maintenance (i.e. 7.7.5, 7.9.4, ....) versions,
+not for development versions.
+
+### <a name="tag-scheme"></a> Tag scheme
+- prior Bonita 7.10, `Build-Bonita` tags exactly match the Bonita version
+- as of Bonita 7.10, tags use the `<bonita_version>-<increment>` like `7.10.0-1`. This allows to track improvements or
+bug fixes applied to `Build-Bonita` for a given Bonita version
+
+Examples
+
+| Bonita version | Build-Bonita tag |
+| -------- | ----- |
+| 7.10.1 | 7.10.1-1, 7.10.1-2, .... |
+| 7.10.0 | 7.10.0-1, 7.10.0-2, .... |
+| 7.9.4 | 7.9.4 |
+| 7.7.5 | 7.7.5 |
+
+
+# Developing on Build-Bonita
+
+The following is for contributors to this repository.
+
+Notice that a lot of actions are manual, so if it's becoming boring for you, fill an issue to discuss about it, then
+provide a Pull Request to automate this and simplify our life
+
+## Add support for a new version
+
+Notice that most of the actions described below can be done directly using the GitHub website, for instance
+- file edition
+- branch and pull request creation
+
+See [GitHub help](https://help.github.com/en/github/managing-files-in-a-repository/editing-files-in-your-repository) for
+more details
+
+### Bonita maintenance version
+
+- from GitHub interface, edit `build-script.sh`on `master` branch (you can follow [GitHub help](https://help.github.com/en/github/managing-files-in-a-repository/editing-files-in-your-repository))
+- update the `build-script.sh` file and update the `BONITA_VERSION` variable
+- propose file changes by creating a new branch, for instance `maintenance_7.10.2`
+- [create a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) targeting `master`
+- wait for build to pass, this should work without any other modifications
+- [merge the Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request) after successful build
+
+### Bonita development version
+
+- create a new branch starting from the `dev` branch, for instance `dev_7.11.0.W10`
+- update the `build-script.sh` file and update the `BONITA_VERSION` variable
+- [create a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) targeting the `dev` branch
+- wait for build to run
+- failures often happen because of new components to be added or removed, build options of some components to be updated
+  - try to fix, then commit and iterate until build pass
+  - see [#32](https://github.com/Bonitasoft-Community/Build-Bonita/pull/32) or
+  [#48](https://github.com/Bonitasoft-Community/Build-Bonita/pull/48) for instance
+- [merge the Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request) after successful build
+
+
+### Merging master and dev branches
+
+Follow the same lifecycle as Bonita component repositories. Merge are currently done manually by `Build-Bonita`
+contributors
+- `master` --> `dev`: all the time, especially after adding support for a new maintenance version. Allow to get new
+improvements applied to maintenance versions, avoid subsequent merge conflicts, ...
+- `dev` --> `master`: on GA release, `master` is going to become the maintenance branch for the new Bonita released
+version. It is highly advised to do the merge in a dedicated branch as some issue occurred at that stage in the past
+  - first, ensure that `master` has been merged into`dev`
+  - create a new `bonita_7.10.0_GA` branch starting from `master` branch
+  - merge `dev` into `bonita_7.10.0_GA`
+  - [create a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) from `bonita_7.10.0_GA` targeting the `master` branch
+  - [merge the Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request) into `master` when the build passed (eventually after fixing any issues related to the merge)
+
+
+## New Release
+
+Release are cut when
+- a new Bonita version (GA or maintenance) is supported by `Build-Bonita`
+- significant improvements have been made in the `Build-Bonita` build script for the latest supported Bonita version
+
+### Create a GitHub release
+
+A new release can be create by following the [GitHub help](https://help.github.com/en/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)
+- for `Tag version`, use a value that follows the [Tag Scheme](#tag-scheme). The tag will be created when the release
+will be published
+- for `Target`
+  - usually, keep the `master` branch except if new commits that you don't want to integrate for the release are already
+  available in the branch
+  - in that case, choose a dedicated commit 
+  - **important**: ensure that the build to pass on the chosen branch or commit used to create the release
+
diff --git a/about.bmp b/about.bmp
new file mode 100644 (file)
index 0000000..e9ec5db
Binary files /dev/null and b/about.bmp differ
diff --git a/about.png b/about.png
new file mode 100644 (file)
index 0000000..8469ba8
Binary files /dev/null and b/about.png differ
diff --git a/all-in-one.bonitastudio-features.product b/all-in-one.bonitastudio-features.product
new file mode 100644 (file)
index 0000000..9587ecc
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="Japan Digital Studio" uid="org.bonitasoft.studio.product" id="org.bonitasoft.studio.product" application="org.bonitasoft.studio.application.application" version="7.13.0" useFeatures="true" includeLaunchers="true">
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <programArgsLin>-clean
+      </programArgsLin>
+      <vmArgs>-Xmx1g -Xms512m  -Dosgi.requiredJavaVersion=11 -Dfile.encoding=UTF8
+      </vmArgs>
+      <vmArgsMac>-XstartOnFirstThread
+      </vmArgsMac>
+      <vmArgsWin>-Dgreclipse.nonlocking=true
+      </vmArgsWin>
+   </launcherArgs>
+
+   <windowImages/>
+
+   <splash
+      location="org.bonitasoft.studio"
+      startupProgressRect="4,345,679,5"
+      startupMessageRect="223,190,250,25"
+      startupForegroundColor="FFFCFC" />
+   <launcher name="BonitaStudioCommunity">
+      <macosx icon="icons/bonitasoft-icon-128-128-transparent.icns"/>
+      <win useIco="true">
+         <ico path="icons/bonitasoft.ico"/>
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+      <linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</linux>
+      <macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</macos>
+      <windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</windows>
+   </vm>
+
+   <license>
+        <url>http://www.gnu.org/licenses/gpl-2.0.html</url>
+        <text>
+               Copyright (C) 2021 Kyoto Prefecture
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2.0 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+         </text>
+   </license>
+
+   <plugins>
+   </plugins>
+
+   <features>
+      <feature id="studio-feature"/>
+      <feature id="studio-bos-specific-feature"/>
+      <feature id="bos-branding-feature"/>
+      <feature id="rootfiles-feature"/>
+   </features>
+
+   <configurations>
+      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="1" />
+      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
+      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
+      <property name="branding.version" value="${branding.version}" />
+      <property name="osgi.nls.warnings" value="ignore" />
+      <property name="product.version" value="${project.version}" />
+      <property name="portal.version" value="${bundle.version}" />
+      <property name="engine.version" value="${engine.version}" />
+      <property name="osgi.instance.area" value="@noDefault" />
+      <property name="eclipse.buildId" value="${unqualifiedVersion}.${buildQualifier}" />
+      <property name="eclipse.log.level" value="INFO" />
+      <property name="file.encoding" value="UTF-8" />
+   </configurations>
+
+   <preferencesInfo>
+      <targetfile overwrite="false"/>
+   </preferencesInfo>
+
+   <cssInfo>
+   </cssInfo>
+
+</product>
diff --git a/all-in-one.installer.installer.properties b/all-in-one.installer.installer.properties
new file mode 100644 (file)
index 0000000..b79e3ab
--- /dev/null
@@ -0,0 +1,49 @@
+##### Properties used only in this file #####
+img.folder=${basedir}/installer/images
+shortcut.base=BonitaStudioCommunity
+
+##### Properties used by build file #####
+project.file=${basedir}/installer/installer_project_template.xml
+##### Properties used by the project file #####
+enable.uninstaller=${enable.uninstaller}
+
+
+#Product
+vendor=JapanDigital
+product.short.name=KyousouCommunity
+product.full.name=Kyousou Community
+product.version=${project.version}
+branding.version=${branding.version}
+
+#Folders
+bitrock.output=${bitrock.install}/output
+
+#Shortcuts
+shortcut.comment=Starts ${product.full.name}
+shortcut.name=${product.short.name}-${branding.version}
+
+mac.shortcut.name=${shortcut.base}-${branding.version}.app
+windows.shortcut.name=${shortcut.base}.exe
+windows64.shortcut.name=${shortcut.base}.exe
+linux.shortcut.name=${shortcut.base}
+
+linux.shortcut=${studio.dir}/${linux.shortcut.name}
+windows.shortcut=${studio.dir}/${windows.shortcut.name}
+windows64.shortcut=${studio.dir}/${windows64.shortcut.name}
+
+#Resources
+license=${studio.dir}/gpl-2.0.txt
+wizard.image=${img.folder}/icon-64-64.png
+logo=${img.folder}/topRight.png
+leftImage=${img.folder}/leftImage.png
+splash=${img.folder}/splash.png
+titlebar.image=${img.folder}/icon-installer-48.png
+windows.ico=${img.folder}/windows.ico
+mac.icns=${mac.studio.dir}/${mac.shortcut.name}/Contents/Resources/bonitasoft-icon-128-128-transparent.icns
+mac.installer.icns=${img.folder}/install.icns
+slide1=${img.folder}/slide01-01.png
+slide2=${img.folder}/slide02-01.png
+slide3=${img.folder}/slide03-01.png
+
+#path from install dir (runtime) to xpm file
+linux.icon=${all.in.one.foler}/icon.xpm
diff --git a/all-in-one.installer.installer_project_template.xml b/all-in-one.installer.installer_project_template.xml
new file mode 100644 (file)
index 0000000..291e76c
--- /dev/null
@@ -0,0 +1,502 @@
+<project>
+    <shortName>@product.short.name@</shortName>
+    <fullName>@product.full.name@</fullName>
+    <version>@branding.version@</version>
+    <outputDirectory>@bitrock.output@</outputDirectory>
+    <installerFilename>@installer.name@</installerFilename>
+    <licenseFile>@license@</licenseFile>
+    <licenseFileEncoding>utf-8</licenseFileEncoding>
+    <logoImage>@logo@</logoImage>
+    <leftImage>@leftImage@</leftImage>
+    <splashImage>@splash@</splashImage>
+    <allowLanguageSelection>1</allowLanguageSelection>
+    <wmImage>@titlebar.image@</wmImage>
+    <windowsExecutableIcon>@windows.ico@</windowsExecutableIcon>
+    <osxApplicationBundleIcon>@mac.installer.icns@</osxApplicationBundleIcon>
+    <osxPlatforms>osx-intel osx-x86_64</osxPlatforms>
+    <createOsxBundleZip>1</createOsxBundleZip>
+    <createUninstaller>@enable.uninstaller@</createUninstaller>
+    <slideShowLoop>1</slideShowLoop>
+    <slideShowTiming>8</slideShowTiming>
+    <slideShowImageList>
+        <slideShowImage>
+            <path>@slide1@</path>
+        </slideShowImage>
+        <slideShowImage>
+            <path>@slide2@</path>
+        </slideShowImage>
+        <slideShowImage>
+            <path>@slide3@</path>
+        </slideShowImage>
+    </slideShowImageList>
+    <singleInstanceCheck>1</singleInstanceCheck>
+    <overrideGtkButtonText>1</overrideGtkButtonText>
+    <compressionAlgorithm>zip</compressionAlgorithm>
+    <allowedLanguages>en es fr ja pt_BR</allowedLanguages>
+    <customLanguageFileList>
+        <language>
+            <code>en</code>
+            <file>i18n/messages.properties</file>
+            <encoding>iso8859-1</encoding>
+            <resolveUCN>1</resolveUCN>
+        </language>
+        <language>
+            <code>fr</code>
+            <file>i18n/messages_fr.properties</file>
+            <encoding>iso8859-1</encoding>
+            <resolveUCN>1</resolveUCN>
+        </language>
+        <language>
+            <code>es</code>
+            <file>i18n/messages_es.properties</file>
+            <encoding>iso8859-1</encoding>
+            <resolveUCN>1</resolveUCN>
+        </language>
+        <language>
+            <code>ja</code>
+            <file>i18n/messages_ja.properties</file>
+            <encoding>iso8859-1</encoding>
+            <resolveUCN>1</resolveUCN>
+        </language>
+        <language>
+            <code>pt_BR</code>
+            <file>i18n/messages_pt_BR.properties</file>
+            <encoding>iso8859-1</encoding>
+            <resolveUCN>1</resolveUCN>
+        </language>
+    </customLanguageFileList>
+    <preBuildActionList>
+        <substitute>
+            <encoding>iso8859-1</encoding>
+            <files>${build_project_directory}/i18n/*.properties</files>
+            <type>regexp</type>
+            <substitutionList>
+                <substitution>
+                    <pattern>\\:</pattern>
+                    <value>:</value>
+                </substitution>
+                <substitution>
+                    <pattern>\\!</pattern>
+                    <value>!</value>
+                </substitution>
+            </substitutionList>
+        </substitute>
+    </preBuildActionList>
+    <preInstallationActionList>
+        <setInstallerVariable>
+            <!-- Set default path to C: on Windows -->
+            <name>installdir</name>
+            <value>${env(SYSTEMDRIVE)}/@product.short.name@-${product_version}</value>
+            <ruleList>
+                <platformTest type="windows" />
+            </ruleList>
+        </setInstallerVariable>
+         <setInstallerVariable>
+            <!-- Set default path to /Applications on OSX -->
+            <name>installdir</name>
+            <value>${platform_install_prefix}</value>
+            <ruleList>
+                <platformTest type="osx" />
+            </ruleList>
+        </setInstallerVariable>
+        <setInstallerVariable>
+            <!-- 32 bits -->
+            <name>windowsExecName</name>
+            <value>@windows.shortcut.name@</value>
+            <ruleList>
+                <platformTest type="windows" />
+            </ruleList>
+        </setInstallerVariable>
+    </preInstallationActionList>
+    <postInstallationActionList>
+           <!--        <runProgram>
+            <program>cmd</program>
+            <programArguments>/C netsh advfirewall firewall add rule name="${windowsExecName}" dir=in action=allow program="${installdir}\${windowsExecName}"</programArguments>
+            <progressText>Configuring Windows Firewall...</progressText>
+            <ruleList>
+                <firewallTest>
+                    <type>enabled</type>
+                </firewallTest>
+                <platformTest type="windows" />
+           </ruleList>-->
+        </runProgram>
+       <!--        <runProgram>
+            <program>cmd</program>
+            <programArguments>/C netsh advfirewall firewall add rule name="OpenJDK Platform binary" dir=in action=allow program="${installdir}\jre\bin\javaw.exe"</programArguments>
+            <progressText>Configuring Windows Firewall...</progressText>
+            <ruleList>
+                <firewallTest>
+                    <type>enabled</type>
+                </firewallTest>
+                <platformTest type="windows" />
+            </ruleList>
+       </runProgram>-->
+        <setInstallerVariable persist="1">
+          <name>ini_file</name>
+          <value>${installdir}/configuration/config.ini</value>
+            <ruleList>
+                <platformTest>
+                <negate>1</negate>
+                 <type>osx</type>
+                 </platformTest>
+            </ruleList>
+        </setInstallerVariable>
+         <setInstallerVariable persist="1">
+          <name>ini_file</name>
+          <value>${installdir}/@mac.shortcut.name@/Contents/Eclipse/configuration/config.ini</value>
+            <ruleList>
+                <platformTest type="osx" />
+            </ruleList>
+        </setInstallerVariable>
+        <iniFileSet>
+            <file>${ini_file}</file>
+            <section>Language</section>
+            <key>osgi.nl</key>
+            <value>${installation_language_code}</value>
+        </iniFileSet>
+        <createSymLink>
+            <explanation>@shortcut.comment@</explanation>
+            <linkName>~/Desktop/@product.short.name@-${product_version}</linkName>
+            <target>${installdir}/@mac.shortcut.name@</target>
+            <ruleList>
+                <platformTest>
+                    <type>osx</type>
+                </platformTest>
+            </ruleList>
+        </createSymLink>
+        <setInstallerVariableFromScriptOutput>
+            <exec>xdg-user-dir</exec>
+            <execArgs>DESKTOP</execArgs>
+            <name>desktop_path</name>
+            <abortOnError>0</abortOnError>
+            <showMessageOnError>0</showMessageOnError>
+            <ruleList>
+                <platformTest>
+                    <type>linux</type>
+                </platformTest>
+                <programTest>
+                    <condition>is_in_path</condition>
+                    <name>xdg-user-dir</name>
+                </programTest>
+            </ruleList>
+        </setInstallerVariableFromScriptOutput>
+        <if>
+            <actionList>
+                <setInstallerVariableFromScriptOutput>
+                    <exec>xdg-user-dir</exec>
+                    <execArgs>DESKTOP</execArgs>
+                    <name>desktop_path</name>
+                    <abortOnError>0</abortOnError>
+                    <showMessageOnError>0</showMessageOnError>
+                </setInstallerVariableFromScriptOutput>
+            </actionList>
+            <conditionRuleList>
+                <platformTest>
+                    <type>linux</type>
+                </platformTest>
+                <programTest>
+                    <condition>is_in_path</condition>
+                    <name>xdg-user-dir</name>
+                </programTest>
+            </conditionRuleList>
+            <elseActionList>
+                <setInstallerVariable name="desktop_path" value="${installdir}" />
+            </elseActionList>
+        </if>
+
+        <if>
+            <actionList>
+                <writeFile>
+                    <path>${desktop_path}/@product.short.name@-${product_version}.desktop</path>
+                    <encoding>utf-8</encoding>
+                    <text>
+                        [Desktop Entry]
+                        Version=1.0
+                        Encoding=UTF-8
+                        Name=@product.short.name@-${product_version}
+                        GenericName=@product.short.name@-${product_version}
+                        Comment=@shortcut.comment@
+                        Exec=${installdir}/@linux.shortcut.name@
+                        Icon=${installdir}/bonitasoft-icon-128-128-transparent.png
+                        Terminal=false
+                        Type=Application
+                    </text>
+                </writeFile>
+                <changePermissions permissions="0755"
+                    files="${desktop_path}/@product.short.name@-${product_version}.desktop" />
+                <addFilesToUninstaller files="${desktop_path}/@product.short.name@-${product_version}.desktop" />
+            </actionList>
+            <conditionRuleList>
+                <platformTest>
+                    <type>linux</type>
+                </platformTest>
+            </conditionRuleList>
+        </if>
+        <if>
+            <actionList>
+                <changePermissions permissions="0755" files="${installdir}/jre/bin/java" />
+            </actionList>
+            <conditionRuleList>
+                <platformTest>
+                    <negate>1</negate>
+                    <type>windows</type>
+                </platformTest>
+            </conditionRuleList>
+        </if>
+        <substitute>
+            <encoding>utf-8</encoding>
+            <files>${installdir}/@mac.shortcut.name@/Contents/Eclipse/@product.short.name@.ini</files>
+            <type>exact</type>
+            <substitutionList>
+                <substitution>
+                    <pattern>-startup</pattern>
+                    <value>-vm
+${installdir}/@mac.shortcut.name@/Contents/Eclipse/jre/Contents/Home/bin/java
+-startup</value>
+                </substitution>
+            </substitutionList>
+            <ruleList>
+                <platformTest>
+                    <type>osx</type>
+                </platformTest>
+            </ruleList>
+        </substitute>
+        <changePermissions permissions="0755" files="${installdir}/@mac.shortcut.name@/Contents/Eclipse/jre/Contents/Home/{lib/*,bin/*}"> 
+            <ruleList>
+                <platformTest>
+                    <type>osx</type>
+                </platformTest>
+            </ruleList>
+        </changePermissions>
+    </postInstallationActionList>
+    <finalPageActionList>
+        <runProgram>
+            <ruleList>
+                <platformTest>
+                    <type>osx</type>
+                </platformTest>
+            </ruleList>
+            <program>open</program>
+            <programArguments>"${installdir}/@mac.shortcut.name@" &amp;</programArguments>
+            <progressText>${msg(launch)} ${product_fullname}</progressText>
+        </runProgram>
+        <runProgram>
+            <ruleList>
+                <platformTest>
+                    <type>linux</type>
+                </platformTest>
+            </ruleList>
+            <program>${installdir}/@linux.shortcut.name@</program>
+            <programArguments>&amp;</programArguments>
+            <progressText>${msg(launch)} ${product_fullname}</progressText>
+        </runProgram>
+        <runProgram>
+            <ruleList>
+                <platformTest>
+                    <type>windows</type>
+                </platformTest>
+            </ruleList>
+            <program>${installdir}\${windowsExecName}</program>
+            <programArguments>&amp;</programArguments>
+            <progressText>${msg(launch)} ${product_fullname}</progressText>
+        </runProgram>
+       <!--        <launchBrowser>
+            <show>0</show>
+            <url>http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=126&amp;bos_redirect_product=bos&amp;bos_version=${product_version}&amp;os=${platform_name}&amp;arch=@os_arch@&amp;edition=community&amp;lang=${installation_language_code}&amp;utm_source=bonita_wizard&amp;utm_medium=referral&amp;utm_campaign=bonita_install</url>
+       </launchBrowser>-->
+    </finalPageActionList>
+
+    <enableRollback>0</enableRollback>
+    <enableTimestamp>1</enableTimestamp>
+    <vendor>@vendor@</vendor>
+    <componentList>
+        <component>
+            <name>install</name>
+            <description>Install distribution component</description>
+            <canBeEdited>1</canBeEdited>
+            <selected>1</selected>
+            <show>1</show>
+            <desktopShortcutList>
+                <shortcut>
+                    <comment>@shortcut.comment@</comment>
+                    <exec></exec>
+                    <icon></icon>
+                    <name>@shortcut.name@</name>
+                    <path></path>
+                    <platforms>windows</platforms>
+                    <runInTerminal>0</runInTerminal>
+                    <windowsExec>"${installdir}/${windowsExecName}"</windowsExec>
+                    <windowsExecArgs></windowsExecArgs>
+                    <windowsIcon></windowsIcon>
+                    <windowsPath>${installdir}/</windowsPath>
+                </shortcut>
+                <shortcut>
+                    <comment>@shortcut.comment@</comment>
+                    <exec>${installdir}/@linux.shortcut.name@</exec>
+                    <icon>${installdir}/@linux.icon@</icon>
+                    <name>@shortcut.name@</name>
+                    <path>${installdir}</path>
+                    <platforms>linux</platforms>
+                    <runInTerminal>0</runInTerminal>
+                    <windowsExec></windowsExec>
+                    <windowsExecArgs></windowsExecArgs>
+                    <windowsIcon></windowsIcon>
+                    <windowsPath></windowsPath>
+                </shortcut>
+            </desktopShortcutList>
+            <folderList>
+                <folder>
+                    <description>Linux Program Files</description>
+                    <destination>${installdir}</destination>
+                    <name>linux_programfiles</name>
+                    <platforms>linux</platforms>
+                    <distributionFileList>
+                        <distributionDirectory allowWildcards="1">
+                            <origin>@studio.dir@/**</origin>
+                        </distributionDirectory>
+                    </distributionFileList>
+                </folder>
+                <folder>
+                    <description>Linux Program Files x64</description>
+                    <destination>${installdir}</destination>
+                    <name>linux_programfiles_64</name>
+                    <platforms>linux-x64</platforms>
+                    <distributionFileList>
+                        <distributionDirectory allowWildcards="1">
+                            <origin>@studio.dir@/**</origin>
+                        </distributionDirectory>
+                    </distributionFileList>
+                </folder>
+                 <folder>
+                    <description>Windows Program Files</description>
+                    <destination>${installdir}</destination>
+                    <name>win_programfiles</name>
+                    <platforms>windows</platforms>
+                    <distributionFileList>
+                        <distributionDirectory allowWildcards="1">
+                            <origin>@studio.dir@/**</origin>
+                        </distributionDirectory>
+                    </distributionFileList>
+                </folder>
+                <folder>
+                    <description>OSX Program Files</description>
+                    <destination>${installdir}</destination>
+                    <name>osx_programfiles</name>
+                    <platforms>osx</platforms>
+                    <distributionFileList>
+                        <distributionDirectory allowWildcards="1">
+                            <origin>@mac.studio.dir@/**</origin>
+                        </distributionDirectory>
+                    </distributionFileList>
+                </folder>
+            </folderList>
+            <startMenuShortcutList>
+                <startMenuShortcut>
+                    <comment>@shortcut.comment@</comment>
+                    <name>@shortcut.name@</name>
+                    <runInTerminal>0</runInTerminal>
+                    <windowsExec>${installdir}/${windowsExecName}</windowsExec>
+                    <windowsExecArgs></windowsExecArgs>
+                    <windowsIcon></windowsIcon>
+                    <windowsPath>${installdir}/</windowsPath>
+                </startMenuShortcut>
+                <startMenuShortcut>
+                    <comment>Uninstall ${product_fullname}</comment>
+                    <name>Uninstall ${product_fullname}</name>
+                    <runInTerminal>0</runInTerminal>
+                    <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
+                    <windowsExecArgs></windowsExecArgs>
+                    <windowsIcon></windowsIcon>
+                    <windowsPath>${installdir}/</windowsPath>
+                </startMenuShortcut>
+            </startMenuShortcutList>
+        </component>
+    </componentList>
+    <parameterList>
+        <directoryParameter>
+            <name>installdir</name>
+            <description>Installer.Parameter.installdir.description</description>
+            <explanation>Installer.Parameter.installdir.explanation</explanation>
+            <value></value>
+            <default>${platform_install_prefix}/@product.short.name@-${product_version}</default>
+            <allowEmptyValue>0</allowEmptyValue>
+            <ask>yes</ask>
+            <cliOptionName>prefix</cliOptionName>
+            <mustBeWritable>yes</mustBeWritable>
+            <mustExist>0</mustExist>
+            <validationActionList>
+                       <throwError>
+                           <text>${msg(installdir.must.be.empty.folder)}</text>
+                           <ruleList>
+                                <platformTest>
+                                             <negate>1</negate>
+                                             <type>osx</type>
+                               </platformTest>
+                               <fileTest path="${installdir}" condition="is_not_empty"/>
+                           </ruleList>
+                       </throwError>
+                       <throwError>
+                           <text>${msg(installdir.must.be.empty.folder)}</text>
+                           <ruleList>
+                               <platformTest type="osx" /> 
+                               <fileTest path="${installdir}/@mac.shortcut.name@" condition="is_not_empty"/>
+                           </ruleList>
+                       </throwError>
+                       <throwError>
+                           <text>${msg(not.enough.diskspace)}</text>
+                           <ruleList>
+                              <checkFreeDiskSpace>
+                                 <logic>less</logic>
+                                 <path>${installdir}</path>
+                                 <!-- ${required_diskspace} is automatically calculated by
+                                 InstallBuilder with all the files packed -->
+                                 <size>${required_diskspace}</size>
+                              </checkFreeDiskSpace>
+                           </ruleList>
+                       </throwError>
+              </validationActionList>
+        </directoryParameter>
+        <parameterGroup>
+          <name>antivirusPage</name>
+          <title>${msg(antivirus.detected.title)}</title>
+          <explanation></explanation>
+          <insertAfter>installation</insertAfter>
+          <parameterList>
+            <linkParameter>
+              <name>visitMicrosoftSuuport</name>
+              <description>${msg(visit.microsoft.website)}</description>
+              <explanation>${msg(antivirus.detected.message)}</explanation>
+              <clickedActionList>
+                <launchBrowser>
+                  <url>http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=714&amp;bos_redirect_product=bos&amp;bos_version=@product.version@</url>
+                </launchBrowser>
+              </clickedActionList>
+            </linkParameter>
+         </parameterList>
+          <ruleList>
+            <antivirusTest type="disabled" />
+          </ruleList>
+        </parameterGroup>
+    </parameterList>
+    <preUninstallationActionList>
+        <deleteFile>
+            <path>${desktop_path}/@product.short.name@-${product_version}.desktop</path>
+        </deleteFile>
+        <showQuestion>
+            <default>yes</default>
+            <text>${msg(keep.workspace.msg)}</text>
+            <title>${msg(keep.workspace.title)}</title>
+            <variable>saveWorkspace</variable>
+        </showQuestion>
+    </preUninstallationActionList>
+    <postUninstallationActionList>
+        <deleteFile>
+            <path>${installdir}</path>
+            <ruleList>
+                <isFalse>
+                    <value>${saveWorkspace}</value>
+                </isFalse>
+            </ruleList>
+        </deleteFile>
+    </postUninstallationActionList>
+</project>
diff --git a/bonita-studio.pom.xml b/bonita-studio.pom.xml
new file mode 100644 (file)
index 0000000..e5f3ca2
--- /dev/null
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+       xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.bonitasoft.studio</groupId>
+       <artifactId>studio</artifactId>
+       <version>7.13.0</version>
+       <packaging>pom</packaging>
+       <name>Bonita Studio</name>
+       <properties>
+               <tychoVersion>2.3.0</tychoVersion>
+               <java.version>11</java.version>
+               <os-jvm-flags></os-jvm-flags>
+               <branding.version>2021.2-u0</branding.version>
+               <bundle.version>${project.version}</bundle.version>
+               <ui.designer.version>1.13.20</ui.designer.version>
+               <business.data.repository.version>${project.version}</business.data.repository.version>
+               <engine.version>${project.version}</engine.version>
+               <platform.version>${project.parent.version}</platform.version>
+               <tomcat.version>9.0.52</tomcat.version>
+               <image-overlay-plugin.version>1.1.2</image-overlay-plugin.version>
+               <bonita-project-report-model.version>0.0.3</bonita-project-report-model.version>
+               <p2MirrorUrl>https://osdn.dl.osdn.net/storage/g/j/ja/japandigitalstudio/p2/4.20</p2MirrorUrl>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <tycho.localArtifacts>ignore</tycho.localArtifacts>
+               <maven.compiler.source>${java.version}</maven.compiler.source>
+               <maven.compiler.target>${java.version}</maven.compiler.target>
+               <groovy-maven-plugin.groovy.version>3.0.8</groovy-maven-plugin.groovy.version>
+        <!-- Must be synched with org.bonitasoft.studio.common.repository.core.maven.model.DefaultPluginVersions.MAVEN_DEPENDENCY_PLUGIN_VERSION --> 
+               <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
+       </properties>
+       <modules>
+               <module>patched-plugins</module>
+       </modules>
+
+       <build>
+               <pluginManagement>
+                       <plugins>
+                               <plugin>
+                                       <groupId>org.apache.felix</groupId>
+                                       <artifactId>maven-bundle-plugin</artifactId>
+                                       <version>4.2.1</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.bonitasoft.maven</groupId>
+                                       <artifactId>image-overlay-plugin</artifactId>
+                                       <version>${image-overlay-plugin.version}</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-compiler-plugin</artifactId>
+                                       <version>3.8.1</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-surefire-plugin</artifactId>
+                                       <version>2.22.2</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-clean-plugin</artifactId>
+                                       <version>3.1.0</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.eclipse.tycho</groupId>
+                                       <artifactId>tycho-versions-plugin</artifactId>
+                                       <version>${tychoVersion}</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.eclipse.tycho.extras</groupId>
+                                       <artifactId>tycho-eclipserun-plugin</artifactId>
+                                       <version>${tychoVersion}</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.eclipse.tycho</groupId>
+                                       <artifactId>tycho-packaging-plugin</artifactId>
+                                       <version>${tychoVersion}</version>
+                                       <configuration>
+                                               <strictBinIncludes>false</strictBinIncludes>
+                                               <strictVersions>false</strictVersions>
+                                               <archive>
+                                                       <addMavenDescriptor>false</addMavenDescriptor>
+                                               </archive>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-dependency-plugin</artifactId>
+                                       <version>${maven-dependency-plugin.version}</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-assembly-plugin</artifactId>
+                                       <version>3.3.0</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-antrun-plugin</artifactId>
+                                       <version>1.8</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.codehaus.mojo</groupId>
+                                       <artifactId>exec-maven-plugin</artifactId>
+                                       <version>3.0.0</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.eclipse.tycho</groupId>
+                                       <artifactId>tycho-surefire-plugin</artifactId>
+                                       <version>${tychoVersion}</version>
+                                       <configuration>
+                                               <useUIHarness>false</useUIHarness>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.codehaus.mojo</groupId>
+                                       <artifactId>build-helper-maven-plugin</artifactId>
+                                       <version>3.0.0</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.eclipse.tycho</groupId>
+                                       <artifactId>tycho-compiler-plugin</artifactId>
+                                       <version>${tychoVersion}</version>
+                                       <configuration>
+                                               <compilerArgument>-warn:+discouraged,forbidden</compilerArgument>
+                                               <useProjectSettings>false</useProjectSettings>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.eclipse.tycho</groupId>
+                                       <artifactId>target-platform-configuration</artifactId>
+                                       <version>${tychoVersion}</version>
+                                       <configuration>
+                                               <executionEnvironment>JavaSE-11</executionEnvironment>
+                                               <environments>
+                                                       <environment>
+                                                               <os>linux</os>
+                                                               <ws>gtk</ws>
+                                                               <arch>x86_64</arch>
+                                                       </environment>
+                                                       <environment>
+                                                               <os>macosx</os>
+                                                               <ws>cocoa</ws>
+                                                               <arch>x86_64</arch>
+                                                       </environment>
+                                                       <environment>
+                                                               <os>win32</os>
+                                                               <ws>win32</ws>
+                                                               <arch>x86_64</arch>
+                                                       </environment>
+                                               </environments>
+                                               <target>
+                                                       <artifact>
+                                                               <groupId>org.bonitasoft.studio</groupId>
+                                                               <artifactId>platform</artifactId>
+                                                               <version>${platform.version}</version>
+                                                       </artifact>
+                                               </target>
+                                               <filters>
+                                                       <filter>
+                                                               <type>eclipse-plugin</type>
+                                                               <id>org.bonitasoft.studioEx.console.libs</id>
+                                                               <removeAll />
+                                                       </filter>
+                                               </filters>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.codehaus.gmaven</groupId>
+                                       <artifactId>groovy-maven-plugin</artifactId>
+                                       <version>2.1.1</version>
+                                       <dependencies>
+                                               <dependency>
+                                                       <groupId>org.codehaus.groovy</groupId>
+                                                       <artifactId>groovy-xml</artifactId>
+                                                       <version>${groovy-maven-plugin.groovy.version}</version>
+                                               </dependency>
+                                       </dependencies>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+               <plugins>
+                       <plugin>
+                               <groupId>org.codehaus.gmaven</groupId>
+                               <artifactId>groovy-maven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <phase>initialize</phase>
+                                               <goals>
+                                                       <goal>execute</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <source>
+                                                               project.properties["branding.version.short"] = "${branding.version}".replaceAll('-.*', '')
+                                                       </source>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.eclipse.tycho</groupId>
+                               <artifactId>tycho-versions-plugin</artifactId>
+                       </plugin>
+                       <!-- enable tycho build extension -->
+                       <plugin>
+                               <groupId>org.eclipse.tycho</groupId>
+                               <artifactId>tycho-maven-plugin</artifactId>
+                               <version>${tychoVersion}</version>
+                               <extensions>true</extensions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.eclipse.tycho</groupId>
+                               <artifactId>target-platform-configuration</artifactId>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.bonitasoft.engine.data</groupId>
+                               <artifactId>bonita-business-data-generator</artifactId>
+                               <version>${engine.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.bonitasoft.maven</groupId>
+                               <artifactId>bonita-project-report-model</artifactId>
+                               <version>${bonita-project-report-model.version}</version>
+                       </dependency>
+            <dependency>
+                <groupId>org.bonitasoft.web</groupId>
+                <artifactId>ui-designer-artifact-builder</artifactId>
+                <version>${ui.designer.version}</version>
+            </dependency>
+                       <dependency>
+                               <groupId>junit</groupId>
+                               <artifactId>junit</artifactId>
+                               <version>4.13.1</version>
+                               <scope>test</scope>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+
+       <repositories>
+               <repository>
+                       <id>ossrh</id>
+                       <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+                       <snapshots>
+                               <enabled>true</enabled>
+                       </snapshots>
+                       <releases>
+                               <enabled>false</enabled>
+                       </releases>
+               </repository>
+       </repositories>
+
+       <profiles>
+               <profile>
+                       <id>jdk11-tests</id>
+                       <activation>
+                               <activeByDefault>true</activeByDefault>
+                       </activation>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-toolchains-plugin</artifactId>
+                                               <version>1.1</version>
+                                               <executions>
+                                                       <execution>
+                                                               <phase>validate</phase>
+                                                               <goals>
+                                                                       <goal>toolchain</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                               <configuration>
+                                                       <toolchains>
+                                                               <jdk>
+                                                                       <version>11</version>
+                                                                       <vendor>OpenJDK</vendor>
+                                                               </jdk>
+                                                       </toolchains>
+                                               </configuration>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+               <profile>
+                       <id>default</id>
+                       <activation>
+                               <activeByDefault>true</activeByDefault>
+                       </activation>
+                       <modules>
+                               <module>platform</module>
+                               <module>tests-dependencies</module>
+                               <module>bundles</module>
+                       </modules>
+               </profile>
+               <profile>
+                       <id>all-in-one</id>
+                       <activation>
+                               <activeByDefault>true</activeByDefault>
+                       </activation>
+                       <modules>
+                               <module>all-in-one</module>
+                       </modules>
+               </profile>
+               <profile>
+                       <id>it</id>
+                       <modules>
+                               <module>tests</module>
+                       </modules>
+               </profile>
+               <profile>
+                       <id>macosx-jvm-flags</id>
+                       <activation>
+                               <os>
+                                       <family>mac</family>
+                               </os>
+                       </activation>
+                       <properties>
+                               <os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
+                       </properties>
+               </profile>
+       </profiles>
+
+
+</project>
diff --git a/build-script.sh b/build-script.sh
new file mode 100644 (file)
index 0000000..886c43e
--- /dev/null
@@ -0,0 +1,423 @@
+#!/bin/bash
+
+set -u
+set -e
+set +o nounset
+
+# Workaround for at least Debian Buster
+# Require to build bonita-portal-js due to issue with PhantomJS launched by Karma
+# See https://github.com/ariya/phantomjs/issues/14520
+export OPENSSL_CONF=/etc/ssl
+
+# Script configuration
+# You can set the following environment variables
+BONITA_BUILD_NO_CLEAN=${BONITA_BUILD_NO_CLEAN:-true}
+BONITA_BUILD_QUIET=${BONITA_BUILD_QUIET:-false}
+BONITA_BUILD_STUDIO_ONLY=${BONITA_BUILD_STUDIO_ONLY:-true}
+BONITA_BUILD_STUDIO_SKIP=${BONITA_BUILD_STUDIO_SKIP:-false}
+
+# Bonita version
+
+BONITA_VERSION=7.13.0
+
+
+########################################################################################################################
+# SCM AND BUILD FUNCTIONS
+########################################################################################################################
+
+# $1: the message to be displayed as header
+echoHeaders() {
+    echo
+    echo
+       echo "============================================================"
+       echo "$1"
+       echo "============================================================"
+}
+
+# params:
+# - Git repository name
+# - Tag name (optional)
+# - Checkout folder name (optional)
+checkout() {
+    # We need at least one parameter (the repository name) and no more than three (repository name, tag name and checkout folder name)
+    if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then
+        echo "Incorrect number of parameters: $@"
+        exit 1
+    fi
+
+    repository_name="$1"
+
+    if [ "$#" -ge 2 ]; then
+        tag_name="$2"
+    else
+        # If we don't have a tag name assume that the tag is named with the Bonita version
+               tag_name=$BONITA_VERSION
+    fi
+       echoHeaders "Processing ${repository_name} ${tag_name}"
+
+    if [ "$#" -eq 3 ]; then
+        checkout_folder_name="$3"
+    else
+        # If no checkout folder path is provided use the repository name as destination folder name
+        checkout_folder_name="$repository_name"
+    fi
+
+    # If we don't already clone the repository do it
+    if [ ! -d "$checkout_folder_name/.git" ]; then
+      git clone --depth 1 "https://github.com/bonitasoft/$repository_name.git" $checkout_folder_name
+    fi
+    # Ensure we fetch all the tags and that we are on the appropriate one
+    git -C $checkout_folder_name fetch --tags
+    git -C $checkout_folder_name reset --hard tags/$tag_name
+
+    # Move to the repository clone folder (required to run Maven/Gradle wrapper)
+    cd $checkout_folder_name
+}
+
+run_maven_with_standard_system_properties() {
+       build_command="$build_command -Dengine.version=$BONITA_VERSION -Dfilters.version=$BONITA_VERSION"
+    echo "[DEBUG] Running build command: $build_command"
+    eval "$build_command"
+    # Go back to script folder (checkout move current directory to project checkout folder.
+    cd ..
+}
+
+run_gradle_with_standard_system_properties() {
+    echo "[DEBUG] Running build command: $build_command"
+    eval "$build_command"
+    # Go back to script folder (checkout move current directory to project checkout folder.
+    cd ..
+}
+
+build_maven_wrapper() {
+    build_command="./mvnw"
+}
+
+build_gradle_wrapper() {
+    build_command="./gradlew"
+}
+
+build_quiet_if_requested() {
+    if [[ "${BONITA_BUILD_QUIET}" == "true" ]]; then
+        echo "Configure quiet build"
+        build_command="$build_command --quiet"
+    fi
+}
+
+build() {
+    build_command="$build_command build"
+}
+
+publishToMavenLocal() {
+    build_command="$build_command publishToMavenLocal"
+}
+
+clean() {
+    if [[ "${BONITA_BUILD_NO_CLEAN}" == "true" ]]; then
+        echo "Configure build to skip clean task"
+    else
+        build_command="$build_command clean"
+    fi
+}
+
+install() {
+    build_command="$build_command install"
+}
+
+verify() {
+    build_command="$build_command verify"
+}
+
+skiptest() {
+    build_command="$build_command -DskipTests"
+}
+
+gradle_test_skip() {
+    build_command="$build_command -x test"
+}
+
+profile() {
+    build_command="$build_command -P$1"
+}
+
+# params:
+# - Git repository name
+# - Profile name
+build_maven_wrapper_verify_skiptest_with_profile()
+{
+    checkout $1
+    build_maven_wrapper
+    build_quiet_if_requested
+    clean
+    verify
+    skiptest
+    profile $2
+    run_maven_with_standard_system_properties
+}
+
+# params:
+# - Git repository name
+build_maven_wrapper_install_skiptest()
+{
+    checkout "$@"
+    unzip jdsicons.zip
+    unzip -o JDSmessages.zip
+    cp bonita-studio.pom.xml bonita-studio/pom.xml
+    cp bundles.plugins.pom.xml bonita-studio/bundles/plugins/pom.xml
+    cp console.libs.pom.xml bonita-studio/bundles/plugins/org.bonitasoft.studio.console.libs/pom.xml
+    cp bundles.features.studio-feature.feature.xml bonita-studio/bundles/features/studio-feature/feature.xml
+    cp console.libs.build.properties bonita-studio/bundles/plugins/org.bonitasoft.studio.console.libs/build.properties
+    rm bonita-studio/bundles/plugins/org.bonitasoft.studio.console.libs/META-INF/p2.inf
+    cp splash.bmp bonita-studio/bundles/plugins/org.bonitasoft.studio-product/splash_without_version.bmp
+    cp splash.bmp bonita-studio/bundles/plugins/org.bonitasoft.studio-product/src/org/bonitasoft/studiosplash_without_version.bmp
+    cp splash.bmp bonita-studio/bundles/plugins/org.bonitasoft.studio-product/splash.bmp
+    cp about.bmp bonita-studio/bundles/plugins/org.bonitasoft.studio-product/about.bmp
+    cp studio-product.pom.xml bonita-studio/bundles/plugins/org.bonitasoft.studio-product/pom.xml
+    cp bundles.plugins.studio-product.plugin.xml bonita-studio/bundles/plugins/org.bonitasoft.studio-product/plugin.xml
+    cp bundles.plugins.intro.plugin.xml bonita-studio/bundles/plugins/org.bonitasoft.studio.intro/plugin.xml
+    cp bundles.plugins.intro.plugin.properties bonita-studio/bundles/plugins/org.bonitasoft.studio.intro/plugin.properties
+    cp bundles.plugins.intro.content.introContent.xml bonita-studio/bundles/plugins/org.bonitasoft.studio.intro/content/introContent.xml
+    cp bundles.plugins.intro.content.welcome.html bonita-studio/bundles/plugins/org.bonitasoft.studio.intro/content/welcome.html
+    cp all-in-one.bonitastudio-features.product bonita-studio/all-in-one/bonitastudio-features.product
+    rm bonita-studio/bundles/plugins/org.bonitasoft.studio.application/src/org/bonitasoft/studio/application/coolbar/WelcomeCoolbarItem.java
+    cp bundles.plugins.application.src.org.bonitasoft.studio.application.actions.OpenIntroCommandHnadler.java bonita-studio/bundles/plugins/org.bonitasoft.studio.application/src/org/bonitasoft/studio/application/actions/OpenIntroCommandHandler.java
+    cp bundles.plugins.application.src.org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor.java bonita-studio/bundles/plugins/org.bonitasoft.studio.application/src/org/bonitasoft/studio/application/BonitaStudioWorkbenchAdvisor.java
+    rm bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/coolbar/OpenPortalCoolbarItem.java
+    rm bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/coolbar/RunCoolbarItem.java
+    cp bundles.plugins.application.plugin.xml bonita-studio/bundles/plugins/org.bonitasoft.studio.application/plugin.xml
+    cp bundles.plugins.engine.plugin.xml bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/plugin.xml
+    cp bundles.plugins.engine.src.org.bonitasoft.studio.engine.BOSEngineManager.java bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/BOSEngineManager.java    install
+    build_maven_wrapper
+    build_quiet_if_requested
+    clean
+    skiptest
+    run_maven_with_standard_system_properties
+}
+
+build_gradle_wrapper_test_skip_publishToMavenLocal() {
+    checkout "$@"
+    build_gradle_wrapper
+    build_quiet_if_requested
+    clean
+    gradle_test_skip
+    profile forceCurrentVersion=7.13.0
+    publishToMavenLocal
+    run_gradle_with_standard_system_properties
+}
+
+########################################################################################################################
+# PARAMETERS PARSING AND VALIDATIONS
+########################################################################################################################
+
+OS_IS_LINUX=false
+OS_IS_MAC=false
+OS_IS_WINDOWS=false
+
+detectOS() {
+    case "`uname`" in
+      CYGWIN*)  OS_IS_WINDOWS=true;;
+      MINGW*)   OS_IS_WINDOWS=true;;
+      Darwin*)  OS_IS_MAC=true;;
+      *)        OS_IS_LINUX=true;;
+    esac
+}
+
+logBuildInfo() {
+    echo "OS information"
+    if [[ "${OS_IS_LINUX}" == "true" ]]; then
+        echo "  > Run on Linux"
+        echo "$(cat /etc/lsb-release)" | xargs -L 1 -I % echo "      %"
+    elif [[ "${OS_IS_MAC}" == "true" ]]; then
+        echo "  > Run on MacOS"
+        echo "$(sw_vers)" | xargs -L 1 -I % echo "      %"
+    else
+        echo "  > Run on Windows"
+        echo "$(wmic os get Caption,OSArchitecture,Version //value)" | xargs -L 1 --no-run-if-empty -I % echo "      %" | grep -v -e '^[[:space:]]*$'
+    fi
+    echo "  > Generic information: $(uname -a)"
+
+    echo "Build environment"
+    echo "  > Use $(git --version)"
+    echo "  > Commit: $(git rev-parse FETCH_HEAD)"
+
+    echo "Build settings"
+    echo "  > BONITA_VERSION: ${BONITA_VERSION}"
+    echo "  > BONITA_BUILD_NO_CLEAN: ${BONITA_BUILD_NO_CLEAN}"
+    echo "  > BONITA_BUILD_QUIET: ${BONITA_BUILD_QUIET}"
+    echo "  > BONITA_BUILD_STUDIO_ONLY: ${BONITA_BUILD_STUDIO_ONLY}"
+    echo "  > BONITA_BUILD_STUDIO_SKIP: ${BONITA_BUILD_STUDIO_SKIP}"
+}
+
+checkPrerequisites() {
+    echo "Prerequisites"
+#    if [[ "${OS_IS_LINUX}" == "true" ]]; then
+#        if [[ "${BONITA_BUILD_STUDIO_SKIP}" == "false" ]]; then
+#            # Test that x server is running. Required to generate Bonita Studio models
+#            # Can be ignored if Studio is build without the "generate" Maven profile
+#
+#            if ! xset q &>/dev/null; then
+#                echo "No X server at \$DISPLAY [$DISPLAY]" >&2
+#                exit 1
+#            fi
+#            echo "  > X server running correctly"
+#        fi
+#    fi
+#
+    # Test if Curl exists
+    if hash curl 2>/dev/null; then
+        CURL_VERSION="$(curl --version 2>&1  | awk -F " " 'NR==1 {print $2}')"
+        echo "  > Use curl version: $CURL_VERSION"
+    else
+        echo "curl not found. Exiting."
+        exit 1
+    fi
+
+    checkJavaVersion
+}
+
+checkJavaVersion() {
+    local JAVA_CMD=
+    echo "  > Java prerequisites"
+    echo "      Check if Java version is compatible with Bonita"
+
+    if [[ "x$JAVA" = "x" ]]; then
+        if [[ "x$JAVA_HOME" != "x" ]]; then
+            echo "      JAVA_HOME is set"
+            JAVA_CMD="$JAVA_HOME/bin/java"
+        else
+            echo "      JAVA_HOME is not set. Use java in path"
+            JAVA_CMD="java"
+        fi
+    else
+        JAVA_CMD=${JAVA}
+    fi
+    echo "      Java command path is $JAVA_CMD"
+
+    java_full_version_details=$("$JAVA_CMD" -version 2>&1)
+    echo "      JVM details"
+    echo "${java_full_version_details}" | xargs -L 1 -I % echo "        %"
+
+    java_full_version=$("$JAVA_CMD" -version 2>&1 | grep -i version | sed 's/.*version "\(.*\)".*$/\1/g')
+    echo "      Java full version: $java_full_version"
+    if [[ "x$java_full_version" = "x" ]]; then
+      echo "No Java command could be found. Please set JAVA_HOME variable to a JDK and/or add the java executable to your PATH"
+      exit 1
+    fi
+
+    java_version_1st_digit=$(echo "$java_full_version" | sed 's/\(.*\)\..*\..*$/\1/g')
+    java_version_expected=11
+    # pre Java 9 versions, get minor version
+    if [[ "$java_version_1st_digit" -eq "1" ]]; then
+      java_version=$(echo "$java_full_version" | sed 's/.*\.\(.*\)\..*$/\1/g')
+    else
+      java_version=${java_version_1st_digit}
+    fi
+    echo "      Java version: $java_version"
+
+    if [[ "$java_version" -ne "$java_version_expected" ]]; then
+      echo "Invalid Java version $java_version not $java_version_expected. Please set JAVA_HOME environment variable to a valid JDK version, and/or add the java executable to your PATH"
+      exit 1
+    fi
+    echo "      Java version is compatible with Bonita"
+}
+
+
+########################################################################################################################
+# TOOLING
+########################################################################################################################
+
+detectWebPagesDependenciesVersions() {
+    echoHeaders "Detecting web-pages dependencies versions"
+    local webPagesGradleBuild=`curl -sS -X GET https://raw.githubusercontent.com/bonitasoft/bonita-web-pages/${BONITA_VERSION}/build.gradle`
+
+    WEB_PAGES_UID_VERSION=`echo "${webPagesGradleBuild}" | tr -s "[:blank:]" | tr -d "\n" | sed 's@.*UIDesigner {\(.*\)"}.*@\1@g' | sed 's@.*version "\(.*\)@\1@g'`
+    echo "WEB_PAGES_UID_VERSION: ${WEB_PAGES_UID_VERSION}"
+}
+
+detectStudioDependenciesVersions() {
+#    echoHeaders "Detecting Studio dependencies versions"
+#    local studioPom=`curl -sS -X GET https://raw.githubusercontent.com/bonitasoft/bonita-studio/${BONITA_VERSION}/pom.xml`
+
+#    STUDIO_UID_VERSION=`echo "${studioPom}" | grep \<ui.designer.version\> | sed 's@.*>\(.*\)<.*@\1@g'`
+    STUDIO_UID_VERSION=1.13.20
+    echo "STUDIO_UID_VERSION: ${STUDIO_UID_VERSION}"
+}
+
+
+
+########################################################################################################################
+# MAIN
+########################################################################################################################
+detectOS
+logBuildInfo
+checkPrerequisites
+echo
+
+# List of repositories on https://github.com/bonitasoft that you don't need to build
+# Note that archived repositories are not listed here, as they are only required to build old Bonita versions
+#
+# angular-strap: automatically downloaded in the build of bonita-web project.
+# babel-preset-bonita: automatically downloaded in the build of bonita-ui-designer project.
+# bonita-codesign-windows: use to sign Windows binaries when building using Bonita Continuous Integration.
+# bonita-connector-talend: deprecated.
+# bonita-continuous-delivery-doc: Bonita Enterprise Edition Continuous Delivery module documentation.
+# bonita-custom-page-seed: a project to start building a custom page. Deprecated in favor of UI Designer page + REST API extension.
+# bonita-doc: Bonita documentation.
+# bonita-developer-resources: guidelines for contributing to Bonita, contributor license agreement, code style...
+# bonita-examples: Bonita usage code examples.
+# bonita-ici-doc: Bonita Enterprise Edition AI module documentation.
+# bonita-js-components: automatically downloaded in the build of projects that require it.
+# bonita-migration: migration tool to update a server from a previous Bonita release.
+# bonita-page-authorization-rules: documentation project to provide an example for page mapping authorization rule.
+# bonita-connector-sap: deprecated. Use REST connector instead.
+# bonita-vacation-management-example: an example for Bonita Enterprise Edition Continuous Delivery module.
+# bonita-web-devtools: Bonitasoft internal development tools.
+# bonita-widget-contrib: project to start building custom widgets outside UI Designer.
+# create-react-app: required for Bonita Subscription Intelligent Continuous Improvement module.
+# dojo: Bonitasoft R&D coding dojos.
+# jscs-preset-bonita: Bonita JavaScript code guidelines.
+# ngUpload: automatically downloaded in the build of bonita-ui-designer project.
+# preact-chartjs-2: required for Bonita Subscription Intelligent Continuous Improvement module.
+# preact-content-loader: required for Bonita Subscription Intelligent Continuous Improvement module.
+# restlet-framework-java: /!\
+# swt-repo: legacy repository required by Bonita Studio. Deprecated.
+# training-presentation-tool: fork of reveal.js with custom look and feel.
+# widget-builder: automatically downloaded in the build of bonita-ui-designer project.
+# bonita-studio-watchdog: obsolete since 7.10 (included in bonita-studio).
+
+
+if [[ "${BONITA_BUILD_STUDIO_ONLY}" == "false" ]]; then
+    build_gradle_wrapper_test_skip_publishToMavenLocal bonita-engine
+
+    build_maven_wrapper_install_skiptest bonita-web-extensions
+
+    build_maven_wrapper_install_skiptest bonita-web
+    build_maven_wrapper_install_skiptest bonita-portal-js
+
+    # bonita-web-pages uses a dedicated UID version
+    detectWebPagesDependenciesVersions
+    build_maven_wrapper_install_skiptest bonita-ui-designer ${WEB_PAGES_UID_VERSION}
+    build_gradle_wrapper_test_skip_publishToMavenLocal bonita-web-pages
+
+    build_maven_wrapper_install_skiptest bonita-application-directory
+    build_maven_wrapper_install_skiptest bonita-user-application
+    build_maven_wrapper_install_skiptest bonita-admin-application
+    build_maven_wrapper_install_skiptest bonita-super-admin-application
+
+    build_maven_wrapper_install_skiptest bonita-distrib
+else
+    echoHeaders "Skipping all build prior the Studio part"
+    build_gradle_wrapper_test_skip_publishToMavenLocal bonita-engine
+fi
+
+if [[ "${BONITA_BUILD_STUDIO_SKIP}" == "false" ]]; then
+    build_maven_wrapper_install_skiptest bonita-data-repository
+    
+    # bonita-studio uses a dedicated UID version
+    detectStudioDependenciesVersions
+    build_maven_wrapper_install_skiptest bonita-ui-designer ${STUDIO_UID_VERSION}
+    
+    build_maven_wrapper_verify_skiptest_with_profile bonita-studio default,all-in-one,!jdk11-tests
+else
+    echoHeaders "Skipping the Studio build"
+fi
diff --git a/bundles.features.rootfiles-feature.build.properties b/bundles.features.rootfiles-feature.build.properties
new file mode 100644 (file)
index 0000000..b3bbbb7
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes=feature.xml
+root=file:jds-icon-128-128-transparent.png
diff --git a/bundles.features.studio-feature.feature.xml b/bundles.features.studio-feature.feature.xml
new file mode 100644 (file)
index 0000000..dbd06f4
--- /dev/null
@@ -0,0 +1,723 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="studio-feature"
+      label="Studio"
+      version="7.13.0"
+      provider-name="Bonitasoft S.A.">
+
+   <description>
+      Core feature of Bonita BPM Studio
+   </description>
+
+   <copyright>
+      Copyright (C) 2009-2015 Bonitasoft S.A.
+Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
+This program is free software: you can redistribute it and/or
+modify
+it under the terms of the GNU General Public License as published
+by
+the Free Software Foundation, either version 2.0 of the License,
+or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License
+along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+   </copyright>
+
+   <license url="">
+      Copyright (C) 2009-2021 Bonitasoft S.A.
+Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
+This program is free software: you can redistribute it and/or
+modify
+it under the terms of the GNU General Public License as published
+by
+the Free Software Foundation, either version 2.0 of the License,
+or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License
+along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+   </license>
+
+   <includes
+         id="org.eclipse.datatools.enablement.apache.derby.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.hsqldb.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.ibm.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.ingres.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.jdbc.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.msft.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.mysql.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.oracle.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.postgresql.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.sqlite.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.enablement.sybase.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.modelbase.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.datatools.sqldevtools.sqlbuilder.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.codehaus.groovy.jdt.patch"
+         version="0.0.0"/>
+
+   <includes
+         id="org.codehaus.groovy.compilerless.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.jdt"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.equinox.p2.extras.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.e4.rcp"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_eclipse_es"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_eclipse_fr"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_eclipse_ja"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.emf.compare.ide.ui"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_eclipse_pt_BR"
+         version="0.0.0"/>
+
+   <includes
+         id="de.jcup.asciidoctoreditor"
+         version="0.0.0"/>
+
+   <includes
+         id="de.jcup.yamleditor"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.emf.edapt.runtime.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.egit"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.egit.gitflow.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.wst.xml_core.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.wst.xml_ui.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.nebula.widgets.richtext.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.egit_es"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.egit_fr"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.egit_ja"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.egit_pt_BR"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.emf.compare.egit"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.jgit_es"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.jgit_fr"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.jgit_ja"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.babel.nls_technology.jgit_pt_BR"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.jgit"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.jgit.gpg.bc"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.jgit.http.apache"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.jgit.ssh.apache"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.m2e.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.wst.jsdt.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.wst.web_ui.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.codehaus.groovy.m2eclipse.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.wst.json_ui.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.codehaus.groovy30.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.rcp"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.gmf"
+         version="0.0.0"/>
+
+   <includes
+         id="platform-specific-feature"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.bonitasoft.studio"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.pics"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.diagram"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.diagram.custom"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.model.edit"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.document"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.validation"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.common.diagram"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.engine"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.importer"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.preferences"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.application"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.common"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.model"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.properties"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.groovy"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.exporter"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.intro"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.xml"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.omg.schema.spec.bpmn"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.common.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.decision.table"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.groovy.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.model.edit.custom"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.expression.editor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.scripting"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.configuration"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.dependencies"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.data"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.connectors.model"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.connectors"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.connectors.model.edit"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.importer.bos"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio-models"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.migration"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.net"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.objectweb.asm"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.refactoring"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.contract"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.osgi.compatibility.state"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="javax.wsdl"
+         download-size="0"
+         install-size="0"
+         version="1.6.2.v201012040545"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.batik.util"
+         download-size="0"
+         install-size="0"
+         version="1.6.0.v201011041432"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.businessobject"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.parameters"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.designer"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.validation.common"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.la"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="javax.activation"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="javax.annotation"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+ <!--   <plugin
+         id="org.bonitasoft.studio.connector.wizard.office"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.connector.wizard.sforce"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+        unpack="false"/>-->
+
+   <plugin
+         id="org.eclipse.datatools.modelbase.sql.query"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.team"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.team.git"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.sap.dependency"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+ <!--   <plugin
+         id="org.bonitasoft.studio.connector.wizard.sapjco3"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+        unpack="false"/>-->
+
+   <plugin
+         id="com.sun.jna.platform"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="com.sun.jna"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.httpcomponents.httpclient"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.rest.api.extension"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.sqlbuilder.ex"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+ <!--   <plugin
+         id="org.bonitasoft.studio.connector.wizard.uipath"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+        unpack="false"/>-->
+
+   <plugin
+         id="org.bonitasoft.studio.datatools"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.designer.war"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="org.bonitasoft.studio.identity"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/bundles.plugins.application.plugin.xml b/bundles.plugins.application.plugin.xml
new file mode 100644 (file)
index 0000000..e09b356
--- /dev/null
@@ -0,0 +1,1585 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * Copyright (C) 2009 BonitaSoft S.A.
+ * BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
+ * 
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2.0 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+ -->
+<?eclipse version="3.4"?>
+<plugin>
+   
+   <extension-point id="PropertiesView" name="Properties View Contribution" schema="schema/PropertiesView.exsd"/>
+   
+   <extension-point id="prestartup" name="Actions to hoot at the preStartup of the workbench" schema="schema/prestartup.exsd"/>
+   <extension-point id="preshutdown" name="Actions to hoot at the preShutdown of the workbench" schema="schema/preshutdown.exsd"/>
+   <extension-point id="postImport" name="Actions to hook after Import" schema="schema/postImport.exsd"/>
+   <extension-point id="preImport" name="Actions to hook before Import" schema="schema/preImport.exsd"/>
+   <extension
+         id="application"
+         point="org.eclipse.core.runtime.applications">
+      <application
+            thread="main"
+            visible="true">
+         <run
+               class="org.bonitasoft.studio.application.BonitaStudioApplication">
+         </run>
+      </application>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu">
+         <menu
+               id="org.bonitasoft.studio.fileMenu"
+               label="%fileMenu_Label">
+            <command
+                  commandId="org.bonitasoft.studio.application.command.deployArtifacts"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.deploySeparator"
+                  visible="true">
+            </separator>
+            <menu
+                  icon="icons/menuIcons/recently.png"
+                  label="%RecentlyModified">
+               <dynamic
+                     class="org.bonitasoft.studio.application.actions.ProcessListContribution"
+                     id="org.bonitasoft.studio.application.openRecently">
+               </dynamic>
+            </menu>
+            <command
+                  commandId="org.eclipse.ui.file.save"
+                  disabledIcon="icons/menuIcons/save_disabled.png"
+                  hoverIcon="icons/menuIcons/save_hover.png"
+                  icon="icons/menuIcons/save.png"
+                  label="%saveProcess_label"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.file.saveAll"
+                  disabledIcon="icons/menuIcons/save_disabled.png"
+                  hoverIcon="icons/menuIcons/save_hover.png"
+                  icon="icons/menuIcons/save_all.png"
+                  label="%saveAll_label"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.command.saveAs"
+                  disabledIcon="icons/duplicate_disabled.png"
+                  icon="icons/duplicate.png"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.separator2"
+                  visible="true">
+            </separator>
+            <menu
+                  id="org.bonitasoft.studio.menu.import"
+                  label="%importLabel">
+               <command
+                     commandId="org.bonitasoft.studio.importer.bos.command"
+                     style="push">
+               </command>
+               <command
+                     commandId="org.bonitasoft.studio.importer.other.command"
+                     style="push">
+               </command>
+            </menu>
+            <separator
+                  name="org.bonitasoft.studio.application.separator5"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.bonitasoft.studio.application.printCommand"
+                  disabledIcon="icons/menuIcons/print_disabled.png"
+                  hoverIcon="icons/menuIcons/print_hover.png"
+                  icon="icons/menuIcons/print.png"
+                  label="%printLabel"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.separator3"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.file.close"
+                  icon="icons/menuIcons/close.png"
+                  label="%close"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.file.closeAll"
+                  disabledIcon="icons/menuIcons/close_all_disabled.png"
+                  icon="icons/menuIcons/close_all.png"
+                  label="%closeAll"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.separator4"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.file.exit"
+                  icon="icons/menuIcons/exit.png"
+                  label="%exitAction_label"
+                  style="push">
+            </command>
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isBonitaPerspectiveActive">
+               </reference>
+            </visibleWhen>
+         </menu>
+         <menu
+               id="org.bonitasoft.studio.menu.edit"
+               label="%editMenu_label">
+            <command
+                  commandId="org.eclipse.ui.views.showView"
+                  icon="icons/find.png"
+                  label="%findLabel"
+                  mnemonic="F"
+                  style="push">
+               <parameter
+                     name="org.eclipse.ui.views.showView.viewId"
+                     value="org.bonitasoft.studio.views.overview.tree">
+               </parameter>
+            </command>
+             <separator
+                  name="org.bonitasoft.studio.application.separator20"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.edit.undo"
+                  disabledIcon="icons/undo_disabled.png"
+                  icon="icons/undo.png"
+                  label="%undoLabel"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.edit.redo"
+                  disabledIcon="icons/redo_disabled.png"
+                  icon="icons/redo.png"
+                  label="%redoLabel"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.separator1"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.edit.copy"
+                  disabledIcon="icons/menuIcons/copy_disabled.png"
+                  hoverIcon="icons/menuIcons/copy_hover.png"
+                  icon="icons/menuIcons/copy.png"
+                  label="%copyLabel"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.edit.paste"
+                  disabledIcon="icons/menuIcons/paste_disabled.png"
+                  hoverIcon="icons/menuIcons/paste_hover.png"
+                  icon="icons/menuIcons/paste.png"
+                  label="%pasteLabel"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.separator2"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.window.preferences"
+                  icon="icons/menuIcons/preferences.png"
+                  style="push">
+            </command>
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isBonitaPerspectiveActive">
+               </reference>
+            </visibleWhen>
+         </menu>
+         
+         <menu
+               id="org.bonitasoft.studio.menu.view"
+               label="%viewMenu_label">
+            <menu
+                  id="org.bonitasoft.studio.menu.view.coolbar"
+                  label="%CoolBarLabel">
+               <command
+                     commandId="org.bonitasoft.studio.application.smallCoolbar"
+                     label="%small">
+               </command>
+               <command
+                     commandId="org.bonitasoft.studio.application.normalCoolbar"
+                     label="%normal">
+               </command>
+            </menu>
+            <command
+                  commandId="org.eclipse.ui.views.showView"
+                  icon="icons/show_view.png"
+                  label="%showOverview_label"
+                  style="push">
+               <parameter
+                     name="org.eclipse.ui.views.showView.viewId"
+                     value="org.bonitasoft.studio.views.overview">
+               </parameter>
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.resetWindowCommand"
+                  disabledIcon="icons/reset_view_disabled.png"
+                  icon="icons/reset_view.png"
+                  label="%resetPerspective_label"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.fullscreen"
+                  icon="icons/full_screen.png"
+                  style="push">
+            </command>
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isBonitaPerspectiveActive">
+               </reference>
+            </visibleWhen>
+         </menu>
+        
+         <!--menu
+               label="%selectProfile">
+            <command
+                  commandId="org.bonitasoft.studio.application.switchToAnalyst"
+                  icon="icons/bonitasoft-icon-16-16-transparent.png"
+                  label="%analystMode">
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.commands.switchToDeveloper"
+                  icon="icons/javaPerspective.gif"
+                  label="%developerMode">
+            </command>
+         </menu-->
+         <menu
+               id="org.bonitasoft.studio.menu.help"
+               label="%help_label">
+            <!--command
+                  commandId="org.bonitasoft.studio.application.openIntroCommand"
+                  hoverIcon="icons/menuIcons/bonita_hover.png"
+                  icon="icons/bonitasoft-icon-16-16-transparent.png"
+                  id="org.bonitasoft.studio.helpMenu.welcomeMenu"
+                  label="%openWelcomePage_label"
+                  style="push">
+            </command-->
+
+            <command
+                  commandId="org.bonitasoft.studio.application.showHelp"
+                  disabledIcon="icons/menuIcons/help_disabled.png"
+                  hoverIcon="icons/menuIcons/help_hover.png"
+                  icon="icons/menuIcons/help.png"
+                  label="%online_documentation"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.command.releaseNote"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.help.separator4"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.bonitasoft.studio.application.openLog"
+                  icon="icons/log.png"
+                  label="%openLog_label"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.openEngineLog"
+                  icon="icons/log.png"
+                  label="%openEngineLog_label"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.openUidLog"
+                  icon="icons/log.png"
+                  label="%openUidLog"
+                  style="push">
+            </command>
+            <separator
+                  name="org.bonitasoft.studio.application.help.separator2"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.help.aboutAction"
+                  icon="icons/menuIcons/about.png"
+                  style="push">
+            </command>
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isBonitaPerspectiveActive">
+               </reference>
+            </visibleWhen>
+            </menu>
+         </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.new">
+         <menu
+               id="org.bonitasoft.studio.application.project.explorer.new"
+               label="%new"
+               mnemonic="w">
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.organization"
+                  visible="true">
+            </separator>
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.bdm"
+                  visible="true">
+            </separator>
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.profile"
+                  visible="true">
+            </separator>
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.application"
+                  visible="true">
+            </separator>
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.diagram"
+                  visible="true">
+            </separator>
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.uidartifact"
+                  visible="true">
+            </separator>
+            <separator
+                  name="org.bonitasoft.studio.application.placeholder.restapi"
+                  visible="true">
+            </separator>
+            <separator
+                  name="additions"
+                  visible="true">
+            </separator>
+         </menu>
+         <command
+               commandId="org.bonitasoft.studio.application.newWithWizard"
+               mnemonic="w"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+            </visibleWhen>
+         </command>
+         <command
+               commandId="org.bonitasoft.studio.application.new"
+               mnemonic="w"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+            </visibleWhen>
+         </command>
+         <separator
+               name="newSeparator"
+               visible="true">
+         </separator>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.build">
+         <command
+               commandId="org.eclipse.ui.file.refresh"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <with
+                     variable="activeMenuSelection">
+                  <and>
+                     <count
+                           value="1">
+                     </count>
+                     <or>
+                        <iterate>
+                           <instanceof
+                                 value="org.eclipse.core.resources.IProject">
+                           </instanceof>
+                        </iterate>
+                     </or>
+                  </and>
+               </with>
+            </visibleWhen>
+         </command>
+         <separator
+               name="buildSeparator">
+         </separator>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.open">
+             <command
+                   commandId="org.bonitasoft.studio.application.open"
+                   id="org.bonitasoft.studio.application.openMenu"
+                   style="push">
+            <visibleWhen
+                  checkEnabled="true">
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.edit">
+         <command
+               commandId="org.bonitasoft.studio.renameCommand"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+            </visibleWhen>
+         </command>
+         <command
+               commandId="org.bonitasoft.studio.application.edit.project.command"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <with
+                     variable="activeMenuSelection">
+                  <and>
+                     <count
+                           value="1">
+                     </count>
+                     <iterate>
+                        <instanceof
+                              value="org.eclipse.core.resources.IProject">
+                        </instanceof>
+                        <test
+                              property="org.bonitasoft.studio.application.isBonitaProject">
+                        </test>
+                     </iterate>
+                  </and>
+               </with>
+            </visibleWhen>
+         </command>
+         <separator
+               name="org.bonitasoft.studio.application.edit.separator"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.edit.delete"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+            </visibleWhen>
+         </command>
+      </menuContribution>
+         <menuContribution
+            allPopups="false"
+            locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.deploy">
+         <command
+               commandId="org.bonitasoft.studio.deployCommand"
+               label="%deploy"
+               style="push">
+               <visibleWhen
+                  checkEnabled="true">
+            </visibleWhen>
+         </command>
+         <dynamic
+               class="org.bonitasoft.studio.application.ui.contribution.DeployArtifactsMenuContributionItem"
+               id="org.bonitasoft.studio.application.command.deployArtifacts">
+            <visibleWhen
+                  checkEnabled="false">
+               <with
+                     variable="activeMenuSelection">
+                  <and>
+                     <count
+                           value="1">
+                     </count>
+                     <or>
+                        <iterate>
+                           <instanceof
+                                 value="org.eclipse.core.resources.IProject">
+                           </instanceof>
+                           <test
+                                 property="org.bonitasoft.studio.application.isBonitaProject">
+                           </test>
+                        </iterate>
+                     </or>
+                  </and>
+               </with>
+            </visibleWhen>
+         </dynamic>
+         <separator
+               name="deploySeparator"
+               visible="true">
+         </separator>
+      </menuContribution>
+   <menuContribution
+         allPopups="false"
+         locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.import">
+      <command
+            commandId="org.bonitasoft.studio.application.import"
+            style="push">
+         <visibleWhen
+               checkEnabled="true">
+         </visibleWhen>
+      </command>
+   </menuContribution>
+   <menuContribution
+         allPopups="false"
+         locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.export">
+      <command
+            commandId="org.bonitasoft.studio.application.export"
+            style="push">
+         <visibleWhen
+               checkEnabled="true">
+               </visibleWhen>
+      </command>
+   </menuContribution>
+   <menuContribution
+         allPopups="false"
+         locationURI="popup:org.bonitasoft.studio.application.project.explorer?before=group.edit">
+      <command
+            commandId="org.eclipse.ui.ide.showInSystemExplorer"
+            icon="icons/menuIcons/showInExplorer.png"
+            label="%showInSystemExplorer"
+            style="push">
+         <visibleWhen
+               checkEnabled="true">
+         </visibleWhen>
+      </command>
+   </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.SaveProcessAsCommand"
+            id="org.bonitasoft.studio.application.command.saveAs"
+            name="%saveAs_label">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.OpenIntroCommandHandler"
+            id="org.bonitasoft.studio.application.openIntroCommand"
+            name="%openWelcomePage_label">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.ResetPerspectiveCommand"
+            id="org.bonitasoft.studio.application.resetWindowCommand"
+            name="%resetPerspective_label">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.ShowHelpCommand"
+            id="org.bonitasoft.studio.application.showHelp"
+            name="%showHelp_label">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.OpenConsoleCommand"
+            id="org.bonitasoft.studio.application.openConsole"
+            name="%openConsoleActionLabel">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.OpenApplicationCommand"
+            id="org.bonitasoft.studio.application.openApplication"
+            name="%openAppplicationActionLabel">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.OpenLogCommand"
+            id="org.bonitasoft.studio.application.openLog"
+            name="%openLog_commandLabel">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.PrintCommandHandler"
+            id="org.bonitasoft.studio.application.printCommand"
+            name="%printLabel">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.OpenEngineLogCommand"
+            id="org.bonitasoft.studio.application.openEngineLog"
+            name="%openEngineLog_commandLabel">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.RefreshConnectorHandler"
+            id="org.bonitasoft.studio.application.refreshconnectorcommand"
+            name="%refreshConnectors_commandLabel">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.SwitchPaletteMode"
+            id="org.bonitasoft.studio.application.switchPalette"
+            name="switch palette">
+         <commandParameter
+               id="org.bonitasoft.studio.application.switch.advanced"
+               name="advanced"
+               optional="true">
+         </commandParameter>
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.SwitchPaletteMode"
+            id="org.bonitasoft.studio.application.paletteSimple"
+            name="switch palette to simple">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.SwitchPaletteMode"
+            id="org.bonitasoft.studio.application.paletteAdvanced"
+            name="switch palette to advanced">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.coolbar.SmallCoolBarHandler"
+            id="org.bonitasoft.studio.application.smallCoolbar"
+            name="%small">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.coolbar.NormalCoolBarHandler"
+            id="org.bonitasoft.studio.application.normalCoolbar"
+            name="%normal">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.FullscreenHandler"
+            id="org.bonitasoft.studio.application.fullscreen"
+            name="%fullscreen">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.RenameDiagramCommandHandler"
+            id="org.bonitasoft.studio.application.command.rename"
+            name="Rename Command">
+         <commandParameter
+               id="diagram"
+               name="Diagram to rename"
+               optional="true">
+         </commandParameter>
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.handler.ImportArtifactsFromZipHandler"
+            id="org.bonitasoft.studio.repository.importArtifacts"
+            name="import artifacts">
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.application.actions.OpenUIDLogCommand"
+            id="org.bonitasoft.studio.application.openUidLog"
+            name="%openUidLog">
+      </command>
+      <command
+            id="org.bonitasoft.studio.application.open"
+            name="%Open">
+      </command>
+      <command
+            id="org.bonitasoft.studio.deployCommand"
+            name="%deploy">
+      </command>
+      <command
+            id="org.bonitasoft.studio.application.import"
+            name="%import">
+      </command>
+      <command
+            id="org.bonitasoft.studio.application.export"
+            name="%export">
+            </command>
+         <command
+            id="org.bonitasoft.studio.renameCommand"
+            name="%rename">
+      </command>
+   <command
+         id="org.bonitasoft.studio.application.new"
+         name="%new">
+   </command>
+   <command
+         id="org.bonitasoft.studio.application.newWithWizard"
+         name="%newWithWizard">
+   </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.BonitaContentOutlineView"
+            icon="icons/overview.png"
+            id="org.bonitasoft.studio.views.overview"
+            name="%overviewViewName"
+            restorable="true">
+      </view>
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.process.BonitaGeneralProcessPropertiesView"
+            icon="icons/details.png"
+            id="org.bonitasoft.studio.views.properties.process.general"
+            name="%General_process"
+            restorable="true">
+      </view>
+      <category
+            id="org.bonitasoft.studio.application.bonita"
+            name="Bonita">
+      </category>
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.process.BonitaAppearencePropertiesView"
+            icon="icons/appearanceView.png"
+            id="org.bonitasoft.studio.views.properties.process.appearance"
+            name="%Appearance"
+            restorable="true">
+      </view>
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.BonitaContentOutlineTreeView"
+            icon="icons/overview.png"
+            id="org.bonitasoft.studio.views.overview.tree"
+            name="%TreeOverView"
+            restorable="true">
+      </view>
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.process.BonitaDataPropertiesView"
+            icon="icons/Picto_Studio_Data_16x16.png"
+            id="org.bonitasoft.studio.views.properties.process.data"
+            name="%Data"
+            restorable="true">
+      </view>
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.process.BonitaExecutionPropertiesView"
+            icon="icons/Execution-D.png"
+            id="org.bonitasoft.studio.views.properties.process.execution"
+            name="%Execution"
+            restorable="true">
+      </view>
+      <view
+            category="org.bonitasoft.studio.application.bonita"
+            class="org.bonitasoft.studio.application.views.BonitaProjectExplorer"
+            icon="icons/bonitasoft-icon-16-16-transparent.png"
+            id="org.bonitasoft.studio.application.project.explorer"
+            inject="true"
+            name="%projectExplorer"
+            restorable="true">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.ui.activities">
+      <activity
+            description="searchActivity to remove from studio"
+            id="org.bonitasoft.studio.application.searchActivity"
+            name="SearchActivity">
+      </activity>
+      <activityPatternBinding
+            activityId="org.bonitasoft.studio.application.searchActivity"
+            pattern="org.eclipse.search.*">
+      </activityPatternBinding>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.bonitasoft.studio.application.actions.UndoCommandHandler"
+            commandId="org.eclipse.ui.edit.undo">
+         <enabledWhen>
+            <reference
+                  definitionId="isActiveEditorAnInstanceOfBonitaEditor">
+            </reference>
+         </enabledWhen>
+      </handler>
+      <handler
+            class="org.bonitasoft.studio.application.actions.RedoCommandHandler"
+            commandId="org.eclipse.ui.edit.redo">
+         <enabledWhen>
+            <reference
+                  definitionId="isActiveEditorAnInstanceOfBonitaEditor">
+            </reference>
+         </enabledWhen>
+      </handler>
+      <handler
+            class="org.bonitasoft.studio.application.actions.SaveCommandHandler"
+            commandId="org.eclipse.ui.file.save">
+         <activeWhen>
+            <reference
+                  definitionId="isBonitaPerspectiveActive">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="org.bonitasoft.studio.application.actions.RefreshHandler"
+            commandId="org.eclipse.ui.file.refresh">
+         <activeWhen>
+            <with
+                  variable="activeEditor">
+               <instanceof
+                     value="org.eclipse.ui.editors.text.TextEditor">
+               </instanceof>
+            </with>
+         </activeWhen>
+      </handler>
+      <handler
+            class="org.bonitasoft.studio.application.actions.AboutDialogHandler"
+            commandId="org.eclipse.ui.help.aboutAction">
+          <activeWhen>
+             <and>
+                <reference
+                      definitionId="isABonitaProduct">
+                </reference>
+                <with
+                      variable="activeContexts">
+                   <iterate
+                         ifEmpty="true"
+                         operator="or">
+                      <equals
+                            value="org.eclipse.ui.contexts.window">
+                      </equals>
+                   </iterate>
+                </with>
+             </and>
+        </activeWhen>
+    </handler>
+      <handler
+            class="org.bonitasoft.studio.application.handler.RefreshProjectHandler"
+            commandId="org.eclipse.ui.file.refresh">
+            <activeWhen>
+               <with
+                     variable="activeMenuSelection">
+                  <and>
+                     <count
+                           value="1">
+                     </count>
+                     <iterate>
+                        <instanceof
+                              value="org.eclipse.core.resources.IResource">
+                        </instanceof>
+                     </iterate>
+                  </and>
+               </with>
+            </activeWhen>
+      </handler>
+      <handler
+            class="org.bonitasoft.studio.application.handler.OpenHandler"
+            commandId="org.bonitasoft.studio.application.open">
+      </handler>
+      <handler
+            class="org.bonitasoft.studio.application.handler.DeleteHandler"
+            commandId="org.eclipse.ui.edit.delete">
+         </handler>
+         <handler
+            class="org.bonitasoft.studio.application.handler.DeployHandler"
+            commandId="org.bonitasoft.studio.deployCommand">
+      </handler>
+   <handler
+         class="org.bonitasoft.studio.application.handler.RenameHandler"
+         commandId="org.bonitasoft.studio.renameCommand">
+   </handler>
+   </extension>
+   <extension
+         point="org.eclipse.core.expressions.definitions">
+      <definition
+            id="isActiveEditorAnInstanceOfBonitaEditor">
+         <or>
+            <with
+                  variable="activeEditor">
+               <instanceof
+                     value="org.bonitasoft.studio.model.process.diagram.part.ProcessDiagramEditor">
+               </instanceof>
+            </with>
+         </or>
+      </definition>
+      <definition
+            id="isABonitaProduct">
+         <or>
+            <with
+                  variable="org.eclipse.core.runtime.Platform">
+               <test
+                     property="org.eclipse.core.runtime.product"
+                     value="org.bonitasoft.studio.product">
+               </test>
+                        </with>
+         </or>
+      </definition>
+      <definition
+            id="isBonitaPerspectiveActive">
+            <or>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+            <equals
+                  value="org.bonitasoft.studio.perspective.process">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+            <equals
+                  value="org.bonitasoft.studio.perspective.java">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+            <equals
+                  value="org.bonitasoft.studio.perspective.textEditor">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+            <equals
+                  value="org.bonitasoft.studio.perspective.welcomePage">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+            <equals
+                  value="org.bonitasoft.studio.rest.api.extension.perspective">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.la.perspective">
+            </equals>
+         </with>
+          <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="com.bonitasoft.studio.la.perspective">
+            </equals>
+         </with>
+              <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.defaultProfile.perspective">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="com.bonitasoft.studio.customProfile.perspective">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.bdm.access.control.perspective">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.team.compare.perspective">
+            </equals>
+         </with>
+           <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.perspective.markdownEditor">
+           </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.businessobject.perspective">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.identity.organization.perspective">
+            </equals>
+         </with>
+         <with
+               variable="activeWorkbenchWindow.activePerspective">
+           <equals
+                  value="org.bonitasoft.studio.application.extension.perspective">
+            </equals>
+         </with>
+         </or>
+      </definition>
+      <definition
+            id="isActiveEditorAnInstanceOfProcessEditor">
+         <with
+               variable="activeEditor">
+            <instanceof
+                  value="org.bonitasoft.studio.model.process.diagram.part.ProcessDiagramEditor">
+            </instanceof>
+         </with>
+      </definition>
+   </extension>
+
+   <extension
+         point="org.eclipse.ui.propertiesView">
+      <excludeSources
+            id="org.bonitasoft.studio.views.properties.application">
+      </excludeSources>
+      <excludeSources
+            id="org.bonitasoft.studio.views.properties.form.general">
+      </excludeSources>
+      <excludeSources
+            id="org.bonitasoft.studio.views.properties.appearance">
+      </excludeSources>
+      <excludeSources
+            id="org.bonitasoft.studio.views.overview">
+      </excludeSources>
+   </extension>
+   <extension
+         point="org.bonitasoft.studio.common.poststartup">
+      <contribution
+            class="org.bonitasoft.studio.application.contribution.CheckJavaVersionPostStartupContribution">
+      </contribution>
+   </extension>
+   <extension
+         id="id1"
+         point="org.eclipse.equinox.security.secureStorage">
+      <provider
+            class="org.bonitasoft.studio.application.security.BonitaStudioPasswordProvider"
+            description="Bonita Studio default password provider"
+            priority="10">
+      </provider>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.bonitasoft.studio.application.fullscreen"
+            contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            platform="win32"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="F11">
+      </key>
+      <key
+            commandId="org.bonitasoft.studio.application.fullscreen"
+            contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            platform="cocoa"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="M1+M3+F11">
+      </key>
+      <key
+            commandId="org.bonitasoft.studio.application.fullscreen"
+            contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            platform="gtk"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="F11">
+      </key>
+      <key
+            commandId="org.eclipse.ui.views.showView"
+            contextId="org.bonitasoft.studio.model.process.diagram.form.ui.diagramContext"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="M1+F">
+         <parameter
+               id="org.eclipse.ui.views.showView.viewId"
+               value="org.bonitasoft.studio.views.overview.tree">
+         </parameter>
+      </key>
+      <key
+            commandId="org.eclipse.ui.views.showView"
+            contextId="org.bonitasoft.studio.model.process.diagram.ui.diagramContext"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="M1+F">
+         <parameter
+               id="org.eclipse.ui.views.showView.viewId"
+               value="org.bonitasoft.studio.views.overview.tree">
+         </parameter>
+      </key>
+      <key
+            commandId="org.eclipse.ui.views.showView"
+            contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="M1+M3+O">
+         <parameter
+               id="org.eclipse.ui.views.showView.viewId"
+               value="org.bonitasoft.studio.views.overview">
+         </parameter>
+      </key>
+      <key
+            commandId="org.bonitasoft.studio.application.open"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="F3">
+      </key>
+      <scheme
+            id="org.bonitasoft.studio.application.scheme"
+            name="BonitaBPM Scheme"
+            parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
+      </scheme>
+      <key
+            commandId="org.bonitasoft.studio.deployCommand"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="M1+M2+D">
+      </key>
+      <key
+            commandId="org.bonitasoft.studio.renameCommand"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.bonitasoft.studio.application.scheme"
+            sequence="M1+R">
+      </key>
+   </extension>
+   <extension
+         point="org.eclipse.ui.popupMenus">
+      <viewerContribution
+            id="org.bonitasoft.studio.application.refreshAction"
+            targetID="#TextEditorContext">
+         <action
+               class="org.bonitasoft.studio.application.actions.EditorRefreshActionDelegate"
+               icon="icons/refresh.png"
+               id="org.bonitasoft.studio.application.refreshAction"
+               label="%Refresh"
+               menubarPath="additions">
+         </action>
+      </viewerContribution>
+   </extension>
+   <extension
+         point="org.bonitasoft.studio.coolbarContributionItem">
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.NewCoolbarItem"
+            priority="0"
+            toolbarPosition="0">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.ProjectOverviewCoolbarItem"
+            priority="0"
+            toolbarPosition="2">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.DeployCoolbarItem"
+            toolbarPosition="3">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.SaveCoolbarItem"
+            priority="0"
+            toolbarPosition="6">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.SeparatorCoolbarItem"
+            priority="0"
+            toolbarPosition="10">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.SeparatorCoolbarItem"
+            priority="0"
+            toolbarPosition="13">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.SeparatorCoolbarItem"
+            priority="0"
+            toolbarPosition="16">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.PreferenceCoolbarItem"
+            priority="0"
+            toolbarPosition="18">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.HelpCoolbarItem"
+            priority="0"
+            toolbarPosition="19">
+      </coolbarItem>
+      <coolbarItem
+            class="org.bonitasoft.studio.application.coolbar.WelcomeCoolbarItem"
+            priority="0"
+            toolbarPosition="20">
+      </coolbarItem>
+   </extension>
+   <extension
+         point="org.eclipse.ui.startup">
+      <startup
+            class="org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor">
+      </startup>
+   </extension>
+   <extension
+         point="org.eclipse.ui.contexts">
+      <context
+            description="Bonita context"
+            id="org.bonitasoft.studio.context.id"
+            name="Bonita"
+            parentId="org.eclipse.ui.contexts.window">
+      </context>
+   </extension>
+   <extension
+         id="id1"
+         point="org.eclipse.e4.workbench.model">
+      <processor
+            apply="always"
+            beforefragment="false"
+            class="org.bonitasoft.studio.application.RemoveQuickAccessProcessor">
+      </processor>
+      <fragment
+            uri="fragment.e4xmi">
+      </fragment>
+   </extension>
+   <extension
+         point="org.eclipse.ui.navigator.viewer">
+      <viewer
+            viewerId="org.bonitasoft.studio.application.project.explorer">
+         <popupMenu
+               allowsPlatformContributions="false"
+               id="org.bonitasoft.studio.application.project.explorer#PopupMenu">
+            <insertionPoint
+                  name="group.new"
+                  separator="true">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.open"
+                  separator="true">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.edit"
+                  separator="true">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.reorganize"
+                  separator="true">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.deploy">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.build"
+                  separator="false">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.uninstall">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.import"
+                  separator="true">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.export">
+            </insertionPoint>
+            <insertionPoint
+                  name="group.manage.dependencies"
+                                 separator="true">
+            </insertionPoint>
+            <insertionPoint
+                  name="additions"
+                  separator="true">
+            </insertionPoint>
+          </popupMenu>
+      </viewer>
+      <viewerContentBinding
+            viewerId="org.bonitasoft.studio.application.project.explorer">
+         <includes>
+                <contentExtension
+                  pattern="org.bonitasoft.studio.application.navigatorContent">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.eclipse.ui.navigator.resources.nested.nestedProjectContentProvider">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.eclipse.ui.navigator.resources.linkHelper">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.eclipse.ui.navigator.resources.filters.*">
+            </contentExtension>
+              <contentExtension
+                  pattern="org.eclipse.jdt.java.ui.javaLinkHelper">
+            </contentExtension>
+              <contentExtension
+                    pattern="org.codehaus.groovy.eclipse.ui.groovyContent">
+              </contentExtension>
+            <contentExtension
+                  pattern="org.eclipse.jdt.java.ui.filters.*">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.bonitasoft.studio.application.project.explorer.filters.*">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.eclipse.ui.navigator.resources.nested.HideFolderWhenProjectIsShownAsNested">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.bonitasoft.studio.application.HideTopLevelProjectIfNested">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.bonitasoft.studio.application.hideEmptyFolders">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.bonitasoft.studio.application.hideClasspathContainers">
+            </contentExtension>
+         </includes>
+         <excludes>
+            <contentExtension
+                  pattern="org.eclipse.ui.navigator.resources.filters.closedProject">
+            </contentExtension>
+         </excludes>
+      </viewerContentBinding>
+   </extension>
+   <extension
+         point="org.eclipse.ui.navigator.navigatorContent">
+      <navigatorContent
+            activeByDefault="true"
+            contentProvider="org.bonitasoft.studio.application.views.provider.BonitaExplorerContentProvider"
+            id="org.bonitasoft.studio.application.navigatorContent"
+            labelProvider="org.bonitasoft.studio.application.views.provider.BonitaExplorerLabelProvider"
+            name="Bonita Project Explorer Content"
+            priority="highest">
+         <triggerPoints>
+                <or>
+                    <adapt type="org.eclipse.core.resources.IProject" >
+                        <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.jdt.core.javanature"/>
+                    </adapt>
+                    <instanceof value="org.eclipse.core.resources.IResource" />
+                    <instanceof value="org.eclipse.jdt.core.IJavaElement" />
+                    <instanceof value="org.eclipse.jdt.core.IJarEntryResource" />
+                    <instanceof value="org.eclipse.jdt.internal.ui.packageview.PackageFragmentRootContainer" />
+                </or>
+            </triggerPoints>
+            <possibleChildren>
+                <or>
+                    <instanceof value="org.eclipse.core.resources.IResource" />
+                    <instanceof value="org.eclipse.jdt.core.IJavaElement" />
+                    <instanceof value="org.eclipse.jdt.core.IJarEntryResource" />
+                    <instanceof value="org.eclipse.jdt.internal.ui.packageview.PackageFragmentRootContainer" />
+                </or>
+            </possibleChildren> 
+         <actionProvider
+               class="org.bonitasoft.studio.application.views.provider.CustomOpenActionProvider"
+               id="org.bonitasoft.studio.application.views.OpenActionProvider">
+         </actionProvider>
+         <commonSorter
+               class="org.bonitasoft.studio.application.views.ProjectExplorerViewerComparator"
+               id="org.eclipse.ui.navigator.resources.sorters.defaultSorter">
+         </commonSorter>
+         <actionProvider
+               class="org.eclipse.jdt.internal.ui.navigator.JavaNavigatorRefactorActionProvider"
+               id="org.bonitasoft.studio.navigator.actions.RefactorActions"
+               overrides="org.eclipse.ui.navigator.resources.actions.RefactorActions">
+            <enablement>
+             <and>
+                <or>
+                   <and>
+                      <instanceof
+                            value="org.eclipse.core.resources.IProject">
+                      </instanceof>
+                      <test
+                            property="org.eclipse.core.resources.projectNature"
+                            value="org.eclipse.jdt.core.javanature">
+                      </test>
+                   </and>
+                   <instanceof
+                         value="org.eclipse.jdt.core.IJavaElement">
+                   </instanceof>
+                   <instanceof
+                         value="org.eclipse.jdt.core.IJarEntryResource">
+                   </instanceof>
+                   <instanceof
+                         value="org.eclipse.jdt.internal.ui.packageview.PackageFragmentRootContainer">
+                   </instanceof>
+                   <instanceof
+                         value="org.eclipse.core.resources.IFile">
+                   </instanceof>
+                   <adapt
+                         type="java.util.Collection">
+                      <count
+                            value="0">
+                      </count>
+                   </adapt>
+                </or>
+                <not>
+                   <instanceof
+                         value="org.eclipse.jdt.core.IPackageFragmentRoot">
+                   </instanceof>
+                </not>
+               </and>
+            </enablement>
+         </actionProvider>
+      </navigatorContent>
+      <commonFilter
+            activeByDefault="true"
+            class="org.bonitasoft.studio.application.views.filters.ProvidedContentFilter"
+            description="Artifacts that are provided by Bonita and should nor be edited"
+            id="org.bonitasoft.studio.application.project.explorer.filters.providedContent"
+            name="Provided content"
+            visibleInUI="true">
+      </commonFilter>
+      <commonFilter
+            activeByDefault="true"
+            class="org.bonitasoft.studio.application.views.filters.HideTopLevelProjectIfNested"
+            description="When a project is shown as nested under its container, hide the view of the project as immediate child of workspace or working set"
+            id="org.bonitasoft.studio.application.HideTopLevelProjectIfNested"
+            name="Nested Projects: hide top-level project if shown as nested">
+      </commonFilter>
+      <commonFilter
+            activeByDefault="true"
+            class="org.bonitasoft.studio.application.views.filters.HideEmptyRepository"
+            id="org.bonitasoft.studio.application.hideEmptyFolders"
+            name="Hide empty repository"
+            visibleInUI="true">
+      </commonFilter>
+      <commonFilter
+            activeByDefault="true"
+            class="org.bonitasoft.studio.application.views.filters.HideClasspathContainer"
+            id="org.bonitasoft.studio.application.hideClasspathContainers"
+            name="Hide classpath containers">
+      </commonFilter>
+   </extension>
+   <extension
+         point="org.eclipse.ui.navigator.linkHelper">
+      <linkHelper
+            class="org.bonitasoft.studio.application.views.ExtendendResourceLinkHelper"
+            id="org.bonitasoft.studio.application.extendedResourceLinkHelper">
+         <editorInputEnablement>
+            <instanceof
+                  value="org.eclipse.emf.common.ui.URIEditorInput">
+            </instanceof></editorInputEnablement>
+         <selectionEnablement>
+            <instanceof
+                  value="org.eclipse.core.resources.IFile">
+            </instanceof>
+         </selectionEnablement>
+      </linkHelper>
+   </extension>
+   <extension
+         point="org.eclipse.core.expressions.propertyTesters">
+      <propertyTester
+            class="org.bonitasoft.studio.application.property.tester.BonitaProjectPropertyTester"
+            id="org.bonitasoft.studio.application.project.propertyTester"
+            namespace="org.bonitasoft.studio.application"
+            properties="isBonitaProject,isBonitaStoreContainer,isContainer"
+            type="org.eclipse.core.runtime.IAdaptable">
+      </propertyTester>
+      <propertyTester
+            class="org.bonitasoft.studio.application.property.tester.GroovySrcPropertyTester"
+            id="org.bonitasoft.studio.groovy.ui.GroovySrcPropertyTester"
+            namespace="org.bonitasoft.studio.groovy.ui"
+            properties="isGroovySrcFolder"
+            type="org.eclipse.core.runtime.IAdaptable">
+      </propertyTester>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.bonitasoft.studio.application.perspective.PerspectiveJavaFactory"
+            id="org.bonitasoft.studio.perspective.java"
+            name="Java Perspective">
+      </perspective>
+      <perspective
+            class="org.bonitasoft.studio.application.perspective.WelcomePagePerspectiveFactory"
+            id="org.bonitasoft.studio.perspective.welcomePage"
+            name="No editor opened perspective">
+      </perspective>
+      <perspective
+            class="org.bonitasoft.studio.application.perspective.TextEditorPerspectiveFactory"
+            id="org.bonitasoft.studio.perspective.textEditor"
+            name="Text Perspective">
+      </perspective>
+      <perspective
+            class="org.bonitasoft.studio.application.views.overview.ProjectOverviewPerspective"
+            fixed="true"
+            id="org.bonitasoft.studio.application.extension.perspective"
+            name="%projectExtensionPerspective">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="*">
+         <hiddenMenuItem
+               id="org.eclipse.jdt.ui.refactoring.menu">
+         </hiddenMenuItem>
+         <hiddenMenuItem
+               id="org.eclipse.search.menu">
+         </hiddenMenuItem>
+         <hiddenMenuItem
+               id="org.eclipse.jdt.ui/org.eclipse.jdt.ui.refactoring.menu">
+         </hiddenMenuItem>
+         <hiddenMenuItem
+               id="org.eclipse.jdt.ui.source.menu">
+         </hiddenMenuItem>
+         <hiddenMenuItem
+               id="org.eclipse.ui.run">
+         </hiddenMenuItem>
+      </perspectiveExtension>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.bonitasoft.studio.application.project.explorer.new?after=additions">
+             <command
+                   commandId="org.bonitasoft.studio.application.newFile.command"
+                   icon="icons/newfile_wiz.png"
+                   style="push">
+                  <visibleWhen
+                  checkEnabled="false">
+                   <with
+                         variable="activeMenuSelection">
+                      <and>
+                         <count
+                               value="1">
+                         </count>
+                         <iterate>
+                          <and>
+                             <not>
+                                <test
+                                      property="org.bonitasoft.studio.application.isBonitaStoreContainer">
+                                </test>
+                             </not>
+                             <test
+                                   property="org.bonitasoft.studio.application.isContainer">
+                             </test>
+                          </and>
+                         </iterate>
+                      </and>
+                   </with>
+                </visibleWhen>
+            </command>
+            <command
+                  commandId="org.bonitasoft.studio.application.newFolder.command"
+                  icon="icons/newfolder_wiz.gif"
+                  style="push">
+                  <visibleWhen
+                  checkEnabled="false">
+                   <with
+                         variable="activeMenuSelection">
+                      <and>
+                         <count
+                               value="1">
+                         </count>
+                         <iterate>
+                           <and>
+                              <not>
+                                 <test
+                                       property="org.bonitasoft.studio.application.isBonitaStoreContainer">
+                                 </test>
+                              </not>
+                              <test
+                                    property="org.bonitasoft.studio.application.isContainer">
+                              </test>
+                           </and>
+                         </iterate>
+                      </and>
+                   </with>
+                </visibleWhen>
+            </command>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.bonitasoft.studio.application.views.overview.ProjectOverviewEditorPart"
+            default="false"
+            id="org.bonitasoft.studio.application.dashboard.editor"
+            name="%projectOverviewView">
+      </editor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.bonitasoft.studio.preferences.pages.BPM"
+            class="org.bonitasoft.studio.application.preference.MavenPreferencePage"
+            id="org.bonitasoft.studio.preferences.maven"
+            name="Maven">
+         <keywordReference
+               id="org.bonitasoft.studio.application.extension.keyword">
+         </keywordReference>
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.keywords">
+      <keyword
+            id="org.bonitasoft.studio.application.extension.keyword"
+            label="%extensionKeywords">
+      </keyword>
+   </extension>
+      <extension
+         point="org.bonitasoft.studio.common.dashboardContribution">
+      <dashboardContribution
+            class="org.bonitasoft.studio.application.views.overview.DiagramOverviewContribution">
+      </dashboardContribution>
+   </extension>
+
+</plugin>
diff --git a/bundles.plugins.application.src.org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor.java b/bundles.plugins.application.src.org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor.java
new file mode 100644 (file)
index 0000000..5280916
--- /dev/null
@@ -0,0 +1,725 @@
+/**
+ * Copyright (C) 2009-2011 BonitaSoft S.A.
+ * BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2.0 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.bonitasoft.studio.application;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Objects;
+import java.util.stream.Stream;
+
+import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
+import org.bonitasoft.studio.application.contribution.IPreShutdownContribution;
+import org.bonitasoft.studio.application.handler.OpenReleaseNoteHandler;
+import org.bonitasoft.studio.application.i18n.Messages;
+import org.bonitasoft.studio.common.DateUtil;
+import org.bonitasoft.studio.common.FileUtil;
+import org.bonitasoft.studio.common.ProjectUtil;
+import org.bonitasoft.studio.common.RedirectURLBuilder;
+import org.bonitasoft.studio.common.extension.BonitaStudioExtensionRegistryManager;
+import org.bonitasoft.studio.common.extension.IPostStartupContribution;
+import org.bonitasoft.studio.common.jface.MessageDialogWithLink;
+import org.bonitasoft.studio.common.log.BonitaStudioLog;
+import org.bonitasoft.studio.common.platform.tools.PlatformUtil;
+import org.bonitasoft.studio.common.repository.AbstractRepository;
+import org.bonitasoft.studio.common.repository.RepositoryManager;
+import org.bonitasoft.studio.common.repository.core.ActiveOrganizationProvider;
+import org.bonitasoft.studio.common.repository.core.maven.DependencyGetOperation;
+import org.bonitasoft.studio.common.repository.core.maven.contribution.InstallBonitaMavenArtifactsOperation;
+import org.bonitasoft.studio.common.repository.core.maven.migration.model.GAV;
+import org.bonitasoft.studio.common.repository.core.maven.repository.MavenRepositories;
+import org.bonitasoft.studio.designer.core.UIDesignerServerManager;
+import org.bonitasoft.studio.engine.BOSEngineManager;
+import org.bonitasoft.studio.engine.BOSWebServerManager;
+import org.bonitasoft.studio.engine.server.StartEngineJob;
+import org.bonitasoft.studio.model.process.diagram.part.ProcessDiagramEditorPlugin;
+import org.bonitasoft.studio.model.process.impl.ContractInputImpl;
+import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
+import org.bonitasoft.studio.preferences.BonitaThemeConstants;
+import org.bonitasoft.studio.preferences.dialog.BonitaPreferenceDialog;
+import org.eclipse.core.internal.databinding.beans.BeanPropertyHelper;
+import org.eclipse.core.internal.resources.Workspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.di.InjectionException;
+import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
+import org.eclipse.gmf.runtime.lite.svg.SVGFigure;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.repository.IRepository;
+import org.eclipse.m2e.core.repository.IRepositoryRegistry;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IStartup;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.application.IWorkbenchConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.internal.browser.WebBrowserUtil;
+import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
+import org.osgi.framework.Bundle;
+
+import com.google.common.base.Joiner;
+
+public class BonitaStudioWorkbenchAdvisor extends WorkbenchAdvisor implements IStartup {
+
+    private static final String AWT_DRAW_STRING_AS_IMAGE = "drawStringAsImage";
+
+    private final class PreShutdownStudio implements IRunnableWithProgress {
+
+        @Override
+        public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+            monitor.beginTask(Messages.shuttingDown, IProgressMonitor.UNKNOWN);
+            UIDesignerServerManager.getInstance().stop();
+            Job.getJobManager().cancel(StartEngineJob.FAMILY);
+            executePreShutdownContribution();
+            new ActiveOrganizationProvider().flush();
+            if (BOSWebServerManager.getInstance().serverIsStarted() && BOSEngineManager.getInstance().isRunning()) {
+                BOSEngineManager.getInstance().stop();
+            }
+            FileUtil.deleteDir(ProjectUtil.getBonitaStudioWorkFolder());
+            deleteTomcatTempDir();
+            monitor.done();
+        }
+
+        private void deleteTomcatTempDir() {
+            File tempDir = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString() + File.separator
+                    + "tomcat" + File.separator + "server" + File.separator + "temp");
+            if (tempDir.exists()) {
+                FileUtil.deleteDir(tempDir);
+            }
+        }
+
+        private void executePreShutdownContribution() {
+            final IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance()
+                    .getConfigurationElements(
+                            "org.bonitasoft.studio.application.preshutdown"); //$NON-NLS-1$
+            IPreShutdownContribution contrib = null;
+            for (final IConfigurationElement elem : elements) {
+                try {
+                    contrib = (IPreShutdownContribution) elem.createExecutableExtension("class"); //$NON-NLS-1$
+                    contrib.execute();
+                } catch (final CoreException e) {
+                    BonitaStudioLog.error(e);
+                }
+            }
+        }
+    }
+
+    private static final String FIRST_STARTUP = "firstStartup";
+
+    @Override
+    public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(final IWorkbenchWindowConfigurer configurer) {
+        return new BonitaStudioWorkbenchWindowAdvisor(configurer);
+    }
+
+    @Override
+    public void initialize(final IWorkbenchConfigurer configurer) {
+        super.initialize(configurer);
+        configurer.setSaveAndRestore(true);
+        final IContextService contextService = PlatformUI.getWorkbench().getService(IContextService.class);
+        contextService.activateContext("org.bonitasoft.studio.context.id");
+        initializeIDEImages(configurer);
+    }
+
+    /**
+     * Workaround to load icons for Common Navigator component in a RCP
+     */
+    private void initializeIDEImages(final IWorkbenchConfigurer configurer) {
+        IDE.registerAdapters();
+        declareWorkbenchImages();
+    }
+
+    /********************************************************************
+     * /!\ Copy-pasted from IDEWorkbenchAvisor.declareWorkbenchImages() *
+     * ******************************************************************
+     * Declares all IDE-specific workbench images. This includes both "shared"
+     * images (named in {@link org.eclipse.ui.ide.IDE.SharedImages}) and internal images (named in
+     * {@link org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages}).
+     *
+     * @see IWorkbenchConfigurer#declareImage
+     */
+    private void declareWorkbenchImages() {
+
+        final String ICONS_PATH = "$nl$/icons/full/";//$NON-NLS-1$
+        final String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; // Enabled //$NON-NLS-1$
+
+        // toolbar
+        // icons.
+        final String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; // Disabled //$NON-NLS-1$
+        // //$NON-NLS-1$
+        // toolbar
+        // icons.
+        final String PATH_ETOOL = ICONS_PATH + "etool16/"; // Enabled toolbar //$NON-NLS-1$
+        // //$NON-NLS-1$
+        // icons.
+        final String PATH_DTOOL = ICONS_PATH + "dtool16/"; // Disabled toolbar //$NON-NLS-1$
+        // //$NON-NLS-1$
+        // icons.
+        final String PATH_OBJECT = ICONS_PATH + "obj16/"; // Model object //$NON-NLS-1$
+        // //$NON-NLS-1$
+        // icons
+        final String PATH_WIZBAN = ICONS_PATH + "wizban/"; // Wizard //$NON-NLS-1$
+        // //$NON-NLS-1$
+        // icons
+
+        // View icons
+        final String PATH_EVIEW = ICONS_PATH + "eview16/"; //$NON-NLS-1$
+
+        final Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC, PATH_ETOOL
+                        + "build_exec.png", //$NON-NLS-1$
+                false);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_HOVER,
+                PATH_ETOOL + "build_exec.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED,
+                PATH_DTOOL + "build_exec.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC, PATH_ETOOL
+                        + "search_src.png", //$NON-NLS-1$
+                false);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC_HOVER,
+                PATH_ETOOL + "search_src.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC_DISABLED,
+                PATH_DTOOL + "search_src.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_NEXT_NAV, PATH_ETOOL
+                        + "next_nav.png", //$NON-NLS-1$
+                false);
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_PREVIOUS_NAV, PATH_ETOOL
+                        + "prev_nav.png", //$NON-NLS-1$
+                false);
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_NEWPRJ_WIZ, PATH_WIZBAN
+                        + "newprj_wiz.png", //$NON-NLS-1$
+                false);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_NEWFOLDER_WIZ,
+                PATH_WIZBAN + "newfolder_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_NEWFILE_WIZ, PATH_WIZBAN
+                        + "newfile_wiz.png", //$NON-NLS-1$
+                false);
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_IMPORTDIR_WIZ,
+                PATH_WIZBAN + "importdir_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_IMPORTZIP_WIZ,
+                PATH_WIZBAN + "importzip_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_EXPORTDIR_WIZ,
+                PATH_WIZBAN + "exportdir_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_EXPORTZIP_WIZ,
+                PATH_WIZBAN + "exportzip_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_RESOURCEWORKINGSET_WIZ,
+                PATH_WIZBAN + "workset_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_DLGBAN_SAVEAS_DLG, PATH_WIZBAN
+                        + "saveas_wiz.png", //$NON-NLS-1$
+                false);
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_DLGBAN_QUICKFIX_DLG, PATH_WIZBAN
+                        + "quick_fix.png", //$NON-NLS-1$
+                false);
+
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT,
+                PATH_OBJECT + "prj_obj.png", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
+                        + "cprj_obj.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OPEN_MARKER,
+                PATH_ELOCALTOOL + "gotoobj_tsk.png", true); //$NON-NLS-1$
+
+        // Quick fix icons
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED,
+                PATH_ELOCALTOOL + "smartmode_co.png", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_DLCL_QUICK_FIX_DISABLED,
+                PATH_DLOCALTOOL + "smartmode_co.png", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_WARNING,
+                PATH_OBJECT + "quickfix_warning_obj.png", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_ERROR,
+                PATH_OBJECT + "quickfix_error_obj.png", true); //$NON-NLS-1$
+
+        // task objects
+        // declareRegistryImage(IDEInternalWorkbenchImages.IMG_OBJS_HPRIO_TSK,
+        // PATH_OBJECT+"hprio_tsk.png");
+        // declareRegistryImage(IDEInternalWorkbenchImages.IMG_OBJS_MPRIO_TSK,
+        // PATH_OBJECT+"mprio_tsk.png");
+        // declareRegistryImage(IDEInternalWorkbenchImages.IMG_OBJS_LPRIO_TSK,
+        // PATH_OBJECT+"lprio_tsk.png");
+
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJS_TASK_TSK,
+                PATH_OBJECT + "taskmrk_tsk.png", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJS_BKMRK_TSK,
+                PATH_OBJECT + "bkmrk_tsk.png", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_COMPLETE_TSK, PATH_OBJECT
+                        + "complete_tsk.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_INCOMPLETE_TSK, PATH_OBJECT
+                        + "incomplete_tsk.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_ITEM, PATH_OBJECT
+                        + "welcome_item.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_BANNER, PATH_OBJECT
+                        + "welcome_banner.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_ERROR_PATH, PATH_OBJECT
+                        + "error_tsk.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_WARNING_PATH, PATH_OBJECT
+                        + "warn_tsk.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_OBJS_INFO_PATH, PATH_OBJECT
+                        + "info_tsk.png", //$NON-NLS-1$
+                true);
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_LCL_FLAT_LAYOUT, PATH_ELOCALTOOL
+                        + "flatLayout.png", //$NON-NLS-1$
+                true);
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_LCL_HIERARCHICAL_LAYOUT,
+                PATH_ELOCALTOOL + "hierarchicalLayout.png", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEM_CATEGORY,
+                PATH_ETOOL + "problem_category.png", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW,
+                PATH_EVIEW + "problems_view.png", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_ERROR,
+                PATH_EVIEW + "problems_view_error.png", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_WARNING,
+                PATH_EVIEW + "problems_view_warning.png", true); //$NON-NLS-1$
+    }
+
+    /**
+     * Declares an IDE-specific workbench image.
+     *
+     * @param symbolicName
+     *        the symbolic name of the image
+     * @param path
+     *        the path of the image file; this path is relative to the base
+     *        of the IDE plug-in
+     * @param shared
+     *        <code>true</code> if this is a shared image, and
+     *        <code>false</code> if this is not a shared image
+     * @see IWorkbenchConfigurer#declareImage
+     */
+    private void declareWorkbenchImage(final Bundle ideBundle, final String symbolicName,
+            final String path, final boolean shared) {
+        final URL url = FileLocator.find(ideBundle, new Path(path), null);
+        final ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+        getWorkbenchConfigurer().declareImage(symbolicName, desc, shared);
+    }
+
+    @Override
+    public String getInitialWindowPerspectiveId() {
+        return null;
+    }
+
+    @Override
+    public String getMainPreferencePageId() {
+        return "org.bonitasoft.studio.preferences.preferences.UIPreferencePage";
+    }
+
+    @Override
+    public void preStartup() {
+        // Initialize adapter factories and avoid deadlock at startup
+        ProcessDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory();
+        try {
+            new InstallBonitaMavenArtifactsOperation(MavenPlugin.getMaven().getLocalRepository()).execute();
+        } catch (CoreException e) {
+           BonitaStudioLog.error(e);
+        }
+        disableInternalWebBrowser();
+        setSystemProperties();
+    }
+
+    protected void setSystemProperties() {
+        var instanceLocation = Platform.getInstanceLocation();
+        if (instanceLocation != null) {
+            String workspaceLocation = new File(instanceLocation.getURL().getFile()).getPath();
+            System.setProperty("bonita.tomcat.lib.dir", String.format("%s%stomcat%sserver%slib", workspaceLocation,
+                    File.separator, File.separator, File.separator));
+            BonitaStudioLog.info("bonita.tomcat.lib.dir=" + System.getProperty("bonita.tomcat.lib.dir"),
+                    ApplicationPlugin.PLUGIN_ID);
+        } else {
+            BonitaStudioLog.warning("Property 'bonita.tomcat.lib.dir' has not been set.", ApplicationPlugin.PLUGIN_ID);
+        }
+        // Workaround for STUDIO-3651
+        System.setProperty(AWT_DRAW_STRING_AS_IMAGE, System.getProperty(AWT_DRAW_STRING_AS_IMAGE, "true"));
+    }
+
+    @Override
+    public void postStartup() {
+        var initializeProjectJob = new Job("Initialize project") {
+
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                RepositoryManager.getInstance().getAccessor().start(monitor);
+                return Status.OK_STATUS;
+            }
+        };
+        initializeProjectJob.addJobChangeListener(new JobChangeAdapter() {
+
+            @Override
+            public void done(IJobChangeEvent event) {
+                if (initializeProjectJob.equals(event.getJob())) {
+                    executePostStartupContributions();
+                }
+                super.done(event);
+            }
+        });
+        initializeProjectJob.setPriority(Job.INTERACTIVE);
+        initializeProjectJob.schedule();
+
+        super.postStartup();
+        IThemeEngine engine = PlatformUI.getWorkbench().getService(IThemeEngine.class);
+        synchroniseTheme(engine);
+        applyTheme(engine);
+    }
+
+    /**
+     * Synchronise active eclipse theme with the Bonita preference,
+     * to ensure that specifics adjustments for Dark theme are applied.
+     * The preference value can be outdated if the user update the theme from the eclipse preference panel.
+     */
+    private void synchroniseTheme(IThemeEngine engine) {
+        String currentValue = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
+                .getString(BonitaThemeConstants.STUDIO_THEME_PREFERENCE);
+        String activeTheme = engine.getActiveTheme() == null
+                ? null
+                : engine.getActiveTheme().getId();
+        if (!themeIsValid(activeTheme)) {
+            BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
+                    .setValue(BonitaThemeConstants.STUDIO_THEME_PREFERENCE, BonitaThemeConstants.LIGHT_THEME);
+        } else if (!Objects.equals(currentValue, engine.getActiveTheme().getId())) {
+            BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
+                    .setValue(BonitaThemeConstants.STUDIO_THEME_PREFERENCE, engine.getActiveTheme().getId());
+        }
+    }
+
+    private boolean themeIsValid(String themeId) {
+        if (themeId != null && !themeId.isBlank()) {
+            return Objects.equals(themeId, BonitaThemeConstants.LIGHT_THEME)
+                    || Objects.equals(themeId, BonitaThemeConstants.DARK_THEME);
+        }
+        return false;
+    }
+
+    /**
+     * Apply the theme if required (usually on first start).
+     */
+    private void applyTheme(IThemeEngine engine) {
+        String expectedTheme = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
+                .getString(BonitaThemeConstants.STUDIO_THEME_PREFERENCE);
+        if (engine.getActiveTheme() == null
+                || !Objects.equals(expectedTheme, engine.getActiveTheme().getId())) {
+            BonitaStudioLog.info(String.format("Applying theme %s", expectedTheme), ApplicationPlugin.PLUGIN_ID);
+            engine.setTheme(expectedTheme, true);
+        }
+    }
+
+    /**
+     * Disconnect from the core workspace.
+     */
+    private void disconnectFromWorkspace(final IProgressMonitor monitor) {
+        // save the workspace
+        final MultiStatus status = new MultiStatus(
+                IDEWorkbenchPlugin.IDE_WORKBENCH, 1,
+                IDEWorkbenchMessages.ProblemSavingWorkbench, null);
+        try {
+            final ProgressMonitorJobsDialog p = new ProgressMonitorJobsDialog(
+                    null);
+
+            final boolean applyPolicy = ResourcesPlugin.getWorkspace()
+                    .getDescription().isApplyFileStatePolicy();
+
+            final IRunnableWithProgress runnable = new IRunnableWithProgress() {
+
+                @Override
+                public void run(final IProgressMonitor monitor) {
+                    try {
+                        if (applyPolicy) {
+                            status.merge(((Workspace) ResourcesPlugin
+                                    .getWorkspace()).save(true, true, monitor));
+                        }
+                    } catch (final CoreException e) {
+                        status.merge(e.getStatus());
+                    }
+                }
+            };
+            p.run(true, false, runnable);
+        } catch (final InvocationTargetException e) {
+            status
+                    .merge(new Status(IStatus.ERROR,
+                            IDEWorkbenchPlugin.IDE_WORKBENCH, 1,
+                            IDEWorkbenchMessages.InternalError, e
+                                    .getTargetException()));
+        } catch (final InterruptedException e) {
+            status.merge(new Status(IStatus.ERROR,
+                    IDEWorkbenchPlugin.IDE_WORKBENCH, 1,
+                    IDEWorkbenchMessages.InternalError, e));
+        }
+        ErrorDialog.openError(null,
+                IDEWorkbenchMessages.ProblemsSavingWorkspace, null, status,
+                IStatus.ERROR | IStatus.WARNING);
+        if (!status.isOK()) {
+            IDEWorkbenchPlugin.log(
+                    IDEWorkbenchMessages.ProblemsSavingWorkspace, status);
+        }
+    }
+
+    protected void disableInternalWebBrowser() {
+        final String noRegister = System.getProperty("bonita.noregister"); //$NON-NLS-1$
+        if (noRegister == null || !noRegister.equals("1")) {
+            WebBrowserUtil.isInternalBrowserOperational = false;
+        }
+    }
+
+    @Override
+    public void postShutdown() {
+        super.postShutdown();
+        disconnectFromWorkspace(AbstractRepository.NULL_PROGRESS_MONITOR);
+    }
+
+    @Override
+    public boolean preShutdown() {
+        IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+                .getActivePage();
+        Stream.of(activePage.getViewReferences())
+                .filter(vr -> Objects.equals("org.eclipse.ui.browser.view", vr.getId()))
+                .forEach(activePage::hideView);
+        Job.getJobManager().cancel(StartEngineJob.FAMILY);
+        final boolean returnValue = super.preShutdown();
+        if (returnValue) {
+            try {
+                if (PlatformUI.isWorkbenchRunning() && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null
+                        && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
+                    PlatformUI.getWorkbench().getProgressService().run(true, false, new PreShutdownStudio());
+                    return true;
+                }
+            } catch (final Exception e) {
+                BonitaStudioLog.error(e);
+            }
+        }
+        return returnValue;
+    }
+
+    @Override
+    public void earlyStartup() {
+        if (PlatformUtil.isHeadless()) {
+            return;//Do not execute earlyStartup in headless mode
+        }
+
+        new Job("Setup internal maven repository") {
+
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                new InstallBonitaMavenArtifactsOperation(MavenRepositories.internalRepository()).execute();
+                try {
+                    testMavenCentralAccess(monitor);
+                } catch (InvocationTargetException | InterruptedException e) {
+                    return new Status(IStatus.ERROR, getClass(), e.getMessage());
+                }
+                return Status.OK_STATUS;
+            }
+
+            private void testMavenCentralAccess(IProgressMonitor monitor)
+                    throws InvocationTargetException, InterruptedException {
+                // Use an arbitrary artifact (small) to test maven central access
+                var operation = new DependencyGetOperation(
+                        new GAV("org.bonitasoft.engine", "bonita-engine", "7.13.0", null, "pom", null));
+                MavenPlugin.getRepositoryRegistry().getRepositories(IRepositoryRegistry.SCOPE_SETTINGS).stream()
+                        .map(IRepository::getUrl)
+                        .forEach(operation::addRemoteRespository);
+                operation.run(monitor);
+                var result = operation.getResult();
+                if (result == null) {
+                    IMavenConfiguration mavenConfiguration = MavenPlugin.getMavenConfiguration();
+                    var userSettingsFile = mavenConfiguration.getUserSettingsFile() != null
+                            ? new File(mavenConfiguration.getUserSettingsFile())
+                            : SettingsXmlConfigurationProcessor.DEFAULT_USER_SETTINGS_FILE;
+                    Display.getDefault().syncExec(() -> {
+                        var message = Messages.cannotReachMavenCentralRepositoryMessage;
+                        if (userSettingsFile.exists()) {
+                            message = message + System.lineSeparator()
+                                    + String.format(Messages.validateExistingMavenConfigurationMessage,
+                                            userSettingsFile.getAbsolutePath());
+                        }
+                        int buttonId = new MessageDialogWithLink(Display.getDefault().getActiveShell(),
+                                Messages.cannotReachMavenCentralRepositoryTitle,
+                                null,
+                                message,
+                                MessageDialog.WARNING,
+                                new String[] { IDialogConstants.IGNORE_LABEL,
+                                        Messages.retry,
+                                        Messages.configure },
+                                0,
+                                URI.create(RedirectURLBuilder.create("728"))).open();
+                        if (buttonId == 2) {
+                            BonitaPreferenceDialog dialog = new BonitaPreferenceDialog(
+                                    new Shell(Display.getDefault()));
+                            dialog.create();
+                            dialog.setSelectedPreferencePage(BonitaPreferenceDialog.MAVEN_PAGE_ID);
+                            dialog.open();
+                            try {
+                                testMavenCentralAccess(monitor);
+                            } catch (InvocationTargetException | InterruptedException e) {
+                                BonitaStudioLog.error(e);
+                            }
+                        } else if (buttonId == 1) {
+                            try {
+                                testMavenCentralAccess(monitor);
+                            } catch (InvocationTargetException | InterruptedException e) {
+                                BonitaStudioLog.error(e);
+                            }
+                        }
+                    });
+                }
+            }
+        }.schedule();
+
+        preLoad();
+
+        final long startupDuration = System.currentTimeMillis() - BonitaStudioApplication.START_TIME;
+        BonitaStudioLog.info("Startup duration : " + DateUtil.getDisplayDuration(startupDuration),
+                ApplicationPlugin.PLUGIN_ID);
+        ApplicationPlugin.getDefault().getPreferenceStore().setDefault(FIRST_STARTUP, true);
+        if (isFirstStartup()) {
+//            new OpenReleaseNoteHandler().openBrowser();
+//            PlatformUtil.openIntroIfNoOtherEditorOpen();
+//        }else {
+            PlatformUtil.openDashboardIfNoOtherEditorOpen();
+        }
+        ApplicationPlugin.getDefault().getPreferenceStore().setValue(FIRST_STARTUP, false);
+    }
+
+    private void executePostStartupContributions() {
+        final IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance()
+                .getConfigurationElements(
+                        "org.bonitasoft.studio.common.poststartup"); //$NON-NLS-1$
+        for (final IConfigurationElement elem : elements) {
+            final Workbench workbench = (Workbench) PlatformUI.getWorkbench();
+            try {
+                IPostStartupContribution contrib = (IPostStartupContribution) ContextInjectionFactory
+                        .make(Platform.getBundle(elem.getDeclaringExtension().getNamespaceIdentifier())
+                                .loadClass(elem.getAttribute("class")), workbench.getContext());
+                Display.getDefault().asyncExec(contrib::execute);
+            } catch (InjectionException | ClassNotFoundException | InvalidRegistryObjectException e) {
+                BonitaStudioLog.error(e);
+            }
+        }
+    }
+
+    private boolean isFirstStartup() {
+        return ApplicationPlugin.getDefault().getPreferenceStore().getBoolean(FIRST_STARTUP);
+    }
+
+    private void preLoad() {
+        //Fix performance issue
+        BeanPropertyHelper.getPropertyDescriptor(ContractInputImpl.class, "name");
+        preLoadSVG();
+    }
+
+    private void preLoadSVG() {
+        final SVGFigure svgFigure = new SVGFigure();
+        try {
+            final File iconsFolder = new File(
+                    FileLocator.toFileURL(Platform.getBundle("org.bonitasoft.studio.pics").getResource("icons"))
+                            .getFile());
+            initSVGFigure(svgFigure, iconsFolder, "figures");
+            initSVGFigure(svgFigure, iconsFolder, "decoration", "svg");
+        } catch (final IOException e) {
+            BonitaStudioLog.error(e);
+        }
+    }
+
+    private void initSVGFigure(final SVGFigure svgFigure, final File iconsFolder, final String... pathToFolder) {
+        for (final String filename : new File(iconsFolder, Joiner.on(File.separatorChar).join(pathToFolder)).list()) {
+            if (filename.endsWith(".svgz")) {
+                svgFigure
+                        .setURI("platform:/plugin/org.bonitasoft.studio.pics/icons/" + Joiner.on("/").join(pathToFolder)
+                                + "/" + filename);
+            }
+        }
+    }
+
+}
diff --git a/bundles.plugins.application.src.org.bonitasoft.studio.application.actions.OpenIntroCommandHnadler.java b/bundles.plugins.application.src.org.bonitasoft.studio.application.actions.OpenIntroCommandHnadler.java
new file mode 100644 (file)
index 0000000..31d9ae0
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * Copyright (C) 2010 BonitaSoft S.A.
+ * BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2.0 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.bonitasoft.studio.application.actions;
+
+import org.bonitasoft.studio.common.platform.tools.PlatformUtil;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class OpenIntroCommandHandler extends AbstractHandler {
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+/*        PlatformUtil.openIntro();*/
+               return null;
+       }
+
+}
diff --git a/bundles.plugins.application.src.org.bonitasoft.studio.application.coolbar.WelcomeCoolbarItem.java b/bundles.plugins.application.src.org.bonitasoft.studio.application.coolbar.WelcomeCoolbarItem.java
new file mode 100644 (file)
index 0000000..949985b
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Copyright (C) 2012 BonitaSoft S.A.
+ * BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2.0 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.bonitasoft.studio.application.coolbar;
+
+import org.bonitasoft.studio.application.actions.OpenIntroCommandHandler;
+import org.bonitasoft.studio.application.i18n.Messages;
+import org.bonitasoft.studio.common.extension.IBonitaContributionItem;
+import org.bonitasoft.studio.common.log.BonitaStudioLog;
+import org.bonitasoft.studio.pics.Pics;
+import org.bonitasoft.studio.pics.PicsConstants;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+
+/**
+ * @author Romain Bioteau
+ */
+public class WelcomeCoolbarItem extends ContributionItem implements IBonitaContributionItem {
+/*
+    private final OpenIntroCommandHandler handler;
+
+    public WelcomeCoolbarItem() {
+        handler = new OpenIntroCommandHandler();
+    }
+*/
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.IContributionItem#getId()
+     */
+/*    @Override
+    public String getId() {
+        return "org.bonitasoft.studio.coolbar.welcome";
+    }
+
+    @Override
+    public String getText() {
+        return Messages.WelcomeButtonLabel;
+    }
+
+    @Override
+    public void fill(final ToolBar toolbar, final int index, final int iconSize) {
+        final ToolItem item = new ToolItem(toolbar, SWT.PUSH | SWT.RIGHT);
+        item.setToolTipText(Messages.WelcomeButtonLabel);
+        if (iconSize < 0) {
+            item.setImage(Pics.getImage(PicsConstants.coolbar_welcome_32));
+            item.setHotImage(Pics.getImage(PicsConstants.coolbar_welcome_hot_32));
+        } else {
+            item.setImage(Pics.getImage(PicsConstants.coolbar_welcome_24));
+            item.setHotImage(Pics.getImage(PicsConstants.coolbar_welcome_hot_24));
+        }
+        item.addSelectionListener(new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(final SelectionEvent e) {
+                try {
+                    handler.execute(new ExecutionEvent());
+                } catch (final ExecutionException e1) {
+                    BonitaStudioLog.error(e1);
+                }
+            }
+        });
+
+    }
+*/
+}
diff --git a/bundles.plugins.engine.plugin.xml b/bundles.plugins.engine.plugin.xml
new file mode 100644 (file)
index 0000000..0d514c1
--- /dev/null
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension-point id="org.bonitasoft.studio.engine.kpityperesolver" name="org.bonitasoft.studio.engine.kpityperesolver" schema="schema/org.bonitasoft.studio.engine.kpityperesolver.exsd"/>
+   <extension-point id="preEngineAction" name="preEngineAction" schema="schema/preEngineAction.exsd"/>
+   <extension-point id="postEngineAction" name="preEngineAction" schema="schema/postEngineAction.exsd"/>
+   <extension-point id="bonitaWebServerManager" name="bonitaWebServerManager" schema="schema/bonitaWebServerManager.exsd"/>
+   <extension-point id="org.bonitasoft.studio.engine.processDefinitionExporter" name="org.bonitasoft.studio.engine.processDefinitionExporter" schema="schema/org.bonitasoft.studio.engine.processDefinitionExporter.exsd"/>
+   <extension-point id="bonitaEngineManager" name="bonitaEngineManager" schema="schema/bonitaEngineManager.exsd"/>
+   <extension-point id="org.bonitasoft.studio.engine.definition.builder" name="org.bonitasoft.studio.engine.definition.builder" schema="schema/DefinitionBuilder.exsd"/>
+  <extension
+        point="org.eclipse.ui.commands">
+        <command
+            id="org.bonitasoft.studio.engine.runCommand"
+            name="%runProcessCommand">
+           <commandParameter
+                 id="configuration"
+                 name="configuration"
+                 optional="true">
+           </commandParameter>
+      </command>
+      <command
+            defaultHandler="org.bonitasoft.studio.engine.command.RestartServerCommand"
+            id="org.bonitasoft.studio.engine.resetServerCommand"
+            name="%resetServerCommand">
+      </command>
+       <command
+            id="org.bonitasoft.studio.engine.exportAsBarCommand"
+            name="%buildBarLabel">
+      </command>
+       <commandParameterType
+             id="org.bonitasoft.studio.commandParameterType.abstractProcess"
+             type="org.bonitasoft.studio.model.process.AbstractProcess">
+       </commandParameterType>
+  </extension>
+  <extension
+        point="org.bonitasoft.studio.coolbarContributionItem">
+     <coolbarItem
+           class="org.bonitasoft.studio.engine.coolbar.OpenPortalCoolbarItem"
+           priority="0"
+           toolbarPosition="12">
+     </coolbarItem>
+     <coolbarItem
+           class="org.bonitasoft.studio.engine.coolbar.RunCoolbarItem"
+           priority="0"
+           toolbarPosition="15">
+     </coolbarItem>
+  </extension>
+     <extension
+         point="org.eclipse.ui.preferencePages">
+         <page
+            class="org.bonitasoft.studio.engine.preferences.ServerPreferencePage"
+            id="org.bonitasoft.studio.preferences.server"
+            name="Server preference page">
+         <keywordReference
+               id="org.bonitasoft.studio.preferences.keywordReference.server">
+         </keywordReference>       
+      </page>
+   </extension>
+  <extension
+        point="org.eclipse.core.runtime.preferences">
+
+     <initializer
+           class="org.bonitasoft.studio.engine.preferences.EnginePreferencesInitializer">
+     </initializer>
+  </extension>
+  <extension
+        point="org.eclipse.ui.menus">
+     <menuContribution
+           allPopups="false"
+           locationURI="menu:org.eclipse.ui.main.menu?after=org.bonitasoft.studio.development">
+        <menu
+              id="org.bonitasoft.studio.menu.run"
+              label="%serverMenuLabel">
+           <command
+                 commandId="org.bonitasoft.studio.engine.runCommand"
+                 icon="icons/run.png"
+                 style="push">
+           </command>
+           <command
+                 commandId="org.bonitasoft.studio.application.openConsole"
+                 disabledIcon="icons/user_xp_disabled.png"
+                 icon="icons/user_xp.png"
+                 style="push">
+           </command>
+           <separator
+                 name="org.bonitasoft.studio.engine.separator1"
+                 visible="true">
+           </separator>
+           <command
+                 commandId="org.bonitasoft.studio.engine.exportAsBarCommand"
+                 disabledIcon="icons/export_disabled.png"
+                 icon="icons/export.png"
+                 style="push">
+           </command>
+           <separator
+                 name="org.bonitasoft.studio.engine.separator2"
+                 visible="true">
+           </separator>
+           <command
+                 commandId="org.bonitasoft.studio.engine.resetServerCommand"
+                 icon="icons/reset_server.png"
+                 style="push">
+           </command>
+           <visibleWhen
+                 checkEnabled="true">
+              <reference
+                    definitionId="isBonitaPerspectiveActive">
+              </reference>
+           </visibleWhen>
+        </menu>
+     </menuContribution>
+     <!--menuContribution
+           allPopups="false"
+           locationURI="popup:org.bonitasoft.studio.application.project.explorer?after=group.build">
+        <menu
+              icon="icons/export.png"
+              id="org.bonitasoft.studio.engine.buildDiagram"
+              label="%build">
+           <dynamic
+                 class="org.bonitasoft.studio.engine.ui.contributionItem.BuildProcessContributionItem"
+                 id="org.bonitasoft.studio.engine.buildContributionItem">
+           </dynamic>
+           <visibleWhen
+                  checkEnabled="false">
+               <with
+                     variable="activeMenuSelection">
+                  <and>
+                        <count
+                              value="1">
+                        </count>
+                        <iterate>
+                           <test
+                                 property="org.bonitasoft.studio.diagram.isDiagramFile">
+                           </test>
+                        </iterate>
+                     </and>
+               </with>
+            </visibleWhen>
+        </menu>
+     </menuContribution-->
+  </extension>
+  <extension
+        point="org.eclipse.ui.handlers">
+     <handler
+           class="org.bonitasoft.studio.engine.command.ExportAsBarFileHandler"
+           commandId="org.bonitasoft.studio.engine.exportAsBarCommand">
+     </handler>
+     <handler
+           class="org.bonitasoft.studio.engine.command.RunProcessCommand"
+           commandId="org.bonitasoft.studio.engine.runCommand">
+     </handler>
+  </extension>
+  <extension
+         id="org.bonitasoft.studio.engine.fragment"
+         point="org.eclipse.e4.workbench.model">
+      <fragment
+            uri="fragment.e4xmi">
+      </fragment>
+   </extension>
+  <extension
+        point="org.bonitasoft.studio.common.repository.projectListenerProvider">
+     <projectListenerProvider
+           class="org.bonitasoft.studio.engine.contribution.BonitaProjectListenerProvider">
+     </projectListenerProvider>
+  </extension>
+  <extension
+        point="org.eclipse.ui.keywords">
+     <keyword
+           id="org.bonitasoft.studio.preferences.keywordReference.server"
+           label="%serverKeywords">
+     </keyword>
+  </extension>
+  <extension
+        point="org.bonitasoft.studio.common.barResourcesProvider">
+     <barResourceProvider
+           providerClass="org.bonitasoft.studio.engine.contribution.AdditionalResourcesBARResourcesProvider">
+     </barResourceProvider>
+  </extension>
+</plugin>
diff --git a/bundles.plugins.engine.src.org.bonitasoft.studio.engine.BOSEngineManager.java b/bundles.plugins.engine.src.org.bonitasoft.studio.engine.BOSEngineManager.java
new file mode 100644 (file)
index 0000000..6bbc649
--- /dev/null
@@ -0,0 +1,446 @@
+/**
+ * Copyright (C) 2012-2015 Bonitasoft S.A.
+ * Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2.0 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.bonitasoft.studio.engine;
+
+import static java.util.Objects.requireNonNull;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.bonitasoft.engine.api.ApplicationAPI;
+import org.bonitasoft.engine.api.CommandAPI;
+import org.bonitasoft.engine.api.IdentityAPI;
+import org.bonitasoft.engine.api.LoginAPI;
+import org.bonitasoft.engine.api.PageAPI;
+import org.bonitasoft.engine.api.PlatformAPI;
+import org.bonitasoft.engine.api.PlatformAPIAccessor;
+import org.bonitasoft.engine.api.ProcessAPI;
+import org.bonitasoft.engine.api.ProfileAPI;
+import org.bonitasoft.engine.api.TenantAPIAccessor;
+import org.bonitasoft.engine.api.TenantAdministrationAPI;
+import org.bonitasoft.engine.exception.BonitaHomeNotSetException;
+import org.bonitasoft.engine.exception.ServerAPIException;
+import org.bonitasoft.engine.exception.UnknownAPITypeException;
+import org.bonitasoft.engine.exception.UpdateException;
+import org.bonitasoft.engine.platform.LoginException;
+import org.bonitasoft.engine.platform.PlatformLoginException;
+import org.bonitasoft.engine.platform.PlatformLogoutException;
+import org.bonitasoft.engine.session.APISession;
+import org.bonitasoft.engine.session.PlatformSession;
+import org.bonitasoft.engine.session.SessionNotFoundException;
+import org.bonitasoft.studio.common.CommandExecutor;
+import org.bonitasoft.studio.common.extension.BonitaStudioExtensionRegistryManager;
+import org.bonitasoft.studio.common.log.BonitaStudioLog;
+import org.bonitasoft.studio.common.repository.AbstractRepository;
+import org.bonitasoft.studio.common.repository.RepositoryManager;
+import org.bonitasoft.studio.common.repository.extension.IEngineAction;
+import org.bonitasoft.studio.common.repository.model.IRepository;
+import org.bonitasoft.studio.engine.export.BarExporter;
+import org.bonitasoft.studio.engine.i18n.Messages;
+import org.bonitasoft.studio.engine.preferences.EnginePreferenceConstants;
+import org.bonitasoft.studio.model.configuration.Configuration;
+import org.bonitasoft.studio.model.process.AbstractProcess;
+import org.bonitasoft.studio.preferences.dialog.BonitaPreferenceDialog;
+import org.bonitasoft.studio.ui.notification.BonitaNotificator;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @author Romain Bioteau
+ */
+public class BOSEngineManager {
+
+    public static final String CUSTOM_PERMISSIONS_MAPPING_PROPERTIES = "custom-permissions-mapping.properties";
+
+    public static final String CONSOLE_CONFIG_PROPERTIES = "console-config.properties";
+
+    private static final String POSTSTARTUP_CONTIBUTION_ID = "org.bonitasoft.studio.engine.postEngineAction";
+
+    public static final String PLATFORM_PASSWORD = "platform";
+
+    public static final String PLATFORM_USER = "platformAdmin";
+
+    public static final String BONITA_TECHNICAL_USER = "install";
+
+    public static final String BONITA_TECHNICAL_USER_PASSWORD = "install";
+
+    public static final String API_TYPE_PROPERTY_NAME = "org.bonitasoft.engine.api-type";
+
+    public static final String DEFAULT_TENANT_NAME = "default";
+
+    public static final String DEFAULT_TENANT_DESC = "The default tenant created by the Studio";
+
+    private static final String ENGINESERVERMANAGER_EXTENSION_D = "org.bonitasoft.studio.engine.bonitaEngineManager";
+
+    private static final long DEFAULT_TENANT_ID = 1;
+
+    public static final String SECURITY_CONFIG_PROPERTIES = "security-config.properties";
+
+    private static final String FIND_USER_PASSWORD_COMMAND = "org.bonitasoft.studio.actors.command.userPassword";
+
+    private static BOSEngineManager INSTANCE;
+
+    private boolean isRunning = false;
+
+    private IProgressMonitor monitor;
+
+    private CommandExecutor commandExecutor = new CommandExecutor();
+
+    protected BOSEngineManager(final IProgressMonitor monitor) {
+        if (monitor == null) {
+            this.monitor = AbstractRepository.NULL_PROGRESS_MONITOR;
+        } else {
+            this.monitor = monitor;
+        }
+    }
+
+    public static BOSEngineManager getInstance() {
+        return getInstance(null);
+    }
+
+    public static synchronized BOSEngineManager getInstance(final IProgressMonitor monitor) {
+        if (INSTANCE == null) {
+            INSTANCE = createInstance(monitor);
+        }
+        return INSTANCE;
+    }
+
+    protected static BOSEngineManager createInstance(final IProgressMonitor monitor) {
+        for (final IConfigurationElement element : BonitaStudioExtensionRegistryManager.getInstance()
+                .getConfigurationElements(ENGINESERVERMANAGER_EXTENSION_D)) {
+            try {
+                return (BOSEngineManager) element.createExecutableExtension("class");
+            } catch (final CoreException e) {
+                BonitaStudioLog.error(e, EnginePlugin.PLUGIN_ID);
+            }
+        }
+
+        return new BOSEngineManager(monitor);
+    }
+
+    public synchronized void start(AbstractRepository repository) {
+        if (!isRunning() || !BOSWebServerManager.getInstance().serverIsStarted()) {
+//            boolean notifying = notifyStartServer();
+//            monitor.beginTask(Messages.initializingProcessEngine, IProgressMonitor.UNKNOWN);
+//            BOSWebServerManager.getInstance().startServer(repository, monitor);
+//            isRunning = postEngineStart(repository);
+//            if (notifying) {
+//                notifyServerStarted();
+//            }
+        }
+    }
+
+    private boolean notifyStartServer() {
+        if (EngineNotificationSemaphore.getInstance().tryAcquire()) {
+            if (!isLazyModeEnabled(EnginePlugin.getDefault().getPreferenceStore())) {
+                BonitaNotificator.openNotification(Messages.startServerNotificationTitle,
+                        Messages.engineLazyModeNotificationLink, e -> {
+                            BonitaPreferenceDialog dialog = new BonitaPreferenceDialog(new Shell(Display.getDefault()));
+                            dialog.create();
+                            dialog.setSelectedPreferencePage(BonitaPreferenceDialog.SERVER_SETTINGS_PAGE_ID);
+                            dialog.open();
+                        });
+            }
+            return true;
+        }
+        return false;
+    }
+
+    private boolean isLazyModeEnabled(IPreferenceStore preferenceStore) {
+        return preferenceStore.getBoolean(EnginePreferenceConstants.LAZYLOAD_ENGINE)
+                || System.getProperty(EnginePreferenceConstants.LAZYLOAD_ENGINE) != null;
+    }
+
+    public synchronized void start() {
+        start(RepositoryManager.getInstance().getCurrentRepository());
+    }
+
+    protected boolean postEngineStart(IRepository repository) {
+        //RESUME ENGINE IF PAUSED AT STARTUP
+        try {
+            final APISession apiSession = getLoginAPI().login(BONITA_TECHNICAL_USER, BONITA_TECHNICAL_USER_PASSWORD);
+            final TenantAdministrationAPI tenantManagementAPI = getTenantAdministrationAPI(apiSession);
+            if (tenantManagementAPI.isPaused()) {
+                tenantManagementAPI.resume();
+            }
+            executePostStartupContributions(repository);
+        } catch (final Exception e) {
+            return handlePostEngineStartException(e);
+        }
+        return true;
+    }
+
+    private void notifyServerStarted() {
+        BonitaNotificator.openNotification(Messages.startServerCompletedNotificationTitle,
+                Messages.serverRunningNotificationMessage);
+        EngineNotificationSemaphore.getInstance().release();
+    }
+
+    private boolean handlePostEngineStartException(final Exception e) {
+        if (tomcatServerIsRunning()) {
+            BonitaStudioLog.error(e);
+        } else {
+            BonitaStudioLog.warning("Tomcat server has been shutdown before first start ended.", EnginePlugin.PLUGIN_ID);
+        }
+        return false;
+    }
+
+    protected boolean tomcatServerIsRunning() {
+        return BOSWebServerManager.getInstance().serverIsStarted();
+    }
+
+    public synchronized void stop() {
+        APISession session = null;
+        TenantAdministrationAPI tenantManagementAPI = null;
+        try {
+            session = loginDefaultTenant(null);
+            tenantManagementAPI = getTenantAdministrationAPI(session);
+            tenantManagementAPI.pause();
+            if (dropBusinessDataDBOnExit()) {
+                tenantManagementAPI.cleanAndUninstallBusinessDataModel();
+            } else {
+                tenantManagementAPI.uninstallBusinessDataModel();
+            }
+            tenantManagementAPI.resume();
+        } catch (final Exception e) {
+            BonitaStudioLog.error(e);
+        } finally {
+            if (tenantManagementAPI != null && tenantManagementAPI.isPaused()) {
+                try {
+                    tenantManagementAPI.resume();
+                } catch (final UpdateException e) {
+                    BonitaStudioLog.error(e);
+                }
+            }
+            if (session != null) {
+                logoutDefaultTenant(session);
+            }
+        }
+        if (BOSWebServerManager.getInstance().serverIsStarted()) {
+            BOSWebServerManager.getInstance().stopServer(monitor);
+        }
+        isRunning = false;
+        try {
+            BOSWebServerManager.getInstance().cleanBeforeShutdown();
+        } catch (final IOException e) {
+            BonitaStudioLog.error(e);
+        }
+    }
+
+    private boolean dropBusinessDataDBOnExit() {
+        final IPreferenceStore preferenceStore = EnginePlugin.getDefault().getPreferenceStore();
+        return preferenceStore.getBoolean(EnginePreferenceConstants.DROP_BUSINESS_DATA_DB_ON_EXIT_PREF);
+    }
+
+    protected void executePostStartupContributions(IRepository repository) throws Exception {
+        final IConfigurationElement[] elements = BonitaStudioExtensionRegistryManager.getInstance()
+                .getConfigurationElements(POSTSTARTUP_CONTIBUTION_ID);
+        IEngineAction contrib = null;
+        for (final IConfigurationElement elem : elements) {
+            try {
+                contrib = (IEngineAction) elem.createExecutableExtension("class"); //$NON-NLS-1$
+            } catch (final CoreException e) {
+                BonitaStudioLog.error(e);
+            }
+            if (contrib != null && contrib.shouldRun(repository)) {
+                final APISession session = getLoginAPI().login(BONITA_TECHNICAL_USER, BONITA_TECHNICAL_USER_PASSWORD);
+                try {
+                    contrib.run(session,repository);
+                } finally {
+                    if (session != null) {
+                        logoutDefaultTenant(session);
+                    }
+                }
+            }
+        }
+
+    }
+
+    public boolean isRunning() {
+        return isRunning;
+    }
+
+    public ProcessAPI getProcessAPI(final APISession session) {
+        try {
+            return TenantAPIAccessor.getProcessAPI(session);
+        } catch (final Exception e) {
+            BonitaStudioLog.error(e);
+        }
+        return null;
+    }
+
+    protected LoginAPI getLoginAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        return TenantAPIAccessor.getLoginAPI();
+    }
+
+    public APISession loginDefaultTenant(final IProgressMonitor monitor)
+            throws LoginException, BonitaHomeNotSetException, ServerAPIException,
+            UnknownAPITypeException {
+        return loginTenant(BONITA_TECHNICAL_USER, BONITA_TECHNICAL_USER_PASSWORD, monitor);
+    }
+
+    public APISession loginTenant(final String login, final String password, final IProgressMonitor monitor)
+            throws LoginException,
+            BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        if (!isRunning() && monitor != null) {
+            monitor.beginTask(Messages.waitingForEngineToStart, IProgressMonitor.UNKNOWN);
+        }
+        start();
+        BonitaStudioLog.debug("Attempt to login as " + login, EnginePlugin.PLUGIN_ID);
+        final APISession session = getLoginAPI().login(requireNonNull(login), requireNonNull(password));
+        if (session != null) {
+            BonitaStudioLog.debug("Login successful.", EnginePlugin.PLUGIN_ID);
+        }
+        return session;
+    }
+
+    public void logoutDefaultTenant(final APISession session) {
+        try {
+            getLoginAPI().logout(session);
+        } catch (final Exception e) {
+            BonitaStudioLog.error(e);
+        }
+    }
+
+    public IdentityAPI getIdentityAPI(final APISession session)
+            throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        return TenantAPIAccessor.getIdentityAPI(session);
+    }
+
+    public CommandAPI getCommandAPI(final APISession session)
+            throws BonitaHomeNotSetException, ServerAPIException,
+            UnknownAPITypeException {
+        return TenantAPIAccessor.getCommandAPI(session);
+    }
+
+    public ProfileAPI getProfileAPI(final APISession session)
+            throws BonitaHomeNotSetException, ServerAPIException,
+            UnknownAPITypeException {
+        return TenantAPIAccessor.getProfileAPI(session);
+    }
+
+    public PageAPI getPageAPI(final APISession session)
+            throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        return TenantAPIAccessor.getCustomPageAPI(session);
+    }
+
+    public ApplicationAPI getApplicationAPI(final APISession session)
+            throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        return TenantAPIAccessor.getLivingApplicationAPI(session);
+    }
+
+    public TenantAdministrationAPI getTenantAdministrationAPI(final APISession session)
+            throws BonitaHomeNotSetException,
+            ServerAPIException, UnknownAPITypeException {
+        return TenantAPIAccessor.getTenantAdministrationAPI(session);
+    }
+
+    public PlatformSession loginPlatform(IProgressMonitor monitor)
+            throws PlatformLoginException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        if (!isRunning() && monitor != null) {
+            monitor.beginTask(Messages.waitingForEngineToStart, IProgressMonitor.UNKNOWN);
+        }
+        start();
+        return PlatformAPIAccessor.getPlatformLoginAPI().login(PLATFORM_USER, PLATFORM_PASSWORD);
+    }
+
+    public void logoutPlatform(PlatformSession session)
+            throws PlatformLogoutException, SessionNotFoundException, BonitaHomeNotSetException, ServerAPIException,
+            UnknownAPITypeException {
+        PlatformAPIAccessor.getPlatformLoginAPI().logout(session);
+    }
+
+    public PlatformAPI getPlatformAPI(PlatformSession session)
+            throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {
+        return PlatformAPIAccessor.getPlatformAPI(session);
+    }
+
+    public APISession createSession(final AbstractProcess process, final String configurationId,
+            final IProgressMonitor monitor) throws Exception {
+        final Configuration configuration = BarExporter.getInstance().getConfiguration(process, configurationId);
+        APISession session;
+        String username = configuration.getUsername();
+        String password = retrieveUserPasswordFromActiveOrga(username)
+                .orElseThrow(() -> new Exception(
+                        String.format("Unable to retrieve the password of %s in the active organization.",
+                                username)));
+        try {
+            session = BOSEngineManager.getInstance().loginTenant(username, password,
+                    monitor);
+        } catch (final Exception e1) {
+            throw new Exception(Messages.bind(Messages.loginFailed,
+                    new String[] { username, process.getName(),
+                            process.getVersion() }),
+                    e1);
+        }
+        if (session == null) {
+            throw new Exception(Messages.bind(Messages.loginFailed,
+                    new String[] { username, process.getName(),
+                            process.getVersion() }));
+        }
+        return session;
+    }
+
+    private Optional<String> retrieveUserPasswordFromActiveOrga(String user) {
+        Map<String, Object> parameters = new HashMap<>();
+        parameters.put("userName", user);
+        Object result = commandExecutor.executeCommand(FIND_USER_PASSWORD_COMMAND, parameters);
+        return result instanceof Optional ? (Optional<String>) result : Optional.empty();
+    }
+
+    public byte[] getTenantConfigResourceContent(String resourceName, IProgressMonitor monitor)
+            throws PlatformLoginException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException,
+            PlatformLogoutException, SessionNotFoundException, FileNotFoundException {
+        PlatformSession loginPlatform = null;
+        try {
+            loginPlatform = loginPlatform(monitor);
+            final PlatformAPI platformAPI = getPlatformAPI(loginPlatform);
+            final Map<Long, Map<String, byte[]>> clientTenantConfigurations = platformAPI.getClientTenantConfigurations();
+            final Map<String, byte[]> resources = clientTenantConfigurations.get(DEFAULT_TENANT_ID);
+            if (!resources.containsKey(resourceName)) {
+                throw new FileNotFoundException(String.format("Resource %s does not exist in database.", resourceName));
+            }
+            return resources.get(resourceName);
+        } finally {
+            if (loginPlatform != null) {
+                logoutPlatform(loginPlatform);
+            }
+        }
+    }
+
+    public void updateTenantConfigResourceContent(String resourceName, byte[] content)
+            throws PlatformLoginException, BonitaHomeNotSetException,
+            ServerAPIException, UnknownAPITypeException,
+            UpdateException, PlatformLogoutException, SessionNotFoundException {
+        PlatformSession loginPlatform = null;
+        try {
+            loginPlatform = loginPlatform(null);
+            final PlatformAPI platformAPI = getPlatformAPI(loginPlatform);
+            platformAPI.updateClientTenantConfigurationFile(DEFAULT_TENANT_ID, resourceName, content);
+        } finally {
+            if (loginPlatform != null) {
+                logoutPlatform(loginPlatform);
+            }
+        }
+    }
+
+}
diff --git a/bundles.plugins.intro.content.introContent.xml b/bundles.plugins.intro.content.introContent.xml
new file mode 100644 (file)
index 0000000..71cafc4
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<introContent>
+    <page id="root" content="welcome.html"/>
+    <!--    <page id="eXchange" url="http://www.bonitasoft.org/exchange/index.php?browser=studio"/>-->
+</introContent>
diff --git a/bundles.plugins.intro.content.welcome.html b/bundles.plugins.intro.content.welcome.html
new file mode 100644 (file)
index 0000000..c8631cf
--- /dev/null
@@ -0,0 +1,151 @@
+<!DOCTYPE html
+       PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
+       dir="ltr">
+
+<head>
+<title>Welcome</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
+<link href="css/tailwind-1.1.2.min.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body class="background">
+       <div class="container mx-auto">
+               <div class="flex items-stretch content-center flex-wrap h-screen">
+                       <div class="w-1/3 p-4">
+                               <div
+                                       class="max-w-sm mx-auto p-6 bg-box rounded-lg shadow-lg h-full text-color">
+                                       <contentProvider id="design-icon"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <contentProvider id="design-title"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <ul class="text-color">
+                                               <li><contentProvider id="new-project-action"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                        <li><contentProvider id="switch-action"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                        <li><contentProvider id="import-action"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                        <li><contentProvider id="clone-action"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                       </ul>
+                               </div>
+                       </div>
+                       <div class="w-1/3 p-4">
+                               <div
+                                       class="max-w-sm mx-auto p-6 bg-box rounded-lg shadow-lg h-full text-color">
+                                       <contentProvider id="recent-icon"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <contentProvider id="recent-title"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <contentProvider id="recent-files"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                               </div>
+                       </div>
+<!--                   <div class="w-1/3 p-4 self-center">
+                               <contentProvider id="community-logo"
+                                       pluginId="org.bonitasoft.studio.intro"
+                                       class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+</div>-->
+                       <div class="w-1/3 p-4">
+                               <div
+                                       class="max-w-sm mx-auto p-6 bg-box rounded-lg shadow-lg h-full text-color">
+                                       <contentProvider id="learn-icon"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <contentProvider id="learn-title"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <ul>
+                                               <li><contentProvider id="documentation-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="release-notes-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="getting-started-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="camp-video-series-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="videos-podcasts-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="training-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="blog-link"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                       </ul>
+                               </div>
+                       </div>
+                       <div class="w-1/3 p-4">
+                               <div
+                                       class="max-w-sm mx-auto p-6 bg-box rounded-lg shadow-lg h-full text-color">
+                                       <contentProvider id="help-icon"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <contentProvider id="help-title"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <ul>
+                                               <li><contentProvider id="forum-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="report-issue-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="feedback-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                       </ul>
+                               </div>
+                       </div>
+                       <div class="w-1/3 p-4">
+                               <div
+                                       class="max-w-sm mx-auto p-6 bg-box rounded-lg shadow-lg h-full text-color">
+                                       <contentProvider id="resources-icon"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <contentProvider id="resources-title"
+                                               pluginId="org.bonitasoft.studio.intro"
+                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" />
+                                       <ul>
+                                          <li><contentProvider id="getting-started-bos-link"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                          <li><contentProvider id="user-application-link"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="admin-application-link"
+                                pluginId="org.bonitasoft.studio.intro"
+                                class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="procurement-example-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="expense-report-example-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                               <li><contentProvider id="community-contribution-link"
+                                                               pluginId="org.bonitasoft.studio.intro"
+                                                               class="org.bonitasoft.studio.intro.content.IntroContentProvider" /></li>
+                                       </ul>
+                               </div>
+                       </div>
+               </div>
+       </div>
+</body>
+
+</html>
diff --git a/bundles.plugins.intro.plugin.properties b/bundles.plugins.intro.plugin.properties
new file mode 100644 (file)
index 0000000..1c6ee78
--- /dev/null
@@ -0,0 +1 @@
+openWelcomePage_label=Welcome to Japan Digital Studio
diff --git a/bundles.plugins.intro.plugin.xml b/bundles.plugins.intro.plugin.xml
new file mode 100644 (file)
index 0000000..a30d19d
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.intro">
+      <intro
+            class="org.eclipse.ui.intro.config.CustomizableIntroPart"
+            icon="icons/jds-icon-16-16-transparent.png"
+            id="org.bonitasoft.studio.application.intro"
+            label="%openWelcomePage_label">
+      </intro>
+      <introProductBinding
+            introId="org.bonitasoft.studio.application.intro"
+            productId="org.bonitasoft.studio.product">
+      </introProductBinding>
+   </extension>
+   <extension
+         point="org.eclipse.ui.intro.config">
+      <config
+            configurer="org.bonitasoft.studio.intro.configurer.BontaIntroConfigurer"
+            content="content/introContent.xml"
+            id="org.bonitasoft.studio.application.configId"
+            introId="org.bonitasoft.studio.application.intro">
+         <presentation
+               home-page-id="root">
+            <implementation
+                  kind="html"
+                  os="win32,linux,macosx"
+                  style="$theme$">
+            </implementation>
+         </presentation>
+      </config>
+   </extension>
+
+</plugin>
diff --git a/bundles.plugins.pom.xml b/bundles.plugins.pom.xml
new file mode 100644 (file)
index 0000000..853fcf3
--- /dev/null
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.bonitasoft.studio</groupId>
+        <artifactId>bundles</artifactId>
+        <version>7.13.0</version>
+    </parent>
+    <name>Bonita Studio Community Plugins</name>
+    <groupId>org.bonitasoft.studio.bundles</groupId>
+    <artifactId>plugins</artifactId>
+    <packaging>pom</packaging>
+
+
+    <modules>
+       <module>bonita-business-data-generator</module>
+       <module>bonita-studio-watchdog</module>
+        <module>org.bonitasoft.studio-models</module>
+       <module>org.bonitasoft.studio.application</module>
+       <module>org.bonitasoft.studio.console.libs</module>
+        <module>org.bonitasoft.studio.model</module>
+        <module>org.bonitasoft.studio.model.edit</module>
+       <module>org.bonitasoft.studio.tests-utils</module>
+        <module>org.bonitasoft.studio.diagram</module>
+        <module>org.bonitasoft.studio.businessobject</module>
+        <module>org.bonitasoft.studio.common</module>
+        <module>org.bonitasoft.studio.common.diagram</module>
+        <module>org.bonitasoft.studio.common.repository</module>
+        <module>org.bonitasoft.studio.contract</module>
+       <module>org.bonitasoft.studio.configuration</module>
+       <!--<module>org.bonitasoft.studio.connector.wizard.office</module>
+        <module>org.bonitasoft.studio.connector.wizard.sapjco3</module>
+        <module>org.bonitasoft.studio.connector.wizard.sforce</module>
+       <module>org.bonitasoft.studio.connector.wizard.uipath</module>-->
+        <module>org.bonitasoft.studio.connectors</module>
+        <module>org.bonitasoft.studio.connectors.model</module>
+       <module>org.bonitasoft.studio.connectors.model.edit</module>
+        <module>org.bonitasoft.studio.data</module>
+        <module>org.bonitasoft.studio.datatools</module>
+        <module>org.bonitasoft.studio.decision.table</module>
+        <module>org.bonitasoft.studio.dependencies</module>
+        <module>org.bonitasoft.studio.designer</module>
+        <module>org.bonitasoft.studio.designer.linux</module>
+        <module>org.bonitasoft.studio.designer.macosx</module>
+        <module>org.bonitasoft.studio.designer.war</module>
+        <module>org.bonitasoft.studio.designer.win32</module>
+        <module>org.bonitasoft.studio.diagram.custom</module>
+        <module>org.bonitasoft.studio.document</module>
+        <module>org.bonitasoft.studio.engine</module>
+        <module>org.bonitasoft.studio.exporter</module>
+        <module>org.bonitasoft.studio.expression.editor</module>
+        <module>org.bonitasoft.studio.groovy</module>
+        <module>org.bonitasoft.studio.groovy.ui</module>
+        <module>org.bonitasoft.studio.identity</module>
+        <module>org.bonitasoft.studio.importer</module>
+        <module>org.bonitasoft.studio.importer.bos</module>
+        <module>org.bonitasoft.studio.intro</module>
+        <module>org.bonitasoft.studio.la</module>
+        <module>org.bonitasoft.studio.migration</module>
+        <module>org.bonitasoft.studio.model.edit.custom</module>
+        <module>org.bonitasoft.studio.refactoring</module>
+        <module>org.bonitasoft.studio.parameters</module>
+        <module>org.bonitasoft.studio.pics</module>
+        <module>org.bonitasoft.studio.pics.bonitasoft</module>
+        <module>org.bonitasoft.studio.preferences</module>
+        <module>org.bonitasoft.studio.properties</module>
+        <module>org.bonitasoft.studio.rest.api.extension</module>
+        <module>org.bonitasoft.studio.sap.dependency</module>
+        <module>org.bonitasoft.studio.sap.mock</module>
+        <module>org.bonitasoft.studio.scripting</module>
+        <module>org.bonitasoft.studio.sqlbuilder.ex</module>
+        <module>org.bonitasoft.studio.team</module>
+        <module>org.bonitasoft.studio.team.git</module>
+        <module>org.bonitasoft.studio.ui</module>
+        <module>org.bonitasoft.studio.validation</module>
+        <module>org.bonitasoft.studio.validation.common</module>
+        <module>org.bonitasoft.studio.xml</module>
+        <module>org.omg.schema.spec.bpmn</module>
+        <module>org.bonitasoft.studio-product</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testSourceDirectory>src-test/java</testSourceDirectory>
+        <testResources>
+            <testResource>
+                <directory>src-test/resources</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-test</id>
+                        <phase>test</phase>
+                        <configuration>
+                            <systemProperties>
+                                <osgi.nls.warnings>ignore</osgi.nls.warnings>
+                            </systemProperties>
+                            <includes>
+                                <include>**/*Test.java</include>
+                            </includes>
+                        </configuration>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-testCompile</id>
+                        <phase>test-compile</phase>
+                        <goals>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>local-repository</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>org.bonitasoft.studio.local.repository</module>
+            </modules>
+        </profile>
+    </profiles>
+
+</project>
diff --git a/bundles.plugins.studio-product.plugin.xml b/bundles.plugins.studio-product.plugin.xml
new file mode 100644 (file)
index 0000000..a647b3e
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+  <extension
+         id="product"
+         name="Japan Digital Studio"
+         point="org.eclipse.core.runtime.products">
+      <product
+            application="org.bonitasoft.studio.application.application"
+            name="Japan Digital Studio">
+            <property
+                  name="windowImages"
+                  value="icons/jds-icon-16-16-transparent.png,icons/jds-icon-32-32-transparent.png,icons/jds-icon-48-48-transparent.png,icons/jds-icon-64-64-transparent.png,icons/jds-icon-128-128-transparent.png">
+            </property>
+               <property
+               name="appName"
+               value="Japan Digital Studio">
+         </property>
+         <property
+               name="aboutText"
+               value="Japan Digital Studio&#x0A;Build : XXX_BONITA_PRODUCT_VERSION_XXX&#x0A;&#x0A;This software is licensed under GPL v2.">
+         </property>
+          <property
+               name="aboutImage"
+               value="about.bmp">
+         </property>
+         <property
+               name="startupProgressRect"
+               value="0,286,600,14">
+         </property>
+         <property
+               name="preferenceCustomization"
+               value="plugin_customization.ini">
+         </property>
+         <property
+               name="startupForegroundColor"
+               value="00FF00">
+         </property>
+         <property
+               name="startupMessageRect"
+               value="0,0,0,0">
+         </property>
+         <property
+               name="applicationXMI"
+               value="org.bonitasoft.studio.application/LegacyIDE.e4xmi">
+         </property>
+         <property
+               name="lifeCycleURI"
+               value="bundleclass://org.bonitasoft.studio.application/org.bonitasoft.studio.application.LifeCycleManager">
+         </property>
+         
+      </product>
+   </extension> 
+
+<!-- =================================================================================== -->
+<!-- Themes                                                                                                                     -->
+<!-- =================================================================================== -->
+
+</plugin>
diff --git a/console.libs.build.properties b/console.libs.build.properties
new file mode 100644 (file)
index 0000000..161fa3b
--- /dev/null
@@ -0,0 +1,4 @@
+bin.includes = META-INF/,\
+               .,\
+               lib/\
+              
diff --git a/console.libs.pom.xml b/console.libs.pom.xml
new file mode 100644 (file)
index 0000000..5c0342f
--- /dev/null
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+       xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.bonitasoft.studio.bundles</groupId>
+               <artifactId>plugins</artifactId>
+               <version>7.13.0</version>
+       </parent>
+       <groupId>org.bonitasoft.studio.bundles.plugins</groupId>
+       <artifactId>org.bonitasoft.studio.console.libs</artifactId>
+       <packaging>eclipse-plugin</packaging>
+
+       <properties>
+               <tomcat.bundle.dir>${basedir}/tomcat</tomcat.bundle.dir>
+               <lib.dir>lib</lib.dir>
+    </properties>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.bonitasoft.engine</groupId>
+                       <artifactId>bonita-client</artifactId>
+                       <version>${engine.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>javax.xml.bind</groupId>
+                                       <artifactId>jsr173_api</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.bonitasoft.engine</groupId>
+                       <artifactId>bonita-common</artifactId>
+                       <version>${engine.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>javax.xml.bind</groupId>
+                                       <artifactId>jsr173_api</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+       </dependencies>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>build-helper-maven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>parse-version</id>
+                                               <goals>
+                                                       <goal>parse-version</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>regex-property</id>
+                                               <goals>
+                                                       <goal>regex-property</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <name>osgiVersion</name>
+                                                       <value>${parsedVersion.osgiVersion}</value>
+                                                       <regex>.SNAPSHOT</regex>
+                                                       <replacement>.qualifier</replacement>
+                                                       <failIfNoMatch>false</failIfNoMatch>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <executions>
+                                       <!--<execution>
+                                               <id>Retrieve BOS Tomcat Bundle</id>
+                                               <phase>generate-resources</phase>
+                                               <goals>
+                                                       <goal>unpack</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <artifactItems>
+                                                               <artifactItem>
+                                                                       <groupId>org.bonitasoft.distrib</groupId>
+                                                                       <artifactId>bundle-tomcat</artifactId>
+                                                                       <version>${bundle.version}</version>
+                                                                       <type>zip</type>
+                                                               </artifactItem>
+                                                       </artifactItems>
+                                                       <outputDirectory>${tomcat.bundle.dir}</outputDirectory>
+                                                       <overWriteReleases>true</overWriteReleases>
+                                                       <overWriteSnapshots>true</overWriteSnapshots>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>Retrieve Studio specific war</id>
+                                               <phase>generate-resources</phase>
+                                               <goals>
+                                                       <goal>copy</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <artifactItems>
+                                                               <artifactItem>
+                                                                       <groupId>org.bonitasoft.web.tooling</groupId>
+                                                                       <artifactId>studio-watchdog</artifactId>
+                                                                       <version>${project.version}</version>
+                                                                       <type>war</type>
+                                                               </artifactItem>
+                                                       </artifactItems>
+                                                       <outputDirectory>${tomcat.bundle.dir}/server/webapps</outputDirectory>
+                                                       <overWriteReleases>true</overWriteReleases>
+                                                       <overWriteSnapshots>true</overWriteSnapshots>
+                                               </configuration>
+                                       </execution>-->
+                                       <execution>
+                                               <id>Retrieve bonita-client dependencies</id>
+                                               <phase>process-sources</phase>
+                                               <goals>
+                                                       <goal>copy-dependencies</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <stripVersion>true</stripVersion>
+                                                       <stripClassifier>true</stripClassifier>
+                                                       <outputDirectory>${lib.dir}</outputDirectory>
+                                                       <overWriteReleases>true</overWriteReleases>
+                                                       <overWriteSnapshots>true</overWriteSnapshots>
+                                                       <overWriteIfNewer>true</overWriteIfNewer>
+                                                       <includeScope>runtime</includeScope>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-clean-plugin</artifactId>
+                               <configuration>
+                                       <filesets>
+                                               <fileset>
+                                                       <directory>${lib.dir}</directory>
+                                               </fileset>
+                                               <!--<fileset>
+                                                       <directory>${tomcat.bundle.dir}</directory>
+                                               </fileset>-->
+                                       </filesets>
+                               </configuration>
+                       </plugin>
+                       <!--                    <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-antrun-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>Resources generation add-on</id>
+                                               <phase>generate-resources</phase>
+                                               <configuration>
+                                                       <target>
+                                                               
+                                                               <move todir="${tomcat.bundle.dir}">
+                                                                       <fileset
+                                                                               dir="${tomcat.bundle.dir}/BonitaCommunity-${branding.version}/" />
+                                                               </move>
+                                                               <concat append="true"
+                                                                       destfile="${tomcat.bundle.dir}/server/conf/catalina.properties">java.awt.headless=true</concat>
+                                                               <delete
+                                                                       dir="${tomcat.bundle.dir}/server/webapps/examples" />
+                                                       </target>
+                                               </configuration>
+                                               <goals>
+                                                       <goal>run</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>-->
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <extensions>true</extensions>
+                               <configuration>
+                                       <manifestLocation>META-INF/</manifestLocation>
+                                       <supportedProjectTypes>
+                                               <supportedProjectType>eclipse-plugin</supportedProjectType>
+                                       </supportedProjectTypes>
+                                       <instructions>
+                                               <_removeheaders>
+                                                       Bnd-LastModified,
+                                                       Build-Jdk,
+                                                       Built-By,
+                                                       Tool,
+                                                       Include-Resource,
+                                                       Private-Package,
+                                                       Embedded-Artifacts,
+                                                       Embed-Transitive,
+                                                       Embed-StripVersion,
+                                                       Embed-Directory,
+                                                       Embed-Dependency,
+                                                       Created-By
+                                               </_removeheaders>
+                                               <_exportcontents>
+                                                       !org.bonitasoft.engine.*.impl.db;version="0.0.0",
+                                                       !org.bonitasoft.engine.*.impl.db.archive;version="0.0.0",
+                                                       org.bonitasoft.engine.*;version="0.0.0",
+                                                       javax.xml.bind.*;version="2.2.0"
+                                               </_exportcontents>
+                                               <_nouses>true</_nouses>
+                                               <_noee>true</_noee>
+                                               <Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
+                                               <Automatic-Module-Name>${project.artifactId}</Automatic-Module-Name>
+                                               <Bundle-Name>Bonita Community Tomcat Bundle</Bundle-Name>
+                                               <Bundle-Vendor>Bonitasoft S.A.</Bundle-Vendor>
+                                               <Bundle-Version>${osgiVersion}</Bundle-Version>
+                                               <Bundle-RequiredExecutionEnvironment>JavaSE-11</Bundle-RequiredExecutionEnvironment>
+                                               <Embed-Transitive>true</Embed-Transitive>
+                                               <Embed-Directory>${lib.dir}</Embed-Directory>
+                                               <Embed-StripVersion>true</Embed-StripVersion>
+                                               <Eclipse-BundleShape>dir</Eclipse-BundleShape>
+                                               <Include-Resource>
+                                                       {maven-resources}, {maven-dependencies}<!--,
+                                                       tomcat=tomcat-->
+                                               </Include-Resource>
+                                               <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
+                                               <Import-Package>!*</Import-Package>
+                                               <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
+                                               <Require-Bundle>javax.activation;bundle-version="1.1.0"</Require-Bundle>
+                                       </instructions>
+                                       <niceManifest>true</niceManifest>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>Generate bundle MANIFEST.MF</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>manifest</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <!--<plugin>
+                               <groupId>org.codehaus.gmaven</groupId>
+                               <artifactId>groovy-maven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>configure-bundle</id>
+                                               <phase>prepare-package</phase>
+                                               <goals>
+                                                       <goal>execute</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <source>${project.basedir}/src/script/configure-bundle.groovy</source>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>-->
+               </plugins>
+       </build>
+
+</project>
diff --git a/jds.ico b/jds.ico
new file mode 100644 (file)
index 0000000..ddbf4be
Binary files /dev/null and b/jds.ico differ
diff --git a/jdsicons.zip b/jdsicons.zip
new file mode 100644 (file)
index 0000000..d37194f
Binary files /dev/null and b/jdsicons.zip differ
diff --git a/splash.bmp b/splash.bmp
new file mode 100644 (file)
index 0000000..8520fad
Binary files /dev/null and b/splash.bmp differ
diff --git a/splash.png b/splash.png
new file mode 100644 (file)
index 0000000..7e576e6
Binary files /dev/null and b/splash.png differ
diff --git a/studio-product.pom.xml b/studio-product.pom.xml
new file mode 100644 (file)
index 0000000..b6814b2
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.bonitasoft.studio.bundles</groupId>
+        <artifactId>plugins</artifactId>
+        <version>7.13.0</version>
+    </parent>
+
+    <groupId>org.bonitasoft.studio.bundles.plugins</groupId>
+    <artifactId>org.bonitasoft.studio</artifactId>
+    <packaging>eclipse-plugin</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+               <groupId>org.bonitasoft.maven</groupId>
+                <artifactId>image-overlay-plugin</artifactId>
+                <configuration>
+                    <baseImgPath>${basedir}/splash_without_version.bmp</baseImgPath>
+                    <outputImagePath>${basedir}/splash.bmp</outputImagePath>
+                    <outputImageFormat>bmp</outputImageFormat>
+                    <xLocation>358</xLocation>
+                    <yLocation>259</yLocation>
+                    <italic>true</italic>
+                    <fontSize>58</fontSize>
+                    <color>#0B4361</color>
+                    <versionLabel>${branding.version.short}</versionLabel>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>create-image</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>