Adding latest dev content to eclipse repo.
diff --git a/org.eclipse.blockchain.application/.gitignore b/org.eclipse.blockchain.application/.gitignore
index ae3c172..7447f89 100644
--- a/org.eclipse.blockchain.application/.gitignore
+++ b/org.eclipse.blockchain.application/.gitignore
@@ -1 +1 @@
-/bin/
+/bin
\ No newline at end of file
diff --git a/org.eclipse.blockchain.application/about.html b/org.eclipse.blockchain.application/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.application/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.application/build.properties b/org.eclipse.blockchain.application/build.properties
index 3f78ea4..fb2ce21 100644
--- a/org.eclipse.blockchain.application/build.properties
+++ b/org.eclipse.blockchain.application/build.properties
@@ -2,4 +2,6 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- fragment.xml
+ fragment.xml,\
+ license.txt,\
+ about.html
diff --git a/org.eclipse.blockchain.application/license.txt b/org.eclipse.blockchain.application/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.application/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.application/src/org/eclipse/blockchain/application/BlockchainApplication.java b/org.eclipse.blockchain.application/src/org/eclipse/blockchain/application/BlockchainApplication.java
index 08b30a2..05655ca 100644
--- a/org.eclipse.blockchain.application/src/org/eclipse/blockchain/application/BlockchainApplication.java
+++ b/org.eclipse.blockchain.application/src/org/eclipse/blockchain/application/BlockchainApplication.java
@@ -1,22 +1,34 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.application;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.ui.internal.ide.application.IDEApplication;
/**
- * @author ADG5COB
+ *
+ * Eclipse Application class
+ *
*/
public class BlockchainApplication extends IDEApplication {
- /**
- * {@inheritDoc}
- */
- @Override
- public Object start(final IApplicationContext appContext) throws Exception {
- Object start = super.start(appContext);
- return start;
- }
-}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object start(final IApplicationContext appContext) throws Exception {
+ Object start = super.start(appContext);
+ return start;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/.gitignore b/org.eclipse.blockchain.core/.gitignore
index ae3c172..efada87 100644
--- a/org.eclipse.blockchain.core/.gitignore
+++ b/org.eclipse.blockchain.core/.gitignore
@@ -1 +1,3 @@
-/bin/
+/bin
+/.classpath
+/.settings/
diff --git a/org.eclipse.blockchain.core/META-INF/MANIFEST.MF b/org.eclipse.blockchain.core/META-INF/MANIFEST.MF
index 4651878..111aef2 100644
--- a/org.eclipse.blockchain.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.blockchain.core/META-INF/MANIFEST.MF
@@ -10,10 +10,14 @@
org.eclipse.core.filesystem,
org.eclipse.jface,
org.eclipse.osgi,
- com.google.guava
+ com.google.guava,
+ org.eclipse.blockchain.model
Export-Package: org.eclipse.blockchain.core,
org.eclipse.blockchain.core.events,
- org.eclipse.blockchain.core.log
+ org.eclipse.blockchain.core.interfaces,
+ org.eclipse.blockchain.core.loader,
+ org.eclipse.blockchain.core.log,
+ org.eclipse.blockchain.core.model;x-internal:=true
Bundle-ClassPath: lib/bcprov-jdk15on-1.62.jar,
lib/reactive-streams-1.0.2.jar,
lib/rxjava-2.2.9.jar,
diff --git a/org.eclipse.blockchain.core/about.html b/org.eclipse.blockchain.core/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.core/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/build.properties b/org.eclipse.blockchain.core/build.properties
index 3a56c12..68929cf 100644
--- a/org.eclipse.blockchain.core/build.properties
+++ b/org.eclipse.blockchain.core/build.properties
@@ -20,4 +20,6 @@
lib/rlp-4.5.12.jar,\
lib/tuples-4.5.12.jar,\
lib/utils-4.5.12.jar,\
- lib/web3j-evm-4.5.12.jar
+ lib/web3j-evm-4.5.12.jar,\
+ license.txt,\
+ about.html
diff --git a/org.eclipse.blockchain.core/license.txt b/org.eclipse.blockchain.core/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.core/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/plugin.xml b/org.eclipse.blockchain.core/plugin.xml
index 2817ced..3282d53 100644
--- a/org.eclipse.blockchain.core/plugin.xml
+++ b/org.eclipse.blockchain.core/plugin.xml
@@ -7,9 +7,22 @@
point="org.eclipse.core.resources.natures">
<runtime>
<run
- class="org.eclipse.blockchain.core.EthereumProjectNature">
+ class="org.eclipse.blockchain.core.EthereumNature">
</run>
</runtime>
+ <builder
+ id="org.eclipse.blockchain.core.ethbuilder">
+ </builder>
+ </extension>
+ <extension
+ id="ethbuilder"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ hasNature="true">
+ <run
+ class="org.eclipse.blockchain.core.EthereumBuilder">
+ </run>
+ </builder>
</extension>
</plugin>
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainCore.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainCore.java
index 000b784..c30ddf6 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainCore.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainCore.java
@@ -1,6 +1,17 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.util.StringJoiner;
@@ -10,51 +21,54 @@
import org.eclipse.core.runtime.Status;
/**
- * @author ADG5COB
+ * Plugin Activator
*/
public class BlockchainCore extends Plugin {
- private static BlockchainCore instance;
- public static final String PLUGIN_ID = "org.eclipse.blockchain.core";
+ private static BlockchainCore instance;
+ /**
+ * Plugin ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.blockchain.core";
- /**
- * @return - Blockchain core instance
- */
- public static BlockchainCore getInstance() {
- if (instance == null) {
- instance = new BlockchainCore();
- }
- return instance;
- }
+ /**
+ * @return - Blockchain core instance
+ */
+ public static BlockchainCore getInstance() {
+ if (instance == null) {
+ instance = new BlockchainCore();
+ }
+ return instance;
+ }
- /**
- * This is used to log tool related exception
- *
- * @param pluginId - If null/empty default plugin id will be taken.
- * @param message - The short message must not be null/empty
- * @param e - The exception trace must not be null/empty
- */
- public void logException(final String pluginId, final String message, final Exception e) {
- String pluginDetails = pluginId;
- if ((pluginDetails == null) || pluginDetails.isEmpty()) {
- pluginDetails = PLUGIN_ID;
- }
- if (e == null) {
- return;
- }
- Status status = new Status(IStatus.ERROR, pluginDetails, message + System.lineSeparator() + getError(e));
- instance.getLog().log(status);
- }
+ /**
+ * This is used to log tool related exception
+ *
+ * @param pluginId - If null/empty default plugin id will be taken.
+ * @param message - The short message must not be null/empty
+ * @param e - The exception trace must not be null/empty
+ */
+ public void logException(final String pluginId, final String message, final Exception e) {
+ String pluginDetails = pluginId;
+ if ((pluginDetails == null) || pluginDetails.isEmpty()) {
+ pluginDetails = PLUGIN_ID;
+ }
+ if (e == null) {
+ return;
+ }
+ Status status = new Status(IStatus.ERROR, pluginDetails, message + System.lineSeparator() + getError(e));
+ instance.getLog().log(status);
+ }
- private String getError(final Exception e) {
- StringJoiner errorTrace = new StringJoiner(System.lineSeparator());
- errorTrace.add(e.getMessage());
- for (StackTraceElement ste : e.getStackTrace()) {
- errorTrace.add(ste.toString());
- }
- if (e.getCause() != null) {
- errorTrace.add(e.getCause().toString());
- }
- return errorTrace.toString();
- }
-}
+ private String getError(final Exception e) {
+ StringJoiner errorTrace = new StringJoiner(System.lineSeparator());
+ errorTrace.add(e.getMessage());
+ for (StackTraceElement ste : e.getStackTrace()) {
+ errorTrace.add(ste.toString());
+ }
+ if (e.getCause() != null) {
+ errorTrace.add(e.getCause().toString());
+ }
+ return errorTrace.toString();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainViewsRegistry.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainViewsRegistry.java
index 92820f5..b81d37c 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainViewsRegistry.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/BlockchainViewsRegistry.java
@@ -1,39 +1,53 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Abirami Bhologa Indiran - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.blockchain.core.interfaces.IBlockchainView;
+
/**
- * @author ABB3COB
+ * A registry which holds a list of views that implement IBlockchainView
*/
public class BlockchainViewsRegistry {
- private static Set<IBlockchainView> listOFViews = new HashSet<IBlockchainView>();
+ private static Set<IBlockchainView> listOFViews = new HashSet<>();
+ private BlockchainViewsRegistry() {
+ }
- /**
- * @param view
- */
- public static void registerBlockchainView(final IBlockchainView view) {
- listOFViews.add(view);
- }
+ /**
+ * @param view
+ * - The view that extends IBlockchainView
+ */
+ public static void registerBlockchainView(final IBlockchainView view) {
+ listOFViews.add(view);
+ }
+ /**
+ * @param view
+ * - The view that extends IBlockchainView
+ */
+ public static void dereisterBlockchainView(final IBlockchainView view) {
+ listOFViews.remove(view);
+ }
- /**
- * @param view
- */
- public static void dereisterBlockchainView(final IBlockchainView view) {
- listOFViews.remove(view);
- }
-
-
- /**
- * @return the listOFViews
- */
- public static Set<IBlockchainView> getListOFViews() {
- return listOFViews;
- }
-}
+ /**
+ * @return the listOFViews
+ */
+ public static Set<IBlockchainView> getListOFViews() {
+ return listOFViews;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandExecutor.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandExecutor.java
index 0fb52c9..5b7238b 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandExecutor.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandExecutor.java
@@ -1,6 +1,20 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ * Pavithra Krishna Reddy
+ * Deepthi Murugaiyan
+ * Abirami Bhologa Indiran
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.io.BufferedReader;
@@ -23,6 +37,9 @@
import org.apache.commons.io.FileUtils;
import org.eclipse.blockchain.core.log.EthereumLogService;
+import org.eclipse.blockchain.core.model.IOABI;
+import org.eclipse.blockchain.core.model.SolidityABI;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -38,656 +55,663 @@
import com.fasterxml.jackson.databind.ObjectMapper;
/**
- * Code inside this class is just a prototype so it could contain duplicate/in-efficient code and maybe unwanted code
- * SOLDITY COMPILATION IS TESTED WITH SOLC-0.5.4 version as of NOW
+ * Code inside this class is just a prototype so it could contain
+ * duplicate/in-efficient code and maybe unwanted code SOLDITY COMPILATION IS
+ * TESTED WITH SOLC-0.5.4 version as of NOW
*
- * @author ADG5COB
*/
public class CoreCommandExecutor {
+ private Process gethServer = null;
+ private final String web3jVersion = "web3j-4.5.12";
+ /**
+ * As of now only one Geth server instance is considered so everything related
+ * to geth is maintained as member variables
+ */
+ private String gethIPC = "";
+ private String gethDataDirectory = "";
+ private Map<String, String> gethOptions = null;
+ private final String solcCommand = "solc-path solidity-file --bin --abi --optimize -o output-directory";
+ private final String web3jCommand = "web3j-path solidity generate -a=abi-path -b=bin-path -o=output-directory -p=com.bosch";
- private Process gethServer = null;
- private final String web3jVersion = "web3j-4.5.12";
- /**
- * As of now only one Geth server instance is considered so everything related to geth is maintained as member
- * variables
- */
- private String gethIPC = "";
- private String gethDataDirectory = "";
- private Map<String, String> gethOptions = null;
- private final String solcCommand = "solc-path solidity-file --bin --abi --optimize -o output-directory";
- private final String web3jCommand =
- "web3j-path solidity generate -a=abi-path -b=bin-path -o=output-directory -p=com.bosch";
+ private final Map<String, SolidityABI[]> solidityABIMap = new HashMap<>();
+ private static CoreCommandExecutor instance;
+ private String gethServerStartError = "";
- private final Map<String, SolidityABI[]> solidityABIMap = new HashMap<>();
- private static CoreCommandExecutor instance;
- private String gethServerStartError = "";
+ private CoreCommandExecutor() {
+ }
- /**
- * This instance is used to handle functionality related to geth and solidity
- *
- * @return - CorecommandExecutor instance
- */
- public static CoreCommandExecutor getInstance() {
- if (instance == null) {
- instance = new CoreCommandExecutor();
- }
- return instance;
- }
+ /**
+ * This instance is used to handle functionality related to geth and solidity
+ *
+ * @return - CorecommandExecutor instance
+ */
+ public static CoreCommandExecutor getInstance() {
+ if (instance == null) {
+ instance = new CoreCommandExecutor();
+ }
+ return instance;
+ }
- String getGethServerStartError() {
- return this.gethServerStartError;
- }
+ String getGethServerStartError() {
+ return this.gethServerStartError;
+ }
- /**
- * To start/stop mining process
- *
- * @param start - if true mining will start/ if false mining will stop
- * @throws IOException -
- * @throws InterruptedException -
- */
- public void mine(final boolean start) throws IOException, InterruptedException {
- Process miner = Runtime.getRuntime().exec("cmd");
- StringJoiner inputStream = new StringJoiner(System.lineSeparator());
- StringJoiner errorStream = new StringJoiner(System.lineSeparator());
- cmdRead(miner, inputStream);
- cmdReadError(miner, errorStream);
+ /**
+ * To start/stop mining process
+ *
+ * @param start - if true mining will start/ if false mining will stop
+ * @throws IOException -
+ * @throws InterruptedException -
+ */
+ public void mine(final boolean start) throws IOException, InterruptedException {
+ Process miner = Runtime.getRuntime().exec("cmd");
+ StringJoiner inputStream = new StringJoiner(System.lineSeparator());
+ StringJoiner errorStream = new StringJoiner(System.lineSeparator());
+ cmdRead(miner, inputStream, true);
+ cmdReadError(miner, errorStream, true);
- PrintWriter writer = new PrintWriter(miner.getOutputStream());
- if (start) {
- writer.println("geth attach " + this.gethIPC.replace("\\\\", "\\"));
- writer.println("miner.start(3)");
- writer.close();
- miner.waitFor();
- miner.destroy();
- }
- else {
- writer.println("geth attach " + this.gethIPC.replace("\\\\", "\\"));
- writer.println("miner.stop()");
- writer.close();
- miner.waitFor();
- miner.destroy();
- }
- }
+ PrintWriter writer = new PrintWriter(miner.getOutputStream());
+ if (start) {
+ writer.println("geth attach " + this.gethIPC.replace("\\\\", "\\"));
+ writer.println("miner.start(3)");
+ writer.close();
+ miner.waitFor();
+ miner.destroy();
+ } else {
+ writer.println("geth attach " + this.gethIPC.replace("\\\\", "\\"));
+ writer.println("miner.stop()");
+ writer.close();
+ miner.waitFor();
+ miner.destroy();
+ }
+ }
- private void transferArtifactsFromTempToOutput(final String tempLocation, final String outputLocation,
- final String solName)
- throws IOException {
- // ABI file
- File abiTempFile = new File(tempLocation + File.separator + solName + ".abi");
- File abiFile = new File(outputLocation + File.separator + solName + ".abi");
- abiFile.createNewFile();
- FileUtils.copyFile(abiTempFile, abiFile);
+ private void transferArtifactsFromTempToOutput(final String tempLocation, final String outputLocation,
+ final String solName) throws IOException {
+ // ABI file
+ File abiTempFile = new File(tempLocation + File.separator + solName + ".abi");
+ File abiFile = new File(outputLocation + File.separator + solName + ".abi");
+ abiFile.createNewFile();
+ FileUtils.copyFile(abiTempFile, abiFile);
- // BIN file
- File binTempFile = new File(tempLocation + File.separator + solName + ".bin");
- File binFile = new File(outputLocation + File.separator + solName + ".bin");
- abiFile.createNewFile();
- FileUtils.copyFile(binTempFile, binFile);
- }
+ // BIN file
+ File binTempFile = new File(tempLocation + File.separator + solName + ".bin");
+ File binFile = new File(outputLocation + File.separator + solName + ".bin");
+ abiFile.createNewFile();
+ FileUtils.copyFile(binTempFile, binFile);
+ }
- /**
- * Some osgi internal API are accessed in this method to retrieve the classpath content of this plugin. It won't be
- * changed until problems pop-up
- *
- * @param projectName -
- * @param solidityFiles -
- * @param outputDir -
- * @return -
- * @throws IOException -
- * @throws InterruptedException -
- * @throws ClassNotFoundException -
- */
- public String solidityCompile(final String projectName, final List<IResource> solidityFiles,
- final IResource outputDir)
- throws IOException, InterruptedException, ClassNotFoundException {
- String solcCompilerPath = InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .get(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, "");
- if (solcCompilerPath.isEmpty()) {
- return "Compiler is not set... Please set it in solidity preference page";
- }
- for (IResource solFile : solidityFiles) {
- String tempLocation = outputDir.getLocation().toOSString() + File.separator + "temp";
- File tempOutputDir = new File(tempLocation);
- if (tempOutputDir.exists() && tempOutputDir.isDirectory()) {
- tempOutputDir.delete();
- }
- tempOutputDir.mkdir();
+ /**
+ * Some osgi internal API are accessed in this method to retrieve the classpath
+ * content of this plugin. It won't be changed until problems pop-up
+ *
+ * @param projectName -
+ * @param solidityFiles -
+ * @param outputDir -
+ * @return -
+ * @throws IOException -
+ * @throws InterruptedException -
+ * @throws ClassNotFoundException -
+ */
+ public String solidityCompile(final String projectName, final List<IResource> solidityFiles,
+ final IResource outputDir) throws IOException, InterruptedException, ClassNotFoundException {
+ String solcCompilerPath = InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .get(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, "");
+ if (solcCompilerPath.isEmpty()) {
+ return "Compiler is not set... Please set it in solidity preference page";
+ }
+ for (IResource solFile : solidityFiles) {
+ String tempLocation = outputDir.getLocation().toOSString() + File.separator + "temp";
+ File tempOutputDir = new File(tempLocation);
+ if (tempOutputDir.exists() && tempOutputDir.isDirectory()) {
+ tempOutputDir.delete();
+ }
+ tempOutputDir.mkdirs();// Check This
- String compileCommand =
- this.solcCommand.replace("solc-path", getCmdLinePath(solcCompilerPath + File.separator + "solc"))
- .replace("solidity-file", getCmdLinePath(solFile.getLocation().toOSString()))
- .replace("output-directory", getCmdLinePath(tempOutputDir.getAbsolutePath()));
+ String compileCommand = this.solcCommand
+ .replace("solc-path", getCmdLinePath(solcCompilerPath + File.separator + "solc"))
+ .replace("solidity-file", getCmdLinePath(solFile.getLocation().toOSString()))
+ .replace("output-directory", getCmdLinePath(tempOutputDir.getAbsolutePath()));
- Process solcExe = Runtime.getRuntime().exec("cmd");
- StringJoiner inputStream = new StringJoiner(System.lineSeparator());
- StringJoiner errorStream = new StringJoiner(System.lineSeparator());
+ Process solcExe = Runtime.getRuntime().exec("cmd");
+ StringJoiner inputStream = new StringJoiner(System.lineSeparator());
+ StringJoiner errorStream = new StringJoiner(System.lineSeparator());
- cmdRead(solcExe, inputStream);
- cmdReadError(solcExe, errorStream);
+ cmdRead(solcExe, inputStream, false);
+ cmdReadError(solcExe, errorStream, false);
- PrintWriter writer = new PrintWriter(solcExe.getOutputStream());
- writer.println(compileCommand);
- writer.close();
+ PrintWriter writer = new PrintWriter(solcExe.getOutputStream());
+ writer.println(compileCommand);
+ writer.close();
- solcExe.waitFor();
- solcExe.destroy();
- if (inputStream.toString().contains("Error") || errorStream.toString().contains("Error")) {
- return "Some errors occurred during compilation please check the console!!!";
- }
- /**
- * (In B.sol -> 2 contracts A(Abstract) and B), the actual implementation of A is present separately. In this case
- * Abstract A's abi and bin replace actual A's abi and bin during solidity compilation. That is why this temp
- * concept is introduced, when B.sol is compiled it generates B's abi and bin as well as Abstract A's abi and bin.
- * This Abstract A is not required to be deployed but is required for solididty compilation.
- */
- transferArtifactsFromTempToOutput(tempOutputDir.getAbsolutePath(), outputDir.getLocation().toOSString(),
- solFile.getName().replace(".sol", ""));
- // Reading abi json
- storeABIinSolidityMap(
- outputDir.getLocation().toOSString() + File.separator + solFile.getName().replace(".sol", ".abi"),
- solFile.getLocation().toOSString());
+ solcExe.waitFor();
+ solcExe.destroy();
+ if (inputStream.toString().contains("Error") || errorStream.toString().contains("Error")) {
+ EthereumLogService.INSTANCE.errorLog(inputStream.toString());
+ EthereumLogService.INSTANCE.errorLog(errorStream.toString());
+ System.err.println(inputStream.toString());
+ System.err.println(errorStream.toString());
+ return "Some errors occurred during compilation please check the console!!!";
+ }
+ /**
+ * (In B.sol -> 2 contracts A(Abstract) and B), the actual implementation of A
+ * is present separately. In this case Abstract A's abi and bin replace actual
+ * A's abi and bin during solidity compilation. That is why this temp concept is
+ * introduced, when B.sol is compiled it generates B's abi and bin as well as
+ * Abstract A's abi and bin. This Abstract A is not required to be deployed but
+ * is required for solididty compilation.
+ */
+ transferArtifactsFromTempToOutput(tempOutputDir.getAbsolutePath(), outputDir.getLocation().toOSString(),
+ solFile.getName().replace(".sol", ""));
+ // Reading abi json
+ storeABIinSolidityMap(
+ outputDir.getLocation().toOSString() + File.separator + solFile.getName().replace(".sol", ".abi"),
+ solFile.getLocation().toOSString());
- // Solidity ABI javaType update
- CoreCommandExecutor.getInstance().updateSolABIMap(solFile.getLocation().toOSString(),
- updateSolJavaTypes(CoreCommandExecutor.getInstance().getSolABIMap(solFile.getLocation().toOSString())));
+ // Solidity ABI javaType update
+ CoreCommandExecutor.getInstance().updateSolABIMap(solFile.getLocation().toOSString(), updateSolJavaTypes(
+ CoreCommandExecutor.getInstance().getSolABIMap(solFile.getLocation().toOSString())));
- // Remove old contract from deploymentModel
- EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
- ethProject.removeDeploymentModelForResource(solFile, Web3jHandler.getInstance().getSelectedEnvironment());
+ // Remove old contract from deploymentModel
+ ProjectCreator.getInstance().removeDeploymentModelForResource(solFile,
+ Web3jHandler.getInstance().getSelectedEnvironment());
- // Java Wrapper Creation
- String web3jCmd = this.web3jCommand.replace("web3j-path", "web3j")
- .replace("abi-path",
- getCmdLinePath(
- outputDir.getLocation().toOSString() + File.separator + solFile.getName().replace(".sol", ".abi")))
- .replace("bin-path",
- getCmdLinePath(
- outputDir.getLocation().toOSString() + File.separator + solFile.getName().replace(".sol", ".bin")))
- .replace("output-directory", getCmdLinePath(outputDir.getLocation().toOSString()));
- Process web3jExe = Runtime.getRuntime().exec("cmd");
+ // Java Wrapper Creation
+ String web3jCmd = this.web3jCommand.replace("web3j-path", "web3j")
+ .replace("abi-path",
+ getCmdLinePath(outputDir.getLocation().toOSString() + File.separator
+ + solFile.getName().replace(".sol", ".abi")))
+ .replace("bin-path",
+ getCmdLinePath(outputDir.getLocation().toOSString() + File.separator
+ + solFile.getName().replace(".sol", ".bin")))
+ .replace("output-directory", getCmdLinePath(outputDir.getLocation().toOSString()));
+ Process web3jExe = Runtime.getRuntime().exec("cmd");
- cmdRead(web3jExe, inputStream);
- cmdReadError(web3jExe, errorStream);
+ cmdRead(web3jExe, inputStream, false);
+ cmdReadError(web3jExe, errorStream, false);
- writer = new PrintWriter(web3jExe.getOutputStream());
+ writer = new PrintWriter(web3jExe.getOutputStream());
- /**
- * The current directory is changed because web3j cli input string is limited
- */
- writer.println("cd " + getCmdLinePath(unzipAndGetWeb3jPath()));
+ /**
+ * The current directory is changed because web3j cli input string is limited
+ */
+ writer.println("cd " + getCmdLinePath(unzipAndGetWeb3jPath()));
- writer.println("set JAVA_HOME=" + getJDKPath());
+ writer.println("set JAVA_HOME=" + getJDKPath());
- writer.println(web3jCmd);
+ writer.println(web3jCmd);
- ClassLoader classLoader = CoreCommandExecutor.class.getClassLoader();
- ClasspathEntry[] hostClasspathEntries =
- ((EquinoxClassLoader) classLoader).getClasspathManager().getHostClasspathEntries();
- String cp = "";
- for (ClasspathEntry c : hostClasspathEntries) {
- cp = cp + c.getBundleFile().getBaseFile().toString() + ";";
- }
+ ClassLoader classLoader = CoreCommandExecutor.class.getClassLoader();
+ ClasspathEntry[] hostClasspathEntries = ((EquinoxClassLoader) classLoader).getClasspathManager()
+ .getHostClasspathEntries();
+ String cp = "";
+ for (ClasspathEntry c : hostClasspathEntries) {
+ cp = cp + c.getBundleFile().getBaseFile().toString() + ";";
+ }
- writer
- .println(
- "javac " +
- getCmdLinePath(outputDir.getLocation().toOSString() + File.separator + "com" + File.separator +
- "bosch" + File.separator + solFile.getName().replace(".sol", ".java")) +
- " -cp " + getCmdLinePath(cp));
- writer.close();
+ writer.println("javac "
+ + getCmdLinePath(outputDir.getLocation().toOSString() + File.separator + "com" + File.separator
+ + "bosch" + File.separator + solFile.getName().replace(".sol", ".java"))
+ + " -cp " + getCmdLinePath(cp));
+ writer.close();
- web3jExe.waitFor();
- web3jExe.destroy();
+ web3jExe.waitFor();
+ web3jExe.destroy();
- ProjectCreator.getInstance().getEthProject(projectName).addCompiledSolidityFiles(solFile);
- FileUtils.deleteDirectory(tempOutputDir);
- }
+ ProjectCreator.getInstance().addCompiledSolidityFiles(solFile);
+ FileUtils.deleteDirectory(tempOutputDir);
+ EthereumLogService.INSTANCE.log(inputStream.toString());
+ EthereumLogService.INSTANCE.errorLog(errorStream.toString());
+ System.err.println(inputStream.toString());
+ System.err.println(errorStream.toString());
+ }
+ return "";
+ }
- return "";
- }
+ private String getCmdLinePath(final String path) {
+ return "\"" + path + "\"";
+ }
- private String getCmdLinePath(final String path) {
- return "\"" + path + "\"";
- }
+ private SolidityABI[] updateSolJavaTypes(final SolidityABI[] solABI) throws ClassNotFoundException {
+ SolidityABI[] updatedSolABI = new SolidityABI[solABI.length];
+ for (int i = 0; i < solABI.length; i++) {
+ updatedSolABI[i] = solABI[i];
+ if (updatedSolABI[i].getInputs() != null) {
+ for (IOABI ioa : updatedSolABI[i].getInputs()) {
+ SolidityToJavaDataTypeResolver.getInstance().assignJavaType(ioa.getType(), ioa);
+ }
+ }
+ if (updatedSolABI[i].getOutputs() != null) {
+ for (IOABI ioa : updatedSolABI[i].getOutputs()) {
+ SolidityToJavaDataTypeResolver.getInstance().assignJavaType(ioa.getType(), ioa);
+ }
+ }
+ }
- private SolidityABI[] updateSolJavaTypes(final SolidityABI[] solABI) throws ClassNotFoundException {
- SolidityABI[] updatedSolABI = new SolidityABI[solABI.length];
- for (int i = 0; i < solABI.length; i++) {
- updatedSolABI[i] = solABI[i];
- if (updatedSolABI[i].getInputs() != null) {
- for (IOABI ioa : updatedSolABI[i].getInputs()) {
- SolidityToJavaDataTypeResolver.getInstance().assignJavaType(ioa.getType(), ioa);
- }
- }
- if (updatedSolABI[i].getOutputs() != null) {
- for (IOABI ioa : updatedSolABI[i].getOutputs()) {
- SolidityToJavaDataTypeResolver.getInstance().assignJavaType(ioa.getType(), ioa);
- }
- }
- }
+ return updatedSolABI;
+ }
- return updatedSolABI;
- }
+ private String unzipAndGetWeb3jPath() throws IOException {
+ Bundle bundle = Platform.getBundle("org.eclipse.blockchain.core");
+ return unzipWeb3jZip(FileLocator.toFileURL(bundle.getEntry("res/" + this.web3jVersion + ".zip")).getPath());
+ }
- private String unzipAndGetWeb3jPath() throws IOException {
- Bundle bundle = Platform.getBundle("org.eclipse.blockchain.core");
- return unzipWeb3jZip(FileLocator.toFileURL(bundle.getEntry("res/" + this.web3jVersion + ".zip")).getPath());
- }
+ private String unzipWeb3jZip(final String zipPath) throws IOException {
+ ZipFile web3jZip = new ZipFile(zipPath);
+ String destinationDir = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
+ File web3jZipContainer = new File(destinationDir + File.separator + "web3jContainer");
+ if (!web3jZipContainer.exists()) {
+ web3jZipContainer.mkdir();
+ final byte[] buf = new byte[4096];
+ final Enumeration<? extends ZipEntry> zipEnum = web3jZip.entries();
+ while (zipEnum.hasMoreElements()) {
+ final ZipEntry item = zipEnum.nextElement();
- private String unzipWeb3jZip(final String zipPath) throws IOException {
- ZipFile web3jZip = new ZipFile(zipPath);
- String destinationDir = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
- File web3jZipContainer = new File(destinationDir + File.separator + "web3jContainer");
- if (!web3jZipContainer.exists()) {
- web3jZipContainer.mkdir();
- final byte[] buf = new byte[4096];
- final Enumeration<? extends ZipEntry> zipEnum = web3jZip.entries();
- while (zipEnum.hasMoreElements()) {
- final ZipEntry item = zipEnum.nextElement();
+ if (item.isDirectory()) {
+ final File newdir = new File(web3jZipContainer + File.separator + item.getName());
+ newdir.mkdir();
+ } else {
+ final String newfilePath = web3jZipContainer + File.separator + item.getName();
+ final File newFile = new File(newfilePath);
+ if (!newFile.getParentFile().exists()) {
+ newFile.getParentFile().mkdirs();
+ }
+ try (InputStream is = web3jZip.getInputStream(item);
+ FileOutputStream fos = new FileOutputStream(newfilePath);) {
- if (item.isDirectory()) {
- final File newdir = new File(web3jZipContainer + File.separator + item.getName());
- newdir.mkdir();
- }
- else {
- final String newfilePath = web3jZipContainer + File.separator + item.getName();
- final File newFile = new File(newfilePath);
- if (!newFile.getParentFile().exists()) {
- newFile.getParentFile().mkdirs();
- }
- try (InputStream is = web3jZip.getInputStream(item);
- FileOutputStream fos = new FileOutputStream(newfilePath);) {
+ int len;
+ while ((len = is.read(buf)) > 0) {
+ fos.write(buf, 0, len);
+ }
+ is.close();
+ fos.close();
+ }
+ }
+ }
+ }
+ web3jZip.close();
- int len;
- while ((len = is.read(buf)) > 0) {
- fos.write(buf, 0, len);
- }
- is.close();
- fos.close();
- }
- }
- }
- }
- web3jZip.close();
+ return web3jZipContainer.getAbsolutePath() + File.separator + this.web3jVersion + File.separator + "bin";
+ }
- return web3jZipContainer.getAbsolutePath() + File.separator + this.web3jVersion + File.separator + "bin";
- }
+ /**
+ * @return -
+ * @throws IOException -
+ * @throws InterruptedException -
+ */
+ public String getJDKPath() throws IOException, InterruptedException {
+ String jdkPath = "";
+ Process process = Runtime.getRuntime().exec("cmd");
+ PrintWriter writer = new PrintWriter(process.getOutputStream());
- /**
- * @return -
- * @throws IOException -
- * @throws InterruptedException -
- */
- public String getJDKPath() throws IOException, InterruptedException {
- String jdkPath = "";
- Process process = Runtime.getRuntime().exec("cmd");
- PrintWriter writer = new PrintWriter(process.getOutputStream());
+ StringJoiner readJDKPath = new StringJoiner(System.lineSeparator());
+ cmdRead(process, readJDKPath, true);
- StringJoiner readJDKPath = new StringJoiner(System.lineSeparator());
- cmdRead(process, readJDKPath);
+ writer.println("where javac");
+ writer.close();
- writer.println("where javac");
- writer.close();
+ process.waitFor();
+ process.destroy();
- process.waitFor();
- process.destroy();
+ String[] lines = readJDKPath.toString().split(System.lineSeparator());
+ for (String line : lines) {
+ if (line.contains("javac.exe")) {
+ jdkPath = line.replace("\\bin\\javac.exe", "").replace("\\", "\\\\");
+ break;
+ }
+ }
- String[] lines = readJDKPath.toString().split(System.lineSeparator());
- for (String line : lines) {
- if (line.contains("javac.exe")) {
- jdkPath = line.replace("\\bin\\javac.exe", "").replace("\\", "\\\\");
- break;
- }
- }
+ return getCmdLinePath(jdkPath);
+ }
- return getCmdLinePath(jdkPath);
- }
+ private void storeABIinSolidityMap(final String abiPath, final String solidityFilePath) throws IOException {
+ String abiJson = readABI(abiPath);
+ ObjectMapper jsonMapper = new ObjectMapper();
+ SolidityABI[] readValue = jsonMapper.readValue(abiJson, SolidityABI[].class);
+ for (SolidityABI sabi : readValue) {
+ if (sabi.isPayable()) {
+ IOABI[] inputs = sabi.getInputs();
+ IOABI[] newInputs = new IOABI[inputs.length + 1];
+ for (int o = 0; o < inputs.length; o++) {
+ newInputs[o] = inputs[o];
+ }
+ IOABI payableInput = new IOABI();
+ payableInput.setName("payableAmount");
+ payableInput.setType("uint256");
+ newInputs[inputs.length] = payableInput;
+ sabi.setInputs(newInputs);
+ }
+ }
+ this.solidityABIMap.put(solidityFilePath, readValue);
+ }
- private void storeABIinSolidityMap(final String abiPath, final String solidityFilePath) throws IOException {
- String abiJson = readABI(abiPath);
- ObjectMapper jsonMapper = new ObjectMapper();
- SolidityABI[] readValue = jsonMapper.readValue(abiJson, SolidityABI[].class);
- for (SolidityABI sabi : readValue) {
- if (sabi.isPayable()) {
- IOABI[] inputs = sabi.getInputs();
- IOABI[] newInputs = new IOABI[inputs.length + 1];
- for (int o = 0; o < inputs.length; o++) {
- newInputs[o] = inputs[o];
- }
- IOABI payableInput = new IOABI();
- payableInput.setName("payableAmount");
- payableInput.setType("uint256");
- newInputs[inputs.length] = payableInput;
- sabi.setInputs(newInputs);
- }
- }
- this.solidityABIMap.put(solidityFilePath, readValue);
- }
+ /**
+ * @param solPath - The absolute path of solidity file
+ * @param onlyConstructor - If true will return only constructor ui components
+ * @return - The UI content to be constructed in transactions view
+ */
+ public Map<String, String> getUIComponentForSolidityFile(final String solPath, final boolean onlyConstructor,
+ final String projectName) {
+ SolidityABI[] solABi = this.solidityABIMap.get(solPath);
+ Map<String, String> uiMap = new HashMap<>();
+ if (!onlyConstructor) {// Check to see whether the contract is deployed
+ // in current environment
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
+ IFile file = ethProject.getProject()
+ .getFile(solPath.replace(ethProject.getProject().getLocation().toOSString(), ""));
+ if (!ProjectCreator.getInstance().isSCDeployed(file, Web3jHandler.getInstance().getSelectedEnvironment())) {
+ return uiMap;
+ }
+ }
- /**
- * @param solPath - The absolute path of solidity file
- * @param onlyConstructor - If true will return only constructor ui components
- * @return - The UI content to be constructed in transactions view
- */
- public Map<String, String> getUIComponentForSolidityFile(final String solPath, final boolean onlyConstructor,
- final String projectName) {
- SolidityABI[] solABi = this.solidityABIMap.get(solPath);
- Map<String, String> uiMap = new HashMap<>();
- if (!onlyConstructor) {// Check to see whether the contract is deployed in current environment
- EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
- IFile file =
- ethProject.getProject().getFile(solPath.replace(ethProject.getProject().getLocation().toOSString(), ""));
-
- if (!ethProject.isSCDeployed(file, Web3jHandler.getInstance().getSelectedEnvironment())) {
- return uiMap;
- }
- }
-
- if (solABi != null) {
- for (SolidityABI sABI : solABi) {
- if (sABI.getType().equalsIgnoreCase("constructor")) {
- if (onlyConstructor) {
- String key = "deploy";
- IOABI[] inputs = sABI.getInputs();
- String value = constructUIValue(inputs);
- uiMap.put(key, value);
- }
- }
- else if (sABI.getType().equalsIgnoreCase("function")) {
- if (!onlyConstructor) {
- String key = sABI.getName();
- IOABI[] inputs = sABI.getInputs();
- String value = constructUIValue(inputs);
- uiMap.put(key + "-" + value, value);
- }
- }
- }
- }
-
- return uiMap;
- }
+ if (solABi != null) {
+ for (SolidityABI sABI : solABi) {
+ if (sABI.getType().equalsIgnoreCase("constructor")) {
+ if (onlyConstructor) {
+ String key = "deploy";
+ IOABI[] inputs = sABI.getInputs();
+ String value = constructUIValue(inputs);
+ uiMap.put(key, value);
+ }
+ } else if (sABI.getType().equalsIgnoreCase("function")) {
+ if (!onlyConstructor) {
+ String key = sABI.getName();
+ IOABI[] inputs = sABI.getInputs();
+ String value = constructUIValue(inputs);
+ uiMap.put(key + "-" + value, value);
+ }
+ }
+ }
+ }
- private String constructUIValue(final IOABI[] inputs) {
- StringJoiner uiElemString = new StringJoiner(";");
- for (IOABI input : inputs) {
- uiElemString.add(input.getJavaType().getSimpleName());
- }
- return uiElemString.toString();
- }
+ return uiMap;
+ }
- /**
- * @param abiPath -
- * @return -
- */
- public SolidityABI[] getSolABIMap(final String abiPath) {
- return this.solidityABIMap.get(abiPath);
- }
+ private String constructUIValue(final IOABI[] inputs) {
+ StringJoiner uiElemString = new StringJoiner(";");
+ for (IOABI input : inputs) {
+ uiElemString.add(input.getJavaType().getSimpleName());
+ }
+ return uiElemString.toString();
+ }
- /**
- * @param abiPath -
- * @param updatedSolABI -
- */
- public void updateSolABIMap(final String abiPath, final SolidityABI[] updatedSolABI) {
- this.solidityABIMap.put(abiPath, updatedSolABI);
- }
+ /**
+ * @param abiPath -
+ * @return -
+ */
+ public SolidityABI[] getSolABIMap(final String abiPath) {
+ return this.solidityABIMap.get(abiPath);
+ }
- private String readABI(final String abiPath) throws IOException {
- StringJoiner sj = new StringJoiner("");
- try (BufferedReader br = new BufferedReader(new FileReader(new File(abiPath)))) {
- String line = "";
- while ((line = br.readLine()) != null) {
- sj.add(line);
- }
- }
- return sj.toString();
- }
+ /**
+ * @param abiPath -
+ * @param updatedSolABI -
+ */
+ public void updateSolABIMap(final String abiPath, final SolidityABI[] updatedSolABI) {
+ this.solidityABIMap.put(abiPath, updatedSolABI);
+ }
- /**
- * @return -
- * @throws IOException -
- * @throws InterruptedException -
- */
- public String isGethInstalled() throws IOException, InterruptedException {
- /**
- * This is not fully constructed but this should be first step check when someone tries to invoke ethereum project
- * creation
- */
- StringJoiner inputStream = new StringJoiner(System.lineSeparator());
- StringJoiner errorStream = new StringJoiner(System.lineSeparator());
- String gethCheck = "";
- Process gethProcess = Runtime.getRuntime().exec("cmd");
- cmdRead(gethProcess, inputStream);
- cmdReadError(gethProcess, errorStream);
+ private String readABI(final String abiPath) throws IOException {
+ StringJoiner sj = new StringJoiner("");
+ try (BufferedReader br = new BufferedReader(new FileReader(new File(abiPath)))) {
+ String line = "";
+ while ((line = br.readLine()) != null) {
+ sj.add(line);
+ }
+ }
+ return sj.toString();
+ }
- PrintWriter processWriter = new PrintWriter(gethProcess.getOutputStream());
- processWriter.println("geth version");
- processWriter.close();
+ /**
+ * @return -
+ * @throws IOException -
+ * @throws InterruptedException -
+ */
+ public String isGethInstalled() throws IOException, InterruptedException {
+ /**
+ * This is not fully constructed but this should be first step check when
+ * someone tries to invoke ethereum project creation
+ */
+ StringJoiner inputStream = new StringJoiner(System.lineSeparator());
+ StringJoiner errorStream = new StringJoiner(System.lineSeparator());
+ String gethCheck = "";
+ Process gethProcess = Runtime.getRuntime().exec("cmd");
+ cmdRead(gethProcess, inputStream, true);
+ cmdReadError(gethProcess, errorStream, true);
- gethProcess.waitFor();
- gethCheck = errorStream.toString();
- gethProcess.destroy();
- return gethCheck;
- }
+ PrintWriter processWriter = new PrintWriter(gethProcess.getOutputStream());
+ processWriter.println("geth version");
+ processWriter.close();
- /**
- * @param dataDir -
- * @param initFilePath -
- * @param localGethOptions -
- * @return - Return if any error occurs during server start
- * @throws IOException -
- * @throws InterruptedException
- */
- public String startGethServer(final String dataDir, final String initFilePath,
- final Map<String, String> localGethOptions)
- throws IOException, InterruptedException {
- if (isGethInstalled()
- .equals(NLS.bind(CoreCommandMessages.FRAMEWORK_NOT_INSTALLED, "'geth'", System.lineSeparator()))) {
- return "Either Geth is not installed (or) its reference is not set in PATH env variable";
- }
- if (!Web3jHandler.getInstance().getSelectedEnvironment()
- .equals(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString())) {
- return "Geth environment is not chosen in SecoBlocks -> Environment preference!!!";
- }
- this.gethServerStartError = "Geth";
- StringJoiner inputStream = new StringJoiner(System.lineSeparator());
- StringJoiner errorStream = new StringJoiner(System.lineSeparator());
- this.gethDataDirectory = dataDir;
- CoreCommandExecutor.getInstance().gethOptions = localGethOptions;
- this.gethServer = Runtime.getRuntime().exec("cmd.exe");
- cmdRead(this.gethServer, inputStream);
- cmdReadError(this.gethServer, errorStream);
+ gethProcess.waitFor();
+ gethCheck = errorStream.toString();
+ gethProcess.destroy();
+ return gethCheck;
+ }
- String initFile = initFilePath;
- String genesisFilePath = dataDir + File.separator + "genesis.json";
- if (new File(genesisFilePath).exists()) {
- initFile = genesisFilePath;
- }
- else {
- if (initFilePath.isEmpty()) {
- initFile = createGethInitFile(dataDir);
- }
- }
- startGethServerLocal(dataDir, initFile, localGethOptions);
- return "";
- }
+ /**
+ * @param dataDir -
+ * @param initFilePath -
+ * @param localGethOptions -
+ * @return - Return if any error occurs during server start
+ * @throws IOException -
+ * @throws InterruptedException
+ */
+ public String startGethServer(final String dataDir, final String initFilePath,
+ final Map<String, String> localGethOptions) throws IOException, InterruptedException {
+ if (isGethInstalled()
+ .equals(NLS.bind(CoreCommandMessages.FRAMEWORK_NOT_INSTALLED, "'geth'", System.lineSeparator()))) {
+ return "Either Geth is not installed (or) its reference is not set in PATH env variable";
+ }
+ if (!Web3jHandler.getInstance().getSelectedEnvironment()
+ .equals(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString())) {
+ return "Geth environment is not chosen in SecoBlocks -> Environment preference!!!";
+ }
+ this.gethServerStartError = "Geth";
+ StringJoiner inputStream = new StringJoiner(System.lineSeparator());
+ StringJoiner errorStream = new StringJoiner(System.lineSeparator());
+ this.gethDataDirectory = dataDir;
+ CoreCommandExecutor.getInstance().gethOptions = localGethOptions;
+ this.gethServer = Runtime.getRuntime().exec("cmd.exe");
+ cmdRead(this.gethServer, inputStream, true);
+ cmdReadError(this.gethServer, errorStream, true);
- private void startGethServerLocal(final String dataDir, final String initFile,
- final Map<String, String> localGethOptions) {
- PrintWriter processWriter = new PrintWriter(this.gethServer.getOutputStream());
- if (!initFile.isEmpty() && !new File(dataDir + File.separator + "geth").exists()) {
- processWriter.println("geth --datadir " + getCmdLinePath(dataDir) + " init " + getCmdLinePath(initFile) + "");
- }
- String args = constructGethArguments(localGethOptions);
- processWriter.println("geth --datadir " + getCmdLinePath(dataDir) + " " + args);
- processWriter.close();
- /**
- * This below code is required because geth once started won't terminate and it should not terminate because its a
- * server
- */
- Display.getDefault().syncExec(() -> {
- new Thread(() -> {
- try {
- this.gethServer.waitFor();
- }
- catch (InterruptedException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- }, "Geth Server").start();
- });
- }
+ String initFile = initFilePath;
+ String genesisFilePath = dataDir + File.separator + "genesis.json";
+ if (new File(genesisFilePath).exists()) {
+ initFile = genesisFilePath;
+ } else {
+ if (initFilePath.isEmpty()) {
+ initFile = createGethInitFile(dataDir);
+ }
+ }
+ startGethServerLocal(dataDir, initFile, localGethOptions);
+ return "";
+ }
- /**
- * @return - True if geth is started/ false otherwise
- */
- public boolean isGethStarted() {
- return (this.gethServer != null) && this.gethServer.isAlive() && !this.gethIPC.isEmpty();
- }
+ private void startGethServerLocal(final String dataDir, final String initFile,
+ final Map<String, String> localGethOptions) {
+ PrintWriter processWriter = new PrintWriter(this.gethServer.getOutputStream());
+ if (!initFile.isEmpty() && !new File(dataDir + File.separator + "geth").exists()) {
+ processWriter
+ .println("geth --datadir " + getCmdLinePath(dataDir) + " init " + getCmdLinePath(initFile) + "");
+ }
+ String args = constructGethArguments(localGethOptions);
+ processWriter.println("geth --datadir " + getCmdLinePath(dataDir) + " " + args);
+ processWriter.close();
+ /**
+ * This below code is required because geth once started won't terminate and it
+ * should not terminate because its a server
+ */
+ Display.getDefault().syncExec(() -> {
+ new Thread(() -> {
+ try {
+ this.gethServer.waitFor();
+ } catch (InterruptedException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }, "Geth Server").start();
+ });
+ }
- /**
- * @return - The geth server data directory
- */
- public String getDataDir() {
- return this.gethDataDirectory;
- }
+ /**
+ * @return - True if geth is started/ false otherwise
+ */
+ public boolean isGethStarted() {
+ return (this.gethServer != null) && this.gethServer.isAlive() && !this.gethIPC.isEmpty();
+ }
- /**
- * @return -The geth command line options
- */
- public Map<String, String> getGethOptions() {
- return this.gethOptions;
- }
+ /**
+ * @return - The geth server data directory
+ */
+ public String getDataDir() {
+ return this.gethDataDirectory;
+ }
- /**
- * @return - Returns the default network id
- */
- public String getDefaultNetworkIdForGeth() {
- String defaultNetworkId = "";
- try (BufferedReader br =
- new BufferedReader(new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("genesis.template")));) {
- String genesisContent = "";
- while ((genesisContent = br.readLine()) != null) {
- if (genesisContent.contains("chainId")) {
- defaultNetworkId = genesisContent.substring(genesisContent.indexOf(':') + 1).replace(",", "").trim();
- }
- }
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- return defaultNetworkId;
- }
+ /**
+ * @return -The geth command line options
+ */
+ public Map<String, String> getGethOptions() {
+ return this.gethOptions;
+ }
- private String constructGethArguments(final Map<String, String> localGethOptions) {
- StringJoiner arguments = new StringJoiner(" ");
- localGethOptions.forEach((k, v) -> arguments.add("--" + k + "" + (v.isEmpty() ? "" : " " + v)));
- return arguments.toString();
- }
+ /**
+ * @return - Returns the default network id
+ */
+ public String getDefaultNetworkIdForGeth() {
+ String defaultNetworkId = "";
+ try (BufferedReader br = new BufferedReader(
+ new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("genesis.template")));) {
+ String genesisContent = "";
+ while ((genesisContent = br.readLine()) != null) {
+ if (genesisContent.contains("chainId")) {
+ defaultNetworkId = genesisContent.substring(genesisContent.indexOf(':') + 1).replace(",", "")
+ .trim();
+ }
+ }
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ return defaultNetworkId;
+ }
- /**
- * Terminate geth server
- */
- public void terminateGethServer() {
- if (CoreCommandExecutor.getInstance().gethServer != null) {
- this.gethIPC = "";
- this.gethServer.destroyForcibly();
- try {
- Process terminator = Runtime.getRuntime().exec("cmd.exe");
- PrintWriter pw = new PrintWriter(terminator.getOutputStream());
- pw.println("taskkill /F /IM geth.exe");
- pw.close();
+ private String constructGethArguments(final Map<String, String> localGethOptions) {
+ StringJoiner arguments = new StringJoiner(" ");
+ localGethOptions.forEach((k, v) -> arguments.add("--" + k + "" + (v.isEmpty() ? "" : " " + v)));
+ return arguments.toString();
+ }
- terminator.waitFor();
- terminator.destroy();
- }
- catch (IOException | InterruptedException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- }
- }
+ /**
+ * Terminate geth server
+ */
+ public void terminateGethServer() {
+ if (CoreCommandExecutor.getInstance().gethServer != null) {
+ this.gethIPC = "";
+ this.gethServer.destroyForcibly();
+ try {
+ Process terminator = Runtime.getRuntime().exec("cmd.exe");
+ PrintWriter pw = new PrintWriter(terminator.getOutputStream());
+ pw.println("taskkill /F /IM geth.exe");
+ pw.close();
- private String createGethInitFile(final String dataDir) throws IOException {
- File gethInitFile = new File(dataDir + File.separator + "genesis.json");
- gethInitFile.createNewFile();// NOSONAR
+ terminator.waitFor();
+ terminator.destroy();
+ } catch (IOException | InterruptedException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }
+ }
- try (
- BufferedReader br = new BufferedReader(
- new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("genesis.template")));
- BufferedWriter bw = new BufferedWriter(new FileWriter(gethInitFile));) {
- String genesisContent = "";
- while ((genesisContent = br.readLine()) != null) {
- bw.append(genesisContent);
- bw.append(System.lineSeparator());
- }
- }
- return gethInitFile.getAbsolutePath();
- }
+ private String createGethInitFile(final String dataDir) throws IOException {
+ File gethInitFile = new File(dataDir + File.separator + "genesis.json");
+ gethInitFile.createNewFile();// NOSONAR
+ try (BufferedReader br = new BufferedReader(
+ new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("genesis.template")));
+ BufferedWriter bw = new BufferedWriter(new FileWriter(gethInitFile));) {
+ String genesisContent = "";
+ while ((genesisContent = br.readLine()) != null) {
+ bw.append(genesisContent);
+ bw.append(System.lineSeparator());
+ }
+ }
+ return gethInitFile.getAbsolutePath();
+ }
- /**
- * Read output stream of process going to be executed
- *
- * @param process - The process that is going to start
- * @param inputStream - A log recording object
- */
- public void cmdRead(final Process process, final StringJoiner inputStream) {
- Thread processReadThread = new Thread(() -> {
- String line = "";
- try (BufferedReader processReader = new BufferedReader(new InputStreamReader(process.getInputStream()));) {
- while ((line = processReader.readLine()) != null) {
- inputStream.add(line.trim());
- if (line.contains("Error") && this.gethServerStartError.equals("Geth")) {
- this.gethServerStartError = line;
- }
- if (line.contains("IPC endpoint opened")) {// To determine IPC endpoint when geth server is started.
- this.gethIPC = line.substring(line.indexOf("url=") + 4);
- }
- EthereumLogService.INSTANCE.log(line);
- System.err.println(line);
- }
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- }, "Process Read Thread");
- processReadThread.start();
- }
+ /**
+ * Read output stream of process going to be executed
+ *
+ * @param process - The process that is going to start
+ * @param inputStream - A log recording object
+ */
+ public void cmdRead(final Process process, final StringJoiner inputStream, final boolean logToConsole) {
+ Thread processReadThread = new Thread(() -> {
+ String line = "";
+ try (BufferedReader processReader = new BufferedReader(new InputStreamReader(process.getInputStream()));) {
+ while ((line = processReader.readLine()) != null) {
+ inputStream.add(line.trim());
+ if (line.contains("Error") && this.gethServerStartError.equals("Geth")) {
+ this.gethServerStartError = line;
+ }
+ if (line.contains("IPC endpoint opened")) {
+ /*
+ * To determine IPC endpoint when geth server is started.
+ */
+ this.gethIPC = line.substring(line.indexOf("url=") + 4);
+ }
+ if (logToConsole) {
+ EthereumLogService.INSTANCE.log(line);
+ System.err.println(line);
+ }
+ }
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }, "Process Read Thread");
+ processReadThread.start();
+ }
- /**
- * @return - the geth socket handle
- */
- public String getIPCPath() {
- return this.gethIPC;
- }
+ /**
+ * @return - the geth socket handle
+ */
+ public String getIPCPath() {
+ return this.gethIPC;
+ }
- /**
- * Read error stream of process going to be executed
- *
- * @param process - The process that is going to start
- * @param errorStream - A log recording object
- */
- public void cmdReadError(final Process process, final StringJoiner errorStream) {
- Thread processErrorThread = new Thread(() -> {
- String line = "";
- try (BufferedReader processReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));) {
- while ((line = processReader.readLine()) != null) {
- errorStream.add(line.trim());
- if (line.contains("Error") && this.gethServerStartError.equals("Geth")) {
- this.gethServerStartError = line;
- }
- if (line.contains("IPC endpoint opened")) {// To determine IPC endpoint when geth server is started.
- this.gethIPC = line.substring(line.indexOf("url=") + 4);
- }
- EthereumLogService.INSTANCE.errorLog(line);
- System.err.println(line);
- }
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- }, "Process Error Thread");
- processErrorThread.start();
- }
-}
+ /**
+ * Read error stream of process going to be executed
+ *
+ * @param process - The process that is going to start
+ * @param errorStream - A log recording object
+ */
+ public void cmdReadError(final Process process, final StringJoiner errorStream, final boolean logToConsole) {
+ Thread processErrorThread = new Thread(() -> {
+ String line = "";
+ try (BufferedReader processReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));) {
+ while ((line = processReader.readLine()) != null) {
+ errorStream.add(line.trim());
+ if (line.contains("Error") && this.gethServerStartError.equals("Geth")) {
+ this.gethServerStartError = line;
+ }
+ if (line.contains("IPC endpoint opened")) {// To determine
+ // IPC endpoint
+ // when geth
+ // server is
+ // started.
+ this.gethIPC = line.substring(line.indexOf("url=") + 4);
+ }
+ if (logToConsole) {
+ EthereumLogService.INSTANCE.errorLog(line);
+ System.err.println(line);
+ }
+ }
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }, "Process Error Thread");
+ processErrorThread.start();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandMessages.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandMessages.java
index 95e8862..5609873 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandMessages.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/CoreCommandMessages.java
@@ -1,24 +1,34 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import org.eclipse.osgi.util.NLS;
/**
- * @author ADG5COB
+ * Message class
*/
public class CoreCommandMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.blockchain.core.messages";
+ private static final String BUNDLE_NAME = "org.eclipse.blockchain.core.messages";
- /**
- *
- */
- public static String FRAMEWORK_NOT_INSTALLED;
+ /**
+ *
+ */
+ public static String FRAMEWORK_NOT_INSTALLED;
- static {
- NLS.initializeMessages(BUNDLE_NAME, CoreCommandMessages.class);
- }
-}
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, CoreCommandMessages.class);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumBuilder.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumBuilder.java
new file mode 100644
index 0000000..cd94da9
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumBuilder.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
+package org.eclipse.blockchain.core;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.eclipse.blockchain.core.events.BlockchainBuildEvent;
+import org.eclipse.blockchain.core.events.BlockchainBuildTrigger;
+import org.eclipse.blockchain.core.events.IBlockchainBuildEvent;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Ethereum Project builder
+ */
+public class EthereumBuilder extends IncrementalProjectBuilder {
+ /**
+ * Ethereum Project builder
+ */
+ public static final String ETHEREUM_BUILDER = "org.eclipse.blockchain.core.ethbuilder";
+ private static final String SOLIDITY_OUTPUT_FOLDER = "sol-output";
+ private static ExecutorService service = Executors.newFixedThreadPool(4);
+ private final List<String> compileErrors = new ArrayList<>();
+ private boolean change = false;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IProject[] build(final int kind, final Map<String, String> args, final IProgressMonitor monitor)
+ throws CoreException {
+ this.compileErrors.clear();
+ this.change = false;
+ try {
+ if ((IncrementalProjectBuilder.INCREMENTAL_BUILD == kind)
+ || (IncrementalProjectBuilder.AUTO_BUILD == kind)) {
+ IResourceDelta changes = getDelta(getProject());
+ if (changes != null) {
+ incrementalBuild(changes);
+ } else {
+ clean(monitor);
+ fullBuild();
+ }
+ } else if (IncrementalProjectBuilder.FULL_BUILD == kind) {
+ clean(monitor);
+ fullBuild();
+ }
+ if (this.change) {
+ triggerBuildFinished();
+ }
+ } catch (ExecutionException | InterruptedException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ return new IProject[0];
+ }
+
+ private void triggerBuildFinished() {
+ IBlockchainBuildEvent event = new BlockchainBuildEvent(this.compileErrors, getProject());
+ new Thread(() -> {
+ BlockchainBuildTrigger.getInstance().notifyListeners(event);
+ }, "Blockchain Build Finished").start();
+ }
+
+ private void fullBuild() throws CoreException, InterruptedException, ExecutionException {
+ Set<IResource> changedFiles = new HashSet<>();
+ List<Future<String>> scheduledFutures = new ArrayList<>();
+
+ getProject().accept((resource) -> {
+ if (resource != null) {
+ String fileExtension = resource.getFileExtension();
+ if ((fileExtension != null) && fileExtension.equals("sol")) {
+ changedFiles.add(resource);
+ }
+ }
+ return true;
+ });
+
+ for (IResource resource : changedFiles) {
+ this.change = true;
+ scheduledFutures.add(scheduleCompile(resource));
+ }
+
+ waitForFuturesToComplete(scheduledFutures);
+ }
+
+ private void incrementalBuild(final IResourceDelta changes)
+ throws CoreException, InterruptedException, ExecutionException {
+ Set<IResource> changedFiles = new HashSet<>();
+ List<Future<String>> scheduledFutures = new ArrayList<>();
+
+ changes.accept((final IResourceDelta delta) -> {
+ IResource resource = delta.getResource();
+ if (resource != null) {
+ String fileExtension = resource.getFileExtension();
+ if ((fileExtension != null) && fileExtension.equals("sol")) {
+ changedFiles.add(resource);
+ }
+ }
+ return true;
+ });
+
+ for (IResource resource : changedFiles) {
+ this.change = true;
+ scheduledFutures.add(scheduleCompile(resource));
+ }
+
+ waitForFuturesToComplete(scheduledFutures);
+ }
+
+ private void waitForFuturesToComplete(final List<Future<String>> scheduledFutures)
+ throws InterruptedException, ExecutionException {
+ while (!scheduledFutures.isEmpty()) {
+ List<Future<String>> futuresToRemove = new ArrayList<>();
+ for (Future<String> scheduledFuture : scheduledFutures) {
+ if (scheduledFuture.isDone() || scheduledFuture.isCancelled()) {
+ String result = scheduledFuture.get();
+ if (!result.isEmpty()) {
+ this.compileErrors.add(result);
+ }
+ futuresToRemove.add(scheduledFuture);
+ }
+ }
+ if (!futuresToRemove.isEmpty()) {
+ scheduledFutures.removeAll(futuresToRemove);
+ }
+ Thread.sleep(100);
+ }
+ }
+
+ private Future<String> scheduleCompile(final IResource resourceToCompile) {
+ List<IResource> resourceToCompileAsSet = new ArrayList<>();
+ resourceToCompileAsSet.add(resourceToCompile);
+ return service.submit(() -> {// NOSONAR
+ return CoreCommandExecutor.getInstance().solidityCompile(getProject().getName(), resourceToCompileAsSet,
+ getProject().getFolder(SOLIDITY_OUTPUT_FOLDER));
+ });
+
+ }
+
+ /**
+ * This cleans the solidity output folder {@inheritDoc}
+ */
+ @Override
+ protected void clean(final IProgressMonitor monitor) throws CoreException {
+ IProject project = getProject();
+ IFolder solidityOutputFolder = project.getFolder(SOLIDITY_OUTPUT_FOLDER);
+
+ if (solidityOutputFolder.exists()) {
+ solidityOutputFolder.delete(true, new NullProgressMonitor());
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumNature.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumNature.java
new file mode 100644
index 0000000..83abd6c
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumNature.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Ethereum Project Nature class
+ */
+public class EthereumNature implements IProjectNature {
+
+ private IProject project;
+ /**
+ * Ethereum Project nature
+ */
+ public static final String ETHEREUM_NATURE = "org.eclipse.blockchain.core.ethereum.nature";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void configure() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void deconfigure() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * {@inheritDoc} Do not use this to get the Ethereum project instance
+ */
+ @Override
+ public IProject getProject() {
+ return this.project;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setProject(final IProject project) {
+ this.project = project;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumProject1.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumProject1.java
new file mode 100644
index 0000000..b6ff269
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/EthereumProject1.java
@@ -0,0 +1,310 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.blockchain.core.interfaces.IEthereumProject1;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * The EthereumProject is a smart contract project representation
+ */
+public class EthereumProject1 implements IEthereumProject1 {
+
+ private final String projectLocation;
+ private IProjectDescription projectDescription = null;
+ private IProject project = null;
+ private IFile firstMatchingSolFile = null;
+ private final List<String> projectNatures = new ArrayList<>();
+ private final List<String> projectBuilders = new ArrayList<>();
+ private final Set<IResource> compiledSolidityFiles = new HashSet<>();
+ /**
+ * Environment based deployment model. Currently there are 2 types 1.
+ * EnvironmentType.GETH_CLIENT 2. EnvironmentType.EMBEDDED_EVM
+ */
+ private final Map<String, Map<IResource, DeploymentModel>> environmentBasedDeployedModel = new HashMap<>();
+
+ /**
+ * @param projectLocation - The project location
+ */
+ public EthereumProject1(final String projectLocation) {
+ this.projectLocation = projectLocation;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void addCompiledSolidityFiles(final IResource solidityFile) {
+ this.compiledSolidityFiles.add(solidityFile);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Set<IResource> getCompiledSolidityFiles() {
+ return this.compiledSolidityFiles;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void setProject(final IProject project) {
+ this.project = project;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public IProject getProject() {
+ return this.project;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public String getProjectLocation() {
+ return this.projectLocation;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void setProjectDescription(final IProjectDescription projectDescription) {
+ this.projectDescription = projectDescription;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public IProjectDescription getProjectDescription() {
+ return this.projectDescription;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void addDefaultNatures() {
+ setProjectNatures(EthereumNature.ETHEREUM_NATURE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void addDefaultBuilders() {
+ setProjectBuilders(EthereumBuilder.ETHEREUM_BUILDER);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public String getProjectName() {
+ return this.project != null ? this.project.getName() : "";
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void setProjectBuilders(final String builderId) {
+ this.projectBuilders.add(builderId);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void setProjectNatures(final String nature) {
+ this.projectNatures.add(nature);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public String[] getNatureIds() {
+ return this.projectNatures.toArray(new String[this.projectNatures.size()]);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String[] getBuilderIds() {
+ return this.projectBuilders.toArray(new String[this.projectBuilders.size()]);
+ }
+
+ /**
+ * @return -
+ * @throws CoreException -
+ */
+ IFile getSolFile() throws CoreException {
+ if (this.project != null) {
+ this.project.accept(new IResourceVisitor() {
+
+ @Override
+ public boolean visit(final IResource resource) throws CoreException {
+ if ((resource instanceof IFile) && (resource.getFileExtension() != null)
+ && resource.getFileExtension().equals("sol")) {
+ EthereumProject1.this.firstMatchingSolFile = (IFile) resource;
+ return false;
+ }
+ return true;
+ }
+ });
+ }
+ return this.firstMatchingSolFile;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void createDeploymentModel(final String contractAddress, final IResource scFile,
+ final String lastUsedAccount, final String environment) {
+ DeploymentModel dm = new DeploymentModel(contractAddress, scFile, lastUsedAccount);
+ Map<IResource, DeploymentModel> depModelMap = this.environmentBasedDeployedModel.computeIfAbsent(environment,
+ m -> new HashMap<>());
+ depModelMap.put(scFile, dm);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLastUsedAccount(final IResource scFile, final String environment) {
+ Map<IResource, DeploymentModel> map = this.environmentBasedDeployedModel.get(environment);
+ if ((map != null) && map.containsKey(scFile)) {
+ return map.get(scFile).getLastUsedAccount();
+ }
+ return "";
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void updateLastUsedAccount(final IResource scFile, final String accountDetails, final String environment) {
+ Map<IResource, DeploymentModel> map = this.environmentBasedDeployedModel.get(environment);
+ if ((map != null) && map.containsKey(scFile)) {
+ map.get(scFile).setLastUsedAccount(accountDetails);
+ }
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public String getContractAddress(final IResource scFile, final String environment) {
+ Map<IResource, DeploymentModel> map = this.environmentBasedDeployedModel.get(environment);
+ if ((map != null) && map.containsKey(scFile)) {
+ return map.get(scFile).getContractAddress();
+ }
+ return "";
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void removeDeploymentModelForResource(final IResource resource, final String environment) {
+ Map<IResource, DeploymentModel> map = this.environmentBasedDeployedModel.get(environment);
+ if ((map != null) && map.containsKey(resource)) {
+ map.remove(resource);
+ }
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isSCDeployed(final IResource scFile, final String environment) {
+ Map<IResource, DeploymentModel> map = this.environmentBasedDeployedModel.get(environment);
+ return (map != null) && map.containsKey(scFile);
+ }
+}
+
+/**
+ * When a smart contract is deployed into the blockchain a corresponding
+ * DeploymentModel has to be created which will maintain the details of the
+ * deployed smart contract
+ *
+ * @author ADG5COB
+ */
+class DeploymentModel {
+
+ private final String contractAddress;
+ private final IResource scFile;
+ private String lastUsedAccount;
+
+ DeploymentModel(final String contractAddress, final IResource scFile, final String lastUsedAccount) {
+ this.contractAddress = contractAddress;
+ this.scFile = scFile;
+ this.lastUsedAccount = lastUsedAccount;
+ }
+
+ String getContractAddress() {
+ return this.contractAddress;
+ }
+
+ IResource getScFile() {
+ return this.scFile;
+ }
+
+ String getLastUsedAccount() {
+ return this.lastUsedAccount;
+ }
+
+ void setLastUsedAccount(final String lastUsedAccount) {
+ this.lastUsedAccount = lastUsedAccount;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ListCreator.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ListCreator.java
index 0ba0c60..81d2113 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ListCreator.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ListCreator.java
@@ -1,165 +1,188 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.util.ArrayList;
import java.util.List;
/**
- * @author ADG5COB
+ *
*/
@SuppressWarnings("unchecked")
public class ListCreator {
- List<Object> currentList;
- List<Object> parentList;
+ List<Object> currentList;
+ List<Object> parentList;
- /**
- * This returns the list that is currently processed
- *
- * @param depth - The current dimension level
- * @param isNew - if true creates a new list
- * @return - The List
- */
- public List<Object> getCurrentList(final int depth, final boolean isNew) {
- if (isNew) {
- this.currentList = (List<Object>) assignList(depth);
- }
- return this.currentList;
- }
+ /**
+ * This returns the list that is currently processed
+ *
+ * @param depth
+ * - The current dimension level
+ * @param isNew
+ * - if true creates a new list
+ * @return - The List
+ */
+ public List<Object> getCurrentList(final int depth, final boolean isNew) {
+ if (isNew) {
+ this.currentList = (List<Object>) assignList(depth);
+ }
+ return this.currentList;
+ }
- /**
- * Adds the element to the current list
- *
- * @param depth - The current dimension level
- * @param isNew - if true creates a new list
- * @param element - The element to be added
- */
- public <T> void addToCurrentList(final int depth, final boolean isNew, final T element) {
- getCurrentList(depth, isNew).add(element);
- }
+ /**
+ * Adds the element to the current list
+ *
+ * @param depth
+ * - The current dimension level
+ * @param isNew
+ * - if true creates a new list
+ * @param element
+ * - The element to be added
+ */
+ public <T> void addToCurrentList(final int depth, final boolean isNew,
+ final T element) {
+ getCurrentList(depth, isNew).add(element);
+ }
- /**
- * This returns the currently processed list's parent container
- *
- * @param depth - The current dimension level
- * @param isNew - if true creates a new list
- * @return - The List
- */
- public List<Object> getParentList(final int depth, final boolean isNew) {
- if (isNew) {
- this.parentList = (List<Object>) assignList(depth + 1);
- }
- return this.parentList;
- }
+ /**
+ * This returns the currently processed list's parent container
+ *
+ * @param depth
+ * - The current dimension level
+ * @param isNew
+ * - if true creates a new list
+ * @return - The List
+ */
+ public List<Object> getParentList(final int depth, final boolean isNew) {
+ if (isNew) {
+ this.parentList = (List<Object>) assignList(depth + 1);
+ }
+ return this.parentList;
+ }
- /**
- * Adds the current list to the parent list
- *
- * @param depth - The current dimension level
- * @param isNew - if true creates a new list
- */
- public void addToParentList(final int depth, final boolean isNew) {
- getParentList(depth + 1, isNew).add(getCurrentList(depth, isNew));
- }
+ /**
+ * Adds the current list to the parent list
+ *
+ * @param depth
+ * - The current dimension level
+ * @param isNew
+ * - if true creates a new list
+ */
+ public void addToParentList(final int depth, final boolean isNew) {
+ getParentList(depth + 1, isNew).add(getCurrentList(depth, isNew));
+ }
- /**
- * @return - true if current list is empty, false otherwise
- */
- public boolean isCurrentListEmpty() {
- return (this.currentList == null) || this.currentList.isEmpty();
- }
+ /**
+ * @return - true if current list is empty, false otherwise
+ */
+ public boolean isCurrentListEmpty() {
+ return (this.currentList == null) || this.currentList.isEmpty();
+ }
- /**
- * @return - true if current list is empty, false otherwise
- */
- public boolean isParentListEmpty() {
- return (this.parentList == null) || this.parentList.isEmpty();
- }
+ /**
+ * @return - true if current list is empty, false otherwise
+ */
+ public boolean isParentListEmpty() {
+ return (this.parentList == null) || this.parentList.isEmpty();
+ }
- /**
- * This method is used to split the current list according to the given dimension and package's into the parent list
- *
- * @param pList - The parent container
- * @param depth - The current dimension depth
- * @param currentDimension - The size of current depth
- * @return - The segmented list
- */
- public List<Object> segmentList(final Object pList, final int depth, final int currentDimension) {
- getParentList(depth, true);
- getCurrentList(depth, true);
- List<Object> current = (List<Object>) pList;
- int cnt = 1;
- for (int i = 0; i < current.size(); i++) {
- if (cnt <= currentDimension) {
- this.currentList.add(current.get(i));
- }
- else {
- this.parentList.add(this.currentList);
- getCurrentList(depth, true);
- this.currentList.add(current.get(i));
- cnt = 1;
- }
- cnt++;
- if (i == (current.size() - 1)) {// This means the last iteration
- this.parentList.add(this.currentList);
- }
- }
- return this.parentList;
- }
+ /**
+ * This method is used to split the current list according to the given
+ * dimension and package's into the parent list
+ *
+ * @param pList
+ * - The parent container
+ * @param depth
+ * - The current dimension depth
+ * @param currentDimension
+ * - The size of current depth
+ * @return - The segmented list
+ */
+ public List<Object> segmentList(final Object pList, final int depth,
+ final int currentDimension) {
+ getParentList(depth, true);
+ getCurrentList(depth, true);
+ List<Object> current = (List<Object>) pList;
+ int cnt = 1;
+ for (int i = 0; i < current.size(); i++) {
+ if (cnt <= currentDimension) {
+ this.currentList.add(current.get(i));
+ } else {
+ this.parentList.add(this.currentList);
+ getCurrentList(depth, true);
+ this.currentList.add(current.get(i));
+ cnt = 1;
+ }
+ cnt++;
+ if (i == (current.size() - 1)) {// This means the last iteration
+ this.parentList.add(this.currentList);
+ }
+ }
+ return this.parentList;
+ }
- private Object assignList(final int depth) {
- switch (depth) {
- case 1:
- List<?> theList1 = new ArrayList<>();
- return theList1;
- case 2:
- List<List<?>> theList2 = new ArrayList<>();
- return theList2;
- case 3:
- List<List<List<?>>> theList3 = new ArrayList<>();
- return theList3;
- case 4:
- List<List<List<List<?>>>> theList4 = new ArrayList<>();
- return theList4;
- case 5:
- List<List<List<List<List<?>>>>> theList5 = new ArrayList<>();
- return theList5;
- case 6:
- List<List<List<List<List<List<?>>>>>> theList6 = new ArrayList<>();
- return theList6;
- case 7:
- List<List<List<List<List<List<List<?>>>>>>> theList7 = new ArrayList<>();
- return theList7;
- case 8:
- List<List<List<List<List<List<List<List<?>>>>>>>> theList8 = new ArrayList<>();
- return theList8;
- case 9:
- List<List<List<List<List<List<List<List<List<?>>>>>>>>> theList9 = new ArrayList<>();
- return theList9;
- case 10:
- List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>> theList10 = new ArrayList<>();
- return theList10;
- case 11:
- List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>> theList11 = new ArrayList<>();
- return theList11;
- case 12:
- List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>> theList12 = new ArrayList<>();
- return theList12;
- case 13:
- List<List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>>> theList13 = new ArrayList<>();
- return theList13;
- case 14:
- List<List<List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>>>> theList14 =
- new ArrayList<>();
- return theList14;
- case 15:
- List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>>>>> theList15 =
- new ArrayList<>();
- return theList15;
- default:
- throw new UnsupportedOperationException("Stack too deep maximum limit is 15");
- }
- }
-}
+ private Object assignList(final int depth) {
+ switch (depth) {
+ case 1 :
+ List<?> theList1 = new ArrayList<>();
+ return theList1;
+ case 2 :
+ List<List<?>> theList2 = new ArrayList<>();
+ return theList2;
+ case 3 :
+ List<List<List<?>>> theList3 = new ArrayList<>();
+ return theList3;
+ case 4 :
+ List<List<List<List<?>>>> theList4 = new ArrayList<>();
+ return theList4;
+ case 5 :
+ List<List<List<List<List<?>>>>> theList5 = new ArrayList<>();
+ return theList5;
+ case 6 :
+ List<List<List<List<List<List<?>>>>>> theList6 = new ArrayList<>();
+ return theList6;
+ case 7 :
+ List<List<List<List<List<List<List<?>>>>>>> theList7 = new ArrayList<>();
+ return theList7;
+ case 8 :
+ List<List<List<List<List<List<List<List<?>>>>>>>> theList8 = new ArrayList<>();
+ return theList8;
+ case 9 :
+ List<List<List<List<List<List<List<List<List<?>>>>>>>>> theList9 = new ArrayList<>();
+ return theList9;
+ case 10 :
+ List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>> theList10 = new ArrayList<>();
+ return theList10;
+ case 11 :
+ List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>> theList11 = new ArrayList<>();
+ return theList11;
+ case 12 :
+ List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>> theList12 = new ArrayList<>();
+ return theList12;
+ case 13 :
+ List<List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>>> theList13 = new ArrayList<>();
+ return theList13;
+ case 14 :
+ List<List<List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>>>> theList14 = new ArrayList<>();
+ return theList14;
+ case 15 :
+ List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<?>>>>>>>>>>>>>>> theList15 = new ArrayList<>();
+ return theList15;
+ default :
+ throw new UnsupportedOperationException(
+ "Stack too deep maximum limit is 15");
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/MultidimensionalArrayValueCreator.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/MultidimensionalArrayValueCreator.java
index 615e77f..0261d96 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/MultidimensionalArrayValueCreator.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/MultidimensionalArrayValueCreator.java
@@ -1,80 +1,101 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.util.ArrayList;
import java.util.List;
/**
- * @author ADG5COB
+ * A class to create multidimensional list, This class creates list's which
+ * represent 2d,3d,4d,... arrays
*/
public class MultidimensionalArrayValueCreator {
- private String[] reverseElements(final String[] input) {
- String[] output = new String[input.length];
- int ind = 0;
- for (int x = (input.length - 1); x > -1; x--) {
- output[ind++] = input[x];
- }
- return output;
- }
+ private String[] reverseElements(final String[] input) {
+ String[] output = new String[input.length];
+ int ind = 0;
+ for (int x = (input.length - 1); x > -1; x--) {
+ output[ind++] = input[x];
+ }
+ return output;
+ }
- /**
- * This converts the given array input into a multi-dimensional list based on dimension
- *
- * @param inputArr - The array elements
- * @param dimensionSizes - The sizes of various dimension's
- * @return - Multidimensional list
- */
- public List<Object> getValuesAsList(final Object[] inputArr, final String dimensionSizes) {
- List<Object> theFinalObject = null;
- ListCreator listCreator = new ListCreator();
- String[] dimensionSizesArr = reverseElements(dimensionSizes.split(","));
- int depth = 1;
- if (dimensionSizesArr.length == 1) {
- List<Object> theList = new ArrayList<>();
- for (Object s : inputArr) {
- theList.add(s);
- }
- theFinalObject = theList;
- }
- else {// This separates the iput elements into 1st level list's
- // Create a parent container list
- listCreator.getParentList(depth, true);
+ /**
+ * This converts the given array input into a multi-dimensional list based
+ * on dimension
+ *
+ * @param inputArr
+ * - The array elements
+ * @param dimensionSizes
+ * - The sizes of various dimension's
+ * @return - Multidimensional list
+ */
+ public List<Object> getValuesAsList(final Object[] inputArr,
+ final String dimensionSizes) {
+ List<Object> theFinalObject = null;
+ ListCreator listCreator = new ListCreator();
+ String[] dimensionSizesArr = reverseElements(dimensionSizes.split(","));
+ int depth = 1;
+ if (dimensionSizesArr.length == 1) {
+ List<Object> theList = new ArrayList<>();
+ for (Object s : inputArr) {
+ theList.add(s);
+ }
+ theFinalObject = theList;
+ } else {// This separates the iput elements into 1st level list's
+ // Create a parent container list
+ listCreator.getParentList(depth, true);
- int currentDimensionSize = Integer.parseInt(dimensionSizesArr[dimensionSizesArr.length - 1]);
- int cnt = 1;
- for (int f = 0; f < inputArr.length; f++) {
- if ((cnt == 1) || (cnt > currentDimensionSize) || (f == (inputArr.length - 1))) {
- if ((f == (inputArr.length - 1))) {// This means the last element is being dealt so we have to add it to the
- // list
- listCreator.addToCurrentList(depth, false, inputArr[f]);
- }
- // create new List and Add it; and add previous list(if existing) to a parent list and reset cnt
- cnt = 1;
- if (!listCreator.isCurrentListEmpty()) {
- listCreator.addToParentList(depth, false);
- }
- listCreator.addToCurrentList(depth, true, inputArr[f]);
- }
- else {
- // add element to current list
- listCreator.addToCurrentList(depth, false, inputArr[f]);
- }
- cnt++;
- }
- theFinalObject = listCreator.getParentList(depth, false);
- depth++;
- if (dimensionSizesArr.length > 2) {
- for (int h = (dimensionSizesArr.length - 2); h > 0; h--) {
- currentDimensionSize = Integer.parseInt(dimensionSizesArr[h]);
- theFinalObject = listCreator.segmentList(theFinalObject, depth, currentDimensionSize);
- depth++;
- }
- }
- }
- return theFinalObject;
- }
+ int currentDimensionSize = Integer
+ .parseInt(dimensionSizesArr[dimensionSizesArr.length - 1]);
+ int cnt = 1;
+ for (int f = 0; f < inputArr.length; f++) {
+ if ((cnt == 1) || (cnt > currentDimensionSize)
+ || (f == (inputArr.length - 1))) {
+ if ((f == (inputArr.length - 1))) {// This means the last
+ // element is being
+ // dealt so we have to
+ // add it to the
+ // list
+ listCreator.addToCurrentList(depth, false, inputArr[f]);
+ }
+ // create new List and Add it; and add previous list(if
+ // existing) to a parent list and reset cnt
+ cnt = 1;
+ if (!listCreator.isCurrentListEmpty()) {
+ listCreator.addToParentList(depth, false);
+ }
+ listCreator.addToCurrentList(depth, true, inputArr[f]);
+ } else {
+ // add element to current list
+ listCreator.addToCurrentList(depth, false, inputArr[f]);
+ }
+ cnt++;
+ }
+ theFinalObject = listCreator.getParentList(depth, false);
+ depth++;
+ if (dimensionSizesArr.length > 2) {
+ for (int h = (dimensionSizesArr.length - 2); h > 0; h--) {
+ currentDimensionSize = Integer
+ .parseInt(dimensionSizesArr[h]);
+ theFinalObject = listCreator.segmentList(theFinalObject,
+ depth, currentDimensionSize);
+ depth++;
+ }
+ }
+ }
+ return theFinalObject;
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ProjectCreator.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ProjectCreator.java
index e85c7ca..a2c4953 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ProjectCreator.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/ProjectCreator.java
@@ -1,6 +1,17 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.io.BufferedReader;
@@ -13,11 +24,16 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
+import java.util.stream.Collectors;
import org.eclipse.blockchain.core.events.BlockchainEnvironmentChangedTrigger;
import org.eclipse.blockchain.core.events.IBlockchainEnvironmentChangedEvent;
import org.eclipse.blockchain.core.events.IBlockchainEnvironmentChangedListener;
+import org.eclipse.blockchain.model.core.EthereumProjectHandler;
+import org.eclipse.blockchain.model.core.EthereumProjectModelHandler;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
@@ -38,364 +54,513 @@
import org.eclipse.core.runtime.preferences.InstanceScope;
/**
- * @author ADG5COB
+ * Project handle for Ethereum Project
*/
public class ProjectCreator implements IResourceChangeListener, IBlockchainEnvironmentChangedListener {
+ private static ProjectCreator instance;
+ private final Map<String, EthereumProject> projectMap = new HashMap<>();
+ private String selectedEnvironment = "";
- private static ProjectCreator instance;
- private final Map<String, EthereumProject> projectMap = new HashMap<>();
- private String selectedEnvironment = "";
+ private ProjectCreator() {
+ }
- private ProjectCreator() {}
+ /**
+ * There will be only 1 Project creator instance which can be used to create
+ * multiple Ethereum projects
+ *
+ * @return - The Project creator instance
+ */
+ public static ProjectCreator getInstance() {
+ if (instance == null) {
+ instance = new ProjectCreator();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(instance);
+ BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(instance);
+ }
+ return instance;
+ }
- /**
- * There will be only 1 Project creator instance which can be used to create multiple Ethereum projects
- *
- * @return - The Project creator instance
- */
- public static ProjectCreator getInstance() {
- if (instance == null) {
- instance = new ProjectCreator();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(instance);
- BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(instance);
- }
- return instance;
- }
+ /**
+ * This API is used to create an Ethereum project inside the workspace
+ *
+ * @param projectName - Name of the project
+ * @param projectPath
+ * @return - Project creation message if error occurs then it will return the
+ * error message else empty
+ * @throws IOException - If any problem with file access then this will be
+ * thrown
+ * @throws CoreException -
+ */
+ public String createNewProject(final String projectName, final String projectPath)
+ throws IOException, CoreException {
+ if (this.projectMap.containsKey(projectName)) {
+ return "A project with same name already exists in the workspace";
+ }
+ // EthereumProject ethProject = new EthereumProject(projectPath + File.separator
+ // + projectName);
+ EthereumProject ethProject = EthereumProjectHandler.getInstance().getEthProject(projectName);
+ ethProject.setProjectLocation(projectPath + File.separator + projectName);
+ String directoryCreation = createFolderInWorkspaceForNewProject(ethProject);
- /**
- * This API is used to create an Ethereum project inside the workspace
- *
- * @param projectName - Name of the project
- * @param projectPath
- * @return - Project creation message if error occurs then it will return the error message else empty
- * @throws IOException - If any problem with file access then this will be thrown
- * @throws CoreException -
- */
- public String createNewProject(final String projectName, final String projectPath) throws IOException, CoreException {
- if (this.projectMap.containsKey(projectName)) {
- return "A project with same name already exists in the workspace";
- }
- EthereumProject ethProject = new EthereumProject(projectPath + File.separator + projectName);
- String directoryCreation = createFolderInWorkspaceForNewProject(ethProject);
+ if (directoryCreation.equals("")) {
+ // Contracts folder and sample contract
+ File contractsFolder = new File(ethProject.getProjectLocation() + File.separator + "contracts");
+ contractsFolder.mkdir();
+ File sampleSolFile = new File(contractsFolder.getAbsolutePath() + File.separator + "HelloWorld.sol");
+ if (!sampleSolFile.createNewFile()) {
+ throw new IOException(sampleSolFile.getPath());
+ }
+ try (BufferedReader br = new BufferedReader(
+ new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("HelloWorld.template")));
+ BufferedWriter bw = new BufferedWriter(new FileWriter(sampleSolFile));) {
+ String sampleSolContent = "";
+ while ((sampleSolContent = br.readLine()) != null) {
+ bw.append(sampleSolContent);
+ bw.append(System.lineSeparator());
+ }
+ }
+ configureAndImportProject(ethProject, projectName, URIUtil.toURI(ethProject.getProjectLocation()));
+ this.projectMap.put(projectName, ethProject);
+ }
+ return directoryCreation;
+ }
- if (directoryCreation.equals("")) {
- // Contracts folder and sample contract
- File contractsFolder = new File(ethProject.getProjectLocation() + File.separator + "contracts");
- contractsFolder.mkdir();
- File sampleSolFile = new File(contractsFolder.getAbsolutePath() + File.separator + "HelloWorld.sol");
- if (!sampleSolFile.createNewFile()) {
- throw new IOException(sampleSolFile.getPath());
- }
- try (
- BufferedReader br = new BufferedReader(
- new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("HelloWorld.template")));
- BufferedWriter bw = new BufferedWriter(new FileWriter(sampleSolFile));) {
- String sampleSolContent = "";
- while ((sampleSolContent = br.readLine()) != null) {
- bw.append(sampleSolContent);
- bw.append(System.lineSeparator());
- }
- }
- configureAndImportProject(ethProject, projectName, URIUtil.toURI(ethProject.getProjectLocation()));
- this.projectMap.put(projectName, ethProject);
- }
- return directoryCreation;
- }
+ /**
+ * To check whether the project has ethereum nature before importing into
+ * workspace
+ *
+ * @param projectPathString
+ * @return
+ */
+ public String isItAnEthereumProject(final String projectPathString) {
+ // Check if sucha directory exists
+ File projectDirectory = new File(projectPathString);
+ if (projectDirectory.exists()) {
+ // valid directory
+ String[] splitProjPath = projectPathString.split("\\\\");
+ if (splitProjPath.length >= 2) {
+ // check if there is a .project in the location
+ File projDescriptorFile = new File(projectPathString + File.separator + ".project");
- /**
- * To check whether the project has ethereum nature before importing into workspace
- *
- * @param projectPathString
- * @return
- */
- public String isItAnEthereumProject(final String projectPathString) {
- // Check if sucha directory exists
- File projectDirectory = new File(projectPathString);
- if (projectDirectory.exists()) {
- // valid directory
- String[] splitProjPath = projectPathString.split("\\\\");
- if (splitProjPath.length >= 2) {
- // check if there is a .project in the location
- File projDescriptorFile = new File(projectPathString + File.separator + ".project");
+ if (projDescriptorFile.exists()) {
+ IProjectDescription description;
+ try {
+ Path projectIPath = new Path(projectPathString);
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ description = workspace.loadProjectDescription(
+ projectIPath.append(IPath.SEPARATOR + IProjectDescription.DESCRIPTION_FILE_NAME));
+ String[] natureIds = description.getNatureIds();
- if (projDescriptorFile.exists()) {
- IProjectDescription description;
- try {
- Path projectIPath = new Path(projectPathString);
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- description = workspace.loadProjectDescription(
- projectIPath.append(IPath.SEPARATOR + IProjectDescription.DESCRIPTION_FILE_NAME));
- String[] natureIds = description.getNatureIds();
+ for (String natureID : natureIds) {
+ if ((EthereumNature.ETHEREUM_NATURE.equalsIgnoreCase(natureID))) {
+ return "";
+ }
+ }
+ return "Not Ethereum project";
+ } catch (CoreException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }
+ return "No Ethereum project exists at: " + projectPathString;
+ }
+ return "Invalid directory path: " + projectPathString;
+ }
+ return "Directory " + projectPathString + " does not exist";
+ }
- for (String natureID : natureIds) {
- if ((EthereumProjectNature.ETHEREUM_NATURE.equalsIgnoreCase(natureID))) {
- return "";
- }
- }
- return "Not Ethereum project";
- }
- catch (CoreException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- }
- return "No Ethereum project exists at: " + projectPathString;
- }
- return "Invalid directory path: " + projectPathString;
- }
- return "Directory " + projectPathString + " does not exist";
- }
+ /**
+ * @param projectPathString
+ * @return
+ */
+ public String createExistingProject(final String projectPathString) {
- /**
- * @param projectPathString
- * @return
- */
- public String createExistingProject(final String projectPathString) {
+ // Check if sucha directory exists
+ File projectDirectory = new File(projectPathString);
+ if (projectDirectory.exists()) {
+ // valid directory
+ String[] splitProjPath = projectPathString.split("\\\\");
+ if (splitProjPath.length >= 2) {
+ String projName = splitProjPath[splitProjPath.length - 1];
- // Check if sucha directory exists
- File projectDirectory = new File(projectPathString);
- if (projectDirectory.exists()) {
- // valid directory
- String[] splitProjPath = projectPathString.split("\\\\");
- if (splitProjPath.length >= 2) {
- String projName = splitProjPath[splitProjPath.length - 1];
+ EthereumProject ethProject = EthereumProjectHandler.getInstance().getEthProject(projName);
+ ethProject.setProjectLocation(projectPathString);
- EthereumProject ethProject = new EthereumProject(projectPathString);
- // check if there is a .project in the location
- File projDescriptorFile = new File(projectPathString + File.separator + ".project");
+ // check if there is a .project in the location
+ File projDescriptorFile = new File(projectPathString + File.separator + ".project");
- if (projDescriptorFile.exists()) {
- return invokeProjectCreationWithDescription(projectPathString, projectDirectory, projName, ethProject);
- }
- return "No Ethereum project exists at: " + projectPathString;
- }
- return "Invalid directory path: " + projectPathString;
- }
- // directory doesn't exist. Should we create?
- return "Directory " + projectPathString + " does not exist";
- }
+ EthereumProject ethProjectFromModal = EthereumProjectModelHandler.getInstance()
+ .loadProject(new File(projectPathString + File.separator + ".ethproject").getAbsolutePath());
- /**
- * @param projectPathString
- * @param projectDirectory
- * @param projName
- * @param ethProject
- * @return
- */
- private String invokeProjectCreationWithDescription(final String projectPathString, final File projectDirectory,
- final String projName, final EthereumProject ethProject) {
- // project exists at this location
- IProgressMonitor monitor = new NullProgressMonitor();
+ if (projDescriptorFile.exists()) {
+ /**
+ * Populate modal data into EthProject
+ */
+ ethProject.setFirstMatchingSolFile(ethProjectFromModal.getFirstMatchingSolFile());
+ ethProject.setCompiledSolidityFiles(ethProjectFromModal.getCompiledSolidityFiles());
+ ethProject.setEnvironmentBasedDeployedModel(ethProjectFromModal.getEnvironmentBasedDeployedModel());
+ ethProject.getDeploymentmodel().addAll(ethProjectFromModal.getDeploymentmodel());
- Path projectIPath = new Path(projectPathString);
+ return invokeProjectCreationWithDescription(projectPathString, projectDirectory, projName,
+ ethProject);
+ }
+ return "No Ethereum project exists at: " + projectPathString;
+ }
+ return "Invalid directory path: " + projectPathString;
+ }
+ // directory doesn't exist. Should we create?
+ return "Directory " + projectPathString + " does not exist";
+ }
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ /**
+ * @param projectPathString
+ * @param projectDirectory
+ * @param projName
+ * @param ethProject
+ * @return
+ */
+ private String invokeProjectCreationWithDescription(final String projectPathString, final File projectDirectory,
+ final String projName, final EthereumProject ethProject) {
+ // project exists at this location
+ IProgressMonitor monitor = new NullProgressMonitor();
- IProjectDescription description;
- try {
- description = workspace
- .loadProjectDescription(projectIPath.append(IPath.SEPARATOR + IProjectDescription.DESCRIPTION_FILE_NAME));
+ Path projectIPath = new Path(projectPathString);
-// String[] natureIds = description.getNatureIds();
-// boolean hasEthereumNature = false;
-// for (String natureID : natureIds) {
-// if ((EthereumProjectNature.ETHEREUM_NATURE.equalsIgnoreCase(natureID))) {
-// hasEthereumNature = true;
-// break;
-// }
-// }
-// if (!hasEthereumNature) {
-// String[] newNatureIds = new String[natureIds.length + 1];
-// for (int z = 0; z < natureIds.length; z++) {
-// newNatureIds[z] = natureIds[z];
-// }
-// newNatureIds[newNatureIds.length - 1] = EthereumProjectNature.ETHEREUM_NATURE;
-// description.setNatureIds(newNatureIds);
-// }
- createProjectWithDescription(projectDirectory, projName, ethProject, monitor, projectIPath, workspace,
- description);
- }
- catch (CoreException e) {
- BlockchainCore.getInstance().logException(BlockchainCore.PLUGIN_ID, e.getMessage(), e);
- return "Exception occured during project creation";
- }
- // Should we check if the project has at least one solc file? If not create contracts folder and add file?
- return "";
- }
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
- /**
- * @param projectDirectory
- * @param projName
- * @param ethProject
- * @param monitor
- * @param projectIPath
- * @param workspace
- * @param description
- * @throws CoreException
- */
- private void createProjectWithDescription(final File projectDirectory, final String projName,
- final EthereumProject ethProject, final IProgressMonitor monitor, final Path projectIPath,
- final IWorkspace workspace, final IProjectDescription description)
- throws CoreException {
- IProject project;
- if (!description.getName().equals(projectDirectory.getName())) {
- project = workspace.getRoot().getProject(projectDirectory.getName());
- }
- else {
- project = workspace.getRoot().getProject(description.getName());
- }
+ IProjectDescription description;
+ try {
+ description = workspace.loadProjectDescription(
+ projectIPath.append(IPath.SEPARATOR + IProjectDescription.DESCRIPTION_FILE_NAME));
- if (Platform.getLocation().isPrefixOf(projectIPath)) {
- description.setLocation(null);
- }
- else {
- description.setLocation(projectIPath);
- }
+ // String[] natureIds = description.getNatureIds();
+ // boolean hasEthereumNature = false;
+ // for (String natureID : natureIds) {
+ // if
+ // ((EthereumProjectNature.ETHEREUM_NATURE.equalsIgnoreCase(natureID)))
+ // {
+ // hasEthereumNature = true;
+ // break;
+ // }
+ // }
+ // if (!hasEthereumNature) {
+ // String[] newNatureIds = new String[natureIds.length + 1];
+ // for (int z = 0; z < natureIds.length; z++) {
+ // newNatureIds[z] = natureIds[z];
+ // }
+ // newNatureIds[newNatureIds.length - 1] =
+ // EthereumProjectNature.ETHEREUM_NATURE;
+ // description.setNatureIds(newNatureIds);
+ // }
+ createProjectWithDescription(projectDirectory, projName, ethProject, monitor, projectIPath, workspace,
+ description);
+ } catch (CoreException e) {
+ BlockchainCore.getInstance().logException(BlockchainCore.PLUGIN_ID, e.getMessage(), e);
+ return "Exception occured during project creation";
+ }
+ // Should we check if the project has at least one solc file? If not
+ // create contracts folder and add file?
+ return "";
+ }
- ethProject.setProjectDescription(description);
- ethProject.setProject(project);
+ /**
+ * @param projectDirectory
+ * @param projName
+ * @param ethProject
+ * @param monitor
+ * @param projectIPath
+ * @param workspace
+ * @param description
+ * @throws CoreException
+ */
+ private void createProjectWithDescription(final File projectDirectory, final String projName,
+ final EthereumProject ethProject, final IProgressMonitor monitor, final Path projectIPath,
+ final IWorkspace workspace, final IProjectDescription description) throws CoreException {
+ IProject project;
+ if (!description.getName().equals(projectDirectory.getName())) {
+ project = workspace.getRoot().getProject(projectDirectory.getName());
+ } else {
+ project = workspace.getRoot().getProject(description.getName());
+ }
- boolean isProjectExists = project.exists();
+ if (Platform.getLocation().isPrefixOf(projectIPath)) {
+ description.setLocation(null);
+ } else {
+ description.setLocation(projectIPath);
+ }
- if (!isProjectExists) {
- project.create(description, 0, monitor);
- }
- project.open(monitor);
- if (!project.getDescription().hasNature(EthereumProjectNature.ETHEREUM_NATURE)) {
- IProjectDescription description2 = project.getDescription();
- String[] natureIds = description2.getNatureIds();
- String[] newNatureIds = new String[natureIds.length + 1];
- for (int z = 0; z < natureIds.length; z++) {
- newNatureIds[z] = natureIds[z];
- }
- newNatureIds[newNatureIds.length - 1] = EthereumProjectNature.ETHEREUM_NATURE;
- description2.setNatureIds(newNatureIds);
- project.setDescription(description2, monitor);
- }
+ ethProject.setProjectDescription(description);
+ ethProject.setProject(project);
- if (isProjectExists) {
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- }
- this.projectMap.put(projName, ethProject);
- }
+ boolean isProjectExists = project.exists();
- /**
- * @param projectName -
- * @return -
- * @throws CoreException -
- */
- public IFile getFirstMatchingSolFile(final String projectName) throws CoreException {
- return this.projectMap.get(projectName).getSolFile();
- }
+ if (!isProjectExists) {
+ project.create(description, 0, monitor);
+ }
+ project.open(monitor);
+ if (!project.getDescription().hasNature(EthereumNature.ETHEREUM_NATURE)) {
+ IProjectDescription description2 = project.getDescription();
+ String[] natureIds = description2.getNatureIds();
+ String[] newNatureIds = new String[natureIds.length + 1];
+ for (int z = 0; z < natureIds.length; z++) {
+ newNatureIds[z] = natureIds[z];
+ }
+ newNatureIds[newNatureIds.length - 1] = EthereumNature.ETHEREUM_NATURE;
+ description2.setNatureIds(newNatureIds);
+ project.setDescription(description2, monitor);
+ }
- /**
- * This is used to configure and import a ethereum project into prduct
- *
- * @param projectName - Project name
- * @param projectURI - The location URI of the project contents
- * @throws CoreException -
- * @throws IOException -
- */
- private void configureAndImportProject(final EthereumProject ethProject, final String projectName,
- final URI projectURI)
- throws CoreException, IOException {
- ethProject.setProjectDescription(ResourcesPlugin.getWorkspace().newProjectDescription(projectName));
- ethProject.getProjectDescription().setLocationURI(projectURI);
- ethProject.addDefaultNatures();
+ if (isProjectExists) {
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ }
+ this.projectMap.put(projName, ethProject);
+ }
- // Validate and set nature
- String[] natureIds = ethProject.getProjectDescription().getNatureIds();
- String[] newNatures = new String[natureIds.length + ethProject.getNatureIds().length];
- int i = natureIds.length;
- for (String n : ethProject.getNatureIds()) {
- newNatures[i++] = n;
- }
- if (IStatus.OK == ResourcesPlugin.getWorkspace().validateNatureSet(newNatures).getCode()) {
- ethProject.getProjectDescription().setNatureIds(newNatures);
- }
- else {
- BlockchainCore.getInstance().logException("", "Problem configuring natures",
- new Exception(Arrays.toString(ethProject.getNatureIds())));
- }
+ /**
+ * @param projectName -
+ * @return -
+ * @throws CoreException -
+ */
+ public IFile getFirstMatchingSolFile(final String projectName) throws CoreException {
+ return EthereumProjectHandler.getInstance().getSolFile(projectName);
+ }
- ethProject.setProject(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
- ethProject.getProject().create(ethProject.getProjectDescription(), new NullProgressMonitor());
- ethProject.getProject().open(new NullProgressMonitor());
- createPackageJsonDepFile(ethProject);
- }
+ /**
+ * This is used to configure and import a ethereum project into prduct
+ *
+ * @param projectName - Project name
+ * @param projectURI - The location URI of the project contents
+ * @throws CoreException -
+ * @throws IOException -
+ */
+ private void configureAndImportProject(final EthereumProject ethProject, final String projectName,
+ final URI projectURI) throws CoreException, IOException {
+ ethProject.setProjectDescription(ResourcesPlugin.getWorkspace().newProjectDescription(projectName));
+ ethProject.getProjectDescription().setLocationURI(projectURI);
+ // ethProject.addDefaultNatures();
+ EthereumProjectHandler.getInstance().addProjectNature(ethProject, EthereumNature.ETHEREUM_NATURE);
+ // ethProject.addDefaultBuilders();
+ EthereumProjectHandler.getInstance().addProjectBuilder(ethProject, EthereumBuilder.ETHEREUM_BUILDER);
+ for (String builderId : ethProject.getProjectBuilders()) {
+ addBuildersToProject(ethProject.getProjectDescription(), builderId);
+ }
- private String createFolderInWorkspaceForNewProject(final EthereumProject ethProject) {
- File projectDirectory = new File(ethProject.getProjectLocation());
- if (projectDirectory.mkdir()) {
- return "";
- }
- return "Some Problem in directory creation, please check the location " + ethProject.getProjectLocation();
- }
+ // Validate and set nature
+ String[] natureIds = ethProject.getProjectDescription().getNatureIds();
+ String[] newNatures = new String[natureIds.length + ethProject.getProjectNatures().size()];
+ int i = natureIds.length;
+ for (String n : ethProject.getProjectNatures()) {
+ newNatures[i++] = n;
+ }
+ if (IStatus.OK == ResourcesPlugin.getWorkspace().validateNatureSet(newNatures).getCode()) {
+ ethProject.getProjectDescription().setNatureIds(newNatures);
+ } else {
+ BlockchainCore.getInstance().logException("", "Problem configuring natures", new Exception(Arrays.toString(
+ ethProject.getProjectNatures().toArray(new String[ethProject.getProjectNatures().size()]))));
+ }
- private void createPackageJsonDepFile(final EthereumProject ethProject) throws IOException {
- File packageJson = new File(ethProject.getProject().getLocation().toOSString() + IPath.SEPARATOR + "package.json");
- if (!packageJson.createNewFile()) {
- throw new IOException(packageJson.getPath());
- }
- }
+ ethProject.setProject(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
+ ethProject.getProject().create(ethProject.getProjectDescription(), new NullProgressMonitor());
+ ethProject.getProject().open(new NullProgressMonitor());
+ createPackageJsonDepFile(ethProject);
+ }
- /**
- * {@inheritDoc} On deletion of project from workspace it should be removed from project map as-well.
- */
- @Override
- public void resourceChanged(final IResourceChangeEvent event) {
- IResource resource = event.getResource();
- if ((resource != null) && (resource instanceof IProject) && (event.getType() == IResourceChangeEvent.PRE_DELETE) &&
- this.projectMap.containsKey(resource.getName())) {
- this.projectMap.remove(resource.getName());
- }
- else {
- IResourceDelta rootDelta = event.getDelta();
- try {
- rootDelta.accept(new IResourceDeltaVisitor() {
+ private void addBuildersToProject(final IProjectDescription projectDescription, final String builderId) {
+ ICommand[] commands = projectDescription.getBuildSpec();
+ for (ICommand command : commands) {
+ if (builderId.equals(command.getBuilderName())) {
+ return;
+ }
+ }
+ ICommand[] newCommands = new ICommand[commands.length + 1];
+ System.arraycopy(commands, 0, newCommands, 0, commands.length);
+ ICommand newCommand = projectDescription.newCommand();
+ newCommand.setBuilderName(builderId);
- @Override
- public boolean visit(final IResourceDelta delta) throws CoreException {
- IResource resource2 = delta.getResource();
- if ((resource2 instanceof IFile) && (delta.getResource().getFileExtension() != null) &&
- (resource2.getFileExtension().equals("sol")) && (delta.getKind() == IResourceDelta.REMOVED) &&
- (getEthProject(resource2.getProject().getName()) != null)) {
- getEthProject(resource2.getProject().getName()).getCompiledSolidityFiles().remove(resource2);
- getEthProject(resource2.getProject().getName()).removeDeploymentModelForResource(resource2,
- getSelectedEnvironment());
- }
- return true;
- }
- });
- }
- catch (CoreException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- }
- }
+ newCommands[newCommands.length - 1] = newCommand;
+ projectDescription.setBuildSpec(newCommands);
+ }
- /**
- * @param projectName
- * @return
- */
- public EthereumProject getEthProject(final String projectName) {
- return this.projectMap.get(projectName);
- }
+ private String createFolderInWorkspaceForNewProject(final EthereumProject ethProject) {
+ File projectDirectory = new File(ethProject.getProjectLocation());
+ if (projectDirectory.mkdir()) {
+ return "";
+ }
+ return "Some Problem in directory creation, please check the location " + ethProject.getProjectLocation();
+ }
- private String getSelectedEnvironment() {
- if (!this.selectedEnvironment.isEmpty()) {
- return this.selectedEnvironment;
- }
- return this.selectedEnvironment = InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
- }
+ private void createPackageJsonDepFile(final EthereumProject ethProject) throws IOException {
+ File packageJson = new File(
+ ethProject.getProject().getLocation().toOSString() + IPath.SEPARATOR + "package.json");
+ if (!packageJson.createNewFile()) {
+ throw new IOException(packageJson.getPath());
+ }
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
- this.selectedEnvironment = event.getActiveEvironment();
- }
-}
+ /**
+ * {@inheritDoc} On deletion of project from workspace it should be removed from
+ * project map as-well.
+ */
+ @Override
+ public void resourceChanged(final IResourceChangeEvent event) {
+ IResource resource = event.getResource();
+ if ((resource != null) && (resource instanceof IProject) && (event.getType() == IResourceChangeEvent.PRE_DELETE)
+ && this.projectMap.containsKey(resource.getName())) {
+ try {
+ EthereumProjectModelHandler.getInstance().saveProject(this.projectMap.get(resource.getName()));
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ this.projectMap.remove(resource.getName());
+ EthereumProjectHandler.getInstance().removeEthProject(resource.getName());
+ } else {
+ IResourceDelta rootDelta = event.getDelta();
+ try {
+ rootDelta.accept(new IResourceDeltaVisitor() {
+
+ @Override
+ public boolean visit(final IResourceDelta delta) throws CoreException {
+ IResource resource2 = delta.getResource();
+ if ((resource2 instanceof IFile) && (delta.getResource().getFileExtension() != null)
+ && (resource2.getFileExtension().equals("sol"))
+ && (delta.getKind() == IResourceDelta.REMOVED)
+ && (getEthProject(resource2.getProject().getName()) != null)) {
+ getEthProject(resource2.getProject().getName()).getCompiledSolidityFiles()
+ .remove(resource2);
+ removeDeploymentModelForResource(resource, getSelectedEnvironment());
+ }
+ return true;
+ }
+ });
+ } catch (CoreException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }
+ }
+
+ /**
+ * @param projectName
+ * @return
+ */
+ public EthereumProject getEthProject(final String projectName) {
+ return this.projectMap.get(projectName);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param solidityFile - The compiled solidity file that belongs to this project
+ */
+ public void addCompiledSolidityFiles(final IResource solidityFile) {
+ EthereumProjectHandler.getInstance().addCompiledSolidityFiles(solidityFile);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - Whether the SC is deployed into the passed in environment
+ */
+ public boolean isSCDeployed(final IResource scFile, final String environment) {
+ return EthereumProjectHandler.getInstance().isSCDeployed(scFile, environment);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param contractAddress - The contract address of the deployed SC
+ * @param scFile - The SC resource
+ * @param lastUsedAccount - The account that was last used for performing a
+ * transaction
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void createDeploymentModel(final String contractAddress, final IResource scFile,
+ final String lastUsedAccount, final String environment) {
+ EthereumProjectHandler.getInstance().createDeploymentModel(contractAddress, scFile, lastUsedAccount,
+ environment);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - The account that was last used for performing a transaction
+ */
+ public String getLastUsedAccount(final IResource scFile, final String environment) {
+ return EthereumProjectHandler.getInstance().getLastUsedAccount(scFile, environment);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param scFile - The SC resource
+ * @param accountDetails - The new account that was used for transaction
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void updateLastUsedAccount(final IResource scFile, final String accountDetails, final String environment) {
+ EthereumProjectHandler.getInstance().updateLastUsedAccount(scFile, accountDetails, environment);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - The contract address of the deployed SC
+ */
+ public String getContractAddress(final IResource scFile, final String environment) {
+ return EthereumProjectHandler.getInstance().getContractAddress(scFile, environment);
+ }
+
+ /**
+ * This is just a re-direction to EthereumProjectHandler, this is done this way
+ * because we don't want client's to directly use EthereumProjectHandler
+ *
+ * @param resource - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void removeDeploymentModelForResource(final IResource resource, final String environment) {
+ EthereumProjectHandler.getInstance().removeDeploymentModelForResource(resource, environment);
+ }
+
+ private String getSelectedEnvironment() {
+ if (!this.selectedEnvironment.isEmpty()) {
+ return this.selectedEnvironment;
+ }
+ return this.selectedEnvironment = InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
+ }
+
+ /**
+ * Save all existing workspace project modals
+ *
+ * @throws IOException - Any exception while performing I/O
+ */
+ public void saveAllProjects() throws IOException {
+ EthereumProjectModelHandler.getInstance()
+ .saveProjects(this.projectMap.values().stream().collect(Collectors.toList()));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
+ this.selectedEnvironment = event.getActiveEvironment();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SecoBlocksPreferenceConstants.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SecoBlocksPreferenceConstants.java
index 6ae8fb1..8e26389 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SecoBlocksPreferenceConstants.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SecoBlocksPreferenceConstants.java
@@ -1,31 +1,43 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ * Pavithra Krishna Reddy
+ *******************************************************************************/
package org.eclipse.blockchain.core;
-
/**
- * @author ADG5COB
+ * Preference constants class
*/
public class SecoBlocksPreferenceConstants {
- public enum EnvironmentType {
- GETH_CLIENT,
- EMBEDDED_EVM
- }
+ public enum EnvironmentType {
+ GETH_CLIENT, EMBEDDED_EVM
+ }
- public static final String SECOBLOCKS_PREF_NODE = "org.eclipse.blockchain.ui";
- public static final String SOLIDITY_COMPILER_PREF_KEY = "soliditypreference";
- public static final String SOLIDITY_GIT_URL = "https://github.com/ethereum/solidity/releases";
- public static final String ENVIRONMENT_PREF_KEY = "environmentpreference";
+ public static final String SECOBLOCKS_PREF_NODE = "org.eclipse.blockchain.ui";
+ public static final String SOLIDITY_COMPILER_PREF_KEY = "soliditypreference";
+ public static final String SOLIDITY_GIT_URL = "https://github.com/ethereum/solidity/releases";
+ public static final String ENVIRONMENT_PREF_KEY = "environmentpreference";
- public static final String[] versionList = { "v0.5.17", "v0.6.4", "v0.6.3", "v0.6.2", "v0.6.1", "v0.5.16", "v0.6.0" };
- public static final String PREF_KEY_VersionList = "versionList";
- public static final String PREF_KEY_SelectedList = "selectedList";
- /**
- * This setting of currently selected embedded address is required because this address will be used in Web3jHandler
- * to retrieve appropriate web3j and Admin EmbeddedEVM instance
- */
- // public static final String EMBEDDED_EVM_SELECTED_ADDRESS = "embeddedevmaddress";
+ public static final String[] versionList = {"v0.5.17", "v0.6.4", "v0.6.3",
+ "v0.6.2", "v0.6.1", "v0.5.16", "v0.6.0"};
+ public static final String PREF_KEY_VersionList = "versionList";
+ public static final String PREF_KEY_SelectedList = "selectedList";
+ /**
+ * This setting of currently selected embedded address is required because
+ * this address will be used in Web3jHandler to retrieve appropriate web3j
+ * and Admin EmbeddedEVM instance
+ */
+ // public static final String EMBEDDED_EVM_SELECTED_ADDRESS =
+ // "embeddedevmaddress";
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCaster.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCaster.java
index 5bb73b8..5855422 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCaster.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCaster.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.math.BigInteger;
@@ -8,163 +18,158 @@
import org.web3j.utils.Numeric;
/**
- * @author ADG5COB
+ * This class is used to cast the string inputs into their correspomding java
+ * classes
*/
public class SolidityDynamicValueCaster {
- private SolidityDynamicValueCaster() {}
+ private SolidityDynamicValueCaster() {
+ }
- /**
- * This method is used to perform dynamic value casting of params that should be used while invvoking smart contract
- * methods
- *
- * @param valueToCast - The String value obtained from the user
- * @param type - The actual type to which the object should be casted to
- * @return - Casted value
- */
- public static Object castValue(final String valueToCast, final Class<?> type) {
- /**
- * Boolean Data types
- */
- if (type.getName().equals(Boolean.class.getName())) {
- return Boolean.parseBoolean(valueToCast);
- }
- else if (type.getName().equals(Byte.class.getName())) {
- return Byte.parseByte(valueToCast);
- }
- else if (type.getName().equals(Short.class.getName())) {
- return Short.parseShort(valueToCast);
- }
- else if (type.getName().equals(Integer.class.getName())) {
- return Integer.parseInt(valueToCast);
- }
- else if (type.getName().equals(Long.class.getName())) {
- return Long.parseLong(valueToCast);
- }
- else if (type.getName().equals(Float.class.getName())) {
- return Float.parseFloat(valueToCast);
- }
- else if (type.getName().equals(Double.class.getName())) {
- return Double.parseDouble(valueToCast);
- }
- else if (type.getName().equals(String.class.getName())) {
- return valueToCast;
- }
- else if (type.getName().equals(Character.class)) {
- return Character.valueOf(valueToCast.charAt(0));
- }
- else if (type.getName().equals(BigInteger.class.getName())) {
- /**
- * Non-Primitive Data types
- */
- return new BigInteger(valueToCast);
- }
- else {
- return null;
- }
- }
+ /**
+ * This method is used to perform dynamic value casting of params that
+ * should be used while invvoking smart contract methods
+ *
+ * @param valueToCast
+ * - The String value obtained from the user
+ * @param type
+ * - The actual type to which the object should be casted to
+ * @return - Casted value
+ */
+ public static Object castValue(final String valueToCast,
+ final Class<?> type) {
+ /**
+ * Boolean Data types
+ */
+ if (type.getName().equals(Boolean.class.getName())) {
+ return Boolean.parseBoolean(valueToCast);
+ } else if (type.getName().equals(Byte.class.getName())) {
+ return Byte.parseByte(valueToCast);
+ } else if (type.getName().equals(Short.class.getName())) {
+ return Short.parseShort(valueToCast);
+ } else if (type.getName().equals(Integer.class.getName())) {
+ return Integer.parseInt(valueToCast);
+ } else if (type.getName().equals(Long.class.getName())) {
+ return Long.parseLong(valueToCast);
+ } else if (type.getName().equals(Float.class.getName())) {
+ return Float.parseFloat(valueToCast);
+ } else if (type.getName().equals(Double.class.getName())) {
+ return Double.parseDouble(valueToCast);
+ } else if (type.getName().equals(String.class.getName())) {
+ return valueToCast;
+ } else if (type.getName().equals(Character.class)) {
+ return Character.valueOf(valueToCast.charAt(0));
+ } else if (type.getName().equals(BigInteger.class.getName())) {
+ /**
+ * Non-Primitive Data types
+ */
+ return new BigInteger(valueToCast);
+ } else {
+ return null;
+ }
+ }
- /**
- * @param valueToCast - This is a comma separated value
- * @param type - The class type to cast to
- * @param dimensionDepth - The level of array
- * @return - array
- */
- public static Object castArrayArgs(final String valueToCast, final Class<?> type) {
- Object obj = null;
- MultidimensionalArrayValueCreator multidimensionalArrayValueCreator = new MultidimensionalArrayValueCreator();
- String values = valueToCast.split(":")[1];
- String dimensions = valueToCast.split(":")[0];
- if (type.getName().equals("byte")) {// only for this list of byte array - multidimensional array in this has to be
- // checked
- String[] vals = values.split(",");
- Object[] byteObjects = new Object[vals.length];
- for (int i = 0; i < vals.length; i++) {
- byteObjects[i] = getByteArray(vals[i]);
- }
- obj = multidimensionalArrayValueCreator.getValuesAsList(byteObjects, dimensions);
- }
- else {
- obj = multidimensionalArrayValueCreator.getValuesAsList(getArray(type, values), dimensions);
- }
- return obj;
- }
+ /**
+ * @param valueToCast
+ * - This is a comma separated value
+ * @param type
+ * - The class type to cast to
+ * @param dimensionDepth
+ * - The level of array
+ * @return - array
+ */
+ public static Object castArrayArgs(final String valueToCast,
+ final Class<?> type) {
+ Object obj = null;
+ MultidimensionalArrayValueCreator multidimensionalArrayValueCreator = new MultidimensionalArrayValueCreator();
+ String values = valueToCast.split(":")[1];
+ String dimensions = valueToCast.split(":")[0];
+ if (type.getName().equals("byte")) {// only for this list of byte array
+ // - multidimensional array in this
+ // has to be
+ // checked
+ String[] vals = values.split(",");
+ Object[] byteObjects = new Object[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ byteObjects[i] = getByteArray(vals[i]);
+ }
+ obj = multidimensionalArrayValueCreator.getValuesAsList(byteObjects,
+ dimensions);
+ } else {
+ obj = multidimensionalArrayValueCreator
+ .getValuesAsList(getArray(type, values), dimensions);
+ }
+ return obj;
+ }
- /**
- * @param value
- * @return
- */
- public static byte[] getByteArray(final String value) {
- return Numeric.hexStringToByteArray(value);
- }
+ /**
+ * @param value
+ * @return
+ */
+ public static byte[] getByteArray(final String value) {
+ return Numeric.hexStringToByteArray(value);
+ }
- private static Object[] getArray(final Class<?> classType, final String values) {
- Object[] objArray = null;
- String[] vals = values.split(",");
- String type = classType.getName();
- if (type.contains("Short")) {
- Short[] sh = new Short[vals.length];
- for (int i = 0; i < vals.length; i++) {
- sh[i] = (Short) castValue(vals[i], classType);
- }
- objArray = sh;
- }
- else if (type.contains("BigInteger")) {
- BigInteger[] bg = new BigInteger[vals.length];
- for (int i = 0; i < vals.length; i++) {
- bg[i] = (BigInteger) castValue(vals[i], classType);
- }
- objArray = bg;
- }
- else if (type.contains("Integer")) {
- Integer[] it = new Integer[vals.length];
- for (int i = 0; i < vals.length; i++) {
- it[i] = (Integer) castValue(vals[i], classType);
- }
- objArray = it;
- }
- else if (type.contains("Long")) {
- Long[] lg = new Long[vals.length];
- for (int i = 0; i < vals.length; i++) {
- lg[i] = (Long) castValue(vals[i], classType);
- }
- objArray = lg;
- }
- else if (type.contains("Float")) {
- Float[] ft = new Float[vals.length];
- for (int i = 0; i < vals.length; i++) {
- ft[i] = (Float) castValue(vals[i], classType);
- }
- objArray = ft;
- }
- else if (type.contains("Double")) {
- Double[] db = new Double[vals.length];
- for (int i = 0; i < vals.length; i++) {
- db[i] = (Double) castValue(vals[i], classType);
- }
- objArray = db;
- }
- else if (type.contains("String")) {
- String[] st = new String[vals.length];
- for (int i = 0; i < vals.length; i++) {
- st[i] = (String) castValue(vals[i], classType);
- }
- objArray = st;
- }
- else if (type.contains("Boolean")) {
- Boolean[] bool = new Boolean[vals.length];
- for (int i = 0; i < vals.length; i++) {
- bool[i] = (Boolean) castValue(vals[i], classType);
- }
- objArray = bool;
- }
- else if (type.contains("Character")) {
- Character[] chars = new Character[vals.length];
- for (int i = 0; i < vals.length; i++) {
- chars[i] = (Character) castValue(vals[i], classType);
- }
- }
+ private static Object[] getArray(final Class<?> classType,
+ final String values) {
+ Object[] objArray = null;
+ String[] vals = values.split(",");
+ String type = classType.getName();
+ if (type.contains("Short")) {
+ Short[] sh = new Short[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ sh[i] = (Short) castValue(vals[i], classType);
+ }
+ objArray = sh;
+ } else if (type.contains("BigInteger")) {
+ BigInteger[] bg = new BigInteger[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ bg[i] = (BigInteger) castValue(vals[i], classType);
+ }
+ objArray = bg;
+ } else if (type.contains("Integer")) {
+ Integer[] it = new Integer[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ it[i] = (Integer) castValue(vals[i], classType);
+ }
+ objArray = it;
+ } else if (type.contains("Long")) {
+ Long[] lg = new Long[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ lg[i] = (Long) castValue(vals[i], classType);
+ }
+ objArray = lg;
+ } else if (type.contains("Float")) {
+ Float[] ft = new Float[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ ft[i] = (Float) castValue(vals[i], classType);
+ }
+ objArray = ft;
+ } else if (type.contains("Double")) {
+ Double[] db = new Double[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ db[i] = (Double) castValue(vals[i], classType);
+ }
+ objArray = db;
+ } else if (type.contains("String")) {
+ String[] st = new String[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ st[i] = (String) castValue(vals[i], classType);
+ }
+ objArray = st;
+ } else if (type.contains("Boolean")) {
+ Boolean[] bool = new Boolean[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ bool[i] = (Boolean) castValue(vals[i], classType);
+ }
+ objArray = bool;
+ } else if (type.contains("Character")) {
+ Character[] chars = new Character[vals.length];
+ for (int i = 0; i < vals.length; i++) {
+ chars[i] = (Character) castValue(vals[i], classType);
+ }
+ }
- return objArray;
- }
-}
+ return objArray;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCasterHandler.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCasterHandler.java
index 5670281..e7b1387 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCasterHandler.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityDynamicValueCasterHandler.java
@@ -1,28 +1,45 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core;
/**
- * @author ADG5COB
+ * Wrapper class for SolidityDynamicValueCaster
*/
public class SolidityDynamicValueCasterHandler {
- private SolidityDynamicValueCasterHandler() {}
+ private SolidityDynamicValueCasterHandler() {
+ }
- /**
- * @param valueToCast -
- * @param actualType -
- * @param isArray -
- * @return -
- */
- public static Object getValue(final String valueToCast, final Class<?> actualType, final boolean isArray) {
- if (isArray) {
- return SolidityDynamicValueCaster.castArrayArgs(valueToCast, actualType);
- }
- if ((actualType.getComponentType() != null) && "byte".equals(actualType.getComponentType().toGenericString())) {
- return SolidityDynamicValueCaster.getByteArray(valueToCast);
- }
- return SolidityDynamicValueCaster.castValue(valueToCast, actualType);
- }
-}
+ /**
+ * @param valueToCast
+ * -
+ * @param actualType
+ * -
+ * @param isArray
+ * -
+ * @return -
+ */
+ public static Object getValue(final String valueToCast,
+ final Class<?> actualType, final boolean isArray) {
+ if (isArray) {
+ return SolidityDynamicValueCaster.castArrayArgs(valueToCast,
+ actualType);
+ }
+ if ((actualType.getComponentType() != null) && "byte"
+ .equals(actualType.getComponentType().toGenericString())) {
+ return SolidityDynamicValueCaster.getByteArray(valueToCast);
+ }
+ return SolidityDynamicValueCaster.castValue(valueToCast, actualType);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityToJavaDataTypeResolver.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityToJavaDataTypeResolver.java
index a5f5267..c661d1a 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityToJavaDataTypeResolver.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/SolidityToJavaDataTypeResolver.java
@@ -1,12 +1,23 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.blockchain.core.model.IOABI;
import org.web3j.abi.TypeReference;
import org.web3j.abi.datatypes.Address;
import org.web3j.abi.datatypes.Utf8String;
@@ -18,128 +29,129 @@
import com.squareup.javapoet.TypeName;
/**
- * @author ADG5COB
+ * This class is used to create java data types for each solidity data type. The
+ * generated java data type must match with web3j's generated solidity type
+ * because we are dependant on web3j for blockchain interactions
*/
public class SolidityToJavaDataTypeResolver {
- private static SolidityToJavaDataTypeResolver instance;
+ private static SolidityToJavaDataTypeResolver instance;
- private SolidityToJavaDataTypeResolver() {}
+ private SolidityToJavaDataTypeResolver() {
+ }
- /**
- * @return - Instance
- */
- public static SolidityToJavaDataTypeResolver getInstance() {
- if (instance == null) {
- instance = new SolidityToJavaDataTypeResolver();
- }
- return instance;
- }
+ /**
+ * @return - Instance
+ */
+ public static SolidityToJavaDataTypeResolver getInstance() {
+ if (instance == null) {
+ instance = new SolidityToJavaDataTypeResolver();
+ }
+ return instance;
+ }
- /**
- * This method returns the corresponding javatype for the passed solidity type. This method is equivalent to
- * buildTypeName(...) in SolidityFunctionWrapper
- *
- * @param solidityType - The solidity data type
- * @param ioABI - The solidity ABI
- * @throws ClassNotFoundException - Thrown by TypeReference Class
- */
- @SuppressWarnings("rawtypes")
- public void assignJavaType(final String solidityType, final IOABI ioABI) throws ClassNotFoundException {
- TypeReference typeReference = TypeReference.makeTypeReference(solidityType, false, false);
- TypeName ty = TypeName.get(typeReference.getType());
- if (ty instanceof ParameterizedTypeName) {// This is important
- ioABI.setIsArray(true);
- }
- else {
- ioABI.setIsArray(false);
- }
- String javaString = getJavaNativeType(ty, ioABI).toString();
- if (ioABI.getIsArray()) {
- ioABI.setJavaType(List.class);
- }
- else {
- ioABI.setJavaType(ioABI.getCastType());
- }
- ioABI.setJavaTypeString(javaString);
- }
+ /**
+ * This method returns the corresponding javatype for the passed solidity
+ * type. This method is equivalent to buildTypeName(...) in
+ * SolidityFunctionWrapper
+ *
+ * @param solidityType
+ * - The solidity data type
+ * @param ioABI
+ * - The solidity ABI
+ * @throws ClassNotFoundException
+ * - Thrown by TypeReference Class
+ */
+ @SuppressWarnings("rawtypes")
+ public void assignJavaType(final String solidityType, final IOABI ioABI)
+ throws ClassNotFoundException {
+ TypeReference typeReference = TypeReference
+ .makeTypeReference(solidityType, false, false);
+ TypeName ty = TypeName.get(typeReference.getType());
+ if (ty instanceof ParameterizedTypeName) {// This is important
+ ioABI.setIsArray(true);
+ } else {
+ ioABI.setIsArray(false);
+ }
+ String javaString = getJavaNativeType(ty, ioABI).toString();
+ if (ioABI.getIsArray()) {
+ ioABI.setJavaType(List.class);
+ } else {
+ ioABI.setJavaType(ioABI.getCastType());
+ }
+ ioABI.setJavaTypeString(javaString);
+ }
- /**
- * This is equivalent to getNativeType(TypeName) in SolidityFunctionWrapper
- *
- * @param type
- * @return
- */
- private TypeName getJavaNativeType(final TypeName type, final IOABI ioABI) {// NOSONAR
- if (type instanceof ParameterizedTypeName) {
- ioABI.setDimensionDepth(ioABI.getDimensionDepth() + 1);
- return getJavaNativeType((ParameterizedTypeName) type, ioABI);
- }
+ /**
+ * This is equivalent to getNativeType(TypeName) in SolidityFunctionWrapper
+ *
+ * @param type
+ * @return
+ */
+ private TypeName getJavaNativeType(final TypeName type, final IOABI ioABI) {// NOSONAR
+ if (type instanceof ParameterizedTypeName) {
+ ioABI.setDimensionDepth(ioABI.getDimensionDepth() + 1);
+ return getJavaNativeType((ParameterizedTypeName) type, ioABI);
+ }
- String name = ((ClassName) type).simpleName();
+ String name = ((ClassName) type).simpleName();
- if ((name.equals(Address.class.getSimpleName())) || (name.equals(Utf8String.class.getSimpleName()))) {
- ioABI.setCastType(String.class);
- return TypeName.get(String.class);
- }
- else if (name.startsWith("Uint") || name.startsWith("Int")) {
- ioABI.setCastType(BigInteger.class);
- return TypeName.get(BigInteger.class);
- }
- else if (name.startsWith("Bytes") || name.equals("DynamicBytes")) {
- ioABI.setCastType(byte[].class);
- return TypeName.get(byte[].class);
- }
- else if (name.startsWith("Bool")) {
- ioABI.setCastType(Boolean.class);
- return TypeName.get(java.lang.Boolean.class);
- }
- else if (name.equals(Byte.class.getSimpleName())) {
- ioABI.setCastType(Byte.class);
- return TypeName.get(java.lang.Byte.class);
- }
- else if (name.equals(Char.class.getSimpleName())) {
- ioABI.setCastType(Character.class);
- return TypeName.get(Character.class);
- }
- else if (name.equals(Double.class.getSimpleName())) {
- ioABI.setCastType(Double.class);
- return TypeName.get(java.lang.Double.class);
- }
- else if (name.equals(Float.class.getSimpleName())) {
- ioABI.setCastType(Float.class);
- return TypeName.get(java.lang.Float.class);
- }
- else if (name.equals(Int.class.getSimpleName())) {
- ioABI.setCastType(Integer.class);
- return TypeName.get(Integer.class);
- }
- else if (name.equals(Long.class.getSimpleName())) {
- ioABI.setCastType(Long.class);
- return TypeName.get(java.lang.Long.class);
- }
- else if (name.equals(Short.class.getSimpleName())) {
- ioABI.setCastType(Short.class);
- return TypeName.get(java.lang.Short.class);
- }
- else {
- throw new UnsupportedOperationException("Unsupported type: " + type + ", no native type mapping exists.");
- }
- }
+ if ((name.equals(Address.class.getSimpleName()))
+ || (name.equals(Utf8String.class.getSimpleName()))) {
+ ioABI.setCastType(String.class);
+ return TypeName.get(String.class);
+ } else if (name.startsWith("Uint") || name.startsWith("Int")) {
+ ioABI.setCastType(BigInteger.class);
+ return TypeName.get(BigInteger.class);
+ } else if (name.startsWith("Bytes") || name.equals("DynamicBytes")) {
+ ioABI.setCastType(byte[].class);
+ return TypeName.get(byte[].class);
+ } else if (name.startsWith("Bool")) {
+ ioABI.setCastType(Boolean.class);
+ return TypeName.get(java.lang.Boolean.class);
+ } else if (name.equals(Byte.class.getSimpleName())) {
+ ioABI.setCastType(Byte.class);
+ return TypeName.get(java.lang.Byte.class);
+ } else if (name.equals(Char.class.getSimpleName())) {
+ ioABI.setCastType(Character.class);
+ return TypeName.get(Character.class);
+ } else if (name.equals(Double.class.getSimpleName())) {
+ ioABI.setCastType(Double.class);
+ return TypeName.get(java.lang.Double.class);
+ } else if (name.equals(Float.class.getSimpleName())) {
+ ioABI.setCastType(Float.class);
+ return TypeName.get(java.lang.Float.class);
+ } else if (name.equals(Int.class.getSimpleName())) {
+ ioABI.setCastType(Integer.class);
+ return TypeName.get(Integer.class);
+ } else if (name.equals(Long.class.getSimpleName())) {
+ ioABI.setCastType(Long.class);
+ return TypeName.get(java.lang.Long.class);
+ } else if (name.equals(Short.class.getSimpleName())) {
+ ioABI.setCastType(Short.class);
+ return TypeName.get(java.lang.Short.class);
+ } else {
+ throw new UnsupportedOperationException("Unsupported type: " + type
+ + ", no native type mapping exists.");
+ }
+ }
- /**
- * This is equivalent to getNativeType(ParameterizedTypeName) in SolidityFunctionWrapper
- *
- * @param parameterizedTypeName
- * @return
- */
- private TypeName getJavaNativeType(final ParameterizedTypeName parameterizedTypeName, final IOABI ioABI) {
- List<TypeName> typeNames = parameterizedTypeName.typeArguments;
- List<TypeName> nativeTypeNames = new ArrayList<>(typeNames.size());
- for (TypeName enclosedTypeName : typeNames) {
- nativeTypeNames.add(getJavaNativeType(enclosedTypeName, ioABI));
- }
- return ParameterizedTypeName.get(ClassName.get(List.class),
- nativeTypeNames.toArray(new TypeName[nativeTypeNames.size()]));
- }
-}
+ /**
+ * This is equivalent to getNativeType(ParameterizedTypeName) in
+ * SolidityFunctionWrapper
+ *
+ * @param parameterizedTypeName
+ * @return
+ */
+ private TypeName getJavaNativeType(
+ final ParameterizedTypeName parameterizedTypeName,
+ final IOABI ioABI) {
+ List<TypeName> typeNames = parameterizedTypeName.typeArguments;
+ List<TypeName> nativeTypeNames = new ArrayList<>(typeNames.size());
+ for (TypeName enclosedTypeName : typeNames) {
+ nativeTypeNames.add(getJavaNativeType(enclosedTypeName, ioABI));
+ }
+ return ParameterizedTypeName.get(ClassName.get(List.class),
+ nativeTypeNames.toArray(new TypeName[nativeTypeNames.size()]));
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/Web3jHandler.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/Web3jHandler.java
index b19e952..97fc0d1 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/Web3jHandler.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/Web3jHandler.java
@@ -1,6 +1,20 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ * Pavithra Krishna Reddy
+ * Deepthi Murugaiyan
+ * Abirami Bhologa Indiran
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.core;
import java.io.BufferedReader;
@@ -30,10 +44,16 @@
import java.util.concurrent.ExecutionException;
import org.apache.commons.io.FileUtils;
-import org.eclipse.blockchain.classloader.DynamicClassLoader;
import org.eclipse.blockchain.core.events.BlockchainEnvironmentChangedTrigger;
import org.eclipse.blockchain.core.events.IBlockchainEnvironmentChangedEvent;
import org.eclipse.blockchain.core.events.IBlockchainEnvironmentChangedListener;
+import org.eclipse.blockchain.core.loader.DynamicClassLoader;
+import org.eclipse.blockchain.core.model.Account;
+import org.eclipse.blockchain.core.model.EmbeddedEVMObject;
+import org.eclipse.blockchain.core.model.IOABI;
+import org.eclipse.blockchain.core.model.SolidityABI;
+import org.eclipse.blockchain.core.model.TransactionModel;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.web3j.abi.FunctionReturnDecoder;
@@ -63,789 +83,807 @@
import org.web3j.utils.Numeric;
/**
- * @author ADG5COB
+ * The web3j Handler class
*/
public class Web3jHandler implements IBlockchainEnvironmentChangedListener {
- private final Account personalAccount = new Account();
- private String eventInfo = "";
- private static Web3jHandler web3j;
- private final List<String> accountPassword = new ArrayList<>();
- /**
- * Environment based contract and class instance maps. Currently there are 2 types 1. EnvironmentType.GETH_CLIENT 2.
- * EnvironmentType.EMBEDDED_EVM
- */
- private final Map<String, Map<String, Class<?>>> environmentBasedContractMap = new HashMap<>();
- private final Map<String, Map<String, Object>> environmentBasedClassInstanceMap = new HashMap<>();
+ private final Account personalAccount = new Account();
+ private String eventInfo = "";
+ private static Web3jHandler web3j;
+ private final List<String> accountPassword = new ArrayList<>();
+ /**
+ * Environment based contract and class instance maps. Currently there are 2
+ * types 1. EnvironmentType.GETH_CLIENT 2. EnvironmentType.EMBEDDED_EVM
+ */
+ private final Map<String, Map<String, Class<?>>> environmentBasedContractMap = new HashMap<>();
+ private final Map<String, Map<String, Object>> environmentBasedClassInstanceMap = new HashMap<>();
- private EmbeddedEVMObject embeddedEVM = null;
- private String selectedEnvironment = "";
+ private EmbeddedEVMObject embeddedEVM = null;
+ private String selectedEnvironment = "";
- private Web3jHandler() {}
+ private Web3jHandler() {
+ }
- /**
- * @return -
- */
- public static Web3jHandler getInstance() {
- if (web3j == null) {
- web3j = new Web3jHandler();
- web3j.initializeEVMConfigurationMap();
- BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(web3j);
- }
- if (web3j.accountPassword.isEmpty()) {
- web3j.accountPassword.add("123");
- web3j.accountPassword.add("123");
- web3j.accountPassword.add("123");
- }
- return web3j;
- }
+ /**
+ * @return -
+ */
+ public static Web3jHandler getInstance() {
+ if (web3j == null) {
+ web3j = new Web3jHandler();
+ web3j.initializeEVMConfigurationMap();
+ BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(web3j);
+ }
+ if (web3j.accountPassword.isEmpty()) {
+ web3j.accountPassword.add("123");
+ web3j.accountPassword.add("123");
+ web3j.accountPassword.add("123");
+ }
+ return web3j;
+ }
- /**
- * Before calling this method make sure Geth server is started
- *
- * @throws IOException -
- * @throws InterruptedException -
- * @throws ExecutionException -
- */
- public String createInitialAccounts() throws IOException, InterruptedException, ExecutionException {
- while (true) {
- if (CoreCommandExecutor.getInstance().isGethStarted()) {
- break;
- }
- if (!CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "").isEmpty()) {
- return CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "");
- }
- Thread.sleep(500);
- }
- List<String> result = getAdminInstance().personalListAccounts().send().getResult();
- if (result.isEmpty()) {
- // Then no accounts in the data directory create new accounts
- NewAccountIdentifier account1 = getAdminInstance().personalNewAccount("123").send();
- NewAccountIdentifier account2 = getAdminInstance().personalNewAccount("123").send();
- NewAccountIdentifier account3 = getAdminInstance().personalNewAccount("123").send();
- Map<String, String> accountsMap = new LinkedHashMap<>();
- accountsMap.put(account1.getAccountId(), "123");
- accountsMap.put(account2.getAccountId(), "123");
- accountsMap.put(account3.getAccountId(), "123");
- this.personalAccount.setDataDir(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
- CoreCommandExecutor.getInstance().getDataDir());
- this.personalAccount.setAccounts(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
- accountsMap);
- // Terminate geth server
- CoreCommandExecutor.getInstance().terminateGethServer();
- while (true) {
- if (!CoreCommandExecutor.getInstance().isGethStarted()) {
- break;
- }
- Thread.sleep(500);
- }
- // Start new geth server with new accounts created above
- CoreCommandExecutor.getInstance().startGethServer(CoreCommandExecutor.getInstance().getDataDir(),
- createGethInitFile(CoreCommandExecutor.getInstance().getDataDir(), true,
- SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString()),
- CoreCommandExecutor.getInstance().getGethOptions());
- while (true) {
- if (CoreCommandExecutor.getInstance().isGethStarted()) {
- break;
- }
- if (!CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "").isEmpty()) {
- return CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "");
- }
- Thread.sleep(500);
- }
- Map<String, String> balanceMap = new LinkedHashMap<>();
- balanceMap.put(account1.getAccountId(), convertToEther(getAdminInstance()
- .ethGetBalance(account1.getAccountId(), new DefaultBlockParameterNumber(0)).send().getBalance().toString()));
- balanceMap.put(account2.getAccountId(), convertToEther(getAdminInstance()
- .ethGetBalance(account2.getAccountId(), new DefaultBlockParameterNumber(0)).send().getBalance().toString()));
- balanceMap.put(account3.getAccountId(), convertToEther(getAdminInstance()
- .ethGetBalance(account3.getAccountId(), new DefaultBlockParameterNumber(0)).send().getBalance().toString()));
- this.personalAccount.setAccountBalance(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
- balanceMap);
- // Unlock newly created accounts
- getAdminInstance().personalUnlockAccount(account1.getAccountId(), "123");
- getAdminInstance().personalUnlockAccount(account2.getAccountId(), "123");
- getAdminInstance().personalUnlockAccount(account3.getAccountId(), "123");
- }
- else {
- // Accounts are already present load them
- Map<String, String> accountsMap = new LinkedHashMap<>();
- Map<String, String> balanceMap = new LinkedHashMap<>();
- String[] account = new String[3];
- for (int i = 0; i < result.size(); i++) {
- accountsMap.put(result.get(i), this.accountPassword.get(i));
- account[i] = result.get(i);
- }
+ /**
+ * Before calling this method make sure Geth server is started
+ *
+ * @throws IOException -
+ * @throws InterruptedException -
+ * @throws ExecutionException -
+ */
+ public String createInitialAccounts() throws IOException, InterruptedException, ExecutionException {
+ while (true) {
+ if (CoreCommandExecutor.getInstance().isGethStarted()) {
+ break;
+ }
+ if (!CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "").isEmpty()) {
+ return CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "");
+ }
+ Thread.sleep(500);
+ }
+ List<String> result = getAdminInstance().personalListAccounts().send().getResult();
+ if (result.isEmpty()) {
+ // Then no accounts in the data directory create new accounts
+ NewAccountIdentifier account1 = getAdminInstance().personalNewAccount("123").send();
+ NewAccountIdentifier account2 = getAdminInstance().personalNewAccount("123").send();
+ NewAccountIdentifier account3 = getAdminInstance().personalNewAccount("123").send();
+ Map<String, String> accountsMap = new LinkedHashMap<>();
+ accountsMap.put(account1.getAccountId(), "123");
+ accountsMap.put(account2.getAccountId(), "123");
+ accountsMap.put(account3.getAccountId(), "123");
+ this.personalAccount.setDataDir(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
+ CoreCommandExecutor.getInstance().getDataDir());
+ this.personalAccount.setAccounts(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
+ accountsMap);
+ // Terminate geth server
+ CoreCommandExecutor.getInstance().terminateGethServer();
+ while (true) {
+ if (!CoreCommandExecutor.getInstance().isGethStarted()) {
+ break;
+ }
+ Thread.sleep(500);
+ }
+ // Start new geth server with new accounts created above
+ CoreCommandExecutor.getInstance().startGethServer(CoreCommandExecutor.getInstance().getDataDir(),
+ createGethInitFile(CoreCommandExecutor.getInstance().getDataDir(), true,
+ SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString()),
+ CoreCommandExecutor.getInstance().getGethOptions());
+ while (true) {
+ if (CoreCommandExecutor.getInstance().isGethStarted()) {
+ break;
+ }
+ if (!CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "").isEmpty()) {
+ return CoreCommandExecutor.getInstance().getGethServerStartError().replace("Geth", "");
+ }
+ Thread.sleep(500);
+ }
+ Map<String, String> balanceMap = new LinkedHashMap<>();
+ balanceMap.put(account1.getAccountId(),
+ convertToEther(getAdminInstance()
+ .ethGetBalance(account1.getAccountId(), new DefaultBlockParameterNumber(0)).send()
+ .getBalance().toString()));
+ balanceMap.put(account2.getAccountId(),
+ convertToEther(getAdminInstance()
+ .ethGetBalance(account2.getAccountId(), new DefaultBlockParameterNumber(0)).send()
+ .getBalance().toString()));
+ balanceMap.put(account3.getAccountId(),
+ convertToEther(getAdminInstance()
+ .ethGetBalance(account3.getAccountId(), new DefaultBlockParameterNumber(0)).send()
+ .getBalance().toString()));
+ this.personalAccount.setAccountBalance(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
+ balanceMap);
+ // Unlock newly created accounts
+ getAdminInstance().personalUnlockAccount(account1.getAccountId(), "123");
+ getAdminInstance().personalUnlockAccount(account2.getAccountId(), "123");
+ getAdminInstance().personalUnlockAccount(account3.getAccountId(), "123");
+ } else {
+ // Accounts are already present load them
+ Map<String, String> accountsMap = new LinkedHashMap<>();
+ Map<String, String> balanceMap = new LinkedHashMap<>();
+ String[] account = new String[3];
+ for (int i = 0; i < result.size(); i++) {
+ accountsMap.put(result.get(i), this.accountPassword.get(i));
+ account[i] = result.get(i);
+ }
- balanceMap.put(account[0], convertToEther(getAdminInstance()
- .ethGetBalance(account[0], DefaultBlockParameterName.LATEST).sendAsync().get().getBalance().toString()));
- balanceMap.put(account[1], convertToEther(getAdminInstance()
- .ethGetBalance(account[1], DefaultBlockParameterName.LATEST).sendAsync().get().getBalance().toString()));
- balanceMap.put(account[2], convertToEther(getAdminInstance()
- .ethGetBalance(account[2], DefaultBlockParameterName.LATEST).sendAsync().get().getBalance().toString()));
- this.personalAccount.setAccountBalance(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
- balanceMap);
- this.personalAccount.setDataDir(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
- CoreCommandExecutor.getInstance().getDataDir());
- this.personalAccount.setAccounts(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
- accountsMap);
- getAdminInstance().personalUnlockAccount(account[0], "123");
- getAdminInstance().personalUnlockAccount(account[1], "123");
- getAdminInstance().personalUnlockAccount(account[2], "123");
- }
+ balanceMap.put(account[0],
+ convertToEther(getAdminInstance().ethGetBalance(account[0], DefaultBlockParameterName.LATEST)
+ .sendAsync().get().getBalance().toString()));
+ balanceMap.put(account[1],
+ convertToEther(getAdminInstance().ethGetBalance(account[1], DefaultBlockParameterName.LATEST)
+ .sendAsync().get().getBalance().toString()));
+ balanceMap.put(account[2],
+ convertToEther(getAdminInstance().ethGetBalance(account[2], DefaultBlockParameterName.LATEST)
+ .sendAsync().get().getBalance().toString()));
+ this.personalAccount.setAccountBalance(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
+ balanceMap);
+ this.personalAccount.setDataDir(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
+ CoreCommandExecutor.getInstance().getDataDir());
+ this.personalAccount.setAccounts(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString(),
+ accountsMap);
+ getAdminInstance().personalUnlockAccount(account[0], "123");
+ getAdminInstance().personalUnlockAccount(account[1], "123");
+ getAdminInstance().personalUnlockAccount(account[2], "123");
+ }
- // add listener for tranactions
- addListenerForTransactions();
- return "";
- }
+ // add listener for tranactions
+ addListenerForTransactions();
+ return "";
+ }
+ /**
+ * @param projectName -
+ * @param scName -
+ * @param solOutputDir -
+ * @param solidityFileAbsPath -
+ * @param values -
+ * @param accountDetails -
+ * @return -
+ * @throws Exception -
+ */
+ public String deploySmartContract(final String projectName, final String scName, final String solOutputDir,
+ final String solidityFileAbsPath, final String values, final String accountDetails) throws Exception {
+ try {
+ if ((getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString()))
+ && (!CoreCommandExecutor.getInstance().isGethStarted())) {
+ return "Geth Server is not started";
+ }
+ Class<?> contract;
+ Object classInstance;
+ Web3j web3jLocal = getWeb3jInstance();
+ Map<String, String> accounts = this.personalAccount.getAccounts(getSelectedEnvironment());
+ Iterator<String> iterator = accounts.keySet().iterator();
+ String accountInfo = null;
+ while (iterator.hasNext()) {
+ String account = iterator.next();
+ if (account.equals(accountDetails)) {
+ accountInfo = account;
+ break;
+ }
+ }
- /**
- * @param projectName -
- * @param scName -
- * @param solOutputDir -
- * @param solidityFileAbsPath -
- * @param values -
- * @param accountDetails -
- * @return -
- * @throws Exception -
- */
- public String deploySmartContract(final String projectName, final String scName, final String solOutputDir,
- final String solidityFileAbsPath, final String values, final String accountDetails)
- throws Exception {
- try {
- if ((getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString())) &&
- (!CoreCommandExecutor.getInstance().isGethStarted())) {
- return "Geth Server is not started";
- }
- Class<?> contract;
- Object classInstance;
- Web3j web3jLocal = getWeb3jInstance();
- Map<String, String> accounts = this.personalAccount.getAccounts(getSelectedEnvironment());
- Iterator<String> iterator = accounts.keySet().iterator();
- String accountInfo = null;
- while (iterator.hasNext()) {
- String account = iterator.next();
- if (account.equals(accountDetails)) {
- accountInfo = account;
- break;
- }
- }
+ if (accountInfo != null) {
+ String[] credentials = getWalletFile(accountInfo.replace("0x", ""),
+ this.personalAccount.getDataDir(getSelectedEnvironment()) + File.separator + "keystore")
+ .split("~");
+ Credentials creds = WalletUtils.loadCredentials(credentials[1], credentials[0]);
+ ContractGasProvider contractGasProvider = new DefaultGasProvider();
- if (accountInfo != null) {
- String[] credentials = getWalletFile(accountInfo.replace("0x", ""),
- this.personalAccount.getDataDir(getSelectedEnvironment()) + File.separator + "keystore").split("~");
- Credentials creds = WalletUtils.loadCredentials(credentials[1], credentials[0]);
- ContractGasProvider contractGasProvider = new DefaultGasProvider();
+ DynamicClassLoader dcl = new DynamicClassLoader(this.getClass().getClassLoader(), projectName,
+ solOutputDir);
+ contract = dcl.loadClass("com.bosch." + scName);
- DynamicClassLoader dcl = new DynamicClassLoader(this.getClass().getClassLoader(), projectName, solOutputDir);
- contract = dcl.loadClass("com.bosch." + scName);
+ SolidityABI[] solABI = CoreCommandExecutor.getInstance().getSolABIMap(solidityFileAbsPath);
- SolidityABI[] solABI = CoreCommandExecutor.getInstance().getSolABIMap(solidityFileAbsPath);
+ Class<?>[] cls = getConstructorArgTypes(solABI);
+ Object[] objs = getConstructorArgsAsObject(solABI, web3jLocal, creds, contractGasProvider, values);
- Class<?>[] cls = getConstructorArgTypes(solABI);
- Object[] objs = getConstructorArgsAsObject(solABI, web3jLocal, creds, contractGasProvider, values);
+ RemoteCall<?> dep = (RemoteCall<?>) contract.getMethod("deploy", cls).invoke(contract, objs);
+ if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString()
+ .equals(getSelectedEnvironment())) {
+ CoreCommandExecutor.getInstance().mine(true);
+ }
+ classInstance = dep.send();
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
+ ProjectCreator.getInstance().createDeploymentModel(
+ contract.getMethod("getContractAddress").invoke(classInstance).toString(),
+ ethProject.getProject().getFile(
+ solidityFileAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
+ accountInfo, getSelectedEnvironment());
- RemoteCall<?> dep = (RemoteCall<?>) contract.getMethod("deploy", cls).invoke(contract, objs);
- if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString().equals(getSelectedEnvironment())) {
- CoreCommandExecutor.getInstance().mine(true);
- }
- classInstance = dep.send();
- EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
- ethProject.createDeploymentModel(contract.getMethod("getContractAddress").invoke(classInstance).toString(),
- ethProject.getProject()
- .getFile(solidityFileAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
- accountInfo, getSelectedEnvironment());
+ Map<String, Class<?>> tempContractMap = this.environmentBasedContractMap
+ .computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
+ tempContractMap.put(solidityFileAbsPath, contract);
+ Map<String, Object> tempClassInstanceMap = this.environmentBasedClassInstanceMap
+ .computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
+ tempClassInstanceMap.put(solidityFileAbsPath, classInstance);
+ }
+ } finally {
+ updateAccBalance();
+ if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString()
+ .equals(getSelectedEnvironment())) {
+ CoreCommandExecutor.getInstance().mine(false);
+ }
+ }
+ return "";
+ }
- Map<String, Class<?>> tempContractMap =
- this.environmentBasedContractMap.computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
- tempContractMap.put(solidityFileAbsPath, contract);
- Map<String, Object> tempClassInstanceMap =
- this.environmentBasedClassInstanceMap.computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
- tempClassInstanceMap.put(solidityFileAbsPath, classInstance);
- }
- }
- finally {
- updateAccBalance();
- if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString().equals(getSelectedEnvironment())) {
- CoreCommandExecutor.getInstance().mine(false);
- }
- }
- return "";
- }
+ /**
+ * @throws IOException
+ * @throws ExecutionException
+ * @throws InterruptedException
+ */
+ private void updateAccBalance() throws InterruptedException, ExecutionException {
+ Map<String, String> accountBalance = this.personalAccount.getAccountBalance(getSelectedEnvironment());
+ Iterator<String> iterator = accountBalance.keySet().iterator();
+ while (iterator.hasNext()) {
+ String accountID = iterator.next();
+ if (SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString()
+ .equals(getSelectedEnvironment())) {
+ accountBalance.put(accountID,
+ convertToEther(getWeb3jInstance().ethGetBalance(accountID, DefaultBlockParameterName.LATEST)
+ .sendAsync().get().getBalance().toString()));
+ } else {
+ accountBalance.put(accountID,
+ convertToEther(getAdminInstance().ethGetBalance(accountID, DefaultBlockParameterName.LATEST)
+ .sendAsync().get().getBalance().toString()));
+ }
+ }
+ }
+ private Class<?>[] getConstructorArgTypes(final SolidityABI[] solABI) {
+ Class<?>[] classType = null;
+ for (SolidityABI sAbi : solABI) {
+ if (sAbi.getType().equalsIgnoreCase("constructor")) {
+ int inpsLength = sAbi.getInputs().length;
+ classType = new Class<?>[inpsLength + 3];
+ classType[0] = Web3j.class;
+ classType[1] = Credentials.class;
+ classType[2] = ContractGasProvider.class;
+ for (int i = 3; i < (inpsLength + 3); i++) {
+ classType[i] = sAbi.getInputs()[(i - 3)].getJavaType();
+ }
+ }
+ }
+ if (classType == null) {// Contracts w/o constructor
+ classType = new Class<?>[3];
+ classType[0] = Web3j.class;
+ classType[1] = Credentials.class;
+ classType[2] = ContractGasProvider.class;
+ }
+ return classType;
+ }
- /**
- * @throws IOException
- * @throws ExecutionException
- * @throws InterruptedException
- */
- private void updateAccBalance() throws InterruptedException, ExecutionException {
- Map<String, String> accountBalance = this.personalAccount.getAccountBalance(getSelectedEnvironment());
- Iterator<String> iterator = accountBalance.keySet().iterator();
- while (iterator.hasNext()) {
- String accountID = iterator.next();
- if (SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString().equals(getSelectedEnvironment())) {
- accountBalance.put(accountID, convertToEther(getWeb3jInstance()
- .ethGetBalance(accountID, DefaultBlockParameterName.LATEST).sendAsync().get().getBalance().toString()));
- }
- else {
- accountBalance.put(accountID, convertToEther(getAdminInstance()
- .ethGetBalance(accountID, DefaultBlockParameterName.LATEST).sendAsync().get().getBalance().toString()));
- }
- }
- }
+ private Object[] getConstructorArgsAsObject(final SolidityABI[] solABI, final Web3j web3jLocal,
+ final Credentials creds, final ContractGasProvider contractGasProvider, final String values) {
+ Object[] objs = null;
+ String[] inputVals = values.split(";");
+ for (SolidityABI sAbi : solABI) {
+ if (sAbi.getType().equalsIgnoreCase("constructor")) {
+ int inpsLength = sAbi.getInputs().length;
+ objs = new Object[inpsLength + 3];
+ objs[0] = web3jLocal;
+ objs[1] = creds;
+ objs[2] = contractGasProvider;
+ for (int i = 3; i < (inpsLength + 3); i++) {
+ objs[i] = getVariable(inputVals[(i - 3)], sAbi.getInputs()[(i - 3)].getJavaType(),
+ sAbi.getInputs()[(i - 3)].getCastType(), sAbi.getInputs()[(i - 3)].getIsArray());
+ }
+ }
+ }
+ if (objs == null) {// Contracts w/o constructor
+ objs = new Object[3];
+ objs[0] = web3jLocal;
+ objs[1] = creds;
+ objs[2] = contractGasProvider;
+ }
+ return objs;
+ }
- private Class<?>[] getConstructorArgTypes(final SolidityABI[] solABI) {
- Class<?>[] classType = null;
- for (SolidityABI sAbi : solABI) {
- if (sAbi.getType().equalsIgnoreCase("constructor")) {
- int inpsLength = sAbi.getInputs().length;
- classType = new Class<?>[inpsLength + 3];
- classType[0] = Web3j.class;
- classType[1] = Credentials.class;
- classType[2] = ContractGasProvider.class;
- for (int i = 3; i < (inpsLength + 3); i++) {
- classType[i] = sAbi.getInputs()[(i - 3)].getJavaType();
- }
- }
- }
- if (classType == null) {// Contracts w/o constructor
- classType = new Class<?>[3];
- classType[0] = Web3j.class;
- classType[1] = Credentials.class;
- classType[2] = ContractGasProvider.class;
- }
- return classType;
- }
+ private Object getVariable(final String value, final Class<?> type, final Class<?> castType,
+ final boolean isArray) {
+ Object castValue = null;
+ castValue = SolidityDynamicValueCasterHandler.getValue(value, (isArray ? castType : type), isArray);
+ return castValue;
+ }
- private Object[] getConstructorArgsAsObject(final SolidityABI[] solABI, final Web3j web3jLocal,
- final Credentials creds, final ContractGasProvider contractGasProvider, final String values) {
- Object[] objs = null;
- String[] inputVals = values.split(";");
- for (SolidityABI sAbi : solABI) {
- if (sAbi.getType().equalsIgnoreCase("constructor")) {
- int inpsLength = sAbi.getInputs().length;
- objs = new Object[inpsLength + 3];
- objs[0] = web3jLocal;
- objs[1] = creds;
- objs[2] = contractGasProvider;
- for (int i = 3; i < (inpsLength + 3); i++) {
- objs[i] = getVariable(inputVals[(i - 3)], sAbi.getInputs()[(i - 3)].getJavaType(),
- sAbi.getInputs()[(i - 3)].getCastType(), sAbi.getInputs()[(i - 3)].getIsArray());
- }
- }
- }
- if (objs == null) {// Contracts w/o constructor
- objs = new Object[3];
- objs[0] = web3jLocal;
- objs[1] = creds;
- objs[2] = contractGasProvider;
- }
- return objs;
- }
+ /**
+ * This method is used to invoke the smart contract function...
+ *
+ * @param projectName -
+ * @param funcName
+ * @param scAbsPath
+ * @param values - The input params for the function to be invoked,
+ * should be a comma separated value.
+ * @param accountDetails -
+ * @return
+ * @throws Exception
+ */
+ public String invokeSCFunction(final String projectName, final String funcName, final String scAbsPath,
+ final String values, final String accountDetails) throws Exception {
+ String response = "";
+ Object responseObject = null;
+ boolean returnPresent = false;
+ Map<String, Class<?>> tempContractMap = this.environmentBasedContractMap
+ .computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
+ Class<?> contract = tempContractMap.get(scAbsPath);
+ Map<String, Object> tempClassInstanceMap = this.environmentBasedClassInstanceMap
+ .computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
+ Object classInstance = tempClassInstanceMap.get(scAbsPath);
+ try {
+ String[] funcDetails = funcName.split("-");
+ String argList = "";
+ if (funcDetails.length > 1) {
+ argList = funcDetails[1];
+ }
+ SolidityABI[] solABI = CoreCommandExecutor.getInstance().getSolABIMap(scAbsPath);
+ String[] inputVals = new String[0];
+ if (!values.isEmpty()) {
+ inputVals = values.split(";");
+ }
+ SolidityABI masterSolABI = getSolABI(solABI, funcDetails[0], argList, inputVals);
+ if (masterSolABI != null) {
+ Class<?>[] funcArgs = getFuncArgs(masterSolABI);
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
- private Object getVariable(final String value, final Class<?> type, final Class<?> castType, final boolean isArray) {
- Object castValue = null;
- castValue = SolidityDynamicValueCasterHandler.getValue(value, (isArray ? castType : type), isArray);
- return castValue;
- }
+ // Re-Load contract with new credentials - if different account
+ // is chosen
+ String lastUsedAccount = ProjectCreator.getInstance().getLastUsedAccount(
+ ethProject.getProject()
+ .getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
+ getSelectedEnvironment());
+ if (!accountDetails.equals(lastUsedAccount)) {
+ String[] credentials = getWalletFile(accountDetails.replace("0x", ""),
+ this.personalAccount.getDataDir(getSelectedEnvironment()) + File.separator + "keystore")
+ .split("~");
+ Web3j web3jInstance = getWeb3jInstance();
+ Credentials creds = WalletUtils.loadCredentials(credentials[1], credentials[0]);
+ ContractGasProvider contractGasProvider = new DefaultGasProvider();
+ classInstance = contract
+ .getMethod("load", String.class, Web3j.class, Credentials.class, ContractGasProvider.class)
+ .invoke(classInstance,
+ ProjectCreator.getInstance().getContractAddress(
+ ethProject.getProject()
+ .getFile(scAbsPath.replace(
+ ethProject.getProject().getLocation().toOSString(), "")),
+ getSelectedEnvironment()),
+ web3jInstance, creds, contractGasProvider);
+ ProjectCreator.getInstance().updateLastUsedAccount(
+ ethProject.getProject()
+ .getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
+ accountDetails, getSelectedEnvironment());
+ /**
+ * This is required because when account is changed(Acc1 to Acc2) the
+ * classInstance will be loaded here with the new account(Acc2) and hence the
+ * tempclassinstancemap should also be updated with the newly loaded
+ * classinstance
+ */
+ tempClassInstanceMap.put(scAbsPath, classInstance);
+ }
+ RemoteCall<?> dep = (RemoteCall<?>) contract.getMethod(funcDetails[0], funcArgs).invoke(classInstance,
+ getFuncValues(values, masterSolABI.getInputs()));
+ returnPresent = doesFunctionReturnSomething(masterSolABI);
+ if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString()
+ .equals(getSelectedEnvironment())) {
+ CoreCommandExecutor.getInstance().mine(true);
+ }
+ // response = dep.send().toString();
+ responseObject = dep.send();
+ // responseObject =
+ // SolidityDynamicValueCasterHandler.getValue(projectName,
+ // valueToCast, actualType, isArray)
+ if (returnPresent && masterSolABI.getOutputs()[0].getJavaType().equals(List.class)
+ && masterSolABI.getOutputs()[0].getCastType().getSimpleName().contains("byte")) {
+ List<byte[]> bytes = (List<byte[]>) responseObject;
+ for (byte[] b : bytes) {
+ response += Numeric.toHexString(b) + ";";
+ }
+ } else if (returnPresent
+ && masterSolABI.getOutputs()[0].getJavaType().getSimpleName().contains("byte")) {
+ response = Numeric.toHexString((byte[]) responseObject);
+ } else {
+ response = responseObject.toString();
+ }
+ } else {
+ returnPresent = true;
+ response = "Something is not rite. Please make sure you pass the correct arguments";
+ }
- /**
- * This method is used to invoke the smart contract function...
- *
- * @param projectName -
- * @param funcName
- * @param scAbsPath
- * @param values - The input params for the function to be invoked, should be a comma separated value.
- * @param accountDetails -
- * @return
- * @throws Exception
- */
- public String invokeSCFunction(final String projectName, final String funcName, final String scAbsPath,
- final String values, final String accountDetails)
- throws Exception {
- String response = "";
- Object responseObject = null;
- boolean returnPresent = false;
- Map<String, Class<?>> tempContractMap =
- this.environmentBasedContractMap.computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
- Class<?> contract = tempContractMap.get(scAbsPath);
- Map<String, Object> tempClassInstanceMap =
- this.environmentBasedClassInstanceMap.computeIfAbsent(getSelectedEnvironment(), m -> new HashMap<>());
- Object classInstance = tempClassInstanceMap.get(scAbsPath);
- try {
- String[] funcDetails = funcName.split("-");
- String argList = "";
- if (funcDetails.length > 1) {
- argList = funcDetails[1];
- }
- SolidityABI[] solABI = CoreCommandExecutor.getInstance().getSolABIMap(scAbsPath);
- String[] inputVals = new String[0];
- if (!values.isEmpty()) {
- inputVals = values.split(";");
- }
- SolidityABI masterSolABI = getSolABI(solABI, funcDetails[0], argList, inputVals);
- if (masterSolABI != null) {
- Class<?>[] funcArgs = getFuncArgs(masterSolABI);
- EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
+ this.eventInfo = "";
+ if (responseObject instanceof TransactionReceipt) {
+ TransactionReceipt transactionReceipt = (TransactionReceipt) responseObject;
+ ArrayList<Event> events = new ArrayList<Event>();
- // Re-Load contract with new credentials - if different account is chosen
- String lastUsedAccount = ethProject.getLastUsedAccount(
- ethProject.getProject().getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
- getSelectedEnvironment());
- if (!accountDetails.equals(lastUsedAccount)) {
- String[] credentials = getWalletFile(accountDetails.replace("0x", ""),
- this.personalAccount.getDataDir(getSelectedEnvironment()) + File.separator + "keystore").split("~");
- Web3j web3jInstance = getWeb3jInstance();
- Credentials creds = WalletUtils.loadCredentials(credentials[1], credentials[0]);
- ContractGasProvider contractGasProvider = new DefaultGasProvider();
- classInstance =
- contract.getMethod("load", String.class, Web3j.class, Credentials.class, ContractGasProvider.class)
- .invoke(classInstance,
- ethProject.getContractAddress(
- ethProject.getProject()
- .getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
- getSelectedEnvironment()),
- web3jInstance, creds, contractGasProvider);
- ethProject.updateLastUsedAccount(
- ethProject.getProject()
- .getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
- accountDetails, getSelectedEnvironment());
- /**
- * This is required because when account is changed(Acc1 to Acc2) the classInstance will be loaded here with
- * the new account(Acc2) and hence the tempclassinstancemap should also be updated with the newly loaded
- * classinstance
- */
- tempClassInstanceMap.put(scAbsPath, classInstance);
- }
+ java.lang.reflect.Field[] s = classInstance.getClass().getFields();
+ for (Field field : s) {
+ if (field.getType() == Event.class) {
+ events.add((Event) field.get(this));
- RemoteCall<?> dep = (RemoteCall<?>) contract.getMethod(funcDetails[0], funcArgs).invoke(classInstance,
- getFuncValues(values, masterSolABI.getInputs()));
- returnPresent = doesFunctionReturnSomething(masterSolABI);
- if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString().equals(getSelectedEnvironment())) {
- CoreCommandExecutor.getInstance().mine(true);
- }
- // response = dep.send().toString();
- responseObject = dep.send();
- // responseObject = SolidityDynamicValueCasterHandler.getValue(projectName, valueToCast, actualType, isArray)
- if (returnPresent && masterSolABI.getOutputs()[0].getJavaType().equals(List.class) &&
- masterSolABI.getOutputs()[0].getCastType().getSimpleName().contains("byte")) {
- List<byte[]> bytes = (List<byte[]>) responseObject;
- for (byte[] b : bytes) {
- response += Numeric.toHexString(b) + ";";
- }
- }
- else if (returnPresent && masterSolABI.getOutputs()[0].getJavaType().getSimpleName().contains("byte")) {
- response = Numeric.toHexString((byte[]) responseObject);
- }
- else {
- response = responseObject.toString();
- }
- }
- else {
- returnPresent = true;
- response = "Something is not rite. Please make sure you pass the correct arguments";
- }
-
- this.eventInfo = "";
- TransactionReceipt transactionReceipt = (TransactionReceipt) responseObject;
- ArrayList<Event> events = new ArrayList<Event>();
-
-
- java.lang.reflect.Field[] s = classInstance.getClass().getFields();
- for (Field field : s) {
- if (field.getType() == Event.class) {
- events.add((Event) field.get(this));
-
- }
- }
-
- for (Event event : events) {
- if (transactionReceipt != null) {
- List<List<org.web3j.abi.datatypes.Type>> eventValues = new ArrayList<>();
- List<org.web3j.abi.datatypes.Type> nonIndexed = null, Indexed = null;
-
- List<Log> logs = transactionReceipt.getLogs();
- for (Log log : logs) {
-
- try {
- nonIndexed = FunctionReturnDecoder.decode(log.getData(), event.getNonIndexedParameters());
- Indexed = FunctionReturnDecoder.decode(log.getData(), event.getIndexedParameters());
- }
- catch (Exception e) {
- continue;
- }
-
-
- }
+ }
+ }
+ for (Event event : events) {
+ if (transactionReceipt != null) {
+ List<List<org.web3j.abi.datatypes.Type>> eventValues = new ArrayList<>();
+ List<org.web3j.abi.datatypes.Type> nonIndexed = null, Indexed = null;
- if (!nonIndexed.isEmpty()) {
- eventValues.add(nonIndexed);
- }
- if (!Indexed.isEmpty()) {
- eventValues.add(Indexed);
- }
+ List<Log> logs = transactionReceipt.getLogs();
+ for (Log log : logs) {
- for (List<org.web3j.abi.datatypes.Type> listType : eventValues) {
- for (org.web3j.abi.datatypes.Type type : listType) {
- this.eventInfo = this.eventInfo + event.getName() + "\t" + "Type " + type.getTypeAsString() + "\t" +
- " Value " + type.getValue() + "\n";
- }
+ try {
+ nonIndexed = FunctionReturnDecoder.decode(log.getData(),
+ event.getNonIndexedParameters());
+ Indexed = FunctionReturnDecoder.decode(log.getData(), event.getIndexedParameters());
+ } catch (Exception e) {
+ continue;
+ }
- }
+ }
+ if (!nonIndexed.isEmpty()) {
+ eventValues.add(nonIndexed);
+ }
+ if (!Indexed.isEmpty()) {
+ eventValues.add(Indexed);
+ }
- }
- }
+ for (List<org.web3j.abi.datatypes.Type> listType : eventValues) {
+ for (org.web3j.abi.datatypes.Type type : listType) {
+ this.eventInfo = this.eventInfo + event.getName() + "\t" + "Type "
+ + type.getTypeAsString() + "\t" + " Value " + type.getValue() + "\n";
+ }
+ }
- }
+ }
+ }
+ }
- finally {
- updateAccBalance();
- if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString().equals(getSelectedEnvironment())) {
- CoreCommandExecutor.getInstance().mine(false);
- }
- }
- return (returnPresent) ? response : "DONE";
- }
+ }
+ finally {
+ updateAccBalance();
+ if (!SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString()
+ .equals(getSelectedEnvironment())) {
+ CoreCommandExecutor.getInstance().mine(false);
+ }
+ }
+ return (returnPresent) ? response : "DONE";
+ }
- /**
- * @return Event Information
- */
- public String getEvents() {
- if (this.eventInfo != null) {
- return this.eventInfo;
- }
- return "No Event Information";
- }
+ /**
+ * @return Event Information
+ */
+ public String getEvents() {
+ if (this.eventInfo != null) {
+ return this.eventInfo;
+ }
+ return "No Event Information";
+ }
- /**
- * As of now restricted to String check....
- *
- * @param masterSolABI
- * @param funcName
- * @return
- */
- private boolean doesFunctionReturnSomething(final SolidityABI masterSolABI) {
- if (masterSolABI.getOutputs().length > 0) {
- for (IOABI iob : masterSolABI.getOutputs()) {
- if ((iob.getJavaType() != null) && !iob.getJavaType().getSimpleName().isEmpty()) {
- return true;
- }
- }
- return false;
- }
- return false;
- }
+ /**
+ * As of now restricted to String check....
+ *
+ * @param masterSolABI
+ * @param funcName
+ * @return
+ */
+ private boolean doesFunctionReturnSomething(final SolidityABI masterSolABI) {
+ if (masterSolABI.getOutputs().length > 0) {
+ for (IOABI iob : masterSolABI.getOutputs()) {
+ if ((iob.getJavaType() != null) && !iob.getJavaType().getSimpleName().isEmpty()) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return false;
+ }
- private Class<?>[] getFuncArgs(final SolidityABI solABI) {
- Class<?>[] argTypes = null;
- IOABI[] inputs = solABI.getInputs();
- argTypes = new Class[inputs.length];
- for (int i = 0; i < inputs.length; i++) {
- argTypes[i] = inputs[i].getJavaType();
- }
- return argTypes;
- }
+ private Class<?>[] getFuncArgs(final SolidityABI solABI) {
+ Class<?>[] argTypes = null;
+ IOABI[] inputs = solABI.getInputs();
+ argTypes = new Class[inputs.length];
+ for (int i = 0; i < inputs.length; i++) {
+ argTypes[i] = inputs[i].getJavaType();
+ }
+ return argTypes;
+ }
- private SolidityABI getSolABI(final SolidityABI solABI[], final String funcName, final String argsList,
- final String[] inputVals) {
- List<String> inputArgs = new ArrayList<>();
- if (argsList.contains(";")) {
- inputArgs = Arrays.asList(argsList.split(";"));
- }
- else if (!argsList.isEmpty()) {
- inputArgs.add(argsList);
- }
- for (SolidityABI sAbi : solABI) {
- if (sAbi.getName().equalsIgnoreCase(funcName) && (sAbi.getInputs().length == inputVals.length)) {
- List<String> argVals = new ArrayList<>();
- for (IOABI input : sAbi.getInputs()) {
- argVals.add(input.getJavaType().getSimpleName());
- }
- if (inputArgs.equals(argVals)) {
- return sAbi;
- }
- }
- }
- return null;
- }
+ private SolidityABI getSolABI(final SolidityABI solABI[], final String funcName, final String argsList,
+ final String[] inputVals) {
+ List<String> inputArgs = new ArrayList<>();
+ if (argsList.contains(";")) {
+ inputArgs = Arrays.asList(argsList.split(";"));
+ } else if (!argsList.isEmpty()) {
+ inputArgs.add(argsList);
+ }
+ for (SolidityABI sAbi : solABI) {
+ if (sAbi.getName().equalsIgnoreCase(funcName) && (sAbi.getInputs().length == inputVals.length)) {
+ List<String> argVals = new ArrayList<>();
+ for (IOABI input : sAbi.getInputs()) {
+ argVals.add(input.getJavaType().getSimpleName());
+ }
+ if (inputArgs.equals(argVals)) {
+ return sAbi;
+ }
+ }
+ }
+ return null;
+ }
- private Object[] getFuncValues(final String values, final IOABI[] ioabi) {
- if (values.isEmpty()) {
- return null;
- }
- String[] inputVals = values.split(";");
- Object[] vals = new Object[inputVals.length];
- for (int i = 0; i < inputVals.length; i++) {
- vals[i] = getVariable(inputVals[i], ioabi[i].getJavaType(), ioabi[i].getCastType(), ioabi[i].getIsArray());
- }
- return vals;
- }
+ private Object[] getFuncValues(final String values, final IOABI[] ioabi) {
+ if (values.isEmpty()) {
+ return null;
+ }
+ String[] inputVals = values.split(";");
+ Object[] vals = new Object[inputVals.length];
+ for (int i = 0; i < inputVals.length; i++) {
+ vals[i] = getVariable(inputVals[i], ioabi[i].getJavaType(), ioabi[i].getCastType(), ioabi[i].getIsArray());
+ }
+ return vals;
+ }
- private String convertToEther(final String wei) {
- return Convert.fromWei(wei, Unit.ETHER).toString();
+ private String convertToEther(final String wei) {
+ return Convert.fromWei(wei, Unit.ETHER).toString();
- }
+ }
- private String createGethInitFile(final String dataDir, final boolean clearOldData, final String accountType)
- throws IOException, InterruptedException {
- if (clearOldData) {
- clearOldDataDir(dataDir);
- }
- File gethInitFile = new File(dataDir + File.separator + "genesis.json");
- gethInitFile.createNewFile();// NOSONAR
- List<String> accounts = new ArrayList<>(this.personalAccount.getAccounts(accountType).keySet());
- try (
- BufferedReader br = new BufferedReader(
- new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("genesis2.template")));
- BufferedWriter bw = new BufferedWriter(new FileWriter(gethInitFile));) {
- String genesisContent = "";
- while ((genesisContent = br.readLine()) != null) {
- if (genesisContent.contains("acc")) {
- int index = Integer
- .parseInt(genesisContent.substring(genesisContent.indexOf("acc") + 3, genesisContent.indexOf("acc") + 4));
- genesisContent = genesisContent.replace("acc" + index, accounts.get(index));
- }
- bw.append(genesisContent);
- bw.append(System.lineSeparator());
- }
- }
- return gethInitFile.getAbsolutePath();
- }
+ private String createGethInitFile(final String dataDir, final boolean clearOldData, final String accountType)
+ throws IOException, InterruptedException {
+ if (clearOldData) {
+ clearOldDataDir(dataDir);
+ }
+ File gethInitFile = new File(dataDir + File.separator + "genesis.json");
+ gethInitFile.createNewFile();// NOSONAR
+ List<String> accounts = new ArrayList<>(this.personalAccount.getAccounts(accountType).keySet());
+ try (BufferedReader br = new BufferedReader(
+ new InputStreamReader(CoreCommandExecutor.class.getResourceAsStream("genesis2.template")));
+ BufferedWriter bw = new BufferedWriter(new FileWriter(gethInitFile));) {
+ String genesisContent = "";
+ while ((genesisContent = br.readLine()) != null) {
+ if (genesisContent.contains("acc")) {
+ int index = Integer.parseInt(genesisContent.substring(genesisContent.indexOf("acc") + 3,
+ genesisContent.indexOf("acc") + 4));
+ genesisContent = genesisContent.replace("acc" + index, accounts.get(index));
+ }
+ bw.append(genesisContent);
+ bw.append(System.lineSeparator());
+ }
+ }
+ return gethInitFile.getAbsolutePath();
+ }
- private static void clearOldDataDir(final String dataDir) throws IOException, InterruptedException {
- int maxTries = 3;
- while (maxTries >= 1) {
- try {
- FileUtils.deleteDirectory(new File(dataDir + File.separator + "geth"));
- break;
- }
- catch (IOException e) {
- if (maxTries > 1) {
- maxTries--;
- Thread.sleep(500);
- }
- else {
- throw e;
- }
- }
- }
- new File(dataDir + File.separator + "genesis.json").delete();// NOSONAR
- }
+ private static void clearOldDataDir(final String dataDir) throws IOException, InterruptedException {
+ int maxTries = 3;
+ while (maxTries >= 1) {
+ try {
+ FileUtils.deleteDirectory(new File(dataDir + File.separator + "geth"));
+ break;
+ } catch (IOException e) {
+ if (maxTries > 1) {
+ maxTries--;
+ Thread.sleep(500);
+ } else {
+ throw e;
+ }
+ }
+ }
+ new File(dataDir + File.separator + "genesis.json").delete();// NOSONAR
+ }
- /**
- * Returns account wallet file along with its password walletFile~password
- *
- * @param accId
- * @param keyStore
- * @return
- */
- private String getWalletFile(final String accId, final String keyStore) {
- File directory = new File(keyStore);
- File[] listFiles = directory.listFiles();
- for (File f : listFiles) {
- if (f.getName().contains(accId)) {
- return f.getAbsolutePath() + "~" + this.personalAccount.getAccounts(getSelectedEnvironment()).get("0x" + accId);
- }
- }
- return "";
- }
+ /**
+ * Returns account wallet file along with its password walletFile~password
+ *
+ * @param accId
+ * @param keyStore
+ * @return
+ */
+ private String getWalletFile(final String accId, final String keyStore) {
+ File directory = new File(keyStore);
+ File[] listFiles = directory.listFiles();
+ for (File f : listFiles) {
+ if (f.getName().contains(accId)) {
+ return f.getAbsolutePath() + "~"
+ + this.personalAccount.getAccounts(getSelectedEnvironment()).get("0x" + accId);
+ }
+ }
+ return "";
+ }
- /**
- * @return - The personal accounts
- */
- public Account getAccount() {
- return this.personalAccount;
- }
+ /**
+ * @return - The personal accounts
+ */
+ public Account getAccount() {
+ return this.personalAccount;
+ }
- /**
- * As of now only single account is supported in embeddedEVM
- */
- private void initializeEVMConfigurationMap() {
- try {
- String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
- File evmWalletLocation =
- new File(workspaceLocation + File.separator + "evmWalletLocation" + File.separator + "keystore");
- if (evmWalletLocation.exists()) {
- Files.walkFileTree(Paths.get(evmWalletLocation.getAbsolutePath()), new SimpleFileVisitor<Path>() {
+ /**
+ * As of now only single account is supported in embeddedEVM
+ */
+ private void initializeEVMConfigurationMap() {
+ try {
+ String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
+ File evmWalletLocation = new File(
+ workspaceLocation + File.separator + "evmWalletLocation" + File.separator + "keystore");
+ if (evmWalletLocation.exists()) {
+ Files.walkFileTree(Paths.get(evmWalletLocation.getAbsolutePath()), new SimpleFileVisitor<Path>() {
- /**
- * {@inheritDoc}
- */
- @Override
- public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
- Files.delete(file);
- return FileVisitResult.CONTINUE;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)
+ throws IOException {
+ Files.delete(file);
+ return FileVisitResult.CONTINUE;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) throws IOException {
- Files.delete(dir);
- return FileVisitResult.CONTINUE;
- }
- });
- }
- evmWalletLocation.mkdirs();
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FileVisitResult postVisitDirectory(final Path dir, final IOException exc)
+ throws IOException {
+ Files.delete(dir);
+ return FileVisitResult.CONTINUE;
+ }
+ });
+ }
+ evmWalletLocation.mkdirs();
- // WalletFiles creation
- String walletFile1 = WalletUtils.generateFullNewWalletFile("123", evmWalletLocation);
- String walletFile2 = WalletUtils.generateFullNewWalletFile("123", evmWalletLocation);
- String walletFile3 = WalletUtils.generateFullNewWalletFile("123", evmWalletLocation);
- // Credentials object
- Credentials cred1 = WalletUtils.loadCredentials("123",
- new File(evmWalletLocation.getAbsolutePath() + File.separator + walletFile1));
- Credentials cred2 = WalletUtils.loadCredentials("123",
- new File(evmWalletLocation.getAbsolutePath() + File.separator + walletFile2));
- Credentials cred3 = WalletUtils.loadCredentials("123",
- new File(evmWalletLocation.getAbsolutePath() + File.separator + walletFile3));
+ // WalletFiles creation
+ String walletFile1 = WalletUtils.generateFullNewWalletFile("123", evmWalletLocation);
+ String walletFile2 = WalletUtils.generateFullNewWalletFile("123", evmWalletLocation);
+ String walletFile3 = WalletUtils.generateFullNewWalletFile("123", evmWalletLocation);
+ // Credentials object
+ Credentials cred1 = WalletUtils.loadCredentials("123",
+ new File(evmWalletLocation.getAbsolutePath() + File.separator + walletFile1));
+ Credentials cred2 = WalletUtils.loadCredentials("123",
+ new File(evmWalletLocation.getAbsolutePath() + File.separator + walletFile2));
+ Credentials cred3 = WalletUtils.loadCredentials("123",
+ new File(evmWalletLocation.getAbsolutePath() + File.separator + walletFile3));
- // Accounts updation
- Map<String, String> accountsMap = new LinkedHashMap<>();
- accountsMap.put(cred1.getAddress(), "123");
- accountsMap.put(cred2.getAddress(), "123");
- accountsMap.put(cred3.getAddress(), "123");
- this.personalAccount.setAccounts(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(),
- accountsMap);
- Map<String, String> accountBalanceMap = new LinkedHashMap<>();
- accountBalanceMap.put(cred1.getAddress(), "100");
- accountBalanceMap.put(cred2.getAddress(), "100");
- accountBalanceMap.put(cred3.getAddress(), "100");
- this.personalAccount.setAccountBalance(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(),
- accountBalanceMap);
- this.personalAccount.setDataDir(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(),
- evmWalletLocation.getParent());
+ // Accounts updation
+ Map<String, String> accountsMap = new LinkedHashMap<>();
+ accountsMap.put(cred1.getAddress(), "123");
+ accountsMap.put(cred2.getAddress(), "123");
+ accountsMap.put(cred3.getAddress(), "123");
+ this.personalAccount.setAccounts(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(),
+ accountsMap);
+ Map<String, String> accountBalanceMap = new LinkedHashMap<>();
+ accountBalanceMap.put(cred1.getAddress(), "100");
+ accountBalanceMap.put(cred2.getAddress(), "100");
+ accountBalanceMap.put(cred3.getAddress(), "100");
+ this.personalAccount.setAccountBalance(
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(), accountBalanceMap);
+ this.personalAccount.setDataDir(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(),
+ evmWalletLocation.getParent());
- // genesis file creation
- String genesisFile = createGethInitFile(evmWalletLocation.getParent(), false,
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
+ // genesis file creation
+ String genesisFile = createGethInitFile(evmWalletLocation.getParent(), false,
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
- // Config object
- Configuration config1 =
- new Configuration(new Address(cred1.getAddress()), 100, new File(genesisFile).toURI().toURL());
- Web3jService embeddedWeb3jService = new EmbeddedWeb3jService(config1);
- Web3j web1 = Web3j.build(embeddedWeb3jService);
- Admin admin1 = Admin.build(new EmbeddedWeb3jService(config1));
+ // Config object
+ Configuration config1 = new Configuration(new Address(cred1.getAddress()), 100,
+ new File(genesisFile).toURI().toURL());
+ Web3jService embeddedWeb3jService = new EmbeddedWeb3jService(config1);
+ Web3j web1 = Web3j.build(embeddedWeb3jService);
+ Admin admin1 = Admin.build(new EmbeddedWeb3jService(config1));
- this.embeddedEVM = new EmbeddedEVMObject(config1, web1, admin1);
- /**
- * Transaction flowable is not supported by embedded EVM hence it is commented for now
- */
- // addListenerForTransactions();
- }
- catch (IOException | NoSuchAlgorithmException | NoSuchProviderException | InvalidAlgorithmParameterException
- | CipherException | InterruptedException e) {
- BlockchainCore.getInstance().logException(BlockchainCore.PLUGIN_ID, "Exception in evm config initialization", e);
- }
- }
+ this.embeddedEVM = new EmbeddedEVMObject(config1, web1, admin1);
+ /**
+ * Transaction flowable is not supported by embedded EVM hence it is commented
+ * for now
+ */
+ // addListenerForTransactions();
+ } catch (IOException | NoSuchAlgorithmException | NoSuchProviderException | InvalidAlgorithmParameterException
+ | CipherException | InterruptedException e) {
+ BlockchainCore.getInstance().logException(BlockchainCore.PLUGIN_ID,
+ "Exception in evm config initialization", e);
+ }
+ }
- /**
- * @return - The environment web3j instance, if selected environment is geth then geth server should be started else
- * null will be returned
- */
- public Web3j getWeb3jInstance() {
- if (getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString())) {
- return this.embeddedEVM.getWeb3j();
- }
- if (CoreCommandExecutor.getInstance().isGethStarted()) {
- return Web3j.build(new WindowsIpcService(CoreCommandExecutor.getInstance().getIPCPath()));
- }
- return null;
- }
+ /**
+ * @return - The environment web3j instance, if selected environment is geth
+ * then geth server should be started else null will be returned
+ */
+ public Web3j getWeb3jInstance() {
+ if (getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString())) {
+ return this.embeddedEVM.getWeb3j();
+ }
+ if (CoreCommandExecutor.getInstance().isGethStarted()) {
+ return Web3j.build(new WindowsIpcService(CoreCommandExecutor.getInstance().getIPCPath()));
+ }
+ return null;
+ }
- /**
- * @return - The environment Admin instance, if selected environment is geth then geth server should be started else
- * null will be returned
- */
- public Admin getAdminInstance() {
- if (getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString())) {
- return this.embeddedEVM.getAdmin();
- }
- if (CoreCommandExecutor.getInstance().isGethStarted()) {
- return Admin.build(new WindowsIpcService(CoreCommandExecutor.getInstance().getIPCPath()));
- }
- return null;
- }
+ /**
+ * @return - The environment Admin instance, if selected environment is geth
+ * then geth server should be started else null will be returned
+ */
+ public Admin getAdminInstance() {
+ if (getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString())) {
+ return this.embeddedEVM.getAdmin();
+ }
+ if (CoreCommandExecutor.getInstance().isGethStarted()) {
+ return Admin.build(new WindowsIpcService(CoreCommandExecutor.getInstance().getIPCPath()));
+ }
+ return null;
+ }
- /**
- * @return -
- */
- public BigInteger getGasPrice() {
- BigInteger gasPrice = null;
- try {
- gasPrice = getAdminInstance().ethGasPrice().send().getGasPrice();
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException("", e.getMessage(), e);
- }
- return gasPrice;
- }
+ /**
+ * @return -
+ */
+ public BigInteger getGasPrice() {
+ BigInteger gasPrice = null;
+ try {
+ gasPrice = getAdminInstance().ethGasPrice().send().getGasPrice();
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ return gasPrice;
+ }
- private void addListenerForTransactions() {
- getWeb3jInstance().transactionFlowable().subscribe(tx -> {
- addToGlobalTransactionMap(tx);
- });
- }
+ private void addListenerForTransactions() {
+ getWeb3jInstance().transactionFlowable().subscribe(tx -> {
+ addToGlobalTransactionMap(tx);
+ });
+ }
- /**
- * Get transaction receipt for already mined transaction
- *
- * @param transactionHash - The transaction hash
- * @return - The transaction receipt for the requested transaction
- * @throws IOException - Is thrown if socket connection get terminated
- */
- public String getTransactionReceiptAsString(final String transactionHash) throws IOException {
- EthGetTransactionReceipt transactionReceipt = getWeb3jInstance().ethGetTransactionReceipt(transactionHash).send();
- return getTransactionReceiptMessage(transactionReceipt.getResult());
- }
+ /**
+ * Get transaction receipt for already mined transaction
+ *
+ * @param transactionHash - The transaction hash
+ * @return - The transaction receipt for the requested transaction
+ * @throws IOException - Is thrown if socket connection get terminated
+ */
+ public String getTransactionReceiptAsString(final String transactionHash) throws IOException {
+ EthGetTransactionReceipt transactionReceipt = getWeb3jInstance().ethGetTransactionReceipt(transactionHash)
+ .send();
+ return getTransactionReceiptMessage(transactionReceipt.getResult());
+ }
- private String getTransactionReceiptMessage(final TransactionReceipt transactionReceipt) {
- return "Transaction Hash :" + transactionReceipt.getTransactionHash() + System.lineSeparator() +
- "Transaction Index :" + transactionReceipt.getTransactionIndex() + System.lineSeparator() + "Block Hash :" +
- transactionReceipt.getBlockHash() + System.lineSeparator() + "Block Number :" +
- transactionReceipt.getBlockNumber() + System.lineSeparator() + "Cumulative Gas Used :" +
- transactionReceipt.getCumulativeGasUsed() + System.lineSeparator() + "Gas Used :" +
- transactionReceipt.getGasUsed() + System.lineSeparator() + "Contract Address :" +
- transactionReceipt.getContractAddress() + System.lineSeparator() + "Root :" + transactionReceipt.getRoot() +
- System.lineSeparator() + "Status :" + transactionReceipt.getStatus() + System.lineSeparator() + "From :" +
- transactionReceipt.getFrom() + System.lineSeparator() + "To :" + transactionReceipt.getTo() +
- System.lineSeparator() + "Logs :" + transactionReceipt.getLogs().toString() + System.lineSeparator() +
- "Logs Bloom :" + transactionReceipt.getLogsBloom() + System.lineSeparator();
- }
+ private String getTransactionReceiptMessage(final TransactionReceipt transactionReceipt) {
+ return "Transaction Hash :" + transactionReceipt.getTransactionHash() + System.lineSeparator()
+ + "Transaction Index :" + transactionReceipt.getTransactionIndex() + System.lineSeparator()
+ + "Block Hash :" + transactionReceipt.getBlockHash() + System.lineSeparator() + "Block Number :"
+ + transactionReceipt.getBlockNumber() + System.lineSeparator() + "Cumulative Gas Used :"
+ + transactionReceipt.getCumulativeGasUsed() + System.lineSeparator() + "Gas Used :"
+ + transactionReceipt.getGasUsed() + System.lineSeparator() + "Contract Address :"
+ + transactionReceipt.getContractAddress() + System.lineSeparator() + "Root :"
+ + transactionReceipt.getRoot() + System.lineSeparator() + "Status :" + transactionReceipt.getStatus()
+ + System.lineSeparator() + "From :" + transactionReceipt.getFrom() + System.lineSeparator() + "To :"
+ + transactionReceipt.getTo() + System.lineSeparator() + "Logs :"
+ + transactionReceipt.getLogs().toString() + System.lineSeparator() + "Logs Bloom :"
+ + transactionReceipt.getLogsBloom() + System.lineSeparator();
+ }
- /**
- * @param tx
- */
- private void addToGlobalTransactionMap(final Transaction tx) {
- // create an intermediate transaction model with the actual transaction data
- TransactionModel transactionModel = new TransactionModel();
- transactionModel.setValues(tx);
- // refresh the transaction view with data
- BlockchainViewsRegistry.getListOFViews().stream().forEach(view -> view.updateView(transactionModel));
- }
+ /**
+ * @param tx
+ */
+ private void addToGlobalTransactionMap(final Transaction tx) {
+ // create an intermediate transaction model with the actual transaction
+ // data
+ TransactionModel transactionModel = new TransactionModel();
+ transactionModel.setValues(tx);
+ // refresh the transaction view with data
+ BlockchainViewsRegistry.getListOFViews().stream().forEach(view -> view.updateView(transactionModel));
+ }
- String getSelectedEnvironment() {
- if (!this.selectedEnvironment.isEmpty()) {
- return this.selectedEnvironment;
- }
- return this.selectedEnvironment = InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
- }
+ String getSelectedEnvironment() {
+ if (!this.selectedEnvironment.isEmpty()) {
+ return this.selectedEnvironment;
+ }
+ return this.selectedEnvironment = InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
- this.selectedEnvironment = event.getActiveEvironment();
- }
-}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
+ this.selectedEnvironment = event.getActiveEvironment();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainBuildEvent.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainBuildEvent.java
new file mode 100644
index 0000000..d27b0b4
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainBuildEvent.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.core.events;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+
+public class BlockchainBuildEvent implements IBlockchainBuildEvent {
+
+ List<String> compileErrors;
+ IProject project;
+
+ /**
+ * @param compileErrors
+ */
+ public BlockchainBuildEvent(final List<String> compileErrors, final IProject project) {
+ this.compileErrors = compileErrors;
+ this.project = project;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<String> getErrors() {
+ return this.compileErrors;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IProject getProject() {
+ return this.project;
+ }
+
+}
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainBuildTrigger.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainBuildTrigger.java
new file mode 100644
index 0000000..f7649cf
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainBuildTrigger.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.core.events;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BlockchainBuildTrigger {
+
+ private static BlockchainBuildTrigger instance;
+ private final List<IBlockchainBuildListener> listeners = new ArrayList<>();
+
+ private BlockchainBuildTrigger() {
+ }
+
+ /**
+ * @return
+ */
+ public static BlockchainBuildTrigger getInstance() {
+ if (null == instance) {
+ instance = new BlockchainBuildTrigger();
+ }
+ return instance;
+ }
+
+ /**
+ * @param listener
+ */
+ public void addBuildListener(final IBlockchainBuildListener listener) {
+ instance.listeners.add(listener);
+ }
+
+ /**
+ * @param event
+ */
+ public void notifyListeners(final IBlockchainBuildEvent event) {
+ for (IBlockchainBuildListener listener : this.listeners) {
+ listener.blockchainBuildComplete(event);
+ }
+ }
+}
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedEvent.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedEvent.java
index f7a84b8..51e7e4e 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedEvent.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedEvent.java
@@ -1,28 +1,39 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core.events;
-
/**
- * @author ADG5COB
+ * Environment changed event
*/
-public class BlockchainEnvironmentChangedEvent implements IBlockchainEnvironmentChangedEvent {
+public class BlockchainEnvironmentChangedEvent
+ implements
+ IBlockchainEnvironmentChangedEvent {
- private final String activeEnvironment;
+ private final String activeEnvironment;
- /**
- * @param activeEnv
- */
- public BlockchainEnvironmentChangedEvent(final String activeEnv) {
- this.activeEnvironment = activeEnv;
- }
+ /**
+ * @param activeEnv
+ */
+ public BlockchainEnvironmentChangedEvent(final String activeEnv) {
+ this.activeEnvironment = activeEnv;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public String getActiveEvironment() {
- return this.activeEnvironment;
- }
-}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getActiveEvironment() {
+ return this.activeEnvironment;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedTrigger.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedTrigger.java
index 959eb4f..a7f93ab 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedTrigger.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/BlockchainEnvironmentChangedTrigger.java
@@ -1,45 +1,61 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core.events;
import java.util.ArrayList;
import java.util.List;
/**
- * @author ADG5COB
+ * Environment changed Trigger
*/
public class BlockchainEnvironmentChangedTrigger {
- private final List<IBlockchainEnvironmentChangedListener> observers = new ArrayList<>();
- private static BlockchainEnvironmentChangedTrigger instance;
+ private final List<IBlockchainEnvironmentChangedListener> observers = new ArrayList<>();
+ private static BlockchainEnvironmentChangedTrigger instance;
- protected BlockchainEnvironmentChangedTrigger() {}
+ protected BlockchainEnvironmentChangedTrigger() {
+ }
- /**
- * @return - An instance of BlockchainEnvironmentChangedTrigger
- */
- public static BlockchainEnvironmentChangedTrigger getInstance() {
- if (null == instance) {
- instance = new BlockchainEnvironmentChangedTrigger();
- }
- return instance;
- }
+ /**
+ * @return - An instance of BlockchainEnvironmentChangedTrigger
+ */
+ public static BlockchainEnvironmentChangedTrigger getInstance() {
+ if (null == instance) {
+ instance = new BlockchainEnvironmentChangedTrigger();
+ }
+ return instance;
+ }
- /**
- * Method used to add blockchain environment changed listener's to the list of listener's
- *
- * @param observer - The listener to be added.
- */
- public void addBlockchainEnvironmentChangedListener(final IBlockchainEnvironmentChangedListener observer) {
- getInstance().observers.add(observer);
- }
+ /**
+ * Method used to add blockchain environment changed listener's to the list
+ * of listener's
+ *
+ * @param observer
+ * - The listener to be added.
+ */
+ public void addBlockchainEnvironmentChangedListener(
+ final IBlockchainEnvironmentChangedListener observer) {
+ getInstance().observers.add(observer);
+ }
- protected void triggerEnvironmentChange(final String newEnvironment) {
- notifyListeners(new BlockchainEnvironmentChangedEvent(newEnvironment));
- }
+ protected void triggerEnvironmentChange(final String newEnvironment) {
+ notifyListeners(new BlockchainEnvironmentChangedEvent(newEnvironment));
+ }
- private void notifyListeners(final IBlockchainEnvironmentChangedEvent event) {
- getInstance().observers.forEach(o -> o.blockchainEnvironmentChanged(event));
- }
-}
+ private void notifyListeners(
+ final IBlockchainEnvironmentChangedEvent event) {
+ getInstance().observers
+ .forEach(o -> o.blockchainEnvironmentChanged(event));
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainBuildEvent.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainBuildEvent.java
new file mode 100644
index 0000000..53b9f91
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainBuildEvent.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.core.events;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+
+public interface IBlockchainBuildEvent {
+ /**
+ * This will contain all the compilation errors that occured during the current
+ * build
+ *
+ * @return - Compilation errors of all resources that were built
+ */
+ List<String> getErrors();
+
+ /**
+ * @return - The project for which build was triggered
+ */
+ IProject getProject();
+}
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainBuildListener.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainBuildListener.java
new file mode 100644
index 0000000..72f9130
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainBuildListener.java
@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.core.events;
+
+public interface IBlockchainBuildListener {
+
+ /**
+ * This will get triggered once Blockchain build complete's.
+ *
+ * @param event - Any errors or other build related info
+ */
+ void blockchainBuildComplete(IBlockchainBuildEvent event);
+}
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedEvent.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedEvent.java
index 2cff3de..82f478d 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedEvent.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedEvent.java
@@ -1,13 +1,26 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core.events;
-
/**
- * @author ADG5COB
+ * Environment changed event interface
*/
public interface IBlockchainEnvironmentChangedEvent {
- public String getActiveEvironment();
-}
+ /**
+ *
+ * @return - The currently active ethereum environment
+ */
+ public String getActiveEvironment();
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedListener.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedListener.java
index af4cc77..f145fd4 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedListener.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/events/IBlockchainEnvironmentChangedListener.java
@@ -1,16 +1,31 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core.events;
-
/**
- * @author ADG5COB
+ * Blockchain environment changed listener interface
*/
public interface IBlockchainEnvironmentChangedListener {
- /**
- *
- */
- public void blockchainEnvironmentChanged(IBlockchainEnvironmentChangedEvent event);
-}
+ /**
+ * A trigger to intimate all listener's that the ethereum environment has
+ * changed
+ *
+ * @param event
+ * - The event object containing all information about the change
+ * that has occured.
+ */
+ public void blockchainEnvironmentChanged(
+ IBlockchainEnvironmentChangedEvent event);
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/interfaces/IBlockchainView.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/interfaces/IBlockchainView.java
new file mode 100644
index 0000000..e51a8f5
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/interfaces/IBlockchainView.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Abirami Bhologa Indiran - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.interfaces;
+
+import org.eclipse.blockchain.core.model.TransactionModel;
+
+/**
+ * An interface for view's which want to regiter themselves to get notification
+ * about transactions that occur in blockchain
+ */
+public interface IBlockchainView {
+
+ /**
+ * The transaction view which gets called on receiving a new transaction
+ *
+ * @param transactionModel
+ * - The transaction data
+ */
+ public void updateView(TransactionModel transactionModel);
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/interfaces/IEthereumProject1.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/interfaces/IEthereumProject1.java
new file mode 100644
index 0000000..19a4ee0
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/interfaces/IEthereumProject1.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.interfaces;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+
+/**
+ * Interface for Ethereum Project
+ */
+public interface IEthereumProject1 {
+ /**
+ * This method is used to add the compiled solidity files to the set that is
+ * maintained in this project
+ *
+ * @param solidityFile - The compiled solidity file that belongs to this project
+ */
+ public void addCompiledSolidityFiles(final IResource solidityFile);
+
+ /**
+ * This returns a set of compiled solidity files that is part of this project
+ *
+ * @return - Set of compiled solidity files
+ */
+ public Set<IResource> getCompiledSolidityFiles();
+
+ /**
+ * Assigns the IProject to this Ethereum Project. This has to be invoked only
+ * once during creation of Ethereum Project
+ *
+ * @param project - The IProject.
+ */
+ public void setProject(final IProject project);
+
+ /**
+ * Assigns the ProjectDescription for this Ethereum Project.
+ *
+ * @param projectDescription - The Project description associated with this
+ */
+ public void setProjectDescription(final IProjectDescription projectDescription);
+
+ /**
+ * Returns the IProject associated with this Ethereum Project
+ *
+ * @return - The IProject.
+ */
+ public IProject getProject();
+
+ /**
+ *
+ * @return - The Project description associated with this project
+ */
+ public IProjectDescription getProjectDescription();
+
+ /**
+ * The file system location of the project that is associated with this.
+ *
+ * @return - File system location
+ */
+ public String getProjectLocation();
+
+ /**
+ * This method is used to add the default natures that is associated with
+ * Ethereum Project
+ */
+ public void addDefaultNatures();
+
+ /**
+ * This method is used to add the default builders that is associated with
+ * Ethereum Project
+ */
+ public void addDefaultBuilders();
+
+ /**
+ *
+ * @return - The name of the project
+ */
+ public String getProjectName();
+
+ /**
+ * This is used to assign the project builders associated with Ethereum Project.
+ *
+ * @param builderId - The builder id to add to project
+ */
+ public void setProjectBuilders(String builderId);
+
+ /**
+ * This is used to add the project nature to the list of available project
+ * nature's.
+ *
+ * @param nature - The nature to be added.
+ */
+ public void setProjectNatures(final String nature);
+
+ /**
+ *
+ * @return - Array of natures associated with this project
+ */
+ public String[] getNatureIds();
+
+ /**
+ *
+ * @return - Array of builders associated with this project
+ */
+ public String[] getBuilderIds();
+
+ /**
+ * This creates a deployment model for a smart contract that is deployed into a
+ * blockchain
+ *
+ * @param contractAddress - The contract address of the deployed SC
+ * @param scFile - The SC resource
+ * @param lastUsedAccount - The account that was last used for performing a
+ * transaction
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void createDeploymentModel(final String contractAddress, final IResource scFile,
+ final String lastUsedAccount, final String environment);
+
+ /**
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - The account that was last used for performing a transaction
+ */
+ public String getLastUsedAccount(final IResource scFile, final String environment);
+
+ /**
+ * This is used to update the last used account(for transacting with blockchain)
+ *
+ * @param scFile - The SC resource
+ * @param accountDetails - The new account that was used for transaction
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void updateLastUsedAccount(final IResource scFile, final String accountDetails, final String environment);
+
+ /**
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - The contract address of the deployed SC
+ */
+ public String getContractAddress(final IResource scFile, final String environment);
+
+ /**
+ * This method is used to remove the SC resource from the map which holds
+ * deployed resources
+ *
+ * @param resource - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void removeDeploymentModelForResource(final IResource resource, final String environment);
+
+ /**
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - Whether the SC is deployed into the passed in environment
+ */
+ public boolean isSCDeployed(final IResource scFile, final String environment);
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/loader/DynamicClassLoader.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/loader/DynamicClassLoader.java
new file mode 100644
index 0000000..0c2e242
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/loader/DynamicClassLoader.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.loader;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.eclipse.blockchain.core.BlockchainCore;
+import org.eclipse.blockchain.core.ProjectCreator;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
+import org.eclipse.core.resources.IResource;
+
+/**
+ * Solidity Smart contract class loader
+ */
+public class DynamicClassLoader extends ClassLoader {
+
+ String directoryLocation = "";
+ String projectName = "";
+
+ /**
+ * @param parentLoader -
+ * @param projectName -
+ * @param directory -
+ */
+ public DynamicClassLoader(final ClassLoader parentLoader, final String projectName, final String directory) {
+ super(parentLoader);
+ this.directoryLocation = directory;
+ this.projectName = projectName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Class<?> loadClass(final String name) throws ClassNotFoundException {
+ if (shouldBeHandled(name)) {
+ URL url;
+ try {
+ url = new URL("file:" + this.directoryLocation + File.separator + name.replace(".", File.separator)
+ + ".class");
+ URLConnection urlConn = url.openConnection();
+ InputStream is = urlConn.getInputStream();
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ int data = is.read();
+
+ while (data != -1) {
+ buffer.write(data);
+ data = is.read();
+ }
+ is.close();
+
+ byte[] classData = buffer.toByteArray();
+
+ return defineClass(name, classData, 0, classData.length);
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ }
+ return super.loadClass(name);
+ }
+
+ private boolean shouldBeHandled(final String name) {
+ if (getSmartContracts().contains(name.substring(name.lastIndexOf('.') + 1))) {
+ return true;
+ } else if (name.contains("$")
+ && getSmartContracts().contains(name.substring(name.lastIndexOf('.') + 1, name.indexOf('$')))) {
+ return true;
+ } else if (name.equals("org.eclipse.blockchain.core.SolidityDynamicValueCaster")) {
+ return true;
+ } else if (name.equals("org.eclipse.blockchain.core.SolidityDatatypeToJavaDatatype")) {
+ return true;
+ }
+ return false;
+ }
+
+ private List<String> getSmartContracts() {
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(this.projectName);
+ Set<IResource> solFiles = ethProject.getCompiledSolidityFiles().stream()
+ .map(r -> ethProject.getProject().findMember(r)).collect(Collectors.toSet());
+ return solFiles.stream().map(IResource::getName).map(r -> r.replace(".sol", "")).collect(Collectors.toList());
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogService.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogService.java
index 8d1d094..b241dd6 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogService.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogService.java
@@ -1,6 +1,17 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial API and Implementation
+ * Adhith Gopal
+ *******************************************************************************/
package org.eclipse.blockchain.core.log;
import java.util.ArrayList;
@@ -8,46 +19,43 @@
/**
* LoggerService to log into console
- *
- * @author PKI8COB
+ *
*/
public enum EthereumLogService implements IEthereumLogger {
-
- INSTANCE;
- private final List<IEthereumLogger> listeners = new ArrayList();
+ INSTANCE;
- /**
- * {@inheritDoc}
- */
- @Override
- public void log(final String content) {
+ private final List<IEthereumLogger> listeners = new ArrayList();
- for (IEthereumLogger l : this.listeners) {
- l.log(content);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void log(final String content) {
+ for (IEthereumLogger l : this.listeners) {
+ l.log(content);
+ }
- }
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void errorLog(final String content) {
- for (IEthereumLogger l : this.listeners) {
- l.errorLog(content);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void errorLog(final String content) {
+ for (IEthereumLogger l : this.listeners) {
+ l.errorLog(content);
+ }
+ }
- }
+ /**
+ * @param ethereumLogger
+ */
+ public void addIEthereumLogger(final EthereumLogger ethereumLogger) {
+ this.listeners.add(ethereumLogger);
- /**
- * @param ethereumLogger
- */
- public void addIEthereumLogger(final EthereumLogger ethereumLogger) {
- this.listeners.add(ethereumLogger);
+ }
- }
-
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogger.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogger.java
index e5e993f..ca25416 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogger.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/EthereumLogger.java
@@ -1,6 +1,17 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial API and Implementation
+ * Adhith Gopal
+ *******************************************************************************/
package org.eclipse.blockchain.core.log;
import org.eclipse.ui.console.ConsolePlugin;
@@ -8,43 +19,44 @@
import org.eclipse.ui.console.MessageConsoleStream;
/**
- * @author PKI8COB
+ * Ethereum Logger which would log in the system's Ethereum console
*/
public class EthereumLogger implements IEthereumLogger {
- MessageConsoleStream outputMessage;
- MessageConsoleStream errorOutputMessage;
- private final MessageConsole console;
+ MessageConsoleStream outputMessage;
+ MessageConsoleStream errorOutputMessage;
+ private final MessageConsole console;
- /**
- * @param messageConsole
- * @param c
- * @param outputMessage
- */
- public EthereumLogger(final MessageConsole messageConsole) {
- this.outputMessage = messageConsole.newMessageStream();
- this.errorOutputMessage = messageConsole.newMessageStream();
- this.console = messageConsole;
- ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this.outputMessage.getConsole());
- }
+ /**
+ * @param messageConsole
+ * @param c
+ * @param outputMessage
+ */
+ public EthereumLogger(final MessageConsole messageConsole) {
+ this.outputMessage = messageConsole.newMessageStream();
+ this.errorOutputMessage = messageConsole.newMessageStream();
+ this.console = messageConsole;
+ ConsolePlugin.getDefault().getConsoleManager()
+ .showConsoleView(this.outputMessage.getConsole());
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void log(final String content) {
- this.console.activate();
- this.outputMessage.println(content);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void log(final String content) {
+ this.console.activate();
+ this.outputMessage.println(content);
- }
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void errorLog(final String content) {
- this.console.activate();
- this.errorOutputMessage.println(content);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void errorLog(final String content) {
+ this.console.activate();
+ this.errorOutputMessage.println(content);
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/IEthereumLogger.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/IEthereumLogger.java
index db4cf47..883b3d1 100644
--- a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/IEthereumLogger.java
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/log/IEthereumLogger.java
@@ -1,28 +1,37 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial API and Implementation
+ *******************************************************************************/
package org.eclipse.blockchain.core.log;
-
/**
- * @author PKI8COB
+ * Ethereum Logger interface
*/
public interface IEthereumLogger {
- /**
- * This is used to log information into the ethereum console
- *
- * @param content
- * @param methodName
- * @param parameters
- */
- void log(String content);
+ /**
+ * This is used to log information into the ethereum console
+ *
+ * @param content
+ * @param methodName
+ * @param parameters
+ */
+ void log(String content);
- /**
- * This is used to log error into the ethereum console
- *
- * @param content
- * @param methodName
- */
- void errorLog(String content);
-}
+ /**
+ * This is used to log error into the ethereum console
+ *
+ * @param content
+ * @param methodName
+ */
+ void errorLog(String content);
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/Account.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/Account.java
new file mode 100644
index 0000000..b5f70dc
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/Account.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.model;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * Type based accounts Currently there are 2 types 1.
+ * EnvironmentType.GETH_CLIENT 2. EnvironmentType.EMBEDDED_EVM
+ *
+ */
+public class Account {
+
+ private final Map<String, String> dataDir = new HashMap<>();
+ private final Map<String, Map<String, String>> accounts = new HashMap<>();
+ private final Map<String, Map<String, String>> accountBalance = new HashMap<>();
+
+ /**
+ * @param type
+ * - The environment type
+ * @return the accountBalance
+ */
+ public Map<String, String> getAccountBalance(final String type) {
+ return this.accountBalance.computeIfAbsent(type,
+ v -> new LinkedHashMap<>());
+ }
+
+ /**
+ * @param type
+ * - The environment type
+ * @param accountBalance
+ * the accountBalance to set
+ */
+ public void setAccountBalance(final String type,
+ final Map<String, String> accountBalance) {
+ if (!(accountBalance instanceof LinkedHashMap)) {
+ throw new IllegalArgumentException(
+ "The accountBalance should be an instance of LinkedHashMap");
+ }
+ Map<String, String> theMap = this.accountBalance.computeIfAbsent(type,
+ v -> new LinkedHashMap<>());
+ theMap.clear();// for now only account initialization is handled
+ theMap.putAll(accountBalance);
+ }
+
+ /**
+ * @param type
+ * - The environment type
+ * @return the dataDir
+ */
+ public String getDataDir(final String type) {
+ return this.dataDir.get(type);
+ }
+
+ /**
+ * @param type
+ * - The environment type
+ * @param dataDir
+ * the dataDir to set
+ */
+ public void setDataDir(final String type, final String dataDir) {
+ this.dataDir.put(type, dataDir);
+ }
+
+ /**
+ * @param type
+ * - The environment type
+ * @return the accounts
+ */
+ public Map<String, String> getAccounts(final String type) {
+ return this.accounts.computeIfAbsent(type, v -> new LinkedHashMap<>());
+ }
+
+ /**
+ * @param type
+ * - The environment type
+ * @param accounts
+ * the accounts to set
+ */
+ public void setAccounts(final String type,
+ final Map<String, String> accounts) {
+ if (!(accounts instanceof LinkedHashMap)) {
+ throw new IllegalArgumentException(
+ "The accountBalance should be an instance of LinkedHashMap");
+ }
+ Map<String, String> theMap = this.accounts.computeIfAbsent(type,
+ v -> new LinkedHashMap<>());
+ theMap.clear();
+ theMap.putAll(accounts);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/EmbeddedEVMObject.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/EmbeddedEVMObject.java
new file mode 100644
index 0000000..4bb77cd
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/EmbeddedEVMObject.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.model;
+
+import org.web3j.evm.Configuration;
+import org.web3j.protocol.Web3j;
+import org.web3j.protocol.admin.Admin;
+
+/**
+ * Embedded EVM container
+ */
+public class EmbeddedEVMObject {
+
+ private Configuration config;
+ private Web3j web3j;
+ private Admin admin;
+
+ /**
+ * @param config
+ * - The evm configuration
+ * @param web3j
+ * - The web3j instance
+ */
+ public EmbeddedEVMObject(final Configuration config, final Web3j web3j,
+ final Admin admin) {
+ this.config = config;
+ this.web3j = web3j;
+ this.admin = admin;
+ }
+
+ /**
+ * @return the admin
+ */
+ public Admin getAdmin() {
+ return this.admin;
+ }
+
+ /**
+ * @param admin
+ * the admin to set
+ */
+ public void setAdmin(final Admin admin) {
+ this.admin = admin;
+ }
+
+ /**
+ * @return the config
+ */
+ public Configuration getConfig() {
+ return this.config;
+ }
+
+ /**
+ * @param config
+ * the config to set
+ */
+ public void setConfig(final Configuration config) {
+ this.config = config;
+ }
+
+ /**
+ * @return the web3j
+ */
+ public Web3j getWeb3j() {
+ return this.web3j;
+ }
+
+ /**
+ * @param web3j
+ * the web3j to set
+ */
+ public void setWeb3j(final Web3j web3j) {
+ this.web3j = web3j;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/IOABI.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/IOABI.java
new file mode 100644
index 0000000..519509d
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/IOABI.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.model;
+
+/**
+ * Input Output Application Binary interface(ABI)
+ */
+public class IOABI {
+
+ private String name;
+ private String type;
+ private Class<?> javaType;
+ private Class<?> castType;
+ private boolean isArray = false;
+ private String javaTypeString;
+ /**
+ * If array then this denotes the number of dimensions Eg: bool[][] - In
+ * this case this value will be 2
+ */
+ private int dimensionDepth;
+
+ /**
+ * @return the javaTypeString
+ */
+ public String getJavaTypeString() {
+ return this.javaTypeString;
+ }
+
+ /**
+ * @param javaTypeString
+ * the javaTypeString to set
+ */
+ public void setJavaTypeString(final String javaTypeString) {
+ this.javaTypeString = javaTypeString;
+ }
+
+ /**
+ * @return the dimensionDepth
+ */
+ public int getDimensionDepth() {
+ return this.dimensionDepth;
+ }
+
+ /**
+ * @param dimensionDepth
+ * the dimensionDepth to set
+ */
+ public void setDimensionDepth(final int dimensionDepth) {
+ this.dimensionDepth = dimensionDepth;
+ }
+
+ /**
+ * This indexed property is part of event/emit - This has to be investigated
+ */
+ private boolean indexed = false;
+ /**
+ * Not using this for now have to investigate the purpose of this
+ */
+ private String internalType;
+
+ /**
+ * @return the internalType
+ */
+ public String getInternalType() {
+ return this.internalType;
+ }
+
+ /**
+ * @param internalType
+ * the internalType to set
+ */
+ public void setInternalType(final String internalType) {
+ this.internalType = internalType;
+ }
+
+ /**
+ * @return
+ */
+ public boolean getIndexed() {
+ return this.indexed;
+ }
+
+ /**
+ * @param indexed
+ */
+ public void setIndexed(final boolean indexed) {
+ this.indexed = indexed;
+ }
+
+ /**
+ * @param isArray
+ * - true if I/O is array else false
+ */
+ public void setIsArray(final boolean isArray) {
+ this.isArray = isArray;
+ }
+
+ /**
+ * @return - true if I/O is array else false
+ */
+ public boolean getIsArray() {
+ return this.isArray;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * @return the javaType
+ */
+ public Class<?> getJavaType() {
+ return this.javaType;
+ }
+
+ /**
+ * @param javaType
+ * the javaType to set
+ */
+ public void setJavaType(final Class<?> javaType) {
+ this.javaType = javaType;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the type
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * @param type
+ * the type to set
+ */
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ /**
+ * @return - The value cast type if I/O is array
+ */
+ public Class<?> getCastType() {
+ return this.castType;
+ }
+
+ /**
+ * @param castType
+ * - The value cast type if I/O is array
+ */
+ public void setCastType(final Class<?> castType) {
+ this.castType = castType;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/SolidityABI.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/SolidityABI.java
new file mode 100644
index 0000000..93b1b5a
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/SolidityABI.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *******************************************************************************/
+package org.eclipse.blockchain.core.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+/**
+ * Whole solidity Application Binary interface(ABI)
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SolidityABI {
+
+ private String type = "";
+ private IOABI[] inputs;
+ private IOABI[] outputs;
+ private String name = "";
+ private boolean payable;
+ private String stateMutability = "";
+
+ /**
+ * @return the stateMutability
+ */
+ public String getStateMutability() {
+ return this.stateMutability;
+ }
+
+ /**
+ * @param stateMutability
+ * the stateMutability to set
+ */
+ public void setStateMutability(final String stateMutability) {
+ this.stateMutability = stateMutability;
+ }
+
+ /**
+ * @return the payable
+ */
+ public boolean isPayable() {
+ return this.payable;
+ }
+
+ /**
+ * @param payable
+ * the payable to set
+ */
+ public void setPayable(final boolean payable) {
+ this.payable = payable;
+ }
+
+ /**
+ * @return the type
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * @param type
+ * the type to set
+ */
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ /**
+ * @return the inputs
+ */
+ public IOABI[] getInputs() {
+ return this.inputs;
+ }
+
+ /**
+ * @param inputs
+ * the inputs to set
+ */
+ public void setInputs(final IOABI[] inputs) {
+ this.inputs = inputs;
+ }
+
+ /**
+ * @return the outputs
+ */
+ public IOABI[] getOutputs() {
+ return this.outputs;
+ }
+
+ /**
+ * @param outputs
+ * the outputs to set
+ */
+ public void setOutputs(final IOABI[] outputs) {
+ this.outputs = outputs;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/TransactionModel.java b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/TransactionModel.java
new file mode 100644
index 0000000..2b26b8d
--- /dev/null
+++ b/org.eclipse.blockchain.core/src/org/eclipse/blockchain/core/model/TransactionModel.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Abirami Bhologa Indiran - Initial API and Implementation
+ * Adhith Gopal
+ *******************************************************************************/
+package org.eclipse.blockchain.core.model;
+
+import org.web3j.protocol.core.methods.response.Transaction;
+
+/**
+ * The blockchain transaction model
+ */
+public class TransactionModel {
+
+ private String blockHash;
+ private String blockNumber;
+ private String fromAddress;
+ private String gas;
+ private String gasPrice;
+ private String transactionHash;
+ private String input;
+ private String nonce;
+ private String r;
+ private String s;
+ private String toAddress;
+ private String transactionIndex;
+ private String v;
+ private String value;
+
+ public void setValues(final Transaction tx) {
+ this.blockHash = tx.getBlockHash();
+ this.blockNumber = tx.getBlockNumber().toString();
+ this.fromAddress = tx.getFrom();
+ this.gas = tx.getGas().toString();
+ this.gasPrice = tx.getGasPrice().toString();
+ this.transactionHash = tx.getHash();
+ this.input = tx.getInput();
+ this.nonce = tx.getNonce().toString();
+ this.r = tx.getR();
+ this.s = tx.getS();
+ this.toAddress = tx.getTo();
+ this.transactionIndex = tx.getTransactionIndex().toString();
+ this.value = tx.getValue().toString();
+ this.v = tx.getV() + "";
+ }
+
+ /**
+ * @return the blockHash
+ */
+ public String getBlockHash() {
+ return this.blockHash;
+ }
+
+ /**
+ * @return the blockNumber
+ */
+ public String getBlockNumber() {
+ return this.blockNumber;
+ }
+
+ /**
+ * @return the fromAddress
+ */
+ public String getFromAddress() {
+ return this.fromAddress;
+ }
+
+ /**
+ * @return the gas
+ */
+ public String getGas() {
+ return this.gas;
+ }
+
+ /**
+ * @return the gasPrice
+ */
+ public String getGasPrice() {
+ return this.gasPrice;
+ }
+
+ /**
+ * @return the transactionHash
+ */
+ public String getTransactionHash() {
+ return this.transactionHash;
+ }
+
+ /**
+ * @return the input
+ */
+ public String getInput() {
+ return this.input;
+ }
+
+ /**
+ * @return the nonce
+ */
+ public String getNonce() {
+ return this.nonce;
+ }
+
+ /**
+ * @return the r
+ */
+ public String getR() {
+ return this.r;
+ }
+
+ /**
+ * @return the s
+ */
+ public String getS() {
+ return this.s;
+ }
+
+ /**
+ * @return the toAddress
+ */
+ public String getToAddress() {
+ return this.toAddress;
+ }
+
+ /**
+ * @return the transactionIndex
+ */
+ public String getTransactionIndex() {
+ return this.transactionIndex;
+ }
+
+ /**
+ * @return the v
+ */
+ public String getV() {
+ return this.v;
+ }
+
+ /**
+ * @return the value
+ */
+ public String getValue() {
+ return this.value;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.model/.gitignore b/org.eclipse.blockchain.model/.gitignore
new file mode 100644
index 0000000..c5e325c
--- /dev/null
+++ b/org.eclipse.blockchain.model/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/.classpath
+/.settings/
\ No newline at end of file
diff --git a/org.eclipse.blockchain.model/META-INF/MANIFEST.MF b/org.eclipse.blockchain.model/META-INF/MANIFEST.MF
index 2bd7024..99c5d9f 100644
--- a/org.eclipse.blockchain.model/META-INF/MANIFEST.MF
+++ b/org.eclipse.blockchain.model/META-INF/MANIFEST.MF
@@ -8,10 +8,15 @@
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.blockchain.model.ethproject,
- org.eclipse.blockchain.model.ethproject.impl,
- org.eclipse.blockchain.model.ethproject.util
+Export-Package: org.eclipse.blockchain.model.core;
+ x-friends:="org.eclipse.blockchain.core",
+ org.eclipse.blockchain.model.ethproject,
+ org.eclipse.blockchain.model.ethproject.impl;
+ x-friends:="org.eclipse.blockchain.core",
+ org.eclipse.blockchain.model.ethproject.util;
+ x-friends:="org.eclipse.blockchain.core"
Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.core.runtime,
- org.eclipse.core.resources
+ org.eclipse.core.resources,
+ org.eclipse.emf.ecore.xmi
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.blockchain.model/about.html b/org.eclipse.blockchain.model/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.model/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.model/license.txt b/org.eclipse.blockchain.model/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.model/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.model/model/ethproject.aird b/org.eclipse.blockchain.model/model/ethproject.aird
index c7fb7fd..9a9a2c4 100644
--- a/org.eclipse.blockchain.model/model/ethproject.aird
+++ b/org.eclipse.blockchain.model/model/ethproject.aird
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
- <viewpoint:DAnalysis xmi:id="_KNtPwLh0EeqdLtlLS2W1DA" selectedViews="_KQcasLh0EeqdLtlLS2W1DA" version="13.0.0.201804031646">
+ <viewpoint:DAnalysis xmi:id="_KNtPwLh0EeqdLtlLS2W1DA" selectedViews="_KQcasLh0EeqdLtlLS2W1DA _9Sjd4PHMEeq8eqZsRN-YZA _9SpkgPHMEeq8eqZsRN-YZA _9WkbMPHMEeq8eqZsRN-YZA" version="13.0.0.201804031646">
<semanticResources>ethproject.ecore</semanticResources>
<semanticResources>ethproject.genmodel</semanticResources>
<ownedViews xmi:type="viewpoint:DView" xmi:id="_KQcasLh0EeqdLtlLS2W1DA">
@@ -9,6 +9,19 @@
<description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
<target xmi:type="ecore:EPackage" href="ethproject.ecore#/"/>
</ownedRepresentationDescriptors>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_e7Rg8PHNEeq8eqZsRN-YZA" name="ethproject class diagram" repPath="#_e7I-EPHNEeq8eqZsRN-YZA">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
+ <target xmi:type="ecore:EPackage" href="ethproject.ecore#/"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_9Sjd4PHMEeq8eqZsRN-YZA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Review']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_9SpkgPHMEeq8eqZsRN-YZA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_9WkbMPHMEeq8eqZsRN-YZA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Generation']"/>
</ownedViews>
</viewpoint:DAnalysis>
<diagram:DSemanticDiagram xmi:id="_KQ3RcLh0EeqdLtlLS2W1DA" name="ethproject" uid="_KQuukLh0EeqdLtlLS2W1DA">
@@ -210,8 +223,6 @@
</ownedElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_K1oV8Lh1EeqdLtlLS2W1DA" name="IResource" tooltipText="" width="14" height="5">
- <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IResource"/>
- <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IResource"/>
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
@@ -221,8 +232,6 @@
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
<ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_K1yG8Lh1EeqdLtlLS2W1DA" name="org.eclipse.core.resources.IResource" tooltipText="">
- <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IResource"/>
- <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IResource"/>
<decorations xmi:type="viewpoint:Decoration" xmi:id="_K1yuAbh1EeqdLtlLS2W1DA">
<description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
</decorations>
@@ -350,8 +359,6 @@
</ownedElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_I31-ILh2EeqdLtlLS2W1DA" name="IFile" tooltipText="" width="14" height="5">
- <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IFile"/>
- <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IFile"/>
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
@@ -361,8 +368,6 @@
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
<ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_I4A9QLh2EeqdLtlLS2W1DA" name="org.eclipse.core.resources.IFile" tooltipText="">
- <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IFile"/>
- <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IFile"/>
<decorations xmi:type="viewpoint:Decoration" xmi:id="_I4BkULh2EeqdLtlLS2W1DA">
<description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
</decorations>
@@ -450,6 +455,430 @@
<activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
<activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/>
<activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/>
+ <target xmi:type="ecore:EPackage" href="ethproject.ecore#/"/>
+ </diagram:DSemanticDiagram>
+ <diagram:DSemanticDiagram xmi:id="_e7Q54PHNEeq8eqZsRN-YZA" name="ethproject class diagram" uid="_e7I-EPHNEeq8eqZsRN-YZA">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_e7Q54fHNEeq8eqZsRN-YZA" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_e7Q54vHNEeq8eqZsRN-YZA">
+ <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_ehFYwPQREeqb650niQWHeA" sourceArrow="FillDiamond" routingStyle="manhattan">
+ <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_ehFYwfQREeqb650niQWHeA" showIcon="false" labelExpression="service:render">
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_ehFYwvQREeqb650niQWHeA" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
+ </endLabelStyleDescription>
+ </computedStyleDescriptions>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_e7Rg8fHNEeq8eqZsRN-YZA" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_e7Rg8vHNEeq8eqZsRN-YZA" type="Sirius" element="_e7Q54PHNEeq8eqZsRN-YZA" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_i2jqwPHNEeq8eqZsRN-YZA" type="2003" element="_i2JbEPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2jqw_HNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2jqxPHNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2n8O_HNEeq8eqZsRN-YZA" type="3010" element="_i2XdgPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2n8PPHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2n8PfHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2n8PvHNEeq8eqZsRN-YZA" type="3010" element="_i2YrofHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2n8P_HNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2n8QPHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2ojQPHNEeq8eqZsRN-YZA" type="3010" element="_i2Yro_HNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2ojQfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2ojQvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_RobnIPQYEeqb650niQWHeA" type="3010" element="_RoVggPQYEeqb650niQWHeA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_RobnIfQYEeqb650niQWHeA" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RobnIvQYEeqb650niQWHeA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2jqxfHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2jqxvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2jqwfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2jqwvHNEeq8eqZsRN-YZA" x="5" y="170" height="135"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2k45PHNEeq8eqZsRN-YZA" type="2003" element="_i2MeYPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2k45_HNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2k46PHNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2ojRvHNEeq8eqZsRN-YZA" type="3010" element="_i2YrpfHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2ojR_HNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2ojSPHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2pKUPHNEeq8eqZsRN-YZA" type="3010" element="_i2Z5wPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pKUfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pKUvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2pKU_HNEeq8eqZsRN-YZA" type="3010" element="_i2Z5wvHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pKVPHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pKVfHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2pKVvHNEeq8eqZsRN-YZA" type="3010" element="_i2Z5xPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pKV_HNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pKWPHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2pxYPHNEeq8eqZsRN-YZA" type="3010" element="_i2ag0PHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pxYfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pxYvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2pxY_HNEeq8eqZsRN-YZA" type="3010" element="_i2ag0vHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pxZPHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pxZfHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2pxZvHNEeq8eqZsRN-YZA" type="3010" element="_i2ag1PHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pxZ_HNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pxaPHNEeq8eqZsRN-YZA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_x3vckPMuEeqAb8bevODKeA" type="3010" element="_x3KNwPMuEeqAb8bevODKeA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_x3vckfMuEeqAb8bevODKeA" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_x3vckvMuEeqAb8bevODKeA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2k46fHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2k46vHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2k45fHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2k45vHNEeq8eqZsRN-YZA" x="276" y="75" height="283"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2k46_HNEeq8eqZsRN-YZA" type="2003" element="_i2NFcPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2k47vHNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2k47_HNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2pxafHNEeq8eqZsRN-YZA" type="3010" element="_i2dkIPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2pxavHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8" italic="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2pxa_HNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2k48PHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2k48fHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2k47PHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2k47fHNEeq8eqZsRN-YZA" x="615" y="75" width="272"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2k48vHNEeq8eqZsRN-YZA" type="2003" element="_i2NsgPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2lf8PHNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2lf8fHNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2qYcPHNEeq8eqZsRN-YZA" type="3010" element="_i2eLMPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2qYcfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8" italic="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2qYcvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2lf8vHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2lf8_HNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2k48_HNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2k49PHNEeq8eqZsRN-YZA" x="615" y="140" width="272"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2mHAPHNEeq8eqZsRN-YZA" type="2003" element="_i2PhsPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2muEPHNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2nVIPHNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2q_g_HNEeq8eqZsRN-YZA" type="3010" element="_i2fZUPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2q_hPHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8" italic="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2q_hfHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2nVIfHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2nVIvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2mHAfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2mHAvHNEeq8eqZsRN-YZA" x="615" y="205" width="272"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2nVI_HNEeq8eqZsRN-YZA" type="2003" element="_i2QIwPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2n8MPHNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2n8MfHNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2q_hvHNEeq8eqZsRN-YZA" type="3010" element="_i2fZUvHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2q_h_HNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8" italic="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2q_iPHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2n8MvHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2n8M_HNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2nVJPHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2nVJfHNEeq8eqZsRN-YZA" x="713" y="280"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i2n8NPHNEeq8eqZsRN-YZA" type="2003" element="_i2RW4fHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_i2n8N_HNEeq8eqZsRN-YZA" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_i2n8OPHNEeq8eqZsRN-YZA" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_i2q_ifHNEeq8eqZsRN-YZA" type="3010" element="_i2gncPHNEeq8eqZsRN-YZA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_i2q_ivHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8" italic="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i2q_i_HNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i2n8OfHNEeq8eqZsRN-YZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i2n8OvHNEeq8eqZsRN-YZA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i2n8NfHNEeq8eqZsRN-YZA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i2n8NvHNEeq8eqZsRN-YZA" x="220" y="370"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_e7Rg8_HNEeq8eqZsRN-YZA"/>
+ <edges xmi:type="notation:Edge" xmi:id="_dNnlwPQREeqb650niQWHeA" type="4001" element="_dNYVMPQREeqb650niQWHeA" source="_i2k45PHNEeq8eqZsRN-YZA" target="_i2jqwPHNEeq8eqZsRN-YZA">
+ <children xmi:type="notation:Node" xmi:id="_dNnlxPQREeqb650niQWHeA" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dNnlxfQREeqb650niQWHeA" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_dNoM0PQREeqb650niQWHeA" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dNoM0fQREeqb650niQWHeA" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_dNoM0vQREeqb650niQWHeA" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dNoM0_QREeqb650niQWHeA" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_dNnlwfQREeqb650niQWHeA" routing="Rectilinear"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_dNnlwvQREeqb650niQWHeA" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dNnlw_QREeqb650niQWHeA" points="[0, 0, 107, 0]$[-107, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dNoz4PQREeqb650niQWHeA" id="(0.0,0.6334519572953736)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dNoz4fQREeqb650niQWHeA" id="(1.0,0.6240601503759399)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2JbEPHNEeq8eqZsRN-YZA" name="DeploymentModel" tooltipText="" incomingEdges="_dNYVMPQREeqb650niQWHeA" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="ethproject.ecore#//DeploymentModel"/>
+ <semanticElements xmi:type="ecore:EClass" href="ethproject.ecore#//DeploymentModel"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_TgmpsPQYEeqb650niQWHeA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="108,208,8" foregroundColor="255,252,216">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2XdgPHNEeq8eqZsRN-YZA" name="contractAddress : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/contractAddress"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/contractAddress"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2YroPHNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2YrofHNEeq8eqZsRN-YZA" name="scFile : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/scFile"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/scFile"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_6InUQPP3Eeqb650niQWHeA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2Yro_HNEeq8eqZsRN-YZA" name="lastUsedAccount : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/lastUsedAccount"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/lastUsedAccount"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2YrpPHNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_RoVggPQYEeqb650niQWHeA" name="environment : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/environment"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//DeploymentModel/environment"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_TgmpsfQYEeqb650niQWHeA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2MeYPHNEeq8eqZsRN-YZA" name="EthereumProject" tooltipText="" outgoingEdges="_dNYVMPQREeqb650niQWHeA" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="ethproject.ecore#//EthereumProject"/>
+ <semanticElements xmi:type="ecore:EClass" href="ethproject.ecore#//EthereumProject"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_tLMOAPQXEeqb650niQWHeA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="100,100,200" foregroundColor="255,252,216">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2YrpfHNEeq8eqZsRN-YZA" name="projectLocation : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectLocation"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectLocation"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2ZSsPHNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2Z5wPHNEeq8eqZsRN-YZA" name="projectDescription : IProjectDescription" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectDescription"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectDescription"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2Z5wfHNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2Z5wvHNEeq8eqZsRN-YZA" name="project : IProject" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/project"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/project"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2Z5w_HNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2Z5xPHNEeq8eqZsRN-YZA" name="firstMatchingSolFile : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/firstMatchingSolFile"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/firstMatchingSolFile"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2Z5xfHNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2ag0PHNEeq8eqZsRN-YZA" name="projectNatures : stringList" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectNatures"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectNatures"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2ag0fHNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2ag0vHNEeq8eqZsRN-YZA" name="compiledSolidityFiles : IResourceSet" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/compiledSolidityFiles"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/compiledSolidityFiles"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2ag0_HNEeq8eqZsRN-YZA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2ag1PHNEeq8eqZsRN-YZA" name="environmentBasedDeployedModel : DeploymentMap" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/environmentBasedDeployedModel"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/environmentBasedDeployedModel"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_xApcoPQXEeqb650niQWHeA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_x3KNwPMuEeqAb8bevODKeA" name="projectBuilders : stringList" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectBuilders"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="ethproject.ecore#//EthereumProject/projectBuilders"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_5JNfEPMuEeqAb8bevODKeA" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2NFcPHNEeq8eqZsRN-YZA" name="IProjectDescription" tooltipText="" width="14" height="5">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IProjectDescription"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IProjectDescription"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_i2NFcfHNEeq8eqZsRN-YZA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="255,10,10" foregroundColor="255,250,191">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2dkIPHNEeq8eqZsRN-YZA" name="org.eclipse.core.resources.IProjectDescription" tooltipText="">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IProjectDescription"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IProjectDescription"/>
+ <decorations xmi:type="viewpoint:Decoration" xmi:id="_i2gnc_HNEeq8eqZsRN-YZA">
+ <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
+ </decorations>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2dkIfHNEeq8eqZsRN-YZA" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2NsgPHNEeq8eqZsRN-YZA" name="IProject" tooltipText="" width="14" height="5">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IProject"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IProject"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_i2NsgfHNEeq8eqZsRN-YZA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="255,10,10" foregroundColor="255,250,191">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2eLMPHNEeq8eqZsRN-YZA" name="org.eclipse.core.resources.IProject" tooltipText="">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IProject"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IProject"/>
+ <decorations xmi:type="viewpoint:Decoration" xmi:id="_i2gndPHNEeq8eqZsRN-YZA">
+ <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
+ </decorations>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2eLMfHNEeq8eqZsRN-YZA" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2PhsPHNEeq8eqZsRN-YZA" name="stringList" tooltipText="" width="14" height="5">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//stringList"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//stringList"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_i2PhsfHNEeq8eqZsRN-YZA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="255,10,10" foregroundColor="255,250,191">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2fZUPHNEeq8eqZsRN-YZA" name="java.util.List<java.lang.String>" tooltipText="">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//stringList"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//stringList"/>
+ <decorations xmi:type="viewpoint:Decoration" xmi:id="_i2hOgfHNEeq8eqZsRN-YZA">
+ <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
+ </decorations>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2fZUfHNEeq8eqZsRN-YZA" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2QIwPHNEeq8eqZsRN-YZA" name="IResourceSet" tooltipText="" width="14" height="5">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IResourceSet"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IResourceSet"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_i2RW4PHNEeq8eqZsRN-YZA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="255,10,10" foregroundColor="255,250,191">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2fZUvHNEeq8eqZsRN-YZA" name="java.util.Set<java.lang.String>" tooltipText="">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//IResourceSet"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//IResourceSet"/>
+ <decorations xmi:type="viewpoint:Decoration" xmi:id="_i2hOgvHNEeq8eqZsRN-YZA">
+ <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
+ </decorations>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2fZU_HNEeq8eqZsRN-YZA" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_i2RW4fHNEeq8eqZsRN-YZA" name="DeploymentMap" tooltipText="" width="14" height="5">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//DeploymentMap"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//DeploymentMap"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_i2R98PHNEeq8eqZsRN-YZA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="255,10,10" foregroundColor="255,250,191">
+ <customFeatures>backgroundColor</customFeatures>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_i2gncPHNEeq8eqZsRN-YZA" name="java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.eclipse.blockchain.model.ethproject.DeploymentModel>>" tooltipText="">
+ <target xmi:type="ecore:EDataType" href="ethproject.ecore#//DeploymentMap"/>
+ <semanticElements xmi:type="ecore:EDataType" href="ethproject.ecore#//DeploymentMap"/>
+ <decorations xmi:type="viewpoint:Decoration" xmi:id="_i2hOg_HNEeq8eqZsRN-YZA">
+ <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
+ </decorations>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_i2gncfHNEeq8eqZsRN-YZA" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_dNYVMPQREeqb650niQWHeA" name="[0..*] deploymentmodel" sourceNode="_i2MeYPHNEeq8eqZsRN-YZA" targetNode="_i2JbEPHNEeq8eqZsRN-YZA">
+ <target xmi:type="ecore:EReference" href="ethproject.ecore#//EthereumProject/deploymentmodel"/>
+ <semanticElements xmi:type="ecore:EReference" href="ethproject.ecore#//EthereumProject/deploymentmodel"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ehF_0PQREeqb650niQWHeA" description="_ehFYwPQREeqb650niQWHeA" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ehF_0fQREeqb650niQWHeA" showIcon="false"/>
+ <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ehF_0vQREeqb650niQWHeA" labelSize="6" showIcon="false" labelColor="39,76,114"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_e7Q55vHNEeq8eqZsRN-YZA"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/>
<target xmi:type="ecore:EPackage" href="ethproject.ecore#/"/>
</diagram:DSemanticDiagram>
</xmi:XMI>
diff --git a/org.eclipse.blockchain.model/model/ethproject.ecore b/org.eclipse.blockchain.model/model/ethproject.ecore
index 07cbe2f..2ba7122 100644
--- a/org.eclipse.blockchain.model/model/ethproject.ecore
+++ b/org.eclipse.blockchain.model/model/ethproject.ecore
@@ -3,25 +3,29 @@
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ethproject" nsURI="http://www.example.org/ethproject" nsPrefix="ethproject">
<eClassifiers xsi:type="ecore:EClass" name="DeploymentModel">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="contractAddress" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="scFile" eType="#//IResource"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="scFile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="lastUsedAccount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="environment" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="IResource" instanceClassName="org.eclipse.core.resources.IResource"/>
<eClassifiers xsi:type="ecore:EClass" name="EthereumProject">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="projectLocation" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="projectDescription" eType="#//IProjectDescription"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="project" eType="#//IProject"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstMatchingSolFile" eType="#//IFile"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="projectDescription" eType="#//IProjectDescription"
+ transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="project" eType="#//IProject"
+ transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstMatchingSolFile" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="projectNatures" eType="#//stringList"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="compiledSolidityFiles"
eType="#//IResourceSet"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="environmentBasedDeployedModel"
- eType="#//DeploymentMap"/>
+ eType="#//DeploymentMap" transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="projectBuilders" eType="#//stringList"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="deploymentmodel" upperBound="-1"
+ eType="#//DeploymentModel" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="IProjectDescription" instanceClassName="org.eclipse.core.resources.IProjectDescription"/>
<eClassifiers xsi:type="ecore:EDataType" name="IProject" instanceClassName="org.eclipse.core.resources.IProject"/>
- <eClassifiers xsi:type="ecore:EDataType" name="IFile" instanceClassName="org.eclipse.core.resources.IFile"/>
<eClassifiers xsi:type="ecore:EDataType" name="stringList" instanceClassName="java.util.List<java.lang.String>"/>
- <eClassifiers xsi:type="ecore:EDataType" name="IResourceSet" instanceClassName="java.util.Set<org.eclipse.core.resources.IResource>"/>
- <eClassifiers xsi:type="ecore:EDataType" name="DeploymentMap" instanceClassName="java.util.Map<java.lang.String, java.util.Map<org.eclipse.core.resources.IResource, org.eclipse.blockchain.model.ethproject.DeploymentModel>>"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="IResourceSet" instanceClassName="java.util.Set<java.lang.String>"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="DeploymentMap" instanceClassName="java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.eclipse.blockchain.model.ethproject.DeploymentModel>>"/>
</ecore:EPackage>
diff --git a/org.eclipse.blockchain.model/model/ethproject.genmodel b/org.eclipse.blockchain.model/model/ethproject.genmodel
index dfb8b85..9f0b9e0 100644
--- a/org.eclipse.blockchain.model/model/ethproject.genmodel
+++ b/org.eclipse.blockchain.model/model/ethproject.genmodel
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
- modelDirectory="/org.eclipse.blockchain.model/src-gen" creationIcons="false"
- editDirectory="/org.eclipse.blockchain.model.edit/src-gen" editorDirectory="/org.eclipse.blockchain.model.editor/src-gen"
- modelPluginID="org.eclipse.blockchain.model" modelName="Ethproject" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ copyrightText="Copyright (c) 2020 RBEI and others.

This program and the accompanying materials
are made available under the terms of the Eclipse Public License v. 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:
 Adhith Gopal - Initial API and Implementation
 "
+ modelDirectory="/org.eclipse.blockchain.model/src-gen" creationIcons="false" editDirectory="/org.eclipse.blockchain.model.edit/src-gen"
+ editorDirectory="/org.eclipse.blockchain.model.editor/src-gen" modelPluginID="org.eclipse.blockchain.model"
+ modelName="Ethproject" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
codeFormatting="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0"
- copyrightFields="false" operationReflection="true" importOrganizing="true">
+ operationReflection="true" importOrganizing="true">
<foreignModel>ethproject.ecore</foreignModel>
<testsDirectory xsi:nil="true"/>
<genPackages prefix="Ethproject" basePackage="org.eclipse.blockchain.model" disposableProviderFactory="true"
ecorePackage="ethproject.ecore#/">
- <genDataTypes ecoreDataType="ethproject.ecore#//IResource"/>
<genDataTypes ecoreDataType="ethproject.ecore#//IProjectDescription"/>
<genDataTypes ecoreDataType="ethproject.ecore#//IProject"/>
- <genDataTypes ecoreDataType="ethproject.ecore#//IFile"/>
<genDataTypes ecoreDataType="ethproject.ecore#//stringList"/>
<genDataTypes ecoreDataType="ethproject.ecore#//IResourceSet"/>
<genDataTypes ecoreDataType="ethproject.ecore#//DeploymentMap"/>
@@ -21,6 +20,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//DeploymentModel/contractAddress"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//DeploymentModel/scFile"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//DeploymentModel/lastUsedAccount"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//DeploymentModel/environment"/>
</genClasses>
<genClasses ecoreClass="ethproject.ecore#//EthereumProject">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//EthereumProject/projectLocation"/>
@@ -30,6 +30,8 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//EthereumProject/projectNatures"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//EthereumProject/compiledSolidityFiles"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//EthereumProject/environmentBasedDeployedModel"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ethproject.ecore#//EthereumProject/projectBuilders"/>
+ <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference ethproject.ecore#//EthereumProject/deploymentmodel"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/DeploymentModel.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/DeploymentModel.java
index 61d8189..ae16e41 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/DeploymentModel.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/DeploymentModel.java
@@ -1,9 +1,19 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject;
-import org.eclipse.core.resources.IResource;
-
import org.eclipse.emf.ecore.EObject;
/**
@@ -18,6 +28,7 @@
* <li>{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress <em>Contract Address</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile <em>Sc File</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount <em>Last Used Account</em>}</li>
+ * <li>{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getEnvironment <em>Environment</em>}</li>
* </ul>
*
* @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel()
@@ -25,83 +36,115 @@
* @generated
*/
public interface DeploymentModel extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * Returns the value of the '<em><b>Contract Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Contract Address</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Contract Address</em>' attribute.
- * @see #setContractAddress(String)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_ContractAddress()
- * @model
- * @generated
- */
- String getContractAddress();
+ /**
+ * Returns the value of the '<em><b>Contract Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Contract Address</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Contract Address</em>' attribute.
+ * @see #setContractAddress(String)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_ContractAddress()
+ * @model
+ * @generated
+ */
+ String getContractAddress();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress <em>Contract Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Contract Address</em>' attribute.
- * @see #getContractAddress()
- * @generated
- */
- void setContractAddress(String value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress <em>Contract Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Contract Address</em>' attribute.
+ * @see #getContractAddress()
+ * @generated
+ */
+ void setContractAddress(String value);
- /**
- * Returns the value of the '<em><b>Sc File</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sc File</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sc File</em>' attribute.
- * @see #setScFile(IResource)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_ScFile()
- * @model dataType="org.eclipse.blockchain.model.ethproject.IResource"
- * @generated
- */
- IResource getScFile();
+ /**
+ * Returns the value of the '<em><b>Sc File</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sc File</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sc File</em>' attribute.
+ * @see #setScFile(String)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_ScFile()
+ * @model
+ * @generated
+ */
+ String getScFile();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile <em>Sc File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sc File</em>' attribute.
- * @see #getScFile()
- * @generated
- */
- void setScFile(IResource value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile <em>Sc File</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Sc File</em>' attribute.
+ * @see #getScFile()
+ * @generated
+ */
+ void setScFile(String value);
- /**
- * Returns the value of the '<em><b>Last Used Account</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Last Used Account</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Last Used Account</em>' attribute.
- * @see #setLastUsedAccount(String)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_LastUsedAccount()
- * @model
- * @generated
- */
- String getLastUsedAccount();
+ /**
+ * Returns the value of the '<em><b>Last Used Account</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Last Used Account</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Last Used Account</em>' attribute.
+ * @see #setLastUsedAccount(String)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_LastUsedAccount()
+ * @model
+ * @generated
+ */
+ String getLastUsedAccount();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount <em>Last Used Account</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Last Used Account</em>' attribute.
- * @see #getLastUsedAccount()
- * @generated
- */
- void setLastUsedAccount(String value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount <em>Last Used Account</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Last Used Account</em>' attribute.
+ * @see #getLastUsedAccount()
+ * @generated
+ */
+ void setLastUsedAccount(String value);
+
+ /**
+ * Returns the value of the '<em><b>Environment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Environment</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Environment</em>' attribute.
+ * @see #setEnvironment(String)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getDeploymentModel_Environment()
+ * @model
+ * @generated
+ */
+ String getEnvironment();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getEnvironment <em>Environment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Environment</em>' attribute.
+ * @see #getEnvironment()
+ * @generated
+ */
+ void setEnvironment(String value);
} // DeploymentModel
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthereumProject.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthereumProject.java
index 9391ccf..30f62cc 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthereumProject.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthereumProject.java
@@ -1,16 +1,25 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject;
import java.util.List;
import java.util.Map;
import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
@@ -29,6 +38,8 @@
* <li>{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures <em>Project Natures</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles <em>Compiled Solidity Files</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel <em>Environment Based Deployed Model</em>}</li>
+ * <li>{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectBuilders <em>Project Builders</em>}</li>
+ * <li>{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getDeploymentmodel <em>Deploymentmodel</em>}</li>
* </ul>
*
* @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject()
@@ -36,187 +47,235 @@
* @generated
*/
public interface EthereumProject extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * Returns the value of the '<em><b>Project Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Project Location</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Project Location</em>' attribute.
- * @see #setProjectLocation(String)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectLocation()
- * @model
- * @generated
- */
- String getProjectLocation();
+ /**
+ * Returns the value of the '<em><b>Project Location</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Project Location</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Project Location</em>' attribute.
+ * @see #setProjectLocation(String)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectLocation()
+ * @model
+ * @generated
+ */
+ String getProjectLocation();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectLocation <em>Project Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Project Location</em>' attribute.
- * @see #getProjectLocation()
- * @generated
- */
- void setProjectLocation(String value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectLocation <em>Project Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Project Location</em>' attribute.
+ * @see #getProjectLocation()
+ * @generated
+ */
+ void setProjectLocation(String value);
- /**
- * Returns the value of the '<em><b>Project Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Project Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Project Description</em>' attribute.
- * @see #setProjectDescription(IProjectDescription)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectDescription()
- * @model dataType="org.eclipse.blockchain.model.ethproject.IProjectDescription"
- * @generated
- */
- IProjectDescription getProjectDescription();
+ /**
+ * Returns the value of the '<em><b>Project Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Project Description</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Project Description</em>' attribute.
+ * @see #setProjectDescription(IProjectDescription)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectDescription()
+ * @model dataType="org.eclipse.blockchain.model.ethproject.IProjectDescription" transient="true"
+ * @generated
+ */
+ IProjectDescription getProjectDescription();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectDescription <em>Project Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Project Description</em>' attribute.
- * @see #getProjectDescription()
- * @generated
- */
- void setProjectDescription(IProjectDescription value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectDescription <em>Project Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Project Description</em>' attribute.
+ * @see #getProjectDescription()
+ * @generated
+ */
+ void setProjectDescription(IProjectDescription value);
- /**
- * Returns the value of the '<em><b>Project</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Project</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Project</em>' attribute.
- * @see #setProject(IProject)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_Project()
- * @model dataType="org.eclipse.blockchain.model.ethproject.IProject"
- * @generated
- */
- IProject getProject();
+ /**
+ * Returns the value of the '<em><b>Project</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Project</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Project</em>' attribute.
+ * @see #setProject(IProject)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_Project()
+ * @model dataType="org.eclipse.blockchain.model.ethproject.IProject" transient="true"
+ * @generated
+ */
+ IProject getProject();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProject <em>Project</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Project</em>' attribute.
- * @see #getProject()
- * @generated
- */
- void setProject(IProject value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProject <em>Project</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Project</em>' attribute.
+ * @see #getProject()
+ * @generated
+ */
+ void setProject(IProject value);
- /**
- * Returns the value of the '<em><b>First Matching Sol File</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>First Matching Sol File</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>First Matching Sol File</em>' attribute.
- * @see #setFirstMatchingSolFile(IFile)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_FirstMatchingSolFile()
- * @model dataType="org.eclipse.blockchain.model.ethproject.IFile"
- * @generated
- */
- IFile getFirstMatchingSolFile();
+ /**
+ * Returns the value of the '<em><b>First Matching Sol File</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>First Matching Sol File</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>First Matching Sol File</em>' attribute.
+ * @see #setFirstMatchingSolFile(String)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_FirstMatchingSolFile()
+ * @model
+ * @generated
+ */
+ String getFirstMatchingSolFile();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getFirstMatchingSolFile <em>First Matching Sol File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>First Matching Sol File</em>' attribute.
- * @see #getFirstMatchingSolFile()
- * @generated
- */
- void setFirstMatchingSolFile(IFile value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getFirstMatchingSolFile <em>First Matching Sol File</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>First Matching Sol File</em>' attribute.
+ * @see #getFirstMatchingSolFile()
+ * @generated
+ */
+ void setFirstMatchingSolFile(String value);
- /**
- * Returns the value of the '<em><b>Project Natures</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Project Natures</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Project Natures</em>' attribute.
- * @see #setProjectNatures(List)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectNatures()
- * @model dataType="org.eclipse.blockchain.model.ethproject.stringList"
- * @generated
- */
- List<String> getProjectNatures();
+ /**
+ * Returns the value of the '<em><b>Project Natures</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Project Natures</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Project Natures</em>' attribute.
+ * @see #setProjectNatures(List)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectNatures()
+ * @model dataType="org.eclipse.blockchain.model.ethproject.stringList"
+ * @generated
+ */
+ List<String> getProjectNatures();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures <em>Project Natures</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Project Natures</em>' attribute.
- * @see #getProjectNatures()
- * @generated
- */
- void setProjectNatures(List<String> value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures <em>Project Natures</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Project Natures</em>' attribute.
+ * @see #getProjectNatures()
+ * @generated
+ */
+ void setProjectNatures(List<String> value);
- /**
- * Returns the value of the '<em><b>Compiled Solidity Files</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Compiled Solidity Files</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Compiled Solidity Files</em>' attribute.
- * @see #setCompiledSolidityFiles(Set)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_CompiledSolidityFiles()
- * @model dataType="org.eclipse.blockchain.model.ethproject.IResourceSet"
- * @generated
- */
- Set<IResource> getCompiledSolidityFiles();
+ /**
+ * Returns the value of the '<em><b>Compiled Solidity Files</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Compiled Solidity Files</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Compiled Solidity Files</em>' attribute.
+ * @see #setCompiledSolidityFiles(Set)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_CompiledSolidityFiles()
+ * @model dataType="org.eclipse.blockchain.model.ethproject.IResourceSet"
+ * @generated
+ */
+ Set<String> getCompiledSolidityFiles();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles <em>Compiled Solidity Files</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Compiled Solidity Files</em>' attribute.
- * @see #getCompiledSolidityFiles()
- * @generated
- */
- void setCompiledSolidityFiles(Set<IResource> value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles <em>Compiled Solidity Files</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Compiled Solidity Files</em>' attribute.
+ * @see #getCompiledSolidityFiles()
+ * @generated
+ */
+ void setCompiledSolidityFiles(Set<String> value);
- /**
- * Returns the value of the '<em><b>Environment Based Deployed Model</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Environment Based Deployed Model</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Environment Based Deployed Model</em>' attribute.
- * @see #setEnvironmentBasedDeployedModel(Map)
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_EnvironmentBasedDeployedModel()
- * @model dataType="org.eclipse.blockchain.model.ethproject.DeploymentMap"
- * @generated
- */
- Map<String, Map<IResource, DeploymentModel>> getEnvironmentBasedDeployedModel();
+ /**
+ * Returns the value of the '<em><b>Environment Based Deployed Model</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Environment Based Deployed Model</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Environment Based Deployed Model</em>' attribute.
+ * @see #setEnvironmentBasedDeployedModel(Map)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_EnvironmentBasedDeployedModel()
+ * @model dataType="org.eclipse.blockchain.model.ethproject.DeploymentMap" transient="true"
+ * @generated
+ */
+ Map<String, Map<String, DeploymentModel>> getEnvironmentBasedDeployedModel();
- /**
- * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel <em>Environment Based Deployed Model</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Environment Based Deployed Model</em>' attribute.
- * @see #getEnvironmentBasedDeployedModel()
- * @generated
- */
- void setEnvironmentBasedDeployedModel(Map<String, Map<IResource, DeploymentModel>> value);
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel <em>Environment Based Deployed Model</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Environment Based Deployed Model</em>' attribute.
+ * @see #getEnvironmentBasedDeployedModel()
+ * @generated
+ */
+ void setEnvironmentBasedDeployedModel(Map<String, Map<String, DeploymentModel>> value);
+
+ /**
+ * Returns the value of the '<em><b>Project Builders</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Project Builders</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Project Builders</em>' attribute.
+ * @see #setProjectBuilders(List)
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_ProjectBuilders()
+ * @model dataType="org.eclipse.blockchain.model.ethproject.stringList"
+ * @generated
+ */
+ List<String> getProjectBuilders();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectBuilders <em>Project Builders</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Project Builders</em>' attribute.
+ * @see #getProjectBuilders()
+ * @generated
+ */
+ void setProjectBuilders(List<String> value);
+
+ /**
+ * Returns the value of the '<em><b>Deploymentmodel</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.blockchain.model.ethproject.DeploymentModel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Deploymentmodel</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Deploymentmodel</em>' containment reference list.
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#getEthereumProject_Deploymentmodel()
+ * @model containment="true"
+ * @generated
+ */
+ EList<DeploymentModel> getDeploymentmodel();
} // EthereumProject
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectFactory.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectFactory.java
index 152b01d..1680cf6 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectFactory.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectFactory.java
@@ -1,52 +1,67 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject;
import org.eclipse.emf.ecore.EFactory;
/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
* @see org.eclipse.blockchain.model.ethproject.EthprojectPackage
* @generated
*/
public interface EthprojectFactory extends EFactory {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EthprojectFactory eINSTANCE = org.eclipse.blockchain.model.ethproject.impl.EthprojectFactoryImpl.init();
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ EthprojectFactory eINSTANCE = org.eclipse.blockchain.model.ethproject.impl.EthprojectFactoryImpl.init();
- /**
- * Returns a new object of class '<em>Deployment Model</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Deployment Model</em>'.
- * @generated
- */
- DeploymentModel createDeploymentModel();
+ /**
+ * Returns a new object of class '<em>Deployment Model</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Deployment Model</em>'.
+ * @generated
+ */
+ DeploymentModel createDeploymentModel();
- /**
- * Returns a new object of class '<em>Ethereum Project</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Ethereum Project</em>'.
- * @generated
- */
- EthereumProject createEthereumProject();
+ /**
+ * Returns a new object of class '<em>Ethereum Project</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Ethereum Project</em>'.
+ * @generated
+ */
+ EthereumProject createEthereumProject();
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- EthprojectPackage getEthprojectPackage();
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ EthprojectPackage getEthprojectPackage();
-} //EthprojectFactory
+} // EthprojectFactory
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectPackage.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectPackage.java
index 8ccc963..8adf26a 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectPackage.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/EthprojectPackage.java
@@ -1,4 +1,16 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject;
@@ -6,6 +18,7 @@
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
@@ -24,658 +37,684 @@
* @generated
*/
public interface EthprojectPackage extends EPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "ethproject";
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "ethproject";
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.example.org/ethproject";
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.example.org/ethproject";
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "ethproject";
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "ethproject";
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EthprojectPackage eINSTANCE = org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl.init();
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EthprojectPackage eINSTANCE = org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl.init();
- /**
- * The meta object id for the '{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl <em>Deployment Model</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentModel()
- * @generated
- */
- int DEPLOYMENT_MODEL = 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl <em>Deployment Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentModel()
+ * @generated
+ */
+ int DEPLOYMENT_MODEL = 0;
- /**
- * The feature id for the '<em><b>Contract Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DEPLOYMENT_MODEL__CONTRACT_ADDRESS = 0;
+ /**
+ * The feature id for the '<em><b>Contract Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPLOYMENT_MODEL__CONTRACT_ADDRESS = 0;
- /**
- * The feature id for the '<em><b>Sc File</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DEPLOYMENT_MODEL__SC_FILE = 1;
+ /**
+ * The feature id for the '<em><b>Sc File</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPLOYMENT_MODEL__SC_FILE = 1;
- /**
- * The feature id for the '<em><b>Last Used Account</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DEPLOYMENT_MODEL__LAST_USED_ACCOUNT = 2;
+ /**
+ * The feature id for the '<em><b>Last Used Account</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPLOYMENT_MODEL__LAST_USED_ACCOUNT = 2;
- /**
- * The number of structural features of the '<em>Deployment Model</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DEPLOYMENT_MODEL_FEATURE_COUNT = 3;
+ /**
+ * The feature id for the '<em><b>Environment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPLOYMENT_MODEL__ENVIRONMENT = 3;
- /**
- * The number of operations of the '<em>Deployment Model</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DEPLOYMENT_MODEL_OPERATION_COUNT = 0;
+ /**
+ * The number of structural features of the '<em>Deployment Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPLOYMENT_MODEL_FEATURE_COUNT = 4;
- /**
- * The meta object id for the '{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl <em>Ethereum Project</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getEthereumProject()
- * @generated
- */
- int ETHEREUM_PROJECT = 1;
+ /**
+ * The number of operations of the '<em>Deployment Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPLOYMENT_MODEL_OPERATION_COUNT = 0;
- /**
- * The feature id for the '<em><b>Project Location</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__PROJECT_LOCATION = 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl <em>Ethereum Project</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getEthereumProject()
+ * @generated
+ */
+ int ETHEREUM_PROJECT = 1;
- /**
- * The feature id for the '<em><b>Project Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__PROJECT_DESCRIPTION = 1;
+ /**
+ * The feature id for the '<em><b>Project Location</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__PROJECT_LOCATION = 0;
- /**
- * The feature id for the '<em><b>Project</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__PROJECT = 2;
+ /**
+ * The feature id for the '<em><b>Project Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__PROJECT_DESCRIPTION = 1;
- /**
- * The feature id for the '<em><b>First Matching Sol File</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE = 3;
+ /**
+ * The feature id for the '<em><b>Project</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__PROJECT = 2;
- /**
- * The feature id for the '<em><b>Project Natures</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__PROJECT_NATURES = 4;
+ /**
+ * The feature id for the '<em><b>First Matching Sol File</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE = 3;
- /**
- * The feature id for the '<em><b>Compiled Solidity Files</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES = 5;
+ /**
+ * The feature id for the '<em><b>Project Natures</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__PROJECT_NATURES = 4;
- /**
- * The feature id for the '<em><b>Environment Based Deployed Model</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL = 6;
+ /**
+ * The feature id for the '<em><b>Compiled Solidity Files</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES = 5;
- /**
- * The number of structural features of the '<em>Ethereum Project</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT_FEATURE_COUNT = 7;
+ /**
+ * The feature id for the '<em><b>Environment Based Deployed Model</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL = 6;
- /**
- * The number of operations of the '<em>Ethereum Project</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ETHEREUM_PROJECT_OPERATION_COUNT = 0;
+ /**
+ * The feature id for the '<em><b>Project Builders</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__PROJECT_BUILDERS = 7;
- /**
- * The meta object id for the '<em>IResource</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IResource
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIResource()
- * @generated
- */
- int IRESOURCE = 2;
+ /**
+ * The feature id for the '<em><b>Deploymentmodel</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT__DEPLOYMENTMODEL = 8;
- /**
- * The meta object id for the '<em>IProject Description</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IProjectDescription
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProjectDescription()
- * @generated
- */
- int IPROJECT_DESCRIPTION = 3;
+ /**
+ * The number of structural features of the '<em>Ethereum Project</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT_FEATURE_COUNT = 9;
- /**
- * The meta object id for the '<em>IProject</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IProject
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProject()
- * @generated
- */
- int IPROJECT = 4;
+ /**
+ * The number of operations of the '<em>Ethereum Project</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ETHEREUM_PROJECT_OPERATION_COUNT = 0;
- /**
- * The meta object id for the '<em>IFile</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IFile
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIFile()
- * @generated
- */
- int IFILE = 5;
+ /**
+ * The meta object id for the '<em>IProject Description</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.core.resources.IProjectDescription
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProjectDescription()
+ * @generated
+ */
+ int IPROJECT_DESCRIPTION = 2;
- /**
- * The meta object id for the '<em>string List</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.List
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getstringList()
- * @generated
- */
- int STRING_LIST = 6;
+ /**
+ * The meta object id for the '<em>IProject</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.core.resources.IProject
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProject()
+ * @generated
+ */
+ int IPROJECT = 3;
- /**
- * The meta object id for the '<em>IResource Set</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.Set
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIResourceSet()
- * @generated
- */
- int IRESOURCE_SET = 7;
+ /**
+ * The meta object id for the '<em>string List</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.List
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getstringList()
+ * @generated
+ */
+ int STRING_LIST = 4;
- /**
- * The meta object id for the '<em>Deployment Map</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.Map
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentMap()
- * @generated
- */
- int DEPLOYMENT_MAP = 8;
+ /**
+ * The meta object id for the '<em>IResource Set</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Set
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIResourceSet()
+ * @generated
+ */
+ int IRESOURCE_SET = 5;
+ /**
+ * The meta object id for the '<em>Deployment Map</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Map
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentMap()
+ * @generated
+ */
+ int DEPLOYMENT_MAP = 6;
- /**
- * Returns the meta object for class '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel <em>Deployment Model</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Deployment Model</em>'.
- * @see org.eclipse.blockchain.model.ethproject.DeploymentModel
- * @generated
- */
- EClass getDeploymentModel();
+ /**
+ * Returns the meta object for class '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel <em>Deployment Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Deployment Model</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.DeploymentModel
+ * @generated
+ */
+ EClass getDeploymentModel();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress <em>Contract Address</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Contract Address</em>'.
- * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress()
- * @see #getDeploymentModel()
- * @generated
- */
- EAttribute getDeploymentModel_ContractAddress();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress <em>Contract Address</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Contract Address</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getContractAddress()
+ * @see #getDeploymentModel()
+ * @generated
+ */
+ EAttribute getDeploymentModel_ContractAddress();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile <em>Sc File</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sc File</em>'.
- * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile()
- * @see #getDeploymentModel()
- * @generated
- */
- EAttribute getDeploymentModel_ScFile();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile <em>Sc File</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Sc File</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getScFile()
+ * @see #getDeploymentModel()
+ * @generated
+ */
+ EAttribute getDeploymentModel_ScFile();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount <em>Last Used Account</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Last Used Account</em>'.
- * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount()
- * @see #getDeploymentModel()
- * @generated
- */
- EAttribute getDeploymentModel_LastUsedAccount();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount <em>Last Used Account</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Last Used Account</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getLastUsedAccount()
+ * @see #getDeploymentModel()
+ * @generated
+ */
+ EAttribute getDeploymentModel_LastUsedAccount();
- /**
- * Returns the meta object for class '{@link org.eclipse.blockchain.model.ethproject.EthereumProject <em>Ethereum Project</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Ethereum Project</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject
- * @generated
- */
- EClass getEthereumProject();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel#getEnvironment <em>Environment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Environment</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.DeploymentModel#getEnvironment()
+ * @see #getDeploymentModel()
+ * @generated
+ */
+ EAttribute getDeploymentModel_Environment();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectLocation <em>Project Location</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Project Location</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectLocation()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_ProjectLocation();
+ /**
+ * Returns the meta object for class '{@link org.eclipse.blockchain.model.ethproject.EthereumProject <em>Ethereum Project</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Ethereum Project</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject
+ * @generated
+ */
+ EClass getEthereumProject();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectDescription <em>Project Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Project Description</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectDescription()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_ProjectDescription();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectLocation <em>Project Location</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Project Location</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectLocation()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_ProjectLocation();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectDescription <em>Project Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Project Description</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectDescription()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_ProjectDescription();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProject <em>Project</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Project</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProject()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_Project();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProject <em>Project</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Project</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProject()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_Project();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getFirstMatchingSolFile <em>First Matching Sol File</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>First Matching Sol File</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getFirstMatchingSolFile()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_FirstMatchingSolFile();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getFirstMatchingSolFile <em>First Matching Sol File</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>First Matching Sol File</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getFirstMatchingSolFile()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_FirstMatchingSolFile();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures <em>Project Natures</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Project Natures</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_ProjectNatures();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures <em>Project Natures</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Project Natures</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectNatures()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_ProjectNatures();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles <em>Compiled Solidity Files</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Compiled Solidity Files</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_CompiledSolidityFiles();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles <em>Compiled Solidity Files</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Compiled Solidity Files</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getCompiledSolidityFiles()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_CompiledSolidityFiles();
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel <em>Environment Based Deployed Model</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Environment Based Deployed Model</em>'.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel()
- * @see #getEthereumProject()
- * @generated
- */
- EAttribute getEthereumProject_EnvironmentBasedDeployedModel();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel <em>Environment Based Deployed Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Environment Based Deployed Model</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getEnvironmentBasedDeployedModel()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_EnvironmentBasedDeployedModel();
- /**
- * Returns the meta object for data type '{@link org.eclipse.core.resources.IResource <em>IResource</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>IResource</em>'.
- * @see org.eclipse.core.resources.IResource
- * @model instanceClass="org.eclipse.core.resources.IResource"
- * @generated
- */
- EDataType getIResource();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectBuilders <em>Project Builders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Project Builders</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getProjectBuilders()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EAttribute getEthereumProject_ProjectBuilders();
- /**
- * Returns the meta object for data type '{@link org.eclipse.core.resources.IProjectDescription <em>IProject Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>IProject Description</em>'.
- * @see org.eclipse.core.resources.IProjectDescription
- * @model instanceClass="org.eclipse.core.resources.IProjectDescription"
- * @generated
- */
- EDataType getIProjectDescription();
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.blockchain.model.ethproject.EthereumProject#getDeploymentmodel <em>Deploymentmodel</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Deploymentmodel</em>'.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject#getDeploymentmodel()
+ * @see #getEthereumProject()
+ * @generated
+ */
+ EReference getEthereumProject_Deploymentmodel();
- /**
- * Returns the meta object for data type '{@link org.eclipse.core.resources.IProject <em>IProject</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>IProject</em>'.
- * @see org.eclipse.core.resources.IProject
- * @model instanceClass="org.eclipse.core.resources.IProject"
- * @generated
- */
- EDataType getIProject();
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.core.resources.IProjectDescription <em>IProject Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>IProject Description</em>'.
+ * @see org.eclipse.core.resources.IProjectDescription
+ * @model instanceClass="org.eclipse.core.resources.IProjectDescription"
+ * @generated
+ */
+ EDataType getIProjectDescription();
- /**
- * Returns the meta object for data type '{@link org.eclipse.core.resources.IFile <em>IFile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>IFile</em>'.
- * @see org.eclipse.core.resources.IFile
- * @model instanceClass="org.eclipse.core.resources.IFile"
- * @generated
- */
- EDataType getIFile();
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.core.resources.IProject <em>IProject</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>IProject</em>'.
+ * @see org.eclipse.core.resources.IProject
+ * @model instanceClass="org.eclipse.core.resources.IProject"
+ * @generated
+ */
+ EDataType getIProject();
- /**
- * Returns the meta object for data type '{@link java.util.List <em>string List</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>string List</em>'.
- * @see java.util.List
- * @model instanceClass="java.util.List<java.lang.String>"
- * @generated
- */
- EDataType getstringList();
+ /**
+ * Returns the meta object for data type '{@link java.util.List <em>string List</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>string List</em>'.
+ * @see java.util.List
+ * @model instanceClass="java.util.List<java.lang.String>"
+ * @generated
+ */
+ EDataType getstringList();
- /**
- * Returns the meta object for data type '{@link java.util.Set <em>IResource Set</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>IResource Set</em>'.
- * @see java.util.Set
- * @model instanceClass="java.util.Set<org.eclipse.core.resources.IResource>"
- * @generated
- */
- EDataType getIResourceSet();
+ /**
+ * Returns the meta object for data type '{@link java.util.Set <em>IResource Set</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>IResource Set</em>'.
+ * @see java.util.Set
+ * @model instanceClass="java.util.Set<java.lang.String>"
+ * @generated
+ */
+ EDataType getIResourceSet();
- /**
- * Returns the meta object for data type '{@link java.util.Map <em>Deployment Map</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for data type '<em>Deployment Map</em>'.
- * @see java.util.Map
- * @model instanceClass="java.util.Map<java.lang.String, java.util.Map<org.eclipse.core.resources.IResource, org.eclipse.blockchain.model.ethproject.DeploymentModel>>"
- * @generated
- */
- EDataType getDeploymentMap();
+ /**
+ * Returns the meta object for data type '{@link java.util.Map <em>Deployment Map</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Deployment Map</em>'.
+ * @see java.util.Map
+ * @model instanceClass="java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.eclipse.blockchain.model.ethproject.DeploymentModel>>"
+ * @generated
+ */
+ EDataType getDeploymentMap();
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- EthprojectFactory getEthprojectFactory();
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ EthprojectFactory getEthprojectFactory();
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl <em>Deployment Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentModel()
+ * @generated
+ */
+ EClass DEPLOYMENT_MODEL = eINSTANCE.getDeploymentModel();
- /**
- * The meta object literal for the '{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl <em>Deployment Model</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentModel()
- * @generated
- */
- EClass DEPLOYMENT_MODEL = eINSTANCE.getDeploymentModel();
+ /**
+ * The meta object literal for the '<em><b>Contract Address</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DEPLOYMENT_MODEL__CONTRACT_ADDRESS = eINSTANCE.getDeploymentModel_ContractAddress();
- /**
- * The meta object literal for the '<em><b>Contract Address</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DEPLOYMENT_MODEL__CONTRACT_ADDRESS = eINSTANCE.getDeploymentModel_ContractAddress();
+ /**
+ * The meta object literal for the '<em><b>Sc File</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DEPLOYMENT_MODEL__SC_FILE = eINSTANCE.getDeploymentModel_ScFile();
- /**
- * The meta object literal for the '<em><b>Sc File</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DEPLOYMENT_MODEL__SC_FILE = eINSTANCE.getDeploymentModel_ScFile();
+ /**
+ * The meta object literal for the '<em><b>Last Used Account</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DEPLOYMENT_MODEL__LAST_USED_ACCOUNT = eINSTANCE.getDeploymentModel_LastUsedAccount();
- /**
- * The meta object literal for the '<em><b>Last Used Account</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DEPLOYMENT_MODEL__LAST_USED_ACCOUNT = eINSTANCE.getDeploymentModel_LastUsedAccount();
+ /**
+ * The meta object literal for the '<em><b>Environment</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DEPLOYMENT_MODEL__ENVIRONMENT = eINSTANCE.getDeploymentModel_Environment();
- /**
- * The meta object literal for the '{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl <em>Ethereum Project</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getEthereumProject()
- * @generated
- */
- EClass ETHEREUM_PROJECT = eINSTANCE.getEthereumProject();
+ /**
+ * The meta object literal for the '{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl <em>Ethereum Project</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getEthereumProject()
+ * @generated
+ */
+ EClass ETHEREUM_PROJECT = eINSTANCE.getEthereumProject();
- /**
- * The meta object literal for the '<em><b>Project Location</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__PROJECT_LOCATION = eINSTANCE.getEthereumProject_ProjectLocation();
+ /**
+ * The meta object literal for the '<em><b>Project Location</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__PROJECT_LOCATION = eINSTANCE.getEthereumProject_ProjectLocation();
- /**
- * The meta object literal for the '<em><b>Project Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__PROJECT_DESCRIPTION = eINSTANCE.getEthereumProject_ProjectDescription();
+ /**
+ * The meta object literal for the '<em><b>Project Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__PROJECT_DESCRIPTION = eINSTANCE.getEthereumProject_ProjectDescription();
- /**
- * The meta object literal for the '<em><b>Project</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__PROJECT = eINSTANCE.getEthereumProject_Project();
+ /**
+ * The meta object literal for the '<em><b>Project</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__PROJECT = eINSTANCE.getEthereumProject_Project();
- /**
- * The meta object literal for the '<em><b>First Matching Sol File</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE = eINSTANCE.getEthereumProject_FirstMatchingSolFile();
+ /**
+ * The meta object literal for the '<em><b>First Matching Sol File</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE = eINSTANCE.getEthereumProject_FirstMatchingSolFile();
- /**
- * The meta object literal for the '<em><b>Project Natures</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__PROJECT_NATURES = eINSTANCE.getEthereumProject_ProjectNatures();
+ /**
+ * The meta object literal for the '<em><b>Project Natures</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__PROJECT_NATURES = eINSTANCE.getEthereumProject_ProjectNatures();
- /**
- * The meta object literal for the '<em><b>Compiled Solidity Files</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES = eINSTANCE.getEthereumProject_CompiledSolidityFiles();
+ /**
+ * The meta object literal for the '<em><b>Compiled Solidity Files</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES = eINSTANCE.getEthereumProject_CompiledSolidityFiles();
- /**
- * The meta object literal for the '<em><b>Environment Based Deployed Model</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL =
- eINSTANCE.getEthereumProject_EnvironmentBasedDeployedModel();
+ /**
+ * The meta object literal for the '<em><b>Environment Based Deployed Model</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL = eINSTANCE
+ .getEthereumProject_EnvironmentBasedDeployedModel();
- /**
- * The meta object literal for the '<em>IResource</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IResource
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIResource()
- * @generated
- */
- EDataType IRESOURCE = eINSTANCE.getIResource();
+ /**
+ * The meta object literal for the '<em><b>Project Builders</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ETHEREUM_PROJECT__PROJECT_BUILDERS = eINSTANCE.getEthereumProject_ProjectBuilders();
- /**
- * The meta object literal for the '<em>IProject Description</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IProjectDescription
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProjectDescription()
- * @generated
- */
- EDataType IPROJECT_DESCRIPTION = eINSTANCE.getIProjectDescription();
+ /**
+ * The meta object literal for the '<em><b>Deploymentmodel</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ETHEREUM_PROJECT__DEPLOYMENTMODEL = eINSTANCE.getEthereumProject_Deploymentmodel();
- /**
- * The meta object literal for the '<em>IProject</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IProject
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProject()
- * @generated
- */
- EDataType IPROJECT = eINSTANCE.getIProject();
+ /**
+ * The meta object literal for the '<em>IProject Description</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.core.resources.IProjectDescription
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProjectDescription()
+ * @generated
+ */
+ EDataType IPROJECT_DESCRIPTION = eINSTANCE.getIProjectDescription();
- /**
- * The meta object literal for the '<em>IFile</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.core.resources.IFile
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIFile()
- * @generated
- */
- EDataType IFILE = eINSTANCE.getIFile();
+ /**
+ * The meta object literal for the '<em>IProject</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.core.resources.IProject
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIProject()
+ * @generated
+ */
+ EDataType IPROJECT = eINSTANCE.getIProject();
- /**
- * The meta object literal for the '<em>string List</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.List
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getstringList()
- * @generated
- */
- EDataType STRING_LIST = eINSTANCE.getstringList();
+ /**
+ * The meta object literal for the '<em>string List</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.List
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getstringList()
+ * @generated
+ */
+ EDataType STRING_LIST = eINSTANCE.getstringList();
- /**
- * The meta object literal for the '<em>IResource Set</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.Set
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIResourceSet()
- * @generated
- */
- EDataType IRESOURCE_SET = eINSTANCE.getIResourceSet();
+ /**
+ * The meta object literal for the '<em>IResource Set</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Set
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getIResourceSet()
+ * @generated
+ */
+ EDataType IRESOURCE_SET = eINSTANCE.getIResourceSet();
- /**
- * The meta object literal for the '<em>Deployment Map</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.Map
- * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentMap()
- * @generated
- */
- EDataType DEPLOYMENT_MAP = eINSTANCE.getDeploymentMap();
+ /**
+ * The meta object literal for the '<em>Deployment Map</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Map
+ * @see org.eclipse.blockchain.model.ethproject.impl.EthprojectPackageImpl#getDeploymentMap()
+ * @generated
+ */
+ EDataType DEPLOYMENT_MAP = eINSTANCE.getDeploymentMap();
- }
+ }
} //EthprojectPackage
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/DeploymentModelImpl.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/DeploymentModelImpl.java
index aa15f76..b6fb156 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/DeploymentModelImpl.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/DeploymentModelImpl.java
@@ -1,12 +1,21 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject.impl;
import org.eclipse.blockchain.model.ethproject.DeploymentModel;
import org.eclipse.blockchain.model.ethproject.EthprojectPackage;
-
-import org.eclipse.core.resources.IResource;
-
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
@@ -25,256 +34,317 @@
* <li>{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl#getContractAddress <em>Contract Address</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl#getScFile <em>Sc File</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl#getLastUsedAccount <em>Last Used Account</em>}</li>
+ * <li>{@link org.eclipse.blockchain.model.ethproject.impl.DeploymentModelImpl#getEnvironment <em>Environment</em>}</li>
* </ul>
*
* @generated
*/
public class DeploymentModelImpl extends MinimalEObjectImpl.Container implements DeploymentModel {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * The default value of the '{@link #getContractAddress() <em>Contract Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getContractAddress()
- * @generated
- * @ordered
- */
- protected static final String CONTRACT_ADDRESS_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getContractAddress() <em>Contract Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContractAddress()
+ * @generated
+ * @ordered
+ */
+ protected static final String CONTRACT_ADDRESS_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getContractAddress() <em>Contract Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getContractAddress()
- * @generated
- * @ordered
- */
- protected String contractAddress = CONTRACT_ADDRESS_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getContractAddress() <em>Contract Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContractAddress()
+ * @generated
+ * @ordered
+ */
+ protected String contractAddress = CONTRACT_ADDRESS_EDEFAULT;
- /**
- * The default value of the '{@link #getScFile() <em>Sc File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScFile()
- * @generated
- * @ordered
- */
- protected static final IResource SC_FILE_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getScFile() <em>Sc File</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScFile()
+ * @generated
+ * @ordered
+ */
+ protected static final String SC_FILE_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getScFile() <em>Sc File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScFile()
- * @generated
- * @ordered
- */
- protected IResource scFile = SC_FILE_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getScFile() <em>Sc File</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScFile()
+ * @generated
+ * @ordered
+ */
+ protected String scFile = SC_FILE_EDEFAULT;
- /**
- * The default value of the '{@link #getLastUsedAccount() <em>Last Used Account</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLastUsedAccount()
- * @generated
- * @ordered
- */
- protected static final String LAST_USED_ACCOUNT_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getLastUsedAccount() <em>Last Used Account</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastUsedAccount()
+ * @generated
+ * @ordered
+ */
+ protected static final String LAST_USED_ACCOUNT_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getLastUsedAccount() <em>Last Used Account</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLastUsedAccount()
- * @generated
- * @ordered
- */
- protected String lastUsedAccount = LAST_USED_ACCOUNT_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getLastUsedAccount() <em>Last Used Account</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastUsedAccount()
+ * @generated
+ * @ordered
+ */
+ protected String lastUsedAccount = LAST_USED_ACCOUNT_EDEFAULT;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DeploymentModelImpl() {
- super();
- }
+ /**
+ * The default value of the '{@link #getEnvironment() <em>Environment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEnvironment()
+ * @generated
+ * @ordered
+ */
+ protected static final String ENVIRONMENT_EDEFAULT = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return EthprojectPackage.Literals.DEPLOYMENT_MODEL;
- }
+ /**
+ * The cached value of the '{@link #getEnvironment() <em>Environment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEnvironment()
+ * @generated
+ * @ordered
+ */
+ protected String environment = ENVIRONMENT_EDEFAULT;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getContractAddress() {
- return contractAddress;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DeploymentModelImpl() {
+ super();
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setContractAddress(String newContractAddress) {
- String oldContractAddress = contractAddress;
- contractAddress = newContractAddress;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS,
- oldContractAddress, contractAddress));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return EthprojectPackage.Literals.DEPLOYMENT_MODEL;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IResource getScFile() {
- return scFile;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getContractAddress() {
+ return contractAddress;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setScFile(IResource newScFile) {
- IResource oldScFile = scFile;
- scFile = newScFile;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE, oldScFile,
- scFile));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setContractAddress(String newContractAddress) {
+ String oldContractAddress = contractAddress;
+ contractAddress = newContractAddress;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS,
+ oldContractAddress, contractAddress));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLastUsedAccount() {
- return lastUsedAccount;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getScFile() {
+ return scFile;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLastUsedAccount(String newLastUsedAccount) {
- String oldLastUsedAccount = lastUsedAccount;
- lastUsedAccount = newLastUsedAccount;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT,
- oldLastUsedAccount, lastUsedAccount));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setScFile(String newScFile) {
+ String oldScFile = scFile;
+ scFile = newScFile;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE,
+ oldScFile, scFile));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
- return getContractAddress();
- case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
- return getScFile();
- case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
- return getLastUsedAccount();
- }
- return super.eGet(featureID, resolve, coreType);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLastUsedAccount() {
+ return lastUsedAccount;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
- setContractAddress((String) newValue);
- return;
- case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
- setScFile((IResource) newValue);
- return;
- case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
- setLastUsedAccount((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLastUsedAccount(String newLastUsedAccount) {
+ String oldLastUsedAccount = lastUsedAccount;
+ lastUsedAccount = newLastUsedAccount;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT,
+ oldLastUsedAccount, lastUsedAccount));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
- setContractAddress(CONTRACT_ADDRESS_EDEFAULT);
- return;
- case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
- setScFile(SC_FILE_EDEFAULT);
- return;
- case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
- setLastUsedAccount(LAST_USED_ACCOUNT_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEnvironment() {
+ return environment;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
- return CONTRACT_ADDRESS_EDEFAULT == null ? contractAddress != null
- : !CONTRACT_ADDRESS_EDEFAULT.equals(contractAddress);
- case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
- return SC_FILE_EDEFAULT == null ? scFile != null : !SC_FILE_EDEFAULT.equals(scFile);
- case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
- return LAST_USED_ACCOUNT_EDEFAULT == null ? lastUsedAccount != null
- : !LAST_USED_ACCOUNT_EDEFAULT.equals(lastUsedAccount);
- }
- return super.eIsSet(featureID);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEnvironment(String newEnvironment) {
+ String oldEnvironment = environment;
+ environment = newEnvironment;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.DEPLOYMENT_MODEL__ENVIRONMENT,
+ oldEnvironment, environment));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
+ return getContractAddress();
+ case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
+ return getScFile();
+ case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
+ return getLastUsedAccount();
+ case EthprojectPackage.DEPLOYMENT_MODEL__ENVIRONMENT:
+ return getEnvironment();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
- StringBuilder result = new StringBuilder(super.toString());
- result.append(" (contractAddress: ");
- result.append(contractAddress);
- result.append(", scFile: ");
- result.append(scFile);
- result.append(", lastUsedAccount: ");
- result.append(lastUsedAccount);
- result.append(')');
- return result.toString();
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
+ setContractAddress((String) newValue);
+ return;
+ case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
+ setScFile((String) newValue);
+ return;
+ case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
+ setLastUsedAccount((String) newValue);
+ return;
+ case EthprojectPackage.DEPLOYMENT_MODEL__ENVIRONMENT:
+ setEnvironment((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
+ setContractAddress(CONTRACT_ADDRESS_EDEFAULT);
+ return;
+ case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
+ setScFile(SC_FILE_EDEFAULT);
+ return;
+ case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
+ setLastUsedAccount(LAST_USED_ACCOUNT_EDEFAULT);
+ return;
+ case EthprojectPackage.DEPLOYMENT_MODEL__ENVIRONMENT:
+ setEnvironment(ENVIRONMENT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case EthprojectPackage.DEPLOYMENT_MODEL__CONTRACT_ADDRESS:
+ return CONTRACT_ADDRESS_EDEFAULT == null ? contractAddress != null
+ : !CONTRACT_ADDRESS_EDEFAULT.equals(contractAddress);
+ case EthprojectPackage.DEPLOYMENT_MODEL__SC_FILE:
+ return SC_FILE_EDEFAULT == null ? scFile != null : !SC_FILE_EDEFAULT.equals(scFile);
+ case EthprojectPackage.DEPLOYMENT_MODEL__LAST_USED_ACCOUNT:
+ return LAST_USED_ACCOUNT_EDEFAULT == null ? lastUsedAccount != null
+ : !LAST_USED_ACCOUNT_EDEFAULT.equals(lastUsedAccount);
+ case EthprojectPackage.DEPLOYMENT_MODEL__ENVIRONMENT:
+ return ENVIRONMENT_EDEFAULT == null ? environment != null : !ENVIRONMENT_EDEFAULT.equals(environment);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (contractAddress: ");
+ result.append(contractAddress);
+ result.append(", scFile: ");
+ result.append(scFile);
+ result.append(", lastUsedAccount: ");
+ result.append(lastUsedAccount);
+ result.append(", environment: ");
+ result.append(environment);
+ result.append(')');
+ return result.toString();
+ }
} //DeploymentModelImpl
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthereumProjectImpl.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthereumProjectImpl.java
index 6847fc0..c36a9c2 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthereumProjectImpl.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthereumProjectImpl.java
@@ -1,7 +1,20 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject.impl;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -9,18 +22,19 @@
import org.eclipse.blockchain.model.ethproject.DeploymentModel;
import org.eclipse.blockchain.model.ethproject.EthereumProject;
import org.eclipse.blockchain.model.ethproject.EthprojectPackage;
-
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
@@ -37,480 +51,593 @@
* <li>{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl#getProjectNatures <em>Project Natures</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl#getCompiledSolidityFiles <em>Compiled Solidity Files</em>}</li>
* <li>{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl#getEnvironmentBasedDeployedModel <em>Environment Based Deployed Model</em>}</li>
+ * <li>{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl#getProjectBuilders <em>Project Builders</em>}</li>
+ * <li>{@link org.eclipse.blockchain.model.ethproject.impl.EthereumProjectImpl#getDeploymentmodel <em>Deploymentmodel</em>}</li>
* </ul>
*
* @generated
*/
public class EthereumProjectImpl extends MinimalEObjectImpl.Container implements EthereumProject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * The default value of the '{@link #getProjectLocation() <em>Project Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProjectLocation()
- * @generated
- * @ordered
- */
- protected static final String PROJECT_LOCATION_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getProjectLocation() <em>Project Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectLocation()
+ * @generated
+ * @ordered
+ */
+ protected static final String PROJECT_LOCATION_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getProjectLocation() <em>Project Location</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProjectLocation()
- * @generated
- * @ordered
- */
- protected String projectLocation = PROJECT_LOCATION_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getProjectLocation() <em>Project Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectLocation()
+ * @generated
+ * @ordered
+ */
+ protected String projectLocation = PROJECT_LOCATION_EDEFAULT;
- /**
- * The default value of the '{@link #getProjectDescription() <em>Project Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProjectDescription()
- * @generated
- * @ordered
- */
- protected static final IProjectDescription PROJECT_DESCRIPTION_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getProjectDescription() <em>Project Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final IProjectDescription PROJECT_DESCRIPTION_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getProjectDescription() <em>Project Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProjectDescription()
- * @generated
- * @ordered
- */
- protected IProjectDescription projectDescription = PROJECT_DESCRIPTION_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getProjectDescription() <em>Project Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectDescription()
+ * @generated
+ * @ordered
+ */
+ protected IProjectDescription projectDescription = PROJECT_DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getProject() <em>Project</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProject()
- * @generated
- * @ordered
- */
- protected static final IProject PROJECT_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getProject() <em>Project</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProject()
+ * @generated
+ * @ordered
+ */
+ protected static final IProject PROJECT_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getProject() <em>Project</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProject()
- * @generated
- * @ordered
- */
- protected IProject project = PROJECT_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getProject() <em>Project</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProject()
+ * @generated
+ * @ordered
+ */
+ protected IProject project = PROJECT_EDEFAULT;
- /**
- * The default value of the '{@link #getFirstMatchingSolFile() <em>First Matching Sol File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFirstMatchingSolFile()
- * @generated
- * @ordered
- */
- protected static final IFile FIRST_MATCHING_SOL_FILE_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getFirstMatchingSolFile() <em>First Matching Sol File</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFirstMatchingSolFile()
+ * @generated
+ * @ordered
+ */
+ protected static final String FIRST_MATCHING_SOL_FILE_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getFirstMatchingSolFile() <em>First Matching Sol File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFirstMatchingSolFile()
- * @generated
- * @ordered
- */
- protected IFile firstMatchingSolFile = FIRST_MATCHING_SOL_FILE_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getFirstMatchingSolFile() <em>First Matching Sol File</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFirstMatchingSolFile()
+ * @generated
+ * @ordered
+ */
+ protected String firstMatchingSolFile = FIRST_MATCHING_SOL_FILE_EDEFAULT;
- /**
- * The default value of the '{@link #getProjectNatures() <em>Project Natures</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProjectNatures()
- * @generated
- * @ordered
- */
- protected static final List<String> PROJECT_NATURES_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getProjectNatures() <em>Project Natures</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectNatures()
+ * @generated
+ * @ordered
+ */
+ protected static final List<String> PROJECT_NATURES_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getProjectNatures() <em>Project Natures</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProjectNatures()
- * @generated
- * @ordered
- */
- protected List<String> projectNatures = PROJECT_NATURES_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getProjectNatures() <em>Project Natures</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectNatures()
+ * @generated
+ * @ordered
+ */
+ protected List<String> projectNatures = PROJECT_NATURES_EDEFAULT;
- /**
- * The default value of the '{@link #getCompiledSolidityFiles() <em>Compiled Solidity Files</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompiledSolidityFiles()
- * @generated
- * @ordered
- */
- protected static final Set<IResource> COMPILED_SOLIDITY_FILES_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getCompiledSolidityFiles() <em>Compiled Solidity Files</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCompiledSolidityFiles()
+ * @generated
+ * @ordered
+ */
+ protected static final Set<String> COMPILED_SOLIDITY_FILES_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getCompiledSolidityFiles() <em>Compiled Solidity Files</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompiledSolidityFiles()
- * @generated
- * @ordered
- */
- protected Set<IResource> compiledSolidityFiles = COMPILED_SOLIDITY_FILES_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getCompiledSolidityFiles() <em>Compiled Solidity Files</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCompiledSolidityFiles()
+ * @generated
+ * @ordered
+ */
+ protected Set<String> compiledSolidityFiles = COMPILED_SOLIDITY_FILES_EDEFAULT;
- /**
- * The default value of the '{@link #getEnvironmentBasedDeployedModel() <em>Environment Based Deployed Model</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnvironmentBasedDeployedModel()
- * @generated
- * @ordered
- */
- protected static final Map<String, Map<IResource, DeploymentModel>> ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT = null;
+ /**
+ * The default value of the '{@link #getEnvironmentBasedDeployedModel() <em>Environment Based Deployed Model</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEnvironmentBasedDeployedModel()
+ * @generated
+ * @ordered
+ */
+ protected static final Map<String, Map<String, DeploymentModel>> ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getEnvironmentBasedDeployedModel() <em>Environment Based Deployed Model</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnvironmentBasedDeployedModel()
- * @generated
- * @ordered
- */
- protected Map<String, Map<IResource, DeploymentModel>> environmentBasedDeployedModel =
- ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getEnvironmentBasedDeployedModel() <em>Environment Based Deployed Model</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEnvironmentBasedDeployedModel()
+ * @generated
+ * @ordered
+ */
+ protected Map<String, Map<String, DeploymentModel>> environmentBasedDeployedModel = ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EthereumProjectImpl() {
- super();
- }
+ /**
+ * The default value of the '{@link #getProjectBuilders() <em>Project Builders</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectBuilders()
+ * @generated
+ * @ordered
+ */
+ protected static final List<String> PROJECT_BUILDERS_EDEFAULT = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return EthprojectPackage.Literals.ETHEREUM_PROJECT;
- }
+ /**
+ * The cached value of the '{@link #getProjectBuilders() <em>Project Builders</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjectBuilders()
+ * @generated
+ * @ordered
+ */
+ protected List<String> projectBuilders = PROJECT_BUILDERS_EDEFAULT;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getProjectLocation() {
- return projectLocation;
- }
+ /**
+ * The cached value of the '{@link #getDeploymentmodel() <em>Deploymentmodel</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDeploymentmodel()
+ * @generated
+ * @ordered
+ */
+ protected EList<DeploymentModel> deploymentmodel;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProjectLocation(String newProjectLocation) {
- String oldProjectLocation = projectLocation;
- projectLocation = newProjectLocation;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION,
- oldProjectLocation, projectLocation));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EthereumProjectImpl() {
+ super();
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IProjectDescription getProjectDescription() {
- return projectDescription;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return EthprojectPackage.Literals.ETHEREUM_PROJECT;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProjectDescription(IProjectDescription newProjectDescription) {
- IProjectDescription oldProjectDescription = projectDescription;
- projectDescription = newProjectDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION,
- oldProjectDescription, projectDescription));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getProjectLocation() {
+ return projectLocation;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IProject getProject() {
- return project;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProjectLocation(String newProjectLocation) {
+ String oldProjectLocation = projectLocation;
+ projectLocation = newProjectLocation;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION,
+ oldProjectLocation, projectLocation));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProject(IProject newProject) {
- IProject oldProject = project;
- project = newProject;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT, oldProject,
- project));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IProjectDescription getProjectDescription() {
+ return projectDescription;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IFile getFirstMatchingSolFile() {
- return firstMatchingSolFile;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProjectDescription(IProjectDescription newProjectDescription) {
+ IProjectDescription oldProjectDescription = projectDescription;
+ projectDescription = newProjectDescription;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION, oldProjectDescription,
+ projectDescription));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setFirstMatchingSolFile(IFile newFirstMatchingSolFile) {
- IFile oldFirstMatchingSolFile = firstMatchingSolFile;
- firstMatchingSolFile = newFirstMatchingSolFile;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE,
- oldFirstMatchingSolFile, firstMatchingSolFile));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IProject getProject() {
+ return project;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List<String> getProjectNatures() {
- return projectNatures;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProject(IProject newProject) {
+ IProject oldProject = project;
+ project = newProject;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT,
+ oldProject, project));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProjectNatures(List<String> newProjectNatures) {
- List<String> oldProjectNatures = projectNatures;
- projectNatures = newProjectNatures;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES,
- oldProjectNatures, projectNatures));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getFirstMatchingSolFile() {
+ return firstMatchingSolFile;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Set<IResource> getCompiledSolidityFiles() {
- return compiledSolidityFiles;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFirstMatchingSolFile(String newFirstMatchingSolFile) {
+ String oldFirstMatchingSolFile = firstMatchingSolFile;
+ firstMatchingSolFile = newFirstMatchingSolFile;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE, oldFirstMatchingSolFile,
+ firstMatchingSolFile));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setCompiledSolidityFiles(Set<IResource> newCompiledSolidityFiles) {
- Set<IResource> oldCompiledSolidityFiles = compiledSolidityFiles;
- compiledSolidityFiles = newCompiledSolidityFiles;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES,
- oldCompiledSolidityFiles, compiledSolidityFiles));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List<String> getProjectNatures() {
+ return projectNatures;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Map<String, Map<IResource, DeploymentModel>> getEnvironmentBasedDeployedModel() {
- return environmentBasedDeployedModel;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProjectNatures(List<String> newProjectNatures) {
+ List<String> oldProjectNatures = projectNatures;
+ projectNatures = newProjectNatures;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES,
+ oldProjectNatures, projectNatures));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setEnvironmentBasedDeployedModel(
- Map<String, Map<IResource, DeploymentModel>> newEnvironmentBasedDeployedModel) {
- Map<String, Map<IResource, DeploymentModel>> oldEnvironmentBasedDeployedModel = environmentBasedDeployedModel;
- environmentBasedDeployedModel = newEnvironmentBasedDeployedModel;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL, oldEnvironmentBasedDeployedModel,
- environmentBasedDeployedModel));
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Set<String> getCompiledSolidityFiles() {
+ return compiledSolidityFiles;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
- return getProjectLocation();
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
- return getProjectDescription();
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
- return getProject();
- case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
- return getFirstMatchingSolFile();
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
- return getProjectNatures();
- case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
- return getCompiledSolidityFiles();
- case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
- return getEnvironmentBasedDeployedModel();
- }
- return super.eGet(featureID, resolve, coreType);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCompiledSolidityFiles(Set<String> newCompiledSolidityFiles) {
+ Set<String> oldCompiledSolidityFiles = compiledSolidityFiles;
+ compiledSolidityFiles = newCompiledSolidityFiles;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES, oldCompiledSolidityFiles,
+ compiledSolidityFiles));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
- setProjectLocation((String) newValue);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
- setProjectDescription((IProjectDescription) newValue);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
- setProject((IProject) newValue);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
- setFirstMatchingSolFile((IFile) newValue);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
- setProjectNatures((List<String>) newValue);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
- setCompiledSolidityFiles((Set<IResource>) newValue);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
- setEnvironmentBasedDeployedModel((Map<String, Map<IResource, DeploymentModel>>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Map<String, Map<String, DeploymentModel>> getEnvironmentBasedDeployedModel() {
+ return environmentBasedDeployedModel;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
- setProjectLocation(PROJECT_LOCATION_EDEFAULT);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
- setProjectDescription(PROJECT_DESCRIPTION_EDEFAULT);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
- setProject(PROJECT_EDEFAULT);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
- setFirstMatchingSolFile(FIRST_MATCHING_SOL_FILE_EDEFAULT);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
- setProjectNatures(PROJECT_NATURES_EDEFAULT);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
- setCompiledSolidityFiles(COMPILED_SOLIDITY_FILES_EDEFAULT);
- return;
- case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
- setEnvironmentBasedDeployedModel(ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEnvironmentBasedDeployedModel(
+ Map<String, Map<String, DeploymentModel>> newEnvironmentBasedDeployedModel) {
+ Map<String, Map<String, DeploymentModel>> oldEnvironmentBasedDeployedModel = environmentBasedDeployedModel;
+ environmentBasedDeployedModel = newEnvironmentBasedDeployedModel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL,
+ oldEnvironmentBasedDeployedModel, environmentBasedDeployedModel));
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
- return PROJECT_LOCATION_EDEFAULT == null ? projectLocation != null
- : !PROJECT_LOCATION_EDEFAULT.equals(projectLocation);
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
- return PROJECT_DESCRIPTION_EDEFAULT == null ? projectDescription != null
- : !PROJECT_DESCRIPTION_EDEFAULT.equals(projectDescription);
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
- return PROJECT_EDEFAULT == null ? project != null : !PROJECT_EDEFAULT.equals(project);
- case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
- return FIRST_MATCHING_SOL_FILE_EDEFAULT == null ? firstMatchingSolFile != null
- : !FIRST_MATCHING_SOL_FILE_EDEFAULT.equals(firstMatchingSolFile);
- case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
- return PROJECT_NATURES_EDEFAULT == null ? projectNatures != null
- : !PROJECT_NATURES_EDEFAULT.equals(projectNatures);
- case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
- return COMPILED_SOLIDITY_FILES_EDEFAULT == null ? compiledSolidityFiles != null
- : !COMPILED_SOLIDITY_FILES_EDEFAULT.equals(compiledSolidityFiles);
- case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
- return ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT == null ? environmentBasedDeployedModel != null
- : !ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT.equals(environmentBasedDeployedModel);
- }
- return super.eIsSet(featureID);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List<String> getProjectBuilders() {
+ return projectBuilders;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProjectBuilders(List<String> newProjectBuilders) {
+ List<String> oldProjectBuilders = projectBuilders;
+ projectBuilders = newProjectBuilders;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EthprojectPackage.ETHEREUM_PROJECT__PROJECT_BUILDERS,
+ oldProjectBuilders, projectBuilders));
+ }
- StringBuilder result = new StringBuilder(super.toString());
- result.append(" (projectLocation: ");
- result.append(projectLocation);
- result.append(", projectDescription: ");
- result.append(projectDescription);
- result.append(", project: ");
- result.append(project);
- result.append(", firstMatchingSolFile: ");
- result.append(firstMatchingSolFile);
- result.append(", projectNatures: ");
- result.append(projectNatures);
- result.append(", compiledSolidityFiles: ");
- result.append(compiledSolidityFiles);
- result.append(", environmentBasedDeployedModel: ");
- result.append(environmentBasedDeployedModel);
- result.append(')');
- return result.toString();
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<DeploymentModel> getDeploymentmodel() {
+ if (deploymentmodel == null) {
+ deploymentmodel = new EObjectContainmentEList<DeploymentModel>(DeploymentModel.class, this,
+ EthprojectPackage.ETHEREUM_PROJECT__DEPLOYMENTMODEL);
+ }
+ return deploymentmodel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case EthprojectPackage.ETHEREUM_PROJECT__DEPLOYMENTMODEL:
+ return ((InternalEList<?>) getDeploymentmodel()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
+ return getProjectLocation();
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
+ return getProjectDescription();
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
+ return getProject();
+ case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
+ return getFirstMatchingSolFile();
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
+ return getProjectNatures();
+ case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
+ return getCompiledSolidityFiles();
+ case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
+ return getEnvironmentBasedDeployedModel();
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_BUILDERS:
+ return getProjectBuilders();
+ case EthprojectPackage.ETHEREUM_PROJECT__DEPLOYMENTMODEL:
+ return getDeploymentmodel();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
+ setProjectLocation((String) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
+ setProjectDescription((IProjectDescription) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
+ setProject((IProject) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
+ setFirstMatchingSolFile((String) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
+ setProjectNatures((List<String>) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
+ setCompiledSolidityFiles((Set<String>) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
+ setEnvironmentBasedDeployedModel((Map<String, Map<String, DeploymentModel>>) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_BUILDERS:
+ setProjectBuilders((List<String>) newValue);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__DEPLOYMENTMODEL:
+ getDeploymentmodel().clear();
+ getDeploymentmodel().addAll((Collection<? extends DeploymentModel>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
+ setProjectLocation(PROJECT_LOCATION_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
+ setProjectDescription(PROJECT_DESCRIPTION_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
+ setProject(PROJECT_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
+ setFirstMatchingSolFile(FIRST_MATCHING_SOL_FILE_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
+ setProjectNatures(PROJECT_NATURES_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
+ setCompiledSolidityFiles(COMPILED_SOLIDITY_FILES_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
+ setEnvironmentBasedDeployedModel(ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_BUILDERS:
+ setProjectBuilders(PROJECT_BUILDERS_EDEFAULT);
+ return;
+ case EthprojectPackage.ETHEREUM_PROJECT__DEPLOYMENTMODEL:
+ getDeploymentmodel().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_LOCATION:
+ return PROJECT_LOCATION_EDEFAULT == null ? projectLocation != null
+ : !PROJECT_LOCATION_EDEFAULT.equals(projectLocation);
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_DESCRIPTION:
+ return PROJECT_DESCRIPTION_EDEFAULT == null ? projectDescription != null
+ : !PROJECT_DESCRIPTION_EDEFAULT.equals(projectDescription);
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT:
+ return PROJECT_EDEFAULT == null ? project != null : !PROJECT_EDEFAULT.equals(project);
+ case EthprojectPackage.ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE:
+ return FIRST_MATCHING_SOL_FILE_EDEFAULT == null ? firstMatchingSolFile != null
+ : !FIRST_MATCHING_SOL_FILE_EDEFAULT.equals(firstMatchingSolFile);
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_NATURES:
+ return PROJECT_NATURES_EDEFAULT == null ? projectNatures != null
+ : !PROJECT_NATURES_EDEFAULT.equals(projectNatures);
+ case EthprojectPackage.ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES:
+ return COMPILED_SOLIDITY_FILES_EDEFAULT == null ? compiledSolidityFiles != null
+ : !COMPILED_SOLIDITY_FILES_EDEFAULT.equals(compiledSolidityFiles);
+ case EthprojectPackage.ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL:
+ return ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT == null ? environmentBasedDeployedModel != null
+ : !ENVIRONMENT_BASED_DEPLOYED_MODEL_EDEFAULT.equals(environmentBasedDeployedModel);
+ case EthprojectPackage.ETHEREUM_PROJECT__PROJECT_BUILDERS:
+ return PROJECT_BUILDERS_EDEFAULT == null ? projectBuilders != null
+ : !PROJECT_BUILDERS_EDEFAULT.equals(projectBuilders);
+ case EthprojectPackage.ETHEREUM_PROJECT__DEPLOYMENTMODEL:
+ return deploymentmodel != null && !deploymentmodel.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (projectLocation: ");
+ result.append(projectLocation);
+ result.append(", projectDescription: ");
+ result.append(projectDescription);
+ result.append(", project: ");
+ result.append(project);
+ result.append(", firstMatchingSolFile: ");
+ result.append(firstMatchingSolFile);
+ result.append(", projectNatures: ");
+ result.append(projectNatures);
+ result.append(", compiledSolidityFiles: ");
+ result.append(compiledSolidityFiles);
+ result.append(", environmentBasedDeployedModel: ");
+ result.append(environmentBasedDeployedModel);
+ result.append(", projectBuilders: ");
+ result.append(projectBuilders);
+ result.append(')');
+ return result.toString();
+ }
} //EthereumProjectImpl
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectFactoryImpl.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectFactoryImpl.java
index 43d19a0..51d7694 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectFactoryImpl.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectFactoryImpl.java
@@ -1,4 +1,16 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject.impl;
@@ -7,12 +19,8 @@
import java.util.Set;
import org.eclipse.blockchain.model.ethproject.*;
-
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
@@ -29,276 +37,237 @@
* @generated
*/
public class EthprojectFactoryImpl extends EFactoryImpl implements EthprojectFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static EthprojectFactory init() {
- try {
- EthprojectFactory theEthprojectFactory =
- (EthprojectFactory) EPackage.Registry.INSTANCE.getEFactory(EthprojectPackage.eNS_URI);
- if (theEthprojectFactory != null) {
- return theEthprojectFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new EthprojectFactoryImpl();
- }
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static EthprojectFactory init() {
+ try {
+ EthprojectFactory theEthprojectFactory = (EthprojectFactory) EPackage.Registry.INSTANCE
+ .getEFactory(EthprojectPackage.eNS_URI);
+ if (theEthprojectFactory != null) {
+ return theEthprojectFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new EthprojectFactoryImpl();
+ }
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EthprojectFactoryImpl() {
- super();
- }
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EthprojectFactoryImpl() {
+ super();
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case EthprojectPackage.DEPLOYMENT_MODEL:
- return createDeploymentModel();
- case EthprojectPackage.ETHEREUM_PROJECT:
- return createEthereumProject();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case EthprojectPackage.DEPLOYMENT_MODEL:
+ return createDeploymentModel();
+ case EthprojectPackage.ETHEREUM_PROJECT:
+ return createEthereumProject();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case EthprojectPackage.IRESOURCE:
- return createIResourceFromString(eDataType, initialValue);
- case EthprojectPackage.IPROJECT_DESCRIPTION:
- return createIProjectDescriptionFromString(eDataType, initialValue);
- case EthprojectPackage.IPROJECT:
- return createIProjectFromString(eDataType, initialValue);
- case EthprojectPackage.IFILE:
- return createIFileFromString(eDataType, initialValue);
- case EthprojectPackage.STRING_LIST:
- return createstringListFromString(eDataType, initialValue);
- case EthprojectPackage.IRESOURCE_SET:
- return createIResourceSetFromString(eDataType, initialValue);
- case EthprojectPackage.DEPLOYMENT_MAP:
- return createDeploymentMapFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case EthprojectPackage.IPROJECT_DESCRIPTION:
+ return createIProjectDescriptionFromString(eDataType, initialValue);
+ case EthprojectPackage.IPROJECT:
+ return createIProjectFromString(eDataType, initialValue);
+ case EthprojectPackage.STRING_LIST:
+ return createstringListFromString(eDataType, initialValue);
+ case EthprojectPackage.IRESOURCE_SET:
+ return createIResourceSetFromString(eDataType, initialValue);
+ case EthprojectPackage.DEPLOYMENT_MAP:
+ return createDeploymentMapFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case EthprojectPackage.IRESOURCE:
- return convertIResourceToString(eDataType, instanceValue);
- case EthprojectPackage.IPROJECT_DESCRIPTION:
- return convertIProjectDescriptionToString(eDataType, instanceValue);
- case EthprojectPackage.IPROJECT:
- return convertIProjectToString(eDataType, instanceValue);
- case EthprojectPackage.IFILE:
- return convertIFileToString(eDataType, instanceValue);
- case EthprojectPackage.STRING_LIST:
- return convertstringListToString(eDataType, instanceValue);
- case EthprojectPackage.IRESOURCE_SET:
- return convertIResourceSetToString(eDataType, instanceValue);
- case EthprojectPackage.DEPLOYMENT_MAP:
- return convertDeploymentMapToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case EthprojectPackage.IPROJECT_DESCRIPTION:
+ return convertIProjectDescriptionToString(eDataType, instanceValue);
+ case EthprojectPackage.IPROJECT:
+ return convertIProjectToString(eDataType, instanceValue);
+ case EthprojectPackage.STRING_LIST:
+ return convertstringListToString(eDataType, instanceValue);
+ case EthprojectPackage.IRESOURCE_SET:
+ return convertIResourceSetToString(eDataType, instanceValue);
+ case EthprojectPackage.DEPLOYMENT_MAP:
+ return convertDeploymentMapToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DeploymentModel createDeploymentModel() {
- DeploymentModelImpl deploymentModel = new DeploymentModelImpl();
- return deploymentModel;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DeploymentModel createDeploymentModel() {
+ DeploymentModelImpl deploymentModel = new DeploymentModelImpl();
+ return deploymentModel;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EthereumProject createEthereumProject() {
- EthereumProjectImpl ethereumProject = new EthereumProjectImpl();
- return ethereumProject;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EthereumProject createEthereumProject() {
+ EthereumProjectImpl ethereumProject = new EthereumProjectImpl();
+ return ethereumProject;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IResource createIResourceFromString(EDataType eDataType, String initialValue) {
- return (IResource) super.createFromString(eDataType, initialValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IProjectDescription createIProjectDescriptionFromString(EDataType eDataType, String initialValue) {
+ return (IProjectDescription) super.createFromString(eDataType, initialValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertIResourceToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(eDataType, instanceValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertIProjectDescriptionToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IProjectDescription createIProjectDescriptionFromString(EDataType eDataType, String initialValue) {
- return (IProjectDescription) super.createFromString(eDataType, initialValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IProject createIProjectFromString(EDataType eDataType, String initialValue) {
+ return (IProject) super.createFromString(eDataType, initialValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertIProjectDescriptionToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(eDataType, instanceValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertIProjectToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IProject createIProjectFromString(EDataType eDataType, String initialValue) {
- return (IProject) super.createFromString(eDataType, initialValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> createstringListFromString(EDataType eDataType, String initialValue) {
+ return (List<String>) super.createFromString(initialValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertIProjectToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(eDataType, instanceValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertstringListToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(instanceValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IFile createIFileFromString(EDataType eDataType, String initialValue) {
- return (IFile) super.createFromString(eDataType, initialValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public Set<String> createIResourceSetFromString(EDataType eDataType, String initialValue) {
+ return (Set<String>) super.createFromString(initialValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertIFileToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(eDataType, instanceValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertIResourceSetToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(instanceValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- public List<String> createstringListFromString(EDataType eDataType, String initialValue) {
- return (List<String>) super.createFromString(initialValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public Map<String, Map<String, DeploymentModel>> createDeploymentMapFromString(EDataType eDataType,
+ String initialValue) {
+ return (Map<String, Map<String, DeploymentModel>>) super.createFromString(initialValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertstringListToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(instanceValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertDeploymentMapToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(instanceValue);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- public Set<IResource> createIResourceSetFromString(EDataType eDataType, String initialValue) {
- return (Set<IResource>) super.createFromString(initialValue);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EthprojectPackage getEthprojectPackage() {
+ return (EthprojectPackage) getEPackage();
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertIResourceSetToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(instanceValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- public Map<String, Map<IResource, DeploymentModel>> createDeploymentMapFromString(EDataType eDataType,
- String initialValue) {
- return (Map<String, Map<IResource, DeploymentModel>>) super.createFromString(initialValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertDeploymentMapToString(EDataType eDataType, Object instanceValue) {
- return super.convertToString(instanceValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EthprojectPackage getEthprojectPackage() {
- return (EthprojectPackage) getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static EthprojectPackage getPackage() {
- return EthprojectPackage.eINSTANCE;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static EthprojectPackage getPackage() {
+ return EthprojectPackage.eINSTANCE;
+ }
} //EthprojectFactoryImpl
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectPackageImpl.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectPackageImpl.java
index 3fbc1cc..0c6d9f9 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectPackageImpl.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/impl/EthprojectPackageImpl.java
@@ -1,4 +1,16 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject.impl;
@@ -10,17 +22,14 @@
import org.eclipse.blockchain.model.ethproject.EthereumProject;
import org.eclipse.blockchain.model.ethproject.EthprojectFactory;
import org.eclipse.blockchain.model.ethproject.EthprojectPackage;
-
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
@@ -30,437 +39,448 @@
* @generated
*/
public class EthprojectPackageImpl extends EPackageImpl implements EthprojectPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass deploymentModelEClass = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass deploymentModelEClass = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass ethereumProjectEClass = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass ethereumProjectEClass = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType iResourceEDataType = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType iProjectDescriptionEDataType = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType iProjectDescriptionEDataType = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType iProjectEDataType = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType iProjectEDataType = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType stringListEDataType = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType iFileEDataType = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType iResourceSetEDataType = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType stringListEDataType = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType deploymentMapEDataType = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType iResourceSetEDataType = null;
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private EthprojectPackageImpl() {
+ super(eNS_URI, EthprojectFactory.eINSTANCE);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType deploymentMapEDataType = null;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.blockchain.model.ethproject.EthprojectPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private EthprojectPackageImpl() {
- super(eNS_URI, EthprojectFactory.eINSTANCE);
- }
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link EthprojectPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static EthprojectPackage init() {
+ if (isInited)
+ return (EthprojectPackage) EPackage.Registry.INSTANCE.getEPackage(EthprojectPackage.eNS_URI);
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
+ // Obtain or create and register package
+ Object registeredEthprojectPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ EthprojectPackageImpl theEthprojectPackage = registeredEthprojectPackage instanceof EthprojectPackageImpl
+ ? (EthprojectPackageImpl) registeredEthprojectPackage
+ : new EthprojectPackageImpl();
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link EthprojectPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static EthprojectPackage init() {
- if (isInited)
- return (EthprojectPackage) EPackage.Registry.INSTANCE.getEPackage(EthprojectPackage.eNS_URI);
+ isInited = true;
- // Obtain or create and register package
- Object registeredEthprojectPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
- EthprojectPackageImpl theEthprojectPackage = registeredEthprojectPackage instanceof EthprojectPackageImpl
- ? (EthprojectPackageImpl) registeredEthprojectPackage : new EthprojectPackageImpl();
+ // Create package meta-data objects
+ theEthprojectPackage.createPackageContents();
- isInited = true;
+ // Initialize created meta-data
+ theEthprojectPackage.initializePackageContents();
- // Create package meta-data objects
- theEthprojectPackage.createPackageContents();
+ // Mark meta-data to indicate it can't be changed
+ theEthprojectPackage.freeze();
- // Initialize created meta-data
- theEthprojectPackage.initializePackageContents();
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(EthprojectPackage.eNS_URI, theEthprojectPackage);
+ return theEthprojectPackage;
+ }
- // Mark meta-data to indicate it can't be changed
- theEthprojectPackage.freeze();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDeploymentModel() {
+ return deploymentModelEClass;
+ }
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(EthprojectPackage.eNS_URI, theEthprojectPackage);
- return theEthprojectPackage;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDeploymentModel_ContractAddress() {
+ return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(0);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getDeploymentModel() {
- return deploymentModelEClass;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDeploymentModel_ScFile() {
+ return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(1);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDeploymentModel_ContractAddress() {
- return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(0);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDeploymentModel_LastUsedAccount() {
+ return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(2);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDeploymentModel_ScFile() {
- return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(1);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDeploymentModel_Environment() {
+ return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(3);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDeploymentModel_LastUsedAccount() {
- return (EAttribute) deploymentModelEClass.getEStructuralFeatures().get(2);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEthereumProject() {
+ return ethereumProjectEClass;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getEthereumProject() {
- return ethereumProjectEClass;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_ProjectLocation() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(0);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_ProjectLocation() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(0);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_ProjectDescription() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(1);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_ProjectDescription() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(1);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_Project() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(2);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_Project() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(2);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_FirstMatchingSolFile() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(3);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_FirstMatchingSolFile() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(3);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_ProjectNatures() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(4);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_ProjectNatures() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(4);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_CompiledSolidityFiles() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(5);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_CompiledSolidityFiles() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(5);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_EnvironmentBasedDeployedModel() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(6);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEthereumProject_EnvironmentBasedDeployedModel() {
- return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(6);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEthereumProject_ProjectBuilders() {
+ return (EAttribute) ethereumProjectEClass.getEStructuralFeatures().get(7);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getIResource() {
- return iResourceEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEthereumProject_Deploymentmodel() {
+ return (EReference) ethereumProjectEClass.getEStructuralFeatures().get(8);
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getIProjectDescription() {
- return iProjectDescriptionEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getIProjectDescription() {
+ return iProjectDescriptionEDataType;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getIProject() {
- return iProjectEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getIProject() {
+ return iProjectEDataType;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getIFile() {
- return iFileEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getstringList() {
+ return stringListEDataType;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getstringList() {
- return stringListEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getIResourceSet() {
+ return iResourceSetEDataType;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getIResourceSet() {
- return iResourceSetEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getDeploymentMap() {
+ return deploymentMapEDataType;
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EDataType getDeploymentMap() {
- return deploymentMapEDataType;
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EthprojectFactory getEthprojectFactory() {
+ return (EthprojectFactory) getEFactoryInstance();
+ }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EthprojectFactory getEthprojectFactory() {
- return (EthprojectFactory) getEFactoryInstance();
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated)
+ return;
+ isCreated = true;
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated)
- return;
- isCreated = true;
+ // Create classes and their features
+ deploymentModelEClass = createEClass(DEPLOYMENT_MODEL);
+ createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__CONTRACT_ADDRESS);
+ createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__SC_FILE);
+ createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__LAST_USED_ACCOUNT);
+ createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__ENVIRONMENT);
- // Create classes and their features
- deploymentModelEClass = createEClass(DEPLOYMENT_MODEL);
- createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__CONTRACT_ADDRESS);
- createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__SC_FILE);
- createEAttribute(deploymentModelEClass, DEPLOYMENT_MODEL__LAST_USED_ACCOUNT);
+ ethereumProjectEClass = createEClass(ETHEREUM_PROJECT);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_LOCATION);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_DESCRIPTION);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_NATURES);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL);
+ createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_BUILDERS);
+ createEReference(ethereumProjectEClass, ETHEREUM_PROJECT__DEPLOYMENTMODEL);
- ethereumProjectEClass = createEClass(ETHEREUM_PROJECT);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_LOCATION);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_DESCRIPTION);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__FIRST_MATCHING_SOL_FILE);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__PROJECT_NATURES);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__COMPILED_SOLIDITY_FILES);
- createEAttribute(ethereumProjectEClass, ETHEREUM_PROJECT__ENVIRONMENT_BASED_DEPLOYED_MODEL);
+ // Create data types
+ iProjectDescriptionEDataType = createEDataType(IPROJECT_DESCRIPTION);
+ iProjectEDataType = createEDataType(IPROJECT);
+ stringListEDataType = createEDataType(STRING_LIST);
+ iResourceSetEDataType = createEDataType(IRESOURCE_SET);
+ deploymentMapEDataType = createEDataType(DEPLOYMENT_MAP);
+ }
- // Create data types
- iResourceEDataType = createEDataType(IRESOURCE);
- iProjectDescriptionEDataType = createEDataType(IPROJECT_DESCRIPTION);
- iProjectEDataType = createEDataType(IPROJECT);
- iFileEDataType = createEDataType(IFILE);
- stringListEDataType = createEDataType(STRING_LIST);
- iResourceSetEDataType = createEDataType(IRESOURCE_SET);
- deploymentMapEDataType = createEDataType(DEPLOYMENT_MAP);
- }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized)
- return;
- isInitialized = true;
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
+ // Create type parameters
- // Create type parameters
+ // Set bounds for type parameters
- // Set bounds for type parameters
+ // Add supertypes to classes
- // Add supertypes to classes
+ // Initialize classes, features, and operations; add parameters
+ initEClass(deploymentModelEClass, DeploymentModel.class, "DeploymentModel", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDeploymentModel_ContractAddress(), ecorePackage.getEString(), "contractAddress", null, 0, 1,
+ DeploymentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDeploymentModel_ScFile(), ecorePackage.getEString(), "scFile", null, 0, 1,
+ DeploymentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDeploymentModel_LastUsedAccount(), ecorePackage.getEString(), "lastUsedAccount", null, 0, 1,
+ DeploymentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDeploymentModel_Environment(), ecorePackage.getEString(), "environment", null, 0, 1,
+ DeploymentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
- // Initialize classes, features, and operations; add parameters
- initEClass(deploymentModelEClass, DeploymentModel.class, "DeploymentModel", !IS_ABSTRACT, !IS_INTERFACE,
- IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getDeploymentModel_ContractAddress(), ecorePackage.getEString(), "contractAddress", null, 0, 1,
- DeploymentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getDeploymentModel_ScFile(), this.getIResource(), "scFile", null, 0, 1, DeploymentModel.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getDeploymentModel_LastUsedAccount(), ecorePackage.getEString(), "lastUsedAccount", null, 0, 1,
- DeploymentModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
+ initEClass(ethereumProjectEClass, EthereumProject.class, "EthereumProject", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEthereumProject_ProjectLocation(), ecorePackage.getEString(), "projectLocation", null, 0, 1,
+ EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_ProjectDescription(), this.getIProjectDescription(), "projectDescription",
+ null, 0, 1, EthereumProject.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_Project(), this.getIProject(), "project", null, 0, 1, EthereumProject.class,
+ IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_FirstMatchingSolFile(), ecorePackage.getEString(), "firstMatchingSolFile",
+ null, 0, 1, EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_ProjectNatures(), this.getstringList(), "projectNatures", null, 0, 1,
+ EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_CompiledSolidityFiles(), this.getIResourceSet(), "compiledSolidityFiles",
+ null, 0, 1, EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_EnvironmentBasedDeployedModel(), this.getDeploymentMap(),
+ "environmentBasedDeployedModel", null, 0, 1, EthereumProject.class, IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEthereumProject_ProjectBuilders(), this.getstringList(), "projectBuilders", null, 0, 1,
+ EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEReference(getEthereumProject_Deploymentmodel(), this.getDeploymentModel(), null, "deploymentmodel", null,
+ 0, -1, EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEClass(ethereumProjectEClass, EthereumProject.class, "EthereumProject", !IS_ABSTRACT, !IS_INTERFACE,
- IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEthereumProject_ProjectLocation(), ecorePackage.getEString(), "projectLocation", null, 0, 1,
- EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEthereumProject_ProjectDescription(), this.getIProjectDescription(), "projectDescription", null,
- 0, 1, EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEthereumProject_Project(), this.getIProject(), "project", null, 0, 1, EthereumProject.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEthereumProject_FirstMatchingSolFile(), this.getIFile(), "firstMatchingSolFile", null, 0, 1,
- EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEthereumProject_ProjectNatures(), this.getstringList(), "projectNatures", null, 0, 1,
- EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEthereumProject_CompiledSolidityFiles(), this.getIResourceSet(), "compiledSolidityFiles", null, 0,
- 1, EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEthereumProject_EnvironmentBasedDeployedModel(), this.getDeploymentMap(),
- "environmentBasedDeployedModel", null, 0, 1, EthereumProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
- !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ // Initialize data types
+ initEDataType(iProjectDescriptionEDataType, IProjectDescription.class, "IProjectDescription", IS_SERIALIZABLE,
+ !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(iProjectEDataType, IProject.class, "IProject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(stringListEDataType, List.class, "stringList", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS,
+ "java.util.List<java.lang.String>");
+ initEDataType(iResourceSetEDataType, Set.class, "IResourceSet", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS,
+ "java.util.Set<java.lang.String>");
+ initEDataType(deploymentMapEDataType, Map.class, "DeploymentMap", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS,
+ "java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.eclipse.blockchain.model.ethproject.DeploymentModel>>");
- // Initialize data types
- initEDataType(iResourceEDataType, IResource.class, "IResource", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
- initEDataType(iProjectDescriptionEDataType, IProjectDescription.class, "IProjectDescription", IS_SERIALIZABLE,
- !IS_GENERATED_INSTANCE_CLASS);
- initEDataType(iProjectEDataType, IProject.class, "IProject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
- initEDataType(iFileEDataType, IFile.class, "IFile", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
- initEDataType(stringListEDataType, List.class, "stringList", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS,
- "java.util.List<java.lang.String>");
- initEDataType(iResourceSetEDataType, Set.class, "IResourceSet", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS,
- "java.util.Set<org.eclipse.core.resources.IResource>");
- initEDataType(deploymentMapEDataType, Map.class, "DeploymentMap", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS,
- "java.util.Map<java.lang.String, java.util.Map<org.eclipse.core.resources.IResource, org.eclipse.blockchain.model.ethproject.DeploymentModel>>");
-
- // Create resource
- createResource(eNS_URI);
- }
+ // Create resource
+ createResource(eNS_URI);
+ }
} //EthprojectPackageImpl
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectAdapterFactory.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectAdapterFactory.java
index 4fd4395..94e89b9 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectAdapterFactory.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectAdapterFactory.java
@@ -1,4 +1,16 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject.util;
@@ -20,122 +32,126 @@
* @generated
*/
public class EthprojectAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static EthprojectPackage modelPackage;
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static EthprojectPackage modelPackage;
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EthprojectAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = EthprojectPackage.eINSTANCE;
- }
- }
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EthprojectAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = EthprojectPackage.eINSTANCE;
+ }
+ }
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EthprojectSwitch<Adapter> modelSwitch = new EthprojectSwitch<Adapter>() {
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EthprojectSwitch<Adapter> modelSwitch = new EthprojectSwitch<Adapter>() {
+ @Override
+ public Adapter caseDeploymentModel(DeploymentModel object) {
+ return createDeploymentModelAdapter();
+ }
- @Override
- public Adapter caseDeploymentModel(DeploymentModel object) {
- return createDeploymentModelAdapter();
- }
+ @Override
+ public Adapter caseEthereumProject(EthereumProject object) {
+ return createEthereumProjectAdapter();
+ }
- @Override
- public Adapter caseEthereumProject(EthereumProject object) {
- return createEthereumProjectAdapter();
- }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject) target);
- }
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel <em>Deployment Model</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.blockchain.model.ethproject.DeploymentModel
+ * @generated
+ */
+ public Adapter createDeploymentModelAdapter() {
+ return null;
+ }
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.blockchain.model.ethproject.EthereumProject <em>Ethereum Project</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.blockchain.model.ethproject.EthereumProject
+ * @generated
+ */
+ public Adapter createEthereumProjectAdapter() {
+ return null;
+ }
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.blockchain.model.ethproject.DeploymentModel <em>Deployment Model</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.blockchain.model.ethproject.DeploymentModel
- * @generated
- */
- public Adapter createDeploymentModelAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.blockchain.model.ethproject.EthereumProject <em>Ethereum Project</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.blockchain.model.ethproject.EthereumProject
- * @generated
- */
- public Adapter createEthereumProjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
} //EthprojectAdapterFactory
diff --git a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectSwitch.java b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectSwitch.java
index 59a03d3..e23ff89 100644
--- a/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectSwitch.java
+++ b/org.eclipse.blockchain.model/src-gen/org/eclipse/blockchain/model/ethproject/util/EthprojectSwitch.java
@@ -1,4 +1,16 @@
/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
*/
package org.eclipse.blockchain.model.ethproject.util;
@@ -23,113 +35,119 @@
* @generated
*/
public class EthprojectSwitch<T> extends Switch<T> {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2020 RBEI and others.\n\nThis program and the accompanying materials\nare made available under the terms of the Eclipse Public License v. 2.0\nwhich accompanies this distribution, and is available at\nhttps://www.eclipse.org/legal/epl-2.0/\n\nSPDX-License-Identifier: EPL-2.0\n\nContributors:\n Adhith Gopal - Initial API and Implementation\n ";
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static EthprojectPackage modelPackage;
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static EthprojectPackage modelPackage;
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EthprojectSwitch() {
- if (modelPackage == null) {
- modelPackage = EthprojectPackage.eINSTANCE;
- }
- }
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EthprojectSwitch() {
+ if (modelPackage == null) {
+ modelPackage = EthprojectPackage.eINSTANCE;
+ }
+ }
- /**
- * Checks whether this is a switch for the given package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param ePackage the package in question.
- * @return whether this is a switch for the given package.
- * @generated
- */
- @Override
- protected boolean isSwitchFor(EPackage ePackage) {
- return ePackage == modelPackage;
- }
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- @Override
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case EthprojectPackage.DEPLOYMENT_MODEL: {
- DeploymentModel deploymentModel = (DeploymentModel) theEObject;
- T result = caseDeploymentModel(deploymentModel);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case EthprojectPackage.ETHEREUM_PROJECT: {
- EthereumProject ethereumProject = (EthereumProject) theEObject;
- T result = caseEthereumProject(ethereumProject);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- default:
- return defaultCase(theEObject);
- }
- }
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case EthprojectPackage.DEPLOYMENT_MODEL: {
+ DeploymentModel deploymentModel = (DeploymentModel) theEObject;
+ T result = caseDeploymentModel(deploymentModel);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case EthprojectPackage.ETHEREUM_PROJECT: {
+ EthereumProject ethereumProject = (EthereumProject) theEObject;
+ T result = caseEthereumProject(ethereumProject);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
- /**
- * Returns the result of interpreting the object as an instance of '<em>Deployment Model</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Deployment Model</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDeploymentModel(DeploymentModel object) {
- return null;
- }
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Deployment Model</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Deployment Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDeploymentModel(DeploymentModel object) {
+ return null;
+ }
- /**
- * Returns the result of interpreting the object as an instance of '<em>Ethereum Project</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Ethereum Project</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseEthereumProject(EthereumProject object) {
- return null;
- }
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Ethereum Project</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Ethereum Project</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEthereumProject(EthereumProject object) {
+ return null;
+ }
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- @Override
- public T defaultCase(EObject object) {
- return null;
- }
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
} //EthprojectSwitch
diff --git a/org.eclipse.blockchain.model/src/org/eclipse/blockchain/model/core/EthereumProjectHandler.java b/org.eclipse.blockchain.model/src/org/eclipse/blockchain/model/core/EthereumProjectHandler.java
new file mode 100644
index 0000000..97a0274
--- /dev/null
+++ b/org.eclipse.blockchain.model/src/org/eclipse/blockchain/model/core/EthereumProjectHandler.java
@@ -0,0 +1,266 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.model.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.eclipse.blockchain.model.ethproject.DeploymentModel;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
+import org.eclipse.blockchain.model.ethproject.EthprojectFactory;
+import org.eclipse.blockchain.model.ethproject.EthprojectPackage;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ *
+ * EMF Notification mechanism is not used here, if required then Adapter's have
+ * to be created and registered in the list of adapters
+ */
+public class EthereumProjectHandler {
+ private static EthereumProjectHandler instance = null;
+ private final Map<String, EthereumProject> projectMap = new HashMap<>();
+
+ private EthereumProjectHandler() {
+ }
+
+ /**
+ * @return This provides an Ethereum Project Handle which can be used to
+ * manipulate the Ethereum Project
+ */
+ public static EthereumProjectHandler getInstance() {
+ if (null == instance) {
+ instance = new EthereumProjectHandler();
+ /**
+ * This is just to initialize the EMF model and listeners
+ */
+ EthprojectPackage.eINSTANCE.eClass();
+ }
+ return instance;
+ }
+
+ /**
+ * This returns the Ethereum Project instance that matches the project name. If
+ * none match then a new Ethereum Project instance is created
+ *
+ * @param projectName - The name of the project
+ * @return - EthereumProject
+ */
+ public EthereumProject getEthProject(final String projectName) {
+ return this.projectMap.computeIfAbsent(projectName, (v) -> {
+ EthereumProject ethProj = EthprojectFactory.eINSTANCE.createEthereumProject();
+ /**
+ * Initialize all collections so that no NPE gets thrown
+ */
+ ethProj.setProjectBuilders(new ArrayList<>());
+ ethProj.setProjectNatures(new ArrayList<>());
+ ethProj.setCompiledSolidityFiles(new HashSet<>());
+ ethProj.setEnvironmentBasedDeployedModel(new HashMap<>());
+ return ethProj;
+ });
+ }
+
+ /**
+ * Remove the project from the map
+ *
+ * @param projectName - The name of project which should be removed.
+ */
+ public void removeEthProject(final String projectName) {
+ this.projectMap.remove(projectName);
+ }
+
+ /**
+ * Adds the given nature to the list of project natures of ethereum project
+ *
+ * @param ethProject - The Ethereum Project for which nature should be added
+ * @param natureId - The nature id string
+ */
+ public void addProjectNature(final EthereumProject ethProject, final String natureId) {
+ ethProject.getProjectNatures().add(natureId);
+ }
+
+ /**
+ * Adds the given builder to the list of project builders of ethereum project
+ *
+ * @param ethProject - The Ethereum Project for which nature should be added
+ * @param builderId - The builder id string
+ */
+ public void addProjectBuilder(final EthereumProject ethProject, final String builderId) {
+ ethProject.getProjectBuilders().add(builderId);
+ }
+
+ /**
+ * @param projectName - The ethereum Project name for which first matching sol
+ * file should be returned
+ * @return - The first matching sol file, if none then null
+ * @throws CoreException -
+ */
+ public IFile getSolFile(final String projectName) throws CoreException {
+ EthereumProject ethProject = this.projectMap.get(projectName);
+ IProject project = ethProject.getProject();
+ if (project != null) {
+ project.accept(new IResourceVisitor() {
+
+ @Override
+ public boolean visit(final IResource resource) throws CoreException {
+ if ((resource instanceof IFile) && (resource.getFileExtension() != null)
+ && resource.getFileExtension().equals("sol")) {
+ ethProject.setFirstMatchingSolFile(resource.getProjectRelativePath().toOSString());
+ return false;
+ }
+ return true;
+ }
+ });
+ return (IFile) project.findMember(ethProject.getFirstMatchingSolFile());
+ }
+ return null;
+ }
+
+ /**
+ * This method is used to add the compiled solidity files to the set that is
+ * maintained in this project
+ *
+ * @param solidityFile - The compiled solidity file that belongs to this project
+ */
+ public void addCompiledSolidityFiles(final IResource solidityFile) {
+ EthereumProject ethProject = this.projectMap.get(solidityFile.getProject().getName());
+ ethProject.getCompiledSolidityFiles().add(solidityFile.getProjectRelativePath().toOSString());
+ }
+
+ /**
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - Whether the SC is deployed into the passed in environment
+ */
+ public boolean isSCDeployed(final IResource scFile, final String environment) {
+ Map<String, DeploymentModel> map = this.projectMap.get(scFile.getProject().getName())
+ .getEnvironmentBasedDeployedModel().get(environment);
+ return (map != null) && map.containsKey(scFile.getProjectRelativePath().toOSString());
+ }
+
+ /**
+ * This creates a deployment model for a smart contract that is deployed into a
+ * blockchain
+ *
+ * @param contractAddress - The contract address of the deployed SC
+ * @param scFile - The SC resource
+ * @param lastUsedAccount - The account that was last used for performing a
+ * transaction
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void createDeploymentModel(final String contractAddress, final IResource scFile,
+ final String lastUsedAccount, final String environment) {
+ DeploymentModel deploymentModel = EthprojectFactory.eINSTANCE.createDeploymentModel();
+ deploymentModel.setContractAddress(contractAddress);
+ deploymentModel.setScFile(scFile.getProjectRelativePath().toOSString());
+ deploymentModel.setLastUsedAccount(lastUsedAccount);
+ deploymentModel.setEnvironment(environment);
+
+ EthereumProject ethProject = this.projectMap.get(scFile.getProject().getName());
+ /**
+ * The below addition will add all the DM's that get created to the ETHProj
+ * model and will be serialized during modal save.
+ */
+ ethProject.getDeploymentmodel().add(deploymentModel);
+ Map<String, DeploymentModel> depModelMap = ethProject.getEnvironmentBasedDeployedModel()
+ .computeIfAbsent(environment, m -> new HashMap<>());
+ depModelMap.put(scFile.getProjectRelativePath().toOSString(), deploymentModel);
+ }
+
+ /**
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - The account that was last used for performing a transaction
+ */
+ public String getLastUsedAccount(final IResource scFile, final String environment) {
+ Map<String, DeploymentModel> map = this.projectMap.get(scFile.getProject().getName())
+ .getEnvironmentBasedDeployedModel().get(environment);
+ if ((map != null) && map.containsKey(scFile.getProjectRelativePath().toOSString())) {
+ return map.get(scFile.getProjectRelativePath().toOSString()).getLastUsedAccount();
+ }
+ return "";
+ }
+
+ /**
+ * This is used to update the last used account(for transacting with blockchain)
+ *
+ * @param scFile - The SC resource
+ * @param accountDetails - The new account that was used for transaction
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void updateLastUsedAccount(final IResource scFile, final String accountDetails, final String environment) {
+ Map<String, DeploymentModel> map = this.projectMap.get(scFile.getProject().getName())
+ .getEnvironmentBasedDeployedModel().get(environment);
+ if ((map != null) && map.containsKey(scFile.getProjectRelativePath().toOSString())) {
+ map.get(scFile.getProjectRelativePath().toOSString()).setLastUsedAccount(accountDetails);
+ }
+ }
+
+ /**
+ *
+ * @param scFile - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ * @return - The contract address of the deployed SC
+ */
+ public String getContractAddress(final IResource scFile, final String environment) {
+ Map<String, DeploymentModel> map = this.projectMap.get(scFile.getProject().getName())
+ .getEnvironmentBasedDeployedModel().get(environment);
+ if ((map != null) && map.containsKey(scFile.getProjectRelativePath().toOSString())) {
+ return map.get(scFile.getProjectRelativePath().toOSString()).getContractAddress();
+ }
+ return "";
+ }
+
+ /**
+ * This method is used to remove the SC resource from the map which holds
+ * deployed resources
+ *
+ * @param projectName - The ethereum project name from which SC should be
+ * removed
+ * @param resource - The SC resource
+ * @param environment - This denotes the environment into which this SC is
+ * deployed(Embedded/Geth)
+ */
+ public void removeDeploymentModelForResource(final IResource resource, final String environment) {
+ EthereumProject ethProject = this.projectMap.get(resource.getProject().getName());
+ if (null == ethProject) {
+ return;
+ }
+ Map<String, Map<String, DeploymentModel>> envMap = ethProject.getEnvironmentBasedDeployedModel();
+ if (null == envMap) {
+ return;
+ }
+ Map<String, DeploymentModel> map = envMap.get(environment);
+ if ((map != null) && map.containsKey(resource.getProjectRelativePath().toOSString())) {
+ DeploymentModel dm = map.remove(resource.getProjectRelativePath().toOSString());
+ /**
+ * Also remove from ethProject
+ */
+ ethProject.getDeploymentmodel().remove(dm);
+ }
+ }
+}
diff --git a/org.eclipse.blockchain.model/src/org/eclipse/blockchain/model/core/EthereumProjectModelHandler.java b/org.eclipse.blockchain.model/src/org/eclipse/blockchain/model/core/EthereumProjectModelHandler.java
new file mode 100644
index 0000000..b669169
--- /dev/null
+++ b/org.eclipse.blockchain.model/src/org/eclipse/blockchain/model/core/EthereumProjectModelHandler.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.model.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.blockchain.model.ethproject.DeploymentModel;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+
+public class EthereumProjectModelHandler {
+ private static EthereumProjectModelHandler instance = null;
+
+ private EthereumProjectModelHandler() {
+ }
+
+ /**
+ * @return
+ */
+ public static EthereumProjectModelHandler getInstance() {
+ if (null == instance) {
+ instance = new EthereumProjectModelHandler();
+ }
+ return instance;
+ }
+
+ /**
+ * @param projectsToSave
+ * @throws IOException
+ */
+ public void saveProjects(final List<EthereumProject> projectsToSave) throws IOException {
+ for (EthereumProject ethProj : projectsToSave) {
+ saveProject(ethProj);
+ }
+ }
+
+ /**
+ * @param projectsToSave
+ * @throws IOException
+ */
+ public void saveProject(final EthereumProject projectToSave) throws IOException {
+ // Assign XMI resource factory IMPL for ethproject
+ Resource.Factory.Registry registry = Resource.Factory.Registry.INSTANCE;
+ registry.getExtensionToFactoryMap().put("ethproject", new XMIResourceFactoryImpl());
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = resourceSet
+ .createResource(URI.createFileURI(projectToSave.getProjectLocation() + File.separator + ".ethproject"));
+
+ resource.getContents().add(projectToSave);
+
+ resource.save(Collections.emptyMap());
+
+ }
+
+ /**
+ * @param ethProjectPath
+ * @return
+ */
+ public EthereumProject loadProject(final String ethProjectPath) {
+ Resource.Factory.Registry registry = Resource.Factory.Registry.INSTANCE;
+ registry.getExtensionToFactoryMap().put("ethproject", new XMIResourceFactoryImpl());
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = resourceSet.getResource(URI.createFileURI(ethProjectPath), true);
+
+ EthereumProject ethProject = (EthereumProject) resource.getContents().get(0);
+ Map<String, Map<String, DeploymentModel>> deploymentMap = new HashMap<>();
+ reconstructEnvironmentBasedDeploymentMap(deploymentMap, ethProject.getDeploymentmodel());
+ ethProject.setEnvironmentBasedDeployedModel(deploymentMap);
+ return ethProject;
+ }
+
+ private void reconstructEnvironmentBasedDeploymentMap(final Map<String, Map<String, DeploymentModel>> map,
+ final List<DeploymentModel> list) {
+ for (DeploymentModel dm : list) {
+ map.computeIfAbsent(dm.getEnvironment(), v -> new HashMap<>()).put(dm.getScFile(), dm);
+ }
+ }
+}
diff --git a/org.eclipse.blockchain.product/.gitignore b/org.eclipse.blockchain.product/.gitignore
index ae3c172..7447f89 100644
--- a/org.eclipse.blockchain.product/.gitignore
+++ b/org.eclipse.blockchain.product/.gitignore
@@ -1 +1 @@
-/bin/
+/bin
\ No newline at end of file
diff --git a/org.eclipse.blockchain.product/about.html b/org.eclipse.blockchain.product/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.product/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.product/license.txt b/org.eclipse.blockchain.product/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.product/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.product/src/org/eclipse/blockchain/application/BlockchainApplication.java b/org.eclipse.blockchain.product/src/org/eclipse/blockchain/application/BlockchainApplication.java
index 4cb077a..b54207d 100644
--- a/org.eclipse.blockchain.product/src/org/eclipse/blockchain/application/BlockchainApplication.java
+++ b/org.eclipse.blockchain.product/src/org/eclipse/blockchain/application/BlockchainApplication.java
@@ -1,32 +1,42 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.application;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
/**
- * @author ADG5COB
+ * Eclipse Application class
*/
public class BlockchainApplication implements IApplication {
- /**
- * {@inheritDoc}
- */
- @Override
- public Object start(final IApplicationContext context) throws Exception {
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object start(final IApplicationContext context) throws Exception {
- return null;
- }
+ return null;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop() {
- // TODO Auto-generated method stub
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop() {
+ // TODO Auto-generated method stub
- }
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.rcp/about.html b/org.eclipse.blockchain.rcp/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.rcp/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.rcp/blockchain.product b/org.eclipse.blockchain.rcp/blockchain.product
index b4121c8..4e38125 100644
--- a/org.eclipse.blockchain.rcp/blockchain.product
+++ b/org.eclipse.blockchain.rcp/blockchain.product
@@ -48,8 +48,6 @@
<plugin id="com.jcraft.jsch"/>
<plugin id="com.jcraft.jzlib"/>
<plugin id="com.yakindu.solidity"/>
- <plugin id="com.yakindu.solidity.compiler"/>
- <plugin id="com.yakindu.solidity.compiler.win.fragment" fragment="true"/>
<plugin id="com.yakindu.solidity.ide"/>
<plugin id="com.yakindu.solidity.ui"/>
<plugin id="java_cup.runtime"/>
@@ -97,6 +95,7 @@
<plugin id="org.eclipse.ant.ui"/>
<plugin id="org.eclipse.blockchain.application" fragment="true"/>
<plugin id="org.eclipse.blockchain.core"/>
+ <plugin id="org.eclipse.blockchain.model"/>
<plugin id="org.eclipse.blockchain.product"/>
<plugin id="org.eclipse.blockchain.server.core"/>
<plugin id="org.eclipse.blockchain.server.ui"/>
diff --git a/org.eclipse.blockchain.rcp/license.txt b/org.eclipse.blockchain.rcp/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.rcp/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.releng/about.html b/org.eclipse.blockchain.releng/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.releng/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.releng/license.txt b/org.eclipse.blockchain.releng/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.releng/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.core/.gitignore b/org.eclipse.blockchain.server.core/.gitignore
index ae3c172..7447f89 100644
--- a/org.eclipse.blockchain.server.core/.gitignore
+++ b/org.eclipse.blockchain.server.core/.gitignore
@@ -1 +1 @@
-/bin/
+/bin
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.core/about.html b/org.eclipse.blockchain.server.core/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.server.core/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.core/license.txt b/org.eclipse.blockchain.server.core/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.server.core/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/runtime/GethRuntime.java b/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/runtime/GethRuntime.java
index f33704b..0c17ee7 100644
--- a/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/runtime/GethRuntime.java
+++ b/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/runtime/GethRuntime.java
@@ -1,15 +1,23 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.runtime;
import org.eclipse.wst.server.core.model.RuntimeDelegate;
/**
* This is just a proto-type class and not constructed fully.
- *
- * @author ADG5COB
*/
public class GethRuntime extends RuntimeDelegate {
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServer.java b/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServer.java
index 4c84dda..ae0f1cf 100644
--- a/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServer.java
+++ b/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServer.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.server;
import org.eclipse.core.runtime.CoreException;
@@ -12,46 +22,45 @@
/**
* This is just a proto-type class and not constructed fully.
- *
- * @author ADG5COB
*/
public class GethServer extends ServerDelegate {
- /**
- * {@inheritDoc}
- */
- @Override
- public IStatus canModifyModules(final IModule[] add, final IModule[] remove) {
- // TODO Auto-generated method stub
- return new Status(IStatus.ERROR, "", "No Modifications");
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IStatus canModifyModules(final IModule[] add,
+ final IModule[] remove) {
+ // TODO Auto-generated method stub
+ return new Status(IStatus.ERROR, "", "No Modifications");
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public IModule[] getChildModules(final IModule[] module) {
- // TODO Auto-generated method stub
- return null;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IModule[] getChildModules(final IModule[] module) {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public IModule[] getRootModules(final IModule module) throws CoreException {
- // TODO Auto-generated method stub
- return null;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IModule[] getRootModules(final IModule module) throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void modifyModules(final IModule[] add, final IModule[] remove, final IProgressMonitor monitor)
- throws CoreException {
- // TODO Auto-generated method stub
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void modifyModules(final IModule[] add, final IModule[] remove,
+ final IProgressMonitor monitor) throws CoreException {
+ // TODO Auto-generated method stub
- }
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServerBehaviour.java b/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServerBehaviour.java
index 7b785bf..d8bcc9e 100644
--- a/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServerBehaviour.java
+++ b/org.eclipse.blockchain.server.core/src/org/eclipse/blockchain/ui/server/GethServerBehaviour.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.server;
import org.eclipse.blockchain.core.CoreCommandExecutor;
@@ -9,18 +19,16 @@
/**
* This is just a proto-type class and not constructed fully.
- *
- * @author ADG5COB
*/
public class GethServerBehaviour extends ServerBehaviourDelegate {
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop(final boolean force) {
- setServerState(IServer.STATE_STOPPING);
- CoreCommandExecutor.getInstance().terminateGethServer();
- setServerState(IServer.STATE_STOPPED);
- }
-}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop(final boolean force) {
+ setServerState(IServer.STATE_STOPPING);
+ CoreCommandExecutor.getInstance().terminateGethServer();
+ setServerState(IServer.STATE_STOPPED);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.ui/.gitignore b/org.eclipse.blockchain.server.ui/.gitignore
index ae3c172..7447f89 100644
--- a/org.eclipse.blockchain.server.ui/.gitignore
+++ b/org.eclipse.blockchain.server.ui/.gitignore
@@ -1 +1 @@
-/bin/
+/bin
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.ui/about.html b/org.eclipse.blockchain.server.ui/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.server.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.ui/license.txt b/org.eclipse.blockchain.server.ui/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.server.ui/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardComposite.java b/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardComposite.java
index c4fd68a..e5706cd 100644
--- a/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardComposite.java
+++ b/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardComposite.java
@@ -1,6 +1,18 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ * Pavithra Krishna Reddy
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.server.ui.wizard.fragment;
import java.io.BufferedReader;
@@ -32,244 +44,265 @@
/**
* This is just a proto-type class and not constructed fully.
- *
- * @author ADG5COB
*/
public class GethWizardComposite extends Composite {
- private IWizardHandle wizard = null;
- private Text dataDirText;
- private Text initFileText;
- private final String userDir = System.getProperty("user.dir");
- private String networkId = "";
- private Label networkIdLabel;
- private final Map<String, String> gethOptions = new HashMap<>();
- private String dataDirectory = "";
- private String genesisFile = "";
+ private IWizardHandle wizard = null;
+ private Text dataDirText;
+ private Text initFileText;
+ private final String userDir = System.getProperty("user.dir");
+ private String networkId = "";
+ private Label networkIdLabel;
+ private final Map<String, String> gethOptions = new HashMap<>();
+ private String dataDirectory = "";
+ private String genesisFile = "";
- /**
- * @return -
- */
- protected String getDataDirectory() {
- return this.dataDirectory;
- }
+ /**
+ * @return -
+ */
+ protected String getDataDirectory() {
+ return this.dataDirectory;
+ }
- /**
- * @return -
- */
- protected String getGenesisFile() {
- return this.genesisFile;
- }
+ /**
+ * @return -
+ */
+ protected String getGenesisFile() {
+ return this.genesisFile;
+ }
- /**
- * @return -
- */
- protected Map<String, String> getGethOptions() {
- return this.gethOptions;
- }
+ /**
+ * @return -
+ */
+ protected Map<String, String> getGethOptions() {
+ return this.gethOptions;
+ }
- /**
- *
- */
- GethWizardComposite(final Composite parent, final IWizardHandle wizard) {
- super(parent, SWT.NONE);
- this.wizard = wizard;
- this.wizard.setTitle("Geth Server");
- this.wizard.setDescription("This is used to start a geth server instance");
+ /**
+ *
+ */
+ GethWizardComposite(final Composite parent, final IWizardHandle wizard) {
+ super(parent, SWT.NONE);
+ this.wizard = wizard;
+ this.wizard.setTitle("Geth Server");
+ this.wizard
+ .setDescription("This is used to start a geth server instance");
- populateGethOptions();
+ populateGethOptions();
- createDialogArea();
- }
+ createDialogArea();
+ }
- private void createDialogArea() {
- GridLayout layout = new GridLayout();
- setLayout(layout);
- setLayoutData(new GridData(GridData.FILL_BOTH));
+ private void createDialogArea() {
+ GridLayout layout = new GridLayout();
+ setLayout(layout);
+ setLayoutData(new GridData(GridData.FILL_BOTH));
- Composite containerComp = new Composite(this, SWT.None);
- containerComp.setLayout(new GridLayout(3, false));
- containerComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Composite containerComp = new Composite(this, SWT.None);
+ containerComp.setLayout(new GridLayout(3, false));
+ containerComp
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- createContent(containerComp);
- }
+ createContent(containerComp);
+ }
- private void createContent(final Composite containerComp) {
- // First Layer
- Label dataDirLabel = new Label(containerComp, SWT.None);
- dataDirLabel.setText("Data Directory");
- dataDirLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ private void createContent(final Composite containerComp) {
+ // First Layer
+ Label dataDirLabel = new Label(containerComp, SWT.None);
+ dataDirLabel.setText("Data Directory");
+ dataDirLabel
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- this.dataDirText = new Text(containerComp, SWT.BORDER);
- this.dataDirText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- this.dataDirText.setText("");
- this.dataDirText.setToolTipText(this.dataDirText.getText());
+ this.dataDirText = new Text(containerComp, SWT.BORDER);
+ this.dataDirText
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ this.dataDirText.setText("");
+ this.dataDirText.setToolTipText(this.dataDirText.getText());
- this.dataDirText.addModifyListener(new ModifyListener() {
+ this.dataDirText.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(final ModifyEvent e) {
- GethWizardComposite.this.dataDirectory = GethWizardComposite.this.dataDirText.getText();
- GethWizardComposite.this.wizard.update();
- }
- });
+ @Override
+ public void modifyText(final ModifyEvent e) {
+ GethWizardComposite.this.dataDirectory = GethWizardComposite.this.dataDirText
+ .getText();
+ GethWizardComposite.this.wizard.update();
+ }
+ });
- Button dataDirBrowse = new Button(containerComp, SWT.PUSH);
- dataDirBrowse.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- dataDirBrowse.setText("Browse");
- dataDirBrowse.addSelectionListener(new SelectionAdapter() {
+ Button dataDirBrowse = new Button(containerComp, SWT.PUSH);
+ dataDirBrowse
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ dataDirBrowse.setText("Browse");
+ dataDirBrowse.addSelectionListener(new SelectionAdapter() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- getAndSetSelectedDirectoryNode(containerComp, GethWizardComposite.this.dataDirText);
- GethWizardComposite.this.dataDirectory = GethWizardComposite.this.dataDirText.getText();
- GethWizardComposite.this.wizard.update();
- }
- });
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ getAndSetSelectedDirectoryNode(containerComp,
+ GethWizardComposite.this.dataDirText);
+ GethWizardComposite.this.dataDirectory = GethWizardComposite.this.dataDirText
+ .getText();
+ GethWizardComposite.this.wizard.update();
+ }
+ });
- // Second Layer
- Label initFileLabel = new Label(containerComp, SWT.None);
- initFileLabel.setText("Init File");
- initFileLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ // Second Layer
+ Label initFileLabel = new Label(containerComp, SWT.None);
+ initFileLabel.setText("Init File");
+ initFileLabel
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- this.initFileText = new Text(containerComp, SWT.BORDER);
- this.initFileText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- this.initFileText.setText("");
- this.initFileText.setToolTipText("Under development!!!");
- this.initFileText.setEnabled(false);
+ this.initFileText = new Text(containerComp, SWT.BORDER);
+ this.initFileText
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ this.initFileText.setText("");
+ this.initFileText.setToolTipText("Under development!!!");
+ this.initFileText.setEnabled(false);
- Button initFileBrowse = new Button(containerComp, SWT.PUSH);
- initFileBrowse.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- initFileBrowse.setText("Browse");
- initFileBrowse.addSelectionListener(new SelectionAdapter() {
+ Button initFileBrowse = new Button(containerComp, SWT.PUSH);
+ initFileBrowse
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ initFileBrowse.setText("Browse");
+ initFileBrowse.addSelectionListener(new SelectionAdapter() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- getandSetSelectedGenesisFile(containerComp, GethWizardComposite.this.initFileText);
- }
- });
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ getandSetSelectedGenesisFile(containerComp,
+ GethWizardComposite.this.initFileText);
+ }
+ });
- // Scrolled Composite - contains network values
- ScrolledComposite networkComposite = new ScrolledComposite(containerComp, SWT.V_SCROLL | SWT.BORDER);
- networkComposite.setLayout(new GridLayout(1, false));
- networkComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 3, 0));
- Composite networkChild = createdScrolledContent(networkComposite);
+ // Scrolled Composite - contains network values
+ ScrolledComposite networkComposite = new ScrolledComposite(
+ containerComp, SWT.V_SCROLL | SWT.BORDER);
+ networkComposite.setLayout(new GridLayout(1, false));
+ networkComposite.setLayoutData(
+ new GridData(SWT.FILL, SWT.FILL, false, false, 3, 0));
+ Composite networkChild = createdScrolledContent(networkComposite);
- networkComposite.setContent(networkChild);
- networkComposite.setMinSize(networkComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- networkComposite.setExpandHorizontal(true);
- networkComposite.setExpandVertical(true);
- networkComposite.layout();
- }
+ networkComposite.setContent(networkChild);
+ networkComposite.setMinSize(
+ networkComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ networkComposite.setExpandHorizontal(true);
+ networkComposite.setExpandVertical(true);
+ networkComposite.layout();
+ }
- private Composite createdScrolledContent(final ScrolledComposite scrolledComposite) {
- /**
- * This contains the geth arguments which should be made configurable, as of now its static but networkId will be
- * read from the genesis file
- */
- Composite childComp = new Composite(scrolledComposite, SWT.None);
- childComp.setLayout(new GridLayout(1, false));
- childComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ private Composite createdScrolledContent(
+ final ScrolledComposite scrolledComposite) {
+ /**
+ * This contains the geth arguments which should be made configurable,
+ * as of now its static but networkId will be read from the genesis file
+ */
+ Composite childComp = new Composite(scrolledComposite, SWT.None);
+ childComp.setLayout(new GridLayout(1, false));
+ childComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Group networkGroup = new Group(childComp, SWT.BORDER);
- networkGroup.setLayout(new GridLayout(1, false));
- networkGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- networkGroup.setText("Network");
+ Group networkGroup = new Group(childComp, SWT.BORDER);
+ networkGroup.setLayout(new GridLayout(1, false));
+ networkGroup
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ networkGroup.setText("Network");
- this.networkIdLabel = new Label(networkGroup, SWT.None | SWT.READ_ONLY);
- this.networkIdLabel.setText("Network ID : " +
- (this.networkId.isEmpty() ? CoreCommandExecutor.getInstance().getDefaultNetworkIdForGeth() : this.networkId));
+ this.networkIdLabel = new Label(networkGroup, SWT.None | SWT.READ_ONLY);
+ this.networkIdLabel.setText("Network ID : " + (this.networkId.isEmpty()
+ ? CoreCommandExecutor.getInstance().getDefaultNetworkIdForGeth()
+ : this.networkId));
- Group rpcGroup = new Group(childComp, SWT.BORDER);
- rpcGroup.setLayout(new GridLayout(1, false));
- rpcGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- rpcGroup.setText("RPC");
+ Group rpcGroup = new Group(childComp, SWT.BORDER);
+ rpcGroup.setLayout(new GridLayout(1, false));
+ rpcGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ rpcGroup.setText("RPC");
- for (Map.Entry<String, String> entry : this.gethOptions.entrySet()) {
- Label lab = new Label(rpcGroup, SWT.None);
- String val = entry.getValue();
- lab.setText(entry.getKey() + (val.isEmpty() ? "" : " : " + val));
- }
- return childComp;
- }
+ for (Map.Entry<String, String> entry : this.gethOptions.entrySet()) {
+ Label lab = new Label(rpcGroup, SWT.None);
+ String val = entry.getValue();
+ lab.setText(entry.getKey() + (val.isEmpty() ? "" : " : " + val));
+ }
+ return childComp;
+ }
- private void getandSetSelectedGenesisFile(final Composite parent, final Text textWidget) {
- FileDialog dataDir = new FileDialog(parent.getShell());
- dataDir.setFilterPath(this.userDir);
- String selectedDir = dataDir.open();
- if (selectedDir != null) {
- textWidget.setText(selectedDir);
- try (BufferedReader br = new BufferedReader(new FileReader(new File(selectedDir)))) {
- String contents = "";
- while ((contents = br.readLine()) != null) {
- if (contents.contains("chainId")) {
- this.networkId = contents.substring(contents.indexOf(':') + 1).replace(",", "").trim();
- this.networkIdLabel.setText("Network ID : " + this.networkId);
- this.networkIdLabel.getParent().layout();
- }
- }
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException("org.eclipse.blockchain.server.ui", e.getMessage(), e);
- }
- }
- }
+ private void getandSetSelectedGenesisFile(final Composite parent,
+ final Text textWidget) {
+ FileDialog dataDir = new FileDialog(parent.getShell());
+ dataDir.setFilterPath(this.userDir);
+ String selectedDir = dataDir.open();
+ if (selectedDir != null) {
+ textWidget.setText(selectedDir);
+ try (BufferedReader br = new BufferedReader(
+ new FileReader(new File(selectedDir)))) {
+ String contents = "";
+ while ((contents = br.readLine()) != null) {
+ if (contents.contains("chainId")) {
+ this.networkId = contents
+ .substring(contents.indexOf(':') + 1)
+ .replace(",", "").trim();
+ this.networkIdLabel
+ .setText("Network ID : " + this.networkId);
+ this.networkIdLabel.getParent().layout();
+ }
+ }
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException(
+ "org.eclipse.blockchain.server.ui", e.getMessage(), e);
+ }
+ }
+ }
- /**
- * @return - true if wizard is complete with out any errors, false otherwise
- */
- public boolean isWizardComplete() {
- boolean dataDirectoryPresent = false;
- // The validation should be done here
- if ((this.dataDirectory != null) && !this.dataDirectory.equals("")) {
- File folder = new File(this.dataDirectory);
- if (folder.exists()) {
- dataDirectoryPresent = true;
- }
- else {
- this.wizard.setDescription("Data directory path is not valid");
- }
- }
+ /**
+ * @return - true if wizard is complete with out any errors, false otherwise
+ */
+ public boolean isWizardComplete() {
+ boolean dataDirectoryPresent = false;
+ // The validation should be done here
+ if ((this.dataDirectory != null) && !this.dataDirectory.equals("")) {
+ File folder = new File(this.dataDirectory);
+ if (folder.exists()) {
+ dataDirectoryPresent = true;
+ } else {
+ this.wizard.setDescription("Data directory path is not valid");
+ }
+ }
- return dataDirectoryPresent;
- }
+ return dataDirectoryPresent;
+ }
- private void getAndSetSelectedDirectoryNode(final Composite parent, final Text textWidget) {
- DirectoryDialog dirDialog = new DirectoryDialog(parent.getShell());
- dirDialog.setFilterPath(this.userDir);
- String selectedDir = dirDialog.open();
- if (selectedDir != null) {
- textWidget.setText(selectedDir);
- }
- }
+ private void getAndSetSelectedDirectoryNode(final Composite parent,
+ final Text textWidget) {
+ DirectoryDialog dirDialog = new DirectoryDialog(parent.getShell());
+ dirDialog.setFilterPath(this.userDir);
+ String selectedDir = dirDialog.open();
+ if (selectedDir != null) {
+ textWidget.setText(selectedDir);
+ }
+ }
- private void populateGethOptions() {
- this.gethOptions.put("rpc", "");
- this.gethOptions.put("rpccorsdomain", "*");
- this.gethOptions.put("rpcapi", "db,eth,net,web3,personal");
- this.gethOptions.put("gcmode", "archive");
- }
+ private void populateGethOptions() {
+ this.gethOptions.put("rpc", "");
+ this.gethOptions.put("rpccorsdomain", "*");
+ this.gethOptions.put("rpcapi", "db,eth,net,web3,personal");
+ this.gethOptions.put("gcmode", "archive");
+ }
- /**
- *
- */
- protected void prePerformFinish() {
- this.dataDirectory = getTextValue(this.dataDirText);
- this.genesisFile = getTextValue(this.initFileText);
- }
+ /**
+ *
+ */
+ protected void prePerformFinish() {
+ this.dataDirectory = getTextValue(this.dataDirText);
+ this.genesisFile = getTextValue(this.initFileText);
+ }
- private String getTextValue(final Text inputText) {
- StringBuffer textValueBuffer = new StringBuffer();
- Display.getDefault().syncExec(() -> {
- textValueBuffer.append(inputText.getText());
- });
- return textValueBuffer.toString();
- }
+ private String getTextValue(final Text inputText) {
+ StringBuffer textValueBuffer = new StringBuffer();
+ Display.getDefault().syncExec(() -> {
+ textValueBuffer.append(inputText.getText());
+ });
+ return textValueBuffer.toString();
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardFragment.java b/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardFragment.java
index 8224132..53d045b 100644
--- a/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardFragment.java
+++ b/org.eclipse.blockchain.server.ui/src/org/eclipse/blockchain/server/ui/wizard/fragment/GethWizardFragment.java
@@ -1,6 +1,18 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ * Pavithra Krishna Reddy
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.server.ui.wizard.fragment;
import org.eclipse.blockchain.core.BlockchainCore;
@@ -20,116 +32,122 @@
/**
* This is just a proto-type class and not constructed fully.
- *
- * @author ADG5COB
*/
public class GethWizardFragment extends WizardFragment {
- private GethWizardComposite gethComposite;
+ private GethWizardComposite gethComposite;
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean hasComposite() {
- return true;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasComposite() {
+ return true;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public Composite createComposite(final Composite parent, final IWizardHandle handle) {
- this.gethComposite = new GethWizardComposite(parent, handle);
- return this.gethComposite;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Composite createComposite(final Composite parent,
+ final IWizardHandle handle) {
+ this.gethComposite = new GethWizardComposite(parent, handle);
+ return this.gethComposite;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isComplete() {
- if (this.gethComposite != null) {
- return this.gethComposite.isWizardComplete();
- }
- return false;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isComplete() {
+ if (this.gethComposite != null) {
+ return this.gethComposite.isWizardComplete();
+ }
+ return false;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void performFinish(final IProgressMonitor monitor) throws CoreException {
- this.gethComposite.prePerformFinish();
- String anyErrors = startServer();
- if (anyErrors.isEmpty()) {
- Display.getDefault().syncExec(() -> {
- EtherAccountViewPart.updateView();
- });
- // Below activation should happen from UI-Thread
- // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
- // .activate(PlatformUI.getWorkbench().getViewRegistry().find("").createView().getSite().getPart());
- super.performFinish(monitor);
- }
- else {
- getTaskModel().putObject("server", null);
- super.performCancel(monitor);
- }
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performFinish(final IProgressMonitor monitor)
+ throws CoreException {
+ this.gethComposite.prePerformFinish();
+ String anyErrors = startServer();
+ if (anyErrors.isEmpty()) {
+ Display.getDefault().syncExec(() -> {
+ EtherAccountViewPart.updateView();
+ });
+ // Below activation should happen from UI-Thread
+ // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ // .activate(PlatformUI.getWorkbench().getViewRegistry().find("").createView().getSite().getPart());
+ super.performFinish(monitor);
+ } else {
+ getTaskModel().putObject("server", null);
+ super.performCancel(monitor);
+ }
+ }
- /**
- * This will restrict other default child fragments from getting displayed. {@inheritDoc}
- */
- @Override
- public boolean isForceLastFragment() {
- return true;
- }
+ /**
+ * This will restrict other default child fragments from getting displayed.
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isForceLastFragment() {
+ return true;
+ }
- private String startServer() {
- try {
- String anyErrors = CoreCommandExecutor.getInstance().startGethServer(this.gethComposite.getDataDirectory(),
- this.gethComposite.getGenesisFile(), this.gethComposite.getGethOptions());
- Web3jHandler web3j = Web3jHandler.getInstance();
- if (!anyErrors.isEmpty()) {
- showError(anyErrors);
- return anyErrors;
- }
- anyErrors = web3j.createInitialAccounts();
- if (!anyErrors.isEmpty()) {
- showError(anyErrors);
- return anyErrors;
- }
- PlatformUI.getWorkbench().getDisplay();
- Display.getDefault().syncExec(() -> {
- EtherAccountViewPart.updateView();
- });
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException("org.eclipse.blockchain.server.ui", e.getMessage(), e);
- }
- PlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {
+ private String startServer() {
+ try {
+ String anyErrors = CoreCommandExecutor.getInstance()
+ .startGethServer(this.gethComposite.getDataDirectory(),
+ this.gethComposite.getGenesisFile(),
+ this.gethComposite.getGethOptions());
+ Web3jHandler web3j = Web3jHandler.getInstance();
+ if (!anyErrors.isEmpty()) {
+ showError(anyErrors);
+ return anyErrors;
+ }
+ anyErrors = web3j.createInitialAccounts();
+ if (!anyErrors.isEmpty()) {
+ showError(anyErrors);
+ return anyErrors;
+ }
+ PlatformUI.getWorkbench().getDisplay();
+ Display.getDefault().syncExec(() -> {
+ EtherAccountViewPart.updateView();
+ });
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(
+ "org.eclipse.blockchain.server.ui", e.getMessage(), e);
+ }
+ PlatformUI.getWorkbench()
+ .addWorkbenchListener(new IWorkbenchListener() {
- @Override
- public boolean preShutdown(final IWorkbench workbench, final boolean forced) {
- CoreCommandExecutor.getInstance().terminateGethServer();
- return true;
- }
+ @Override
+ public boolean preShutdown(final IWorkbench workbench,
+ final boolean forced) {
+ CoreCommandExecutor.getInstance().terminateGethServer();
+ return true;
+ }
- @Override
- public void postShutdown(final IWorkbench workbench) {
- /**
- * Not required
- */
- }
- });
- return "";
- }
+ @Override
+ public void postShutdown(final IWorkbench workbench) {
+ /**
+ * Not required
+ */
+ }
+ });
+ return "";
+ }
- private void showError(final String anyErrors) {
- Display.getDefault().syncExec(() -> {
- MessageDialog errorDialog = new MessageDialog(Display.getDefault().getActiveShell(), "Geth Server Start Error",
- null, anyErrors, MessageDialog.ERROR, new String[] { "OK" }, 0);
- errorDialog.open();
- });
- }
-}
+ private void showError(final String anyErrors) {
+ Display.getDefault().syncExec(() -> {
+ MessageDialog errorDialog = new MessageDialog(
+ Display.getDefault().getActiveShell(),
+ "Geth Server Start Error", null, anyErrors,
+ MessageDialog.ERROR, new String[]{"OK"}, 0);
+ errorDialog.open();
+ });
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.tycho/about.html b/org.eclipse.blockchain.tycho/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.tycho/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.tycho/license.txt b/org.eclipse.blockchain.tycho/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.tycho/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/.gitignore b/org.eclipse.blockchain.ui/.gitignore
index ae3c172..c5e325c 100644
--- a/org.eclipse.blockchain.ui/.gitignore
+++ b/org.eclipse.blockchain.ui/.gitignore
@@ -1 +1,3 @@
-/bin/
+/bin
+/.classpath
+/.settings/
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/META-INF/MANIFEST.MF b/org.eclipse.blockchain.ui/META-INF/MANIFEST.MF
index 8b5f001..11dbf78 100644
--- a/org.eclipse.blockchain.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.blockchain.ui/META-INF/MANIFEST.MF
@@ -15,7 +15,8 @@
org.eclipse.swt,
org.eclipse.fx.ui.workbench3,
org.eclipse.ui.console,
- org.eclipse.ui.workbench
+ org.eclipse.ui.workbench,
+ org.eclipse.blockchain.model
Bundle-ClassPath: lib/commons-io-2.4.jar,
.
Export-Package: org.eclipse.blockchain.ui.console,
diff --git a/org.eclipse.blockchain.ui/about.html b/org.eclipse.blockchain.ui/about.html
new file mode 100644
index 0000000..122d18e
--- /dev/null
+++ b/org.eclipse.blockchain.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/license.txt b/org.eclipse.blockchain.ui/license.txt
new file mode 100644
index 0000000..4c90559
--- /dev/null
+++ b/org.eclipse.blockchain.ui/license.txt
@@ -0,0 +1,274 @@
+Eclipse Public License - v 2.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (AGREEMENT). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+
+ 1. DEFINITIONS
+
+Contribution means:
+
+ * a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ * b) in the case of each subsequent Contributor:
+ o i) changes to the Program, and
+ o ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ originates from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's
+ behalf. Contributions do not include changes or additions to the
+ Program that are not Modified Works.
+
+Contributor means any person or entity that Distributes the Program.
+
+Licensed Patents mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+Program means the Contributions Distributed in accordance with this
+Agreement.
+
+Recipient means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+Derivative Works shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+Modified Works shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+Distribute means the acts of a) distributing or b) making available in
+any manner that enables the transfer of a copy.
+
+Source Code means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+Secondary License means either the GNU General Public License, Version
+2.0, or any later versions of that license, including any exceptions or
+additional permissions as identified by the initial Contributor.
+
+
+ 2. GRANT OF RIGHTS
+
+ * a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ * b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+ * c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby assumes
+ sole responsibility to secure any other intellectual property rights
+ needed, if any. For example, if a third party patent license is
+ required to allow Recipient to Distribute the Program, it is
+ Recipient's responsibility to acquire that license before
+ distributing the Program.
+ * d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+ * e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License (if
+ permitted under the terms of Section 3).
+
+
+ 3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ * a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany the
+ Program with a statement that the Source Code for the Program is
+ available under this Agreement, and informs Recipients how to obtain
+ it in a reasonable manner on or through a medium customarily used
+ for software exchange; and
+ * b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ o i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+ o ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+ o iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+ o iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements of
+ this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ * a) it must be made available under this Agreement, or if the Program
+ (i) is combined with other material in a separate file or files made
+ available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+ * b) a copy of this Agreement must be included with each copy of the
+ Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability (notices) contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor (Commercial
+Contributor) hereby agrees to defend and indemnify every other
+Contributor (Indemnified Contributor) against any losses, damages and
+costs (collectively Losses) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN AS IS
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including
+a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and may
+only be modified in the following manner. The Agreement Steward reserves
+the right to publish new versions (including revisions) of this
+Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the
+initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is
+published, Contributor may elect to Distribute the Program (including
+its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+
+ Exhibit A Form of Secondary Licenses Notice
+
+This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}.
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a
+ LICENSE file in a relevant directory) where a recipient would be
+ likely to look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/plugin.xml b/org.eclipse.blockchain.ui/plugin.xml
index 9fe9f41..0b18dda 100644
--- a/org.eclipse.blockchain.ui/plugin.xml
+++ b/org.eclipse.blockchain.ui/plugin.xml
@@ -152,6 +152,9 @@
<startup
class="org.eclipse.blockchain.ui.perspective.PerspectiveStartup">
</startup>
+ <startup
+ class="org.eclipse.blockchain.ui.ModelStartup">
+ </startup>
</extension>
<extension
point="org.eclipse.ui.console.consoleFactories">
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/Activator.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/Activator.java
index e2365ed..ef1abc2 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/Activator.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/Activator.java
@@ -1,3 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui;
import org.eclipse.blockchain.core.BlockchainViewsRegistry;
@@ -10,22 +23,25 @@
import javafx.embed.swt.FXCanvas;
/**
- * @author ADG5COB -
+ * Blockchain UI Plugin activator
*/
public class Activator extends AbstractUIPlugin {
- /**
- * The plugin id
- */
- public static final String PLUGIN_ID = "org.eclipse.blockchain.ui";
+ /**
+ * The plugin id
+ */
+ public static final String PLUGIN_ID = "org.eclipse.blockchain.ui";
- /**
- * {@inheritDoc}
- */
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- new FXCanvas(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.NONE);
- BlockchainViewsRegistry.registerBlockchainView(new TransactionHistoryView());
- }
-}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ new FXCanvas(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ SWT.NONE);
+ BlockchainViewsRegistry
+ .registerBlockchainView(new TransactionHistoryView());
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/ModelStartup.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/ModelStartup.java
new file mode 100644
index 0000000..e57af4e
--- /dev/null
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/ModelStartup.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial API and Implementation
+ *
+ */
+package org.eclipse.blockchain.ui;
+
+import org.eclipse.blockchain.core.ProjectCreator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.ui.IStartup;
+
+public class ModelStartup implements IStartup {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void earlyStartup() {
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for (IProject project : projects) {
+ ProjectCreator.getInstance().createExistingProject(project.getLocation().toOSString());
+ }
+ }
+
+}
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/console/EtherConsoleFactory.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/console/EtherConsoleFactory.java
index ccf6a2f..81c2fc1 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/console/EtherConsoleFactory.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/console/EtherConsoleFactory.java
@@ -1,3 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.console;
import org.eclipse.blockchain.core.log.EthereumLogService;
@@ -8,51 +21,52 @@
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.MessageConsole;
-
/**
- * @author PKI8COB
+ * Ethereum console UI
*/
public class EtherConsoleFactory implements IConsoleFactory {
- /**
- * The only instance of this class
- */
- private static EtherConsoleFactory instance;
- public final IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
- private MessageConsole fConsole = null;
+ /**
+ * The only instance of this class
+ */
+ private static EtherConsoleFactory instance;
+ public final IConsoleManager consoleManager = ConsolePlugin.getDefault()
+ .getConsoleManager();
+ private MessageConsole fConsole = null;
- /**
- * @return the only instance of this class.
- */
- public static synchronized EtherConsoleFactory getInstance() {
- if (null == instance) {
- instance = new EtherConsoleFactory();
- }
- return instance;
- }
+ /**
+ * @return the only instance of this class.
+ */
+ public static synchronized EtherConsoleFactory getInstance() {
+ if (null == instance) {
+ instance = new EtherConsoleFactory();
+ }
+ return instance;
+ }
+ @Override
+ public void openConsole() {
+ MessageConsole console = getConsole();
- @Override
- public void openConsole() {
- MessageConsole console = getConsole();
+ boolean exists = false;
+ for (IConsole existingConsole : this.consoleManager.getConsoles()) {
+ if (console == existingConsole) {
+ exists = true;
+ }
+ }
+ if (!exists) {
+ this.consoleManager.addConsoles(new IConsole[]{console});
+ }
+ EthereumLogService.INSTANCE
+ .addIEthereumLogger(new EthereumLogger(getConsole()));
+ }
- boolean exists = false;
- for (IConsole existingConsole : this.consoleManager.getConsoles()) {
- if (console == existingConsole) {
- exists = true;
- }
- }
- if (!exists) {
- this.consoleManager.addConsoles(new IConsole[] { console });
- }
- EthereumLogService.INSTANCE.addIEthereumLogger(new EthereumLogger(getConsole()));
- }
+ public MessageConsole getConsole() {
+ if (this.fConsole == null) {
+ this.fConsole = new MessageConsole("Eth Console", "ethConsole",
+ null, true);
+ }
+ return this.fConsole;
+ }
- public MessageConsole getConsole() {
- if (this.fConsole == null) {
- this.fConsole = new MessageConsole("Eth Console", "ethConsole", null, true);
- }
- return this.fConsole;
- }
-
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/ImportProjectHandler.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/ImportProjectHandler.java
index 47fc148..35893aa 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/ImportProjectHandler.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/ImportProjectHandler.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Deepthi Murugaiyan - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.handlers;
import org.eclipse.blockchain.ui.wizard.EthereumProjectWizard;
@@ -13,23 +23,26 @@
import org.eclipse.ui.PlatformUI;
/**
- * @author DMU1COB
+ * Import Project shortcut
*/
public class ImportProjectHandler extends AbstractHandler {
- /**
- * {@inheritDoc}
- */
- @Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- Display.getDefault().asyncExec(() -> {
- IWorkbench workbench = PlatformUI.getWorkbench();
- EthereumProjectWizard impotWizard = new EthereumProjectWizard();
- impotWizard.init(workbench, null);
- WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), impotWizard);
- dialog.open();
- });
- return "";
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object execute(final ExecutionEvent event)
+ throws ExecutionException {
+ Display.getDefault().asyncExec(() -> {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ EthereumProjectWizard impotWizard = new EthereumProjectWizard();
+ impotWizard.init(workbench, null);
+ WizardDialog dialog = new WizardDialog(
+ workbench.getActiveWorkbenchWindow().getShell(),
+ impotWizard);
+ dialog.open();
+ });
+ return "";
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/SolidityCompilerPreferenceHandler.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/SolidityCompilerPreferenceHandler.java
index 0e5d875..81a0199 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/SolidityCompilerPreferenceHandler.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/handlers/SolidityCompilerPreferenceHandler.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Deepthi Murugaiyan - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.handlers;
import org.eclipse.blockchain.ui.preference.SolidityCompilerPreference;
@@ -14,26 +24,27 @@
import org.eclipse.ui.dialogs.PreferencesUtil;
/**
- * @author DMU1COB
+ * Solidity compiler preference shortcut
*/
public class SolidityCompilerPreferenceHandler extends AbstractHandler {
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object execute(final ExecutionEvent event)
+ throws ExecutionException {
+ Display.getDefault().asyncExec(() -> {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ SolidityCompilerPreference page = new SolidityCompilerPreference();
+ page.init(workbench);
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
+ workbench.getActiveWorkbenchWindow().getShell(),
+ "org.eclipse.blockchain.ui.solidity.compiler.preference",
+ null, null);
+ dialog.open();
- /**
- * {@inheritDoc}
- */
- @Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- Display.getDefault().asyncExec(() -> {
- IWorkbench workbench = PlatformUI.getWorkbench();
- SolidityCompilerPreference page = new SolidityCompilerPreference();
- page.init(workbench);
- PreferenceDialog dialog =
- PreferencesUtil.createPreferenceDialogOn(workbench.getActiveWorkbenchWindow().getShell(),
- "org.eclipse.blockchain.ui.solidity.compiler.preference", null, null);
- dialog.open();
-
- });
- return null;
- }
+ });
+ return null;
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/BlockChainPerspectiveFactory.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/BlockChainPerspectiveFactory.java
index 9cd7ddb..7b51ef7 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/BlockChainPerspectiveFactory.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/BlockChainPerspectiveFactory.java
@@ -1,58 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.perspective;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
-
/**
- * @author PKI8COB
+ * Blockchain Perspective class
*/
public class BlockChainPerspectiveFactory implements IPerspectiveFactory {
- /**
- * The id of the Blockchain perspective
- */
- public static final String BLOCKCHAIN_PERSPECTIVE = "org.eclipse.blockchain.ui.perspective";
+ /**
+ * The id of the Blockchain perspective
+ */
+ public static final String BLOCKCHAIN_PERSPECTIVE = "org.eclipse.blockchain.ui.perspective";
- public static final String RUN_TIME_VIEWID = "org.eclipse.blockchain.ui.runtimeView";
+ public static final String RUN_TIME_VIEWID = "org.eclipse.blockchain.ui.runtimeView";
- public static final String TRANSACTION_VIEWID = "org.eclipse.blockchain.ui.transactionView";
+ public static final String TRANSACTION_VIEWID = "org.eclipse.blockchain.ui.transactionView";
- public static final String COMPILE_TIME_VIEWID = "org.eclipse.blockchain.ui.compileView";
+ public static final String COMPILE_TIME_VIEWID = "org.eclipse.blockchain.ui.compileView";
- public static final String CONSOLE_VIEW = "org.eclipse.ui.console.ConsoleView";
+ public static final String CONSOLE_VIEW = "org.eclipse.ui.console.ConsoleView";
- public static final String SERVER_VIEW = "org.eclipse.wst.server.ui.ServersView";
+ public static final String SERVER_VIEW = "org.eclipse.wst.server.ui.ServersView";
- public static final String ERROR_LOG_VIEW = "org.eclipse.pde.runtime.LogView";
+ public static final String ERROR_LOG_VIEW = "org.eclipse.pde.runtime.LogView";
- private final String TRANSACTION_VIEW_ID = "org.eclipse.blockchain.ui.TransactionHistoryView";
+ private final String TRANSACTION_VIEW_ID = "org.eclipse.blockchain.ui.TransactionHistoryView";
- /**
- * {@inheritDoc}
- */
- @Override
- public void createInitialLayout(final IPageLayout layout) {
- String editorArea = layout.getEditorArea();
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void createInitialLayout(final IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
- IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.25f, editorArea);
- left.addView(IPageLayout.ID_PROJECT_EXPLORER);
+ IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
+ 0.25f, editorArea);
+ left.addView(IPageLayout.ID_PROJECT_EXPLORER);
- IFolderLayout rightLayout = layout.createFolder("rightLayout", IPageLayout.RIGHT, 0.75f, editorArea);
- rightLayout.addView(COMPILE_TIME_VIEWID);
- rightLayout.addPlaceholder(IPageLayout.ID_TASK_LIST);
+ IFolderLayout rightLayout = layout.createFolder("rightLayout",
+ IPageLayout.RIGHT, 0.75f, editorArea);
+ rightLayout.addView(COMPILE_TIME_VIEWID);
+ rightLayout.addPlaceholder(IPageLayout.ID_TASK_LIST);
- // Add View in the bottom area in separate way
- layout.addView(TRANSACTION_VIEWID, IPageLayout.RIGHT, 0.65f, editorArea);
+ // Add View in the bottom area in separate way
+ layout.addView(TRANSACTION_VIEWID, IPageLayout.RIGHT, 0.65f,
+ editorArea);
- IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea);
- bottom.addView(CONSOLE_VIEW);
- bottom.addView(SERVER_VIEW);
- bottom.addView(ERROR_LOG_VIEW);
- bottom.addView(this.TRANSACTION_VIEW_ID);
+ IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM,
+ 0.75f, editorArea);
+ bottom.addView(CONSOLE_VIEW);
+ bottom.addView(SERVER_VIEW);
+ bottom.addView(ERROR_LOG_VIEW);
+ bottom.addView(this.TRANSACTION_VIEW_ID);
- }
+ }
-
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/PerspectiveStartup.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/PerspectiveStartup.java
index edfe313..f8dafd0 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/PerspectiveStartup.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/perspective/PerspectiveStartup.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Deepthi Murugaiyan - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.perspective;
import org.eclipse.blockchain.ui.console.EtherConsoleFactory;
@@ -8,17 +18,18 @@
import org.eclipse.ui.PlatformUI;
/**
- * @author DMU1COB
+ * Blockchain perspective start-up
*/
public class PerspectiveStartup implements IStartup {
- /**
- * {@inheritDoc}
- */
- @Override
- public void earlyStartup() {
- PlatformUI.getWorkbench().getPerspectiveRegistry().setDefaultPerspective("org.eclipse.blockchain.ui.perspective");
- EtherConsoleFactory.getInstance().openConsole();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void earlyStartup() {
+ PlatformUI.getWorkbench().getPerspectiveRegistry()
+ .setDefaultPerspective("org.eclipse.blockchain.ui.perspective");
+ EtherConsoleFactory.getInstance().openConsole();
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/EnvironmentPreferencePage.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/EnvironmentPreferencePage.java
index d94dd33..9df8885 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/EnvironmentPreferencePage.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/EnvironmentPreferencePage.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.preference;
import org.eclipse.blockchain.core.BlockchainCore;
@@ -24,106 +34,128 @@
import org.osgi.service.prefs.BackingStoreException;
/**
- * @author ADG5COB
+ * Preference page for ethereum environment
*/
-public class EnvironmentPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+public class EnvironmentPreferencePage extends PreferencePage
+ implements
+ IWorkbenchPreferencePage {
- private String selectedOption;
+ private String selectedOption;
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IWorkbench workbench) {
- this.selectedOption = Platform.getPreferencesService().getString(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
- SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString(), null);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IWorkbench workbench) {
+ this.selectedOption = Platform.getPreferencesService().getString(
+ SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
+ SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM
+ .toString(),
+ null);
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected Control createContents(final Composite parent) {
- Composite container = new Composite(parent, SWT.NONE);
- container.setLayout(new GridLayout(1, true));
- container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Control createContents(final Composite parent) {
+ Composite container = new Composite(parent, SWT.NONE);
+ container.setLayout(new GridLayout(1, true));
+ container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Group environmentGroup = new Group(container, SWT.NONE);
- environmentGroup.setText("Choose The Environment");
- environmentGroup.setLayout(new GridLayout(1, true));
- environmentGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ Group environmentGroup = new Group(container, SWT.NONE);
+ environmentGroup.setText("Choose The Environment");
+ environmentGroup.setLayout(new GridLayout(1, true));
+ environmentGroup
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- Button embeddedEVM = new Button(environmentGroup, SWT.RADIO);
- embeddedEVM.setText(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
- embeddedEVM.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ Button embeddedEVM = new Button(environmentGroup, SWT.RADIO);
+ embeddedEVM.setText(
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM
+ .toString());
+ embeddedEVM
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- Button gethClient = new Button(environmentGroup, SWT.RADIO);
- gethClient.setText(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString());
- gethClient.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ Button gethClient = new Button(environmentGroup, SWT.RADIO);
+ gethClient.setText(
+ SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT
+ .toString());
+ gethClient
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- if (this.selectedOption.equals(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString())) {
- embeddedEVM.setSelection(true);
- }
- else if (this.selectedOption.equals(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString())) {
- gethClient.setSelection(true);
- }
+ if (this.selectedOption.equals(
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM
+ .toString())) {
+ embeddedEVM.setSelection(true);
+ } else if (this.selectedOption.equals(
+ SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT
+ .toString())) {
+ gethClient.setSelection(true);
+ }
- /**
- * Radio Button Listeneres
- */
- embeddedEVM.addSelectionListener(new SelectionAdapter() {
+ /**
+ * Radio Button Listeneres
+ */
+ embeddedEVM.addSelectionListener(new SelectionAdapter() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- EnvironmentPreferencePage.this.selectedOption =
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString();
- embeddedEVM.setSelection(true);
- gethClient.setSelection(false);
- }
- });
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ EnvironmentPreferencePage.this.selectedOption = SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM
+ .toString();
+ embeddedEVM.setSelection(true);
+ gethClient.setSelection(false);
+ }
+ });
- gethClient.addSelectionListener(new SelectionAdapter() {
+ gethClient.addSelectionListener(new SelectionAdapter() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- EnvironmentPreferencePage.this.selectedOption =
- SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString();
- embeddedEVM.setSelection(false);
- gethClient.setSelection(true);
- }
- });
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ EnvironmentPreferencePage.this.selectedOption = SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT
+ .toString();
+ embeddedEVM.setSelection(false);
+ gethClient.setSelection(true);
+ }
+ });
- return container;
- }
+ return container;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean performOk() {
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .put(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY, this.selectedOption);
- new BlockchainEnvironmentChangedTriggerChild().triggerEnvChange(this.selectedOption);
- try {
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE).flush();
- }
- catch (BackingStoreException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- return super.performOk();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean performOk() {
+ InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .put(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
+ this.selectedOption);
+ new BlockchainEnvironmentChangedTriggerChild()
+ .triggerEnvChange(this.selectedOption);
+ try {
+ InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .flush();
+ } catch (BackingStoreException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ e.getMessage(), e);
+ }
+ return super.performOk();
+ }
- class BlockchainEnvironmentChangedTriggerChild extends BlockchainEnvironmentChangedTrigger {
+ class BlockchainEnvironmentChangedTriggerChild
+ extends
+ BlockchainEnvironmentChangedTrigger {
- public void triggerEnvChange(final String newEnvironment) {
- triggerEnvironmentChange(newEnvironment);
- }
- }
-}
+ public void triggerEnvChange(final String newEnvironment) {
+ triggerEnvironmentChange(newEnvironment);
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SecoBlocksRootPreference.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SecoBlocksRootPreference.java
index e53dd33..b2e9e4e 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SecoBlocksRootPreference.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SecoBlocksRootPreference.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.preference;
import org.eclipse.jface.preference.PreferencePage;
@@ -16,36 +26,40 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
- * @author ADG5COB
+ * Root preference section
*/
-public class SecoBlocksRootPreference extends PreferencePage implements IWorkbenchPreferencePage {
+public class SecoBlocksRootPreference extends PreferencePage
+ implements
+ IWorkbenchPreferencePage {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Control createContents(final Composite parent) {
- Composite contents = new Composite(parent, SWT.NONE);
- contents.setLayout(new GridLayout(1, false));
- contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Control createContents(final Composite parent) {
+ Composite contents = new Composite(parent, SWT.NONE);
+ contents.setLayout(new GridLayout(1, false));
+ contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Label label = new Label(contents, SWT.NONE);
- label.setText("This is just a root page for SecoBlocks expand subtree for preference options");
- label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Label label = new Label(contents, SWT.NONE);
+ label.setText(
+ "This is just a root page for SecoBlocks expand subtree for preference options");
+ label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- label = new Label(contents, SWT.NONE);
- label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
- label.setImage(new Image(Display.getDefault(), this.getClass().getResourceAsStream("/icon/eth-bc-128-128.png")));
- noDefaultAndApplyButton();
- return contents;
- }
+ label = new Label(contents, SWT.NONE);
+ label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
+ label.setImage(new Image(Display.getDefault(), this.getClass()
+ .getResourceAsStream("/icon/eth-bc-128-128.png")));
+ noDefaultAndApplyButton();
+ return contents;
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IWorkbench workbench) {
- // Nothing Here
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IWorkbench workbench) {
+ // Nothing Here
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SolidityCompilerPreference.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SolidityCompilerPreference.java
index ac61532..7ac0564 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SolidityCompilerPreference.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/preference/SolidityCompilerPreference.java
@@ -1,6 +1,18 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ * Pavithra Krishna Reddy
+ * Santhosh Gokhale D
+ *******************************************************************************/
package org.eclipse.blockchain.ui.preference;
import java.io.File;
@@ -50,334 +62,368 @@
import org.eclipse.ui.PlatformUI;
import org.osgi.service.prefs.BackingStoreException;
-
/**
- * @author ADG5COB
+ * Solidity compiler preference page
*/
-public class SolidityCompilerPreference extends PreferencePage implements IWorkbenchPreferencePage {
+public class SolidityCompilerPreference extends PreferencePage
+ implements
+ IWorkbenchPreferencePage {
- private Text solcPathText = null;
- String solidityCompilerPath;
- boolean added, removed;
+ private Text solcPathText = null;
+ String solidityCompilerPath;
+ boolean added, removed;
- List<String> avaiableVersions = new ArrayList<>();
- List<String> selectedVersions = new ArrayList<>();
+ List<String> avaiableVersions = new ArrayList<>();
+ List<String> selectedVersions = new ArrayList<>();
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IWorkbench workbench) {
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IWorkbench workbench) {
- this.solidityCompilerPath =
- Platform.getPreferencesService().getString(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
- SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, "", null);
- String list = Platform.getPreferencesService().getString(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
- SecoBlocksPreferenceConstants.PREF_KEY_VersionList, null, null);
- if (list != null) {
- for (String version : list.split(",")) {
- this.avaiableVersions.add(version);
- }
- }
- list = Platform.getPreferencesService().getString(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
- SecoBlocksPreferenceConstants.PREF_KEY_SelectedList, null, null);
- if (list != null) {
- for (String version : list.split(",")) {
- this.selectedVersions.add(version);
- }
- }
- }
+ this.solidityCompilerPath = Platform.getPreferencesService().getString(
+ SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
+ SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, "",
+ null);
+ String list = Platform.getPreferencesService().getString(
+ SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
+ SecoBlocksPreferenceConstants.PREF_KEY_VersionList, null, null);
+ if (list != null) {
+ for (String version : list.split(",")) {
+ this.avaiableVersions.add(version);
+ }
+ }
+ list = Platform.getPreferencesService().getString(
+ SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
+ SecoBlocksPreferenceConstants.PREF_KEY_SelectedList, null,
+ null);
+ if (list != null) {
+ for (String version : list.split(",")) {
+ this.selectedVersions.add(version);
+ }
+ }
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected Control createContents(final Composite parent) {
- Composite container = new Composite(parent, SWT.None);
- container.setLayout(new GridLayout(3, false));
- GridData layoutData = new GridData(SWT.FILL, SWT.FILL, false, false);
- container.setLayoutData(layoutData);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Control createContents(final Composite parent) {
+ Composite container = new Composite(parent, SWT.None);
+ container.setLayout(new GridLayout(3, false));
+ GridData layoutData = new GridData(SWT.FILL, SWT.FILL, false, false);
+ container.setLayoutData(layoutData);
- Label solcLabel = new Label(container, SWT.None);
- solcLabel.setLayoutData(new GridData(SWT.FILL, SWT.RIGHT, false, false));
- solcLabel.setText("Solidity Compiler Path");
+ Label solcLabel = new Label(container, SWT.None);
+ solcLabel
+ .setLayoutData(new GridData(SWT.FILL, SWT.RIGHT, false, false));
+ solcLabel.setText("Solidity Compiler Path");
- this.solcPathText = new Text(container, SWT.BORDER);
- this.solcPathText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- this.solcPathText.setToolTipText("Please mention the filesystem path of solidity compiler to be downloaded");
- this.solcPathText.setText(this.solidityCompilerPath);
+ this.solcPathText = new Text(container, SWT.BORDER);
+ this.solcPathText
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ this.solcPathText.setToolTipText(
+ "Please mention the filesystem path of solidity compiler to be downloaded");
+ this.solcPathText.setText(this.solidityCompilerPath);
- Button compilerPathBrowseButton = new Button(container, SWT.PUSH);
- compilerPathBrowseButton.setText("Browse");
- compilerPathBrowseButton.setLayoutData(new GridData(SWT.FILL, SWT.RIGHT, false, false, 1, 1));
+ Button compilerPathBrowseButton = new Button(container, SWT.PUSH);
+ compilerPathBrowseButton.setText("Browse");
+ compilerPathBrowseButton.setLayoutData(
+ new GridData(SWT.FILL, SWT.RIGHT, false, false, 1, 1));
- compilerPathBrowseButton.addSelectionListener(new SelectionListener() {
+ compilerPathBrowseButton.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(final SelectionEvent e) {
- DirectoryDialog solcCompilerPathDialog = new DirectoryDialog(parent.getShell());
- solcCompilerPathDialog.setFilterPath(System.getProperty("user.dir"));
- String selectedDir = solcCompilerPathDialog.open();
- if (selectedDir != null) {
- SolidityCompilerPreference.this.solcPathText.setText(selectedDir);
- SolidityCompilerPreference.this.solidityCompilerPath = selectedDir;
- }
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ DirectoryDialog solcCompilerPathDialog = new DirectoryDialog(
+ parent.getShell());
+ solcCompilerPathDialog
+ .setFilterPath(System.getProperty("user.dir"));
+ String selectedDir = solcCompilerPathDialog.open();
+ if (selectedDir != null) {
+ SolidityCompilerPreference.this.solcPathText
+ .setText(selectedDir);
+ SolidityCompilerPreference.this.solidityCompilerPath = selectedDir;
+ }
- }
+ }
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- // do nothing
- }
- });
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // do nothing
+ }
+ });
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
+ data.horizontalSpan = 2;
+ composite.setLayoutData(data);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ layout.marginHeight = 15;
+ composite.setLayout(layout);
- Composite composite = new Composite(parent, SWT.NONE);
- GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
- data.horizontalSpan = 2;
- composite.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 15;
- composite.setLayout(layout);
+ Label candidatesLbl = new Label(composite, SWT.None);
+ candidatesLbl.setText("Versions avaliable");
+ candidatesLbl.setLayoutData(
+ new GridData(SWT.CENTER, SWT.CENTER, false, true));
- Label candidatesLbl = new Label(composite, SWT.None);
- candidatesLbl.setText("Versions avaliable");
- candidatesLbl.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, true));
+ Composite emptyContainer = new Composite(composite, SWT.None);
+ layout = new GridLayout(1, false);
+ emptyContainer.setLayout(layout);
+ layoutData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+ layout.horizontalSpacing = 20;
+ layout.verticalSpacing = 30;
+ emptyContainer.setLayoutData(layoutData);
+ Label selected = new Label(composite, SWT.None);
+ selected.setText("Versions to be downloaded");
+ selected.setLayoutData(
+ new GridData(SWT.CENTER, SWT.CENTER, false, true));
- Composite emptyContainer = new Composite(composite, SWT.None);
- layout = new GridLayout(1, false);
- emptyContainer.setLayout(layout);
- layoutData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
- layout.horizontalSpacing = 20;
- layout.verticalSpacing = 30;
- emptyContainer.setLayoutData(layoutData);
+ ListViewer listViewer = new ListViewer(composite,
+ SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ data = new GridData(GridData.FILL_BOTH);
+ data.heightHint = convertHeightInCharsToPixels(10);
+ data.widthHint = convertWidthInCharsToPixels(60);
+ listViewer.getList().setLayoutData(data);
+ listViewer.getList().setFont(parent.getFont());
+ listViewer.setContentProvider(new IStructuredContentProvider() {
- Label selected = new Label(composite, SWT.None);
- selected.setText("Versions to be downloaded");
- selected.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, true));
+ @Override
+ public Object[] getElements(final Object inputElement) {
+ return ((ArrayList<String>) inputElement).toArray();
+ }
+ });
- ListViewer listViewer = new ListViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = convertHeightInCharsToPixels(10);
- data.widthHint = convertWidthInCharsToPixels(60);
- listViewer.getList().setLayoutData(data);
- listViewer.getList().setFont(parent.getFont());
+ if (this.avaiableVersions.isEmpty()) {
+ this.avaiableVersions = new ArrayList<String>(
+ Arrays.asList(SecoBlocksPreferenceConstants.versionList));
+ }
+ listViewer.setInput(this.avaiableVersions);
+ // Set the initial selection
+ listViewer.setSelection(new StructuredSelection(
+ SecoBlocksPreferenceConstants.versionList[0]), true);
- listViewer.setContentProvider(new IStructuredContentProvider() {
+ Composite buttonContainer = new Composite(composite, SWT.None);
+ layout = new GridLayout(1, false);
+ buttonContainer.setLayout(layout);
+ layoutData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+ layout.horizontalSpacing = 20;
+ layout.verticalSpacing = 30;
+ buttonContainer.setLayoutData(layoutData);
- @Override
- public Object[] getElements(final Object inputElement) {
- return ((ArrayList<String>) inputElement).toArray();
- }
- });
+ ListViewer listViewerSelected = new ListViewer(composite,
+ SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ listViewerSelected.getList().setLayoutData(data);
+ listViewerSelected.getList().setFont(parent.getFont());
- if (this.avaiableVersions.isEmpty()) {
- this.avaiableVersions = new ArrayList<String>(Arrays.asList(SecoBlocksPreferenceConstants.versionList));
- }
- listViewer.setInput(this.avaiableVersions);
+ listViewerSelected.setContentProvider(new IStructuredContentProvider() {
-// Set the initial selection
- listViewer.setSelection(new StructuredSelection(SecoBlocksPreferenceConstants.versionList[0]), true);
+ @Override
+ public Object[] getElements(final Object inputElement) {
+ return ((ArrayList<String>) inputElement).toArray();
+ }
+ });
- Composite buttonContainer = new Composite(composite, SWT.None);
- layout = new GridLayout(1, false);
- buttonContainer.setLayout(layout);
- layoutData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
- layout.horizontalSpacing = 20;
- layout.verticalSpacing = 30;
- buttonContainer.setLayoutData(layoutData);
+ listViewerSelected.setInput(this.selectedVersions);
+ Button sendRightButton = new Button(buttonContainer, SWT.BOLD);
+ sendRightButton.setText(" > ");
+ sendRightButton.addSelectionListener(new SelectionListener() {
- ListViewer listViewerSelected = new ListViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- listViewerSelected.getList().setLayoutData(data);
- listViewerSelected.getList().setFont(parent.getFont());
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ IStructuredSelection s = (IStructuredSelection) listViewer
+ .getSelection();
+ String firstElement = (String) s.getFirstElement();
+ if (firstElement != null) {
+ SolidityCompilerPreference.this.avaiableVersions
+ .remove(firstElement);
+ SolidityCompilerPreference.this.selectedVersions
+ .add(firstElement);
+ listViewer.refresh(false);
+ listViewerSelected.add(firstElement);
+ SolidityCompilerPreference.this.added = true;
+ }
- listViewerSelected.setContentProvider(new IStructuredContentProvider() {
+ }
- @Override
- public Object[] getElements(final Object inputElement) {
- return ((ArrayList<String>) inputElement).toArray();
- }
- });
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // TODO Auto-generated method stub
- listViewerSelected.setInput(this.selectedVersions);
+ }
+ });
- Button sendRightButton = new Button(buttonContainer, SWT.BOLD);
- sendRightButton.setText(" > ");
- sendRightButton.addSelectionListener(new SelectionListener() {
+ Button sendLeftButton = new Button(buttonContainer, SWT.BOLD);
+ sendLeftButton.setText(" < ");
+ sendLeftButton.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(final SelectionEvent e) {
- IStructuredSelection s = (IStructuredSelection) listViewer.getSelection();
- String firstElement = (String) s.getFirstElement();
- if (firstElement != null) {
- SolidityCompilerPreference.this.avaiableVersions.remove(firstElement);
- SolidityCompilerPreference.this.selectedVersions.add(firstElement);
- listViewer.refresh(false);
- listViewerSelected.add(firstElement);
- SolidityCompilerPreference.this.added = true;
- }
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ IStructuredSelection s = (IStructuredSelection) listViewerSelected
+ .getSelection();
+ String firstElement = (String) s.getFirstElement();
+ if (firstElement != null) {
+ SolidityCompilerPreference.this.selectedVersions
+ .remove(firstElement);
+ SolidityCompilerPreference.this.avaiableVersions
+ .add(firstElement);
+ listViewerSelected.refresh(false);
+ listViewer.add(firstElement);
+ SolidityCompilerPreference.this.removed = true;
+ }
- }
+ }
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- // TODO Auto-generated method stub
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // TODO Auto-generated method stub
- }
- });
+ }
+ });
+ return parent;
+ }
- Button sendLeftButton = new Button(buttonContainer, SWT.BOLD);
- sendLeftButton.setText(" < ");
- sendLeftButton.addSelectionListener(new SelectionListener() {
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean performOk() {
- @Override
- public void widgetSelected(final SelectionEvent e) {
- IStructuredSelection s = (IStructuredSelection) listViewerSelected.getSelection();
- String firstElement = (String) s.getFirstElement();
- if (firstElement != null) {
- SolidityCompilerPreference.this.selectedVersions.remove(firstElement);
- SolidityCompilerPreference.this.avaiableVersions.add(firstElement);
- listViewerSelected.refresh(false);
- listViewer.add(firstElement);
- SolidityCompilerPreference.this.removed = true;
- }
+ if (this.added) {
+ Shell shell = PlatformUI.getWorkbench().getDisplay()
+ .getActiveShell();
+ if (shell == null) {
+ shell = new Shell(PlatformUI.getWorkbench().getDisplay());
+ }
+ MessageDialog messageBox = new MessageDialog(shell,
+ "Download Information", null,
+ "The selected compiler versions will be downloaded in the specified location",
+ MessageDialog.INFORMATION, 0,
+ new String[]{IDialogConstants.OK_LABEL,
+ IDialogConstants.CANCEL_LABEL});
+ messageBox.setBlockOnOpen(true);
+ int mbr = messageBox.open();
+ if (mbr == IDialogConstants.CANCEL_ID) {
+ // cancel
+ } else if (mbr == IDialogConstants.OK_ID) {
+ processDownload(this.selectedVersions);
+ }
- }
+ }
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- // TODO Auto-generated method stub
+ this.solidityCompilerPath = getSolText();
+ InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .put(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY,
+ this.solidityCompilerPath);
+ InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.PREF_KEY_VersionList)
+ .put(SecoBlocksPreferenceConstants.PREF_KEY_VersionList,
+ String.join(",", this.avaiableVersions));
+ InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.PREF_KEY_SelectedList)
+ .put(SecoBlocksPreferenceConstants.PREF_KEY_SelectedList,
+ String.join(",", this.selectedVersions));
+ try {
+ InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .flush();
+ } catch (BackingStoreException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ e.getMessage(), e);
+ }
+ return super.performOk();
+ }
- }
- });
+ private String getSolText() {
+ List<String> solcPathList = new ArrayList<>();
+ Display.getDefault().syncExec(() -> {
+ solcPathList.add(this.solcPathText.getText());
+ });
+ return solcPathList.get(0);
+ }
- return parent;
- }
+ /**
+ * @param selectedVersion
+ * @throws IOException
+ */
+ private void processDownload(final List<String> selectedVersion) {
+ if (!this.solidityCompilerPath.isEmpty()) {
+ Job job = new Job("Downloading Complier Packages") {
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean performOk() {
+ @Override
+ public IStatus run(final IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor);
+ for (String version : selectedVersion) {
+ String urlString = "https://github.com/ethereum/solidity/releases/download/"
+ + version + "/solidity-windows.zip";
+ version = version.replace(".", "_");
+ java.io.File file = new java.io.File(
+ SolidityCompilerPreference.this.solidityCompilerPath
+ + File.separator + version);
+ file.getParentFile().setReadable(true);
+ file.mkdir();
+ file.setReadable(true);
+ file.getParentFile().mkdirs();
+ try {
+ URL website = new URL(urlString.trim());
+ String zipFile = file + File.separator
+ + "solidity-windows.zip";
+ URLConnection connection = website.openConnection();
+ InputStream reader = website.openStream();
+ subMonitor.beginTask(getName(),
+ connection.getContentLength());
+ byte[] buffer = new byte[102400];
+ int totalBytesRead = 0;
+ int bytesRead = 0;
+ try (FileOutputStream writer = new FileOutputStream(
+ zipFile, true)) {
+ while ((bytesRead = reader.read(buffer)) > 0) {
+ writer.write(buffer, 0, bytesRead);
+ buffer = new byte[102400];
+ totalBytesRead += bytesRead;
+ subMonitor.newChild(1);
+ }
+ writer.close();
+ reader.close();
+ }
+ // unzip the file
+ UnzipUtility.unzip(zipFile,
+ file.getCanonicalPath());
+ subMonitor.done();
+ } catch (Exception e) {
+ return new Status(IStatus.ERROR, "download",
+ "The network proxy has to be checked. Please go to Window -> Preferences->General-> NetworkConnections.\\n Please set the correct proxy to download the selected complier versions");
+ }
+ }
+ Display.getDefault().syncExec(() -> {
+ MessageDialog messageBox = new MessageDialog(
+ Display.getDefault().getActiveShell(),
+ "Download Information", null,
+ "Downloaded successfully",
+ MessageDialog.INFORMATION, 0,
+ new String[]{IDialogConstants.OK_LABEL});
+ messageBox.setBlockOnOpen(true);
+ messageBox.open();
+ });
- if (this.added) {
- Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
- if (shell == null) {
- shell = new Shell(PlatformUI.getWorkbench().getDisplay());
- }
- MessageDialog messageBox = new MessageDialog(shell, "Download Information", null,
- "The selected compiler versions will be downloaded in the specified location", MessageDialog.INFORMATION, 0,
- new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL });
- messageBox.setBlockOnOpen(true);
- int mbr = messageBox.open();
- if (mbr == IDialogConstants.CANCEL_ID) {
-// cancel
- }
- else if (mbr == IDialogConstants.OK_ID) {
- processDownload(this.selectedVersions);
- }
+ return new Status(IStatus.OK, "download",
+ "Successfully downloaded");
+ }
+ };
+ job.setRule(ResourcesPlugin.getWorkspace().getRoot());
+ job.setUser(true);
+ job.schedule();
- }
+ }
+ }
- this.solidityCompilerPath = getSolText();
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .put(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, this.solidityCompilerPath);
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.PREF_KEY_VersionList)
- .put(SecoBlocksPreferenceConstants.PREF_KEY_VersionList, String.join(",", this.avaiableVersions));
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.PREF_KEY_SelectedList)
- .put(SecoBlocksPreferenceConstants.PREF_KEY_SelectedList, String.join(",", this.selectedVersions));
- try {
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE).flush();
- }
- catch (BackingStoreException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- return super.performOk();
- }
-
- private String getSolText() {
- List<String> solcPathList = new ArrayList<>();
- Display.getDefault().syncExec(() -> {
- solcPathList.add(this.solcPathText.getText());
- });
- return solcPathList.get(0);
- }
-
-
- /**
- * @param selectedVersion
- * @throws IOException
- */
- private void processDownload(final List<String> selectedVersion) {
- if (!this.solidityCompilerPath.isEmpty()) {
- Job job = new Job("Downloading Complier Packages") {
-
- @Override
- public IStatus run(final IProgressMonitor monitor) {
- SubMonitor subMonitor = SubMonitor.convert(monitor);
-
- for (String version : selectedVersion) {
- String urlString =
- "https://github.com/ethereum/solidity/releases/download/" + version + "/solidity-windows.zip";
- version = version.replace(".", "_");
- java.io.File file =
- new java.io.File(SolidityCompilerPreference.this.solidityCompilerPath + File.separator + version);
- file.getParentFile().setReadable(true);
- file.mkdir();
- file.setReadable(true);
- file.getParentFile().mkdirs();
- try {
- URL website = new URL(urlString.trim());
- String zipFile = file + File.separator + "solidity-windows.zip";
- URLConnection connection = website.openConnection();
- InputStream reader = website.openStream();
- subMonitor.beginTask(getName(), connection.getContentLength());
- byte[] buffer = new byte[102400];
- int totalBytesRead = 0;
- int bytesRead = 0;
- try (FileOutputStream writer = new FileOutputStream(zipFile, true)) {
- while ((bytesRead = reader.read(buffer)) > 0) {
- writer.write(buffer, 0, bytesRead);
- buffer = new byte[102400];
- totalBytesRead += bytesRead;
- subMonitor.newChild(1);
- }
- writer.close();
- reader.close();
- }
- // unzip the file
- UnzipUtility.unzip(zipFile, file.getCanonicalPath());
- subMonitor.done();
- }
- catch (Exception e) {
- return new Status(IStatus.ERROR, "download",
- "The network proxy has to be checked. Please go to Window -> Preferences->General-> NetworkConnections.\\n Please set the correct proxy to download the selected complier versions");
- }
- }
- Display.getDefault().syncExec(() -> {
- MessageDialog messageBox = new MessageDialog(Display.getDefault().getActiveShell(), "Download Information",
- null, "Downloaded successfully", MessageDialog.INFORMATION, 0,
- new String[] { IDialogConstants.OK_LABEL });
- messageBox.setBlockOnOpen(true);
- messageBox.open();
- });
-
- return new Status(IStatus.OK, "download", "Successfully downloaded");
- }
- };
- job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.setUser(true);
- job.schedule();
-
- }
- }
-
-
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/property/testers/EthereumProjectPropertyTester.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/property/testers/EthereumProjectPropertyTester.java
index 9cb6bc1..a5c5b6e 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/property/testers/EthereumProjectPropertyTester.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/property/testers/EthereumProjectPropertyTester.java
@@ -1,35 +1,47 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.property.testers;
import org.eclipse.blockchain.core.BlockchainCore;
-import org.eclipse.blockchain.core.EthereumProjectNature;
+import org.eclipse.blockchain.core.EthereumNature;
import org.eclipse.blockchain.ui.Activator;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
/**
- * @author ADG5COB
+ * Property tester to test whether the project is an Ethereum Project.
*/
public class EthereumProjectPropertyTester extends PropertyTester {
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
- try {
- if ((receiver instanceof IProject) && ((IProject) receiver).getProject().getDescription().getNatureIds()[0]
- .equals(EthereumProjectNature.ETHEREUM_NATURE)) {
- return true;
- }
- }
- catch (CoreException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- return false;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean test(final Object receiver, final String property,
+ final Object[] args, final Object expectedValue) {
+ try {
+ if ((receiver instanceof IProject) && ((IProject) receiver)
+ .getProject().getDescription().getNatureIds()[0]
+ .equals(EthereumNature.ETHEREUM_NATURE)) {
+ return true;
+ }
+ } catch (CoreException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ e.getMessage(), e);
+ }
+ return false;
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UIUtilities.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UIUtilities.java
index d246d42..896ef36 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UIUtilities.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UIUtilities.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.util;
import org.eclipse.swt.graphics.Rectangle;
@@ -8,19 +18,25 @@
import org.eclipse.swt.widgets.Shell;
/**
- * @author ADG5COB
+ * A general UI helper class
*/
public class UIUtilities {
+ private UIUtilities() {
+ }
- /**
- * @param display -
- * @param parent -
- */
- public static void moveShellToCenterOfScreen(final Display display, final Shell parent) {
- Rectangle monitorBound = display.getPrimaryMonitor().getBounds();
- Rectangle shellBounds = parent.getBounds();
- int x = monitorBound.x + ((monitorBound.width - shellBounds.width) / 2);
- int y = monitorBound.y + ((monitorBound.height - shellBounds.height) / 2);
- parent.setLocation(x, y);
- }
-}
+ /**
+ * @param display
+ * -
+ * @param parent
+ * -
+ */
+ public static void moveShellToCenterOfScreen(final Display display,
+ final Shell parent) {
+ Rectangle monitorBound = display.getPrimaryMonitor().getBounds();
+ Rectangle shellBounds = parent.getBounds();
+ int x = monitorBound.x + ((monitorBound.width - shellBounds.width) / 2);
+ int y = monitorBound.y
+ + ((monitorBound.height - shellBounds.height) / 2);
+ parent.setLocation(x, y);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UnzipUtility.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UnzipUtility.java
index 42e5916..e0a17b6 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UnzipUtility.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/util/UnzipUtility.java
@@ -1,6 +1,16 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.util;
import java.io.BufferedOutputStream;
@@ -12,65 +22,67 @@
import java.util.zip.ZipInputStream;
/**
- * This utility extracts files and directories of a standard zip file to a destination directory.
- *
- * @author PKI8COB
+ * This utility extracts files and directories of a standard zip file to a
+ * destination directory.
*/
public class UnzipUtility {
- /**
- * Size of the buffer to read/write data
- */
- private static final int BUFFER_SIZE = 4096;
+ /**
+ * Size of the buffer to read/write data
+ */
+ private static final int BUFFER_SIZE = 4096;
- /**
- * Extracts a zip file specified by the zipFilePath to a directory specified by destDirectory (will be created if does
- * not exists)
- *
- * @param zipFilePath
- * @param destDirectory
- * @throws IOException
- */
- public static void unzip(final String zipFilePath, final String destDirectory) throws IOException {
- File destDir = new File(destDirectory);
- if (!destDir.exists()) {
- destDir.mkdir();
- }
- ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
- ZipEntry entry = zipIn.getNextEntry();
- // iterates over entries in the zip file
- while (entry != null) {
- String filePath = destDirectory + File.separator + entry.getName();
- if (!entry.isDirectory()) {
- // if the entry is a file, extracts it
- extractFile(zipIn, filePath);
- }
- else {
- // if the entry is a directory, make the directory
- File dir = new File(filePath);
- dir.mkdir();
- }
- zipIn.closeEntry();
- entry = zipIn.getNextEntry();
- }
- zipIn.close();
- }
+ /**
+ * Extracts a zip file specified by the zipFilePath to a directory specified
+ * by destDirectory (will be created if does not exists)
+ *
+ * @param zipFilePath
+ * @param destDirectory
+ * @throws IOException
+ */
+ public static void unzip(final String zipFilePath,
+ final String destDirectory) throws IOException {
+ File destDir = new File(destDirectory);
+ if (!destDir.exists()) {
+ destDir.mkdir();
+ }
+ ZipInputStream zipIn = new ZipInputStream(
+ new FileInputStream(zipFilePath));
+ ZipEntry entry = zipIn.getNextEntry();
+ // iterates over entries in the zip file
+ while (entry != null) {
+ String filePath = destDirectory + File.separator + entry.getName();
+ if (!entry.isDirectory()) {
+ // if the entry is a file, extracts it
+ extractFile(zipIn, filePath);
+ } else {
+ // if the entry is a directory, make the directory
+ File dir = new File(filePath);
+ dir.mkdir();
+ }
+ zipIn.closeEntry();
+ entry = zipIn.getNextEntry();
+ }
+ zipIn.close();
+ }
- /**
- * Extracts a zip entry (file entry)
- *
- * @param zipIn
- * @param filePath
- * @throws IOException
- */
- private static void extractFile(final ZipInputStream zipIn, final String filePath) throws IOException {
- BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
- byte[] bytesIn = new byte[BUFFER_SIZE];
- int read = 0;
- while ((read = zipIn.read(bytesIn)) != -1) {
- bos.write(bytesIn, 0, read);
- }
- bos.close();
- }
-}
+ /**
+ * Extracts a zip entry (file entry)
+ *
+ * @param zipIn
+ * @param filePath
+ * @throws IOException
+ */
+ private static void extractFile(final ZipInputStream zipIn,
+ final String filePath) throws IOException {
+ BufferedOutputStream bos = new BufferedOutputStream(
+ new FileOutputStream(filePath));
+ byte[] bytesIn = new byte[BUFFER_SIZE];
+ int read = 0;
+ while ((read = zipIn.read(bytesIn)) != -1) {
+ bos.write(bytesIn, 0, read);
+ }
+ bos.close();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/CompileViewPart.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/CompileViewPart.java
index 8ecc3c2..c7416dd 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/CompileViewPart.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/CompileViewPart.java
@@ -1,33 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pavithra Krishna Reddy - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.views;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
-
+/**
+ *
+ */
public class CompileViewPart extends ViewPart {
+ public CompileViewPart() {
+ super();
+ }
- public CompileViewPart() {
- super();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void createPartControl(final Composite parent) {
+ // TODO Auto-generated method stub
- /**
- * {@inheritDoc}
- */
- @Override
- public void createPartControl(final Composite parent) {
- // TODO Auto-generated method stub
+ }
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ // TODO Auto-generated method stub
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- // TODO Auto-generated method stub
+ }
- }
-
-
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/EtherAccountViewPart.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/EtherAccountViewPart.java
index 5695843..c143615 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/EtherAccountViewPart.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/EtherAccountViewPart.java
@@ -1,3 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Deepthi Murugaiyan - Initial contribution and API
+ * Adhith Gopal
+ *******************************************************************************/
package org.eclipse.blockchain.ui.views;
import java.util.Map;
@@ -29,196 +43,222 @@
import javafx.scene.layout.GridPane;
/**
- * @author DMU1COB
+ * Ethereum Accounts view section
*/
-public class EtherAccountViewPart extends FXViewPart implements IBlockchainEnvironmentChangedListener {
+public class EtherAccountViewPart extends FXViewPart
+ implements
+ IBlockchainEnvironmentChangedListener {
- static ComboBox<String> cmbAccount = new ComboBox<>();
- static TextField txtBalance = new TextField();
- static String selectedEnvironment = "";
- private static String selectedItem;
+ static ComboBox<String> cmbAccount = new ComboBox<>();
+ static TextField txtBalance = new TextField();
+ static String selectedEnvironment = "";
+ private static String selectedItem;
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IViewSite site) throws PartInitException {
- super.init(site);
- BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(this);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IViewSite site) throws PartInitException {
+ super.init(site);
+ BlockchainEnvironmentChangedTrigger.getInstance()
+ .addBlockchainEnvironmentChangedListener(this);
+ }
- @Override
- protected Scene createFxScene() {
+ @Override
+ protected Scene createFxScene() {
- Scene scene = null;
- try {
- clearAccountsSection();
- GridPane gridPane = new GridPane();
- gridPane.setPadding(new Insets(20));
- gridPane.setHgap(10);
- gridPane.setVgap(10);
+ Scene scene = null;
+ try {
+ clearAccountsSection();
+ GridPane gridPane = new GridPane();
+ gridPane.setPadding(new Insets(20));
+ gridPane.setHgap(10);
+ gridPane.setVgap(10);
- Label lblAccount = new Label();
- lblAccount.setText("Accounts");
+ Label lblAccount = new Label();
+ lblAccount.setText("Accounts");
- EtherAccountViewPart.cmbAccount.setPrefWidth(200);
- EtherAccountViewPart.cmbAccount.setItems(getAccountList());
- EtherAccountViewPart.cmbAccount.getSelectionModel().selectFirst();
+ EtherAccountViewPart.cmbAccount.setPrefWidth(200);
+ EtherAccountViewPart.cmbAccount.setItems(getAccountList());
+ EtherAccountViewPart.cmbAccount.getSelectionModel().selectFirst();
- Label lblEtherBalance = new Label();
- lblEtherBalance.setText("Ether Balance");
+ Label lblEtherBalance = new Label();
+ lblEtherBalance.setText("Ether Balance");
- Map<String, String> accountBalance =
- Web3jHandler.getInstance().getAccount().getAccountBalance(getSelectedEnvironment());
+ Map<String, String> accountBalance = Web3jHandler.getInstance()
+ .getAccount().getAccountBalance(getSelectedEnvironment());
- // Add a ChangeListener to the ComboBox
- EtherAccountViewPart.cmbAccount.getSelectionModel().selectedItemProperty()
- .addListener(new ChangeListener<String>() {
+ // Add a ChangeListener to the ComboBox
+ EtherAccountViewPart.cmbAccount.getSelectionModel()
+ .selectedItemProperty()
+ .addListener(new ChangeListener<String>() {
- @Override
- public void changed(final ObservableValue<? extends String> ov, final String oldValue,
- final String newValue) {
- if (newValue != null) {
- EtherAccountViewPart.txtBalance.setText(
- Web3jHandler.getInstance().getAccount().getAccountBalance(getSelectedEnvironment()).get(newValue));
- selectedItem = newValue;
+ @Override
+ public void changed(
+ final ObservableValue<? extends String> ov,
+ final String oldValue, final String newValue) {
+ if (newValue != null) {
+ EtherAccountViewPart.txtBalance.setText(
+ Web3jHandler.getInstance().getAccount()
+ .getAccountBalance(
+ getSelectedEnvironment())
+ .get(newValue));
+ selectedItem = newValue;
- /*
- * if (EtherAccountViewPart.getSelectedEnvironment()
- * .equals(SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString())) {
- * InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- * .put(SecoBlocksPreferenceConstants.EMBEDDED_EVM_SELECTED_ADDRESS, newValue); }
- */
- }
- }
- });
+ /*
+ * if
+ * (EtherAccountViewPart.getSelectedEnvironment(
+ * ) .equals(SecoBlocksPreferenceConstants.
+ * EnvironmentType.EMBEDDED_EVM.toString())) {
+ * InstanceScope.INSTANCE.getNode(
+ * SecoBlocksPreferenceConstants.
+ * SECOBLOCKS_PREF_NODE)
+ * .put(SecoBlocksPreferenceConstants.
+ * EMBEDDED_EVM_SELECTED_ADDRESS, newValue); }
+ */
+ }
+ }
+ });
- Button btnAddAccount = new Button();
- btnAddAccount.setText("+");
+ Button btnAddAccount = new Button();
+ btnAddAccount.setText("+");
- Label lblGasLimit = new Label();
- lblGasLimit.setText("Gas Limit");
+ Label lblGasLimit = new Label();
+ lblGasLimit.setText("Gas Limit");
- Label lblGasValue = new Label();
- lblGasValue.setText("Gas Value");
+ Label lblGasValue = new Label();
+ lblGasValue.setText("Gas Value");
- TextField txtGasLimit = new TextField();
- txtGasLimit.setEditable(false);
- txtGasLimit.setTooltip(new Tooltip("Under dev"));
- txtGasLimit.setDisable(true);
- TextField txtGasValue = new TextField();
- txtGasValue.setEditable(false);
- txtGasValue.setTooltip(new Tooltip("Under dev"));
- txtGasValue.setDisable(true);
- if (Web3jHandler.getInstance().getAdminInstance() != null) {
- /**
- * This has to be properly constructed
- */
- // txtGasValue.setText(Web3jHandler.getInstance().getGasPrice().toString());
- }
- setEthBalanace(accountBalance);
- gridPane.add(lblAccount, 0, 0);
- gridPane.add(EtherAccountViewPart.cmbAccount, 1, 0);
- gridPane.add(btnAddAccount, 2, 0);
- gridPane.add(lblGasLimit, 0, 1);
- gridPane.add(lblGasValue, 0, 2);
- gridPane.add(txtGasLimit, 1, 1);
- gridPane.add(txtGasValue, 1, 2);
- gridPane.add(lblEtherBalance, 0, 3);
- gridPane.add(EtherAccountViewPart.txtBalance, 1, 3);
- txtBalance.setEditable(false);
+ TextField txtGasLimit = new TextField();
+ txtGasLimit.setEditable(false);
+ txtGasLimit.setTooltip(new Tooltip("Under dev"));
+ txtGasLimit.setDisable(true);
+ TextField txtGasValue = new TextField();
+ txtGasValue.setEditable(false);
+ txtGasValue.setTooltip(new Tooltip("Under dev"));
+ txtGasValue.setDisable(true);
+ if (Web3jHandler.getInstance().getAdminInstance() != null) {
+ /**
+ * This has to be properly constructed
+ */
+ // txtGasValue.setText(Web3jHandler.getInstance().getGasPrice().toString());
+ }
+ setEthBalanace(accountBalance);
+ gridPane.add(lblAccount, 0, 0);
+ gridPane.add(EtherAccountViewPart.cmbAccount, 1, 0);
+ gridPane.add(btnAddAccount, 2, 0);
+ gridPane.add(lblGasLimit, 0, 1);
+ gridPane.add(lblGasValue, 0, 2);
+ gridPane.add(txtGasLimit, 1, 1);
+ gridPane.add(txtGasValue, 1, 2);
+ gridPane.add(lblEtherBalance, 0, 3);
+ gridPane.add(EtherAccountViewPart.txtBalance, 1, 3);
+ txtBalance.setEditable(false);
- scene = new Scene(gridPane, 400, 400);
+ scene = new Scene(gridPane, 400, 400);
- scene.getStylesheets().add(getClass().getResource("Views.css").toExternalForm());
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
+ scene.getStylesheets()
+ .add(getClass().getResource("Views.css").toExternalForm());
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ e.getMessage(), e);
+ }
- return scene;
+ return scene;
- }
+ }
- /**
- * @param accountBalance
- */
- private static void setEthBalanace(final Map<String, String> accountBalance) {
- if (!EtherAccountViewPart.cmbAccount.getItems().isEmpty()) {
- EtherAccountViewPart.selectedItem = EtherAccountViewPart.cmbAccount.getSelectionModel().getSelectedItem();
- txtBalance.setText(accountBalance.get(EtherAccountViewPart.selectedItem));
- }
- else {// This means no accounts
- txtBalance.setText("");
- }
- }
+ /**
+ * @param accountBalance
+ */
+ private static void setEthBalanace(
+ final Map<String, String> accountBalance) {
+ if (!EtherAccountViewPart.cmbAccount.getItems().isEmpty()) {
+ EtherAccountViewPart.selectedItem = EtherAccountViewPart.cmbAccount
+ .getSelectionModel().getSelectedItem();
+ txtBalance.setText(
+ accountBalance.get(EtherAccountViewPart.selectedItem));
+ } else {// This means no accounts
+ txtBalance.setText("");
+ }
+ }
- /**
- * @return
- */
- private static ObservableList<String> getAccountList() {
- ObservableList<String> accountList = FXCollections.observableArrayList();
- Map<String, String> acctInfo = Web3jHandler.getInstance().getAccount().getAccounts(getSelectedEnvironment());
- Set<String> accounts = acctInfo.keySet();
- accountList.addAll(accounts);
- if (!accountList.isEmpty()) {
- if (getSelectedEnvironment().equals(SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT.toString())) {
- accountList.remove(0);// skipping the coin-base account from displaying
- }
- }
- return accountList;
- }
+ /**
+ * @return
+ */
+ private static ObservableList<String> getAccountList() {
+ ObservableList<String> accountList = FXCollections
+ .observableArrayList();
+ Map<String, String> acctInfo = Web3jHandler.getInstance().getAccount()
+ .getAccounts(getSelectedEnvironment());
+ Set<String> accounts = acctInfo.keySet();
+ accountList.addAll(accounts);
+ if (!accountList.isEmpty()) {
+ if (getSelectedEnvironment().equals(
+ SecoBlocksPreferenceConstants.EnvironmentType.GETH_CLIENT
+ .toString())) {
+ accountList.remove(0);// skipping the coin-base account from
+ // displaying
+ }
+ }
+ return accountList;
+ }
- @Override
- protected void setFxFocus() {
+ @Override
+ protected void setFxFocus() {
- }
+ }
- /**
- * @return the selectedItem
- */
- public static String getSelectedItem() {
- return selectedItem;
- }
+ /**
+ * @return the selectedItem
+ */
+ public static String getSelectedItem() {
+ return selectedItem;
+ }
- /**
- *
- */
- public static void updateView() {
- EtherAccountViewPart.cmbAccount.setItems(getAccountList());
- if (selectedItem == null) {
- EtherAccountViewPart.cmbAccount.getSelectionModel().selectFirst();
- }
- else {
- EtherAccountViewPart.cmbAccount.getSelectionModel().select(selectedItem);
- }
- setEthBalanace(Web3jHandler.getInstance().getAccount().getAccountBalance(getSelectedEnvironment()));
- }
+ /**
+ *
+ */
+ public static void updateView() {
+ EtherAccountViewPart.cmbAccount.setItems(getAccountList());
+ if (selectedItem == null) {
+ EtherAccountViewPart.cmbAccount.getSelectionModel().selectFirst();
+ } else {
+ EtherAccountViewPart.cmbAccount.getSelectionModel()
+ .select(selectedItem);
+ }
+ setEthBalanace(Web3jHandler.getInstance().getAccount()
+ .getAccountBalance(getSelectedEnvironment()));
+ }
- private static String getSelectedEnvironment() {
- if (!selectedEnvironment.isEmpty()) {
- return selectedEnvironment;
- }
- return selectedEnvironment = InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE).get(
- SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
- }
+ private static String getSelectedEnvironment() {
+ if (!selectedEnvironment.isEmpty()) {
+ return selectedEnvironment;
+ }
+ return selectedEnvironment = InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM
+ .toString());
+ }
- private void clearAccountsSection() {
- if ((cmbAccount != null) && (txtBalance != null)) {
- cmbAccount.setItems(FXCollections.observableArrayList());
- txtBalance.setText("");
- }
- }
+ private void clearAccountsSection() {
+ if ((cmbAccount != null) && (txtBalance != null)) {
+ cmbAccount.setItems(FXCollections.observableArrayList());
+ txtBalance.setText("");
+ }
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
- // Change accounts section when evnvironment is changed
- selectedEnvironment = event.getActiveEvironment();
- selectedItem = null;// On environment change reset previous environment selected account
- updateView();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void blockchainEnvironmentChanged(
+ final IBlockchainEnvironmentChangedEvent event) {
+ // Change accounts section when evnvironment is changed
+ selectedEnvironment = event.getActiveEvironment();
+ selectedItem = null;// On environment change reset previous environment
+ // selected account
+ updateView();
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/GethServerDialog.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/GethServerDialog.java
index fa2203f..6e6669b 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/GethServerDialog.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/GethServerDialog.java
@@ -1,6 +1,18 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ * Pavithra Krishna Reddy
+ * Deepthi Murugaiyan
+ *******************************************************************************/
package org.eclipse.blockchain.ui.views;
import java.io.BufferedReader;
@@ -33,207 +45,230 @@
import org.eclipse.swt.widgets.Text;
/**
- * @author ADG5COB
+ *
*/
public class GethServerDialog extends Dialog {
- private Text dataDirText;
- private Text initFileText;
- private final String userDir = System.getProperty("user.dir");
- private String networkId = "";
- private Label networkIdLabel;
- private final Map<String, String> gethOptions = new HashMap<>();
- private String dataDirectory = "";
- private String genesisFile = "";
+ private Text dataDirText;
+ private Text initFileText;
+ private final String userDir = System.getProperty("user.dir");
+ private String networkId = "";
+ private Label networkIdLabel;
+ private final Map<String, String> gethOptions = new HashMap<>();
+ private String dataDirectory = "";
+ private String genesisFile = "";
- /**
- * @return -
- */
- public String getDataDirectory() {
- return this.dataDirectory;
- }
+ /**
+ * @return -
+ */
+ public String getDataDirectory() {
+ return this.dataDirectory;
+ }
- /**
- * @return -
- */
- public String getGenesisFile() {
- return this.genesisFile;
- }
+ /**
+ * @return -
+ */
+ public String getGenesisFile() {
+ return this.genesisFile;
+ }
- /**
- * @return -
- */
- public Map<String, String> getGethOptions() {
- return this.gethOptions;
- }
+ /**
+ * @return -
+ */
+ public Map<String, String> getGethOptions() {
+ return this.gethOptions;
+ }
- /**
- * @param parentShell -
- */
- public GethServerDialog(final Shell parentShell) {
- super(parentShell);
- populateGethOptions();
- }
+ /**
+ * @param parentShell
+ * -
+ */
+ public GethServerDialog(final Shell parentShell) {
+ super(parentShell);
+ populateGethOptions();
+ }
- private void populateGethOptions() {
- this.gethOptions.put("rpc", "");
- this.gethOptions.put("rpccorsdomain", "*");
- this.gethOptions.put("rpcapi", "db,eth,net,web3,personal");
- this.gethOptions.put("gcmode", "archive");
- }
+ private void populateGethOptions() {
+ this.gethOptions.put("rpc", "");
+ this.gethOptions.put("rpccorsdomain", "*");
+ this.gethOptions.put("rpcapi", "db,eth,net,web3,personal");
+ this.gethOptions.put("gcmode", "archive");
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected void configureShell(final Shell shell) {
- super.configureShell(shell);
- shell.setText("Geth Server Setup");
- shell.setSize(300, 400);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void configureShell(final Shell shell) {
+ super.configureShell(shell);
+ shell.setText("Geth Server Setup");
+ shell.setSize(300, 400);
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected Control createDialogArea(final Composite parent) {
- Composite containerComp = new Composite(parent, SWT.None);
- containerComp.setLayout(new GridLayout(3, false));
- containerComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Control createDialogArea(final Composite parent) {
+ Composite containerComp = new Composite(parent, SWT.None);
+ containerComp.setLayout(new GridLayout(3, false));
+ containerComp
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- createContent(containerComp);
- UIUtilities.moveShellToCenterOfScreen(Display.getDefault(), parent.getShell());
- return parent;
- }
+ createContent(containerComp);
+ UIUtilities.moveShellToCenterOfScreen(Display.getDefault(),
+ parent.getShell());
+ return parent;
+ }
- private void createContent(final Composite containerComp) {
- // First Layer
- Label dataDirLabel = new Label(containerComp, SWT.None);
- dataDirLabel.setText("Data Directory");
- dataDirLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ private void createContent(final Composite containerComp) {
+ // First Layer
+ Label dataDirLabel = new Label(containerComp, SWT.None);
+ dataDirLabel.setText("Data Directory");
+ dataDirLabel
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- this.dataDirText = new Text(containerComp, SWT.BORDER);
- this.dataDirText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- this.dataDirText.setText("C:\\Deepthi\\BlockChain\\Account\\Node4");
- this.dataDirText.setToolTipText(this.dataDirText.getText());
+ this.dataDirText = new Text(containerComp, SWT.BORDER);
+ this.dataDirText
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ this.dataDirText.setText("C:\\Deepthi\\BlockChain\\Account\\Node4");
+ this.dataDirText.setToolTipText(this.dataDirText.getText());
- Button dataDirBrowse = new Button(containerComp, SWT.PUSH);
- dataDirBrowse.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- dataDirBrowse.setText("Browse");
- dataDirBrowse.addSelectionListener(new SelectionAdapter() {
+ Button dataDirBrowse = new Button(containerComp, SWT.PUSH);
+ dataDirBrowse
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ dataDirBrowse.setText("Browse");
+ dataDirBrowse.addSelectionListener(new SelectionAdapter() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- getAndSetSelectedDirectoryNode(containerComp, GethServerDialog.this.dataDirText);
- }
- });
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ getAndSetSelectedDirectoryNode(containerComp,
+ GethServerDialog.this.dataDirText);
+ }
+ });
- // Second Layer
- Label initFileLabel = new Label(containerComp, SWT.None);
- initFileLabel.setText("Init File");
- initFileLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ // Second Layer
+ Label initFileLabel = new Label(containerComp, SWT.None);
+ initFileLabel.setText("Init File");
+ initFileLabel
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- this.initFileText = new Text(containerComp, SWT.BORDER);
- this.initFileText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- this.initFileText.setText("");
- this.initFileText.setToolTipText(this.initFileText.getText());
+ this.initFileText = new Text(containerComp, SWT.BORDER);
+ this.initFileText
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ this.initFileText.setText("");
+ this.initFileText.setToolTipText(this.initFileText.getText());
- Button initFileBrowse = new Button(containerComp, SWT.PUSH);
- initFileBrowse.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- initFileBrowse.setText("Browse");
- initFileBrowse.addSelectionListener(new SelectionAdapter() {
+ Button initFileBrowse = new Button(containerComp, SWT.PUSH);
+ initFileBrowse
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ initFileBrowse.setText("Browse");
+ initFileBrowse.addSelectionListener(new SelectionAdapter() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- getandSetSelectedGenesisFile(containerComp, GethServerDialog.this.initFileText);
- }
- });
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ getandSetSelectedGenesisFile(containerComp,
+ GethServerDialog.this.initFileText);
+ }
+ });
- // Scrolled Composite - contains network values
- ScrolledComposite networkComposite = new ScrolledComposite(containerComp, SWT.V_SCROLL | SWT.BORDER);
- networkComposite.setLayout(new GridLayout(1, false));
- networkComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 3, 0));
- Composite networkChild = createdScrolledContent(networkComposite);
+ // Scrolled Composite - contains network values
+ ScrolledComposite networkComposite = new ScrolledComposite(
+ containerComp, SWT.V_SCROLL | SWT.BORDER);
+ networkComposite.setLayout(new GridLayout(1, false));
+ networkComposite.setLayoutData(
+ new GridData(SWT.FILL, SWT.FILL, false, false, 3, 0));
+ Composite networkChild = createdScrolledContent(networkComposite);
- networkComposite.setContent(networkChild);
- networkComposite.setMinSize(networkComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- networkComposite.setExpandHorizontal(true);
- networkComposite.setExpandVertical(true);
- networkComposite.layout();
- }
+ networkComposite.setContent(networkChild);
+ networkComposite.setMinSize(
+ networkComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ networkComposite.setExpandHorizontal(true);
+ networkComposite.setExpandVertical(true);
+ networkComposite.layout();
+ }
- private Composite createdScrolledContent(final ScrolledComposite scrolledComposite) {
- /**
- * This contains the geth arguments which should be made configurable, as of now its static but networkId will be
- * read from the genesis file
- */
- Composite childComp = new Composite(scrolledComposite, SWT.None);
- childComp.setLayout(new GridLayout(1, false));
- childComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ private Composite createdScrolledContent(
+ final ScrolledComposite scrolledComposite) {
+ /**
+ * This contains the geth arguments which should be made configurable,
+ * as of now its static but networkId will be read from the genesis file
+ */
+ Composite childComp = new Composite(scrolledComposite, SWT.None);
+ childComp.setLayout(new GridLayout(1, false));
+ childComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Group networkGroup = new Group(childComp, SWT.BORDER);
- networkGroup.setLayout(new GridLayout(1, false));
- networkGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- networkGroup.setText("Network");
+ Group networkGroup = new Group(childComp, SWT.BORDER);
+ networkGroup.setLayout(new GridLayout(1, false));
+ networkGroup
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ networkGroup.setText("Network");
- this.networkIdLabel = new Label(networkGroup, SWT.None | SWT.READ_ONLY);
- this.networkIdLabel.setText("Network ID : " +
- (this.networkId.isEmpty() ? CoreCommandExecutor.getInstance().getDefaultNetworkIdForGeth() : this.networkId));
+ this.networkIdLabel = new Label(networkGroup, SWT.None | SWT.READ_ONLY);
+ this.networkIdLabel.setText("Network ID : " + (this.networkId.isEmpty()
+ ? CoreCommandExecutor.getInstance().getDefaultNetworkIdForGeth()
+ : this.networkId));
- Group rpcGroup = new Group(childComp, SWT.BORDER);
- rpcGroup.setLayout(new GridLayout(1, false));
- rpcGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- rpcGroup.setText("RPC");
+ Group rpcGroup = new Group(childComp, SWT.BORDER);
+ rpcGroup.setLayout(new GridLayout(1, false));
+ rpcGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ rpcGroup.setText("RPC");
- for (Map.Entry<String, String> entry : this.gethOptions.entrySet()) {
- Label lab = new Label(rpcGroup, SWT.None);
- String val = entry.getValue();
- lab.setText(entry.getKey() + (val.isEmpty() ? "" : " : " + val));
- }
- return childComp;
- }
+ for (Map.Entry<String, String> entry : this.gethOptions.entrySet()) {
+ Label lab = new Label(rpcGroup, SWT.None);
+ String val = entry.getValue();
+ lab.setText(entry.getKey() + (val.isEmpty() ? "" : " : " + val));
+ }
+ return childComp;
+ }
- private void getandSetSelectedGenesisFile(final Composite parent, final Text textWidget) {
- FileDialog dataDir = new FileDialog(parent.getShell());
- dataDir.setFilterPath(this.userDir);
- String selectedDir = dataDir.open();
- textWidget.setText(selectedDir);
- try (BufferedReader br = new BufferedReader(new FileReader(new File(selectedDir)))) {
- String contents = "";
- while ((contents = br.readLine()) != null) {
- if (contents.contains("chainId")) {
- this.networkId = contents.substring(contents.indexOf(':') + 1).replace(",", "").trim();
- this.networkIdLabel.setText("Network ID : " + this.networkId);
- this.networkIdLabel.getParent().layout();
- }
- }
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- }
+ private void getandSetSelectedGenesisFile(final Composite parent,
+ final Text textWidget) {
+ FileDialog dataDir = new FileDialog(parent.getShell());
+ dataDir.setFilterPath(this.userDir);
+ String selectedDir = dataDir.open();
+ textWidget.setText(selectedDir);
+ try (BufferedReader br = new BufferedReader(
+ new FileReader(new File(selectedDir)))) {
+ String contents = "";
+ while ((contents = br.readLine()) != null) {
+ if (contents.contains("chainId")) {
+ this.networkId = contents
+ .substring(contents.indexOf(':') + 1)
+ .replace(",", "").trim();
+ this.networkIdLabel
+ .setText("Network ID : " + this.networkId);
+ this.networkIdLabel.getParent().layout();
+ }
+ }
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ e.getMessage(), e);
+ }
+ }
- private void getAndSetSelectedDirectoryNode(final Composite parent, final Text textWidget) {
- DirectoryDialog dirDialog = new DirectoryDialog(parent.getShell());
- dirDialog.setFilterPath(this.userDir);
- String selectedDir = dirDialog.open();
- textWidget.setText(selectedDir);
- }
+ private void getAndSetSelectedDirectoryNode(final Composite parent,
+ final Text textWidget) {
+ DirectoryDialog dirDialog = new DirectoryDialog(parent.getShell());
+ dirDialog.setFilterPath(this.userDir);
+ String selectedDir = dirDialog.open();
+ textWidget.setText(selectedDir);
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected void okPressed() {
- this.dataDirectory = this.dataDirText.getText();
- this.genesisFile = this.initFileText.getText();
- super.okPressed();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void okPressed() {
+ this.dataDirectory = this.dataDirText.getText();
+ this.genesisFile = this.initFileText.getText();
+ super.okPressed();
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/RunViewPart.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/RunViewPart.java
index e31cb66..ab2c60c 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/RunViewPart.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/RunViewPart.java
@@ -1,3 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Santhosh Gokhale D - Initial contribution and API
+ *******************************************************************************/
package org.eclipse.blockchain.ui.views;
import org.eclipse.swt.SWT;
@@ -10,115 +23,114 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.ViewPart;
-
/**
- * Class with the implementation for the Run time view that would deploy the selected smart contaracts belonging to an
- * account on either a test network or an actual blockchain network.
- *
- * @author SDG3COB
+ * Class with the implementation for the Run time view that would deploy the
+ * selected smart contaracts belonging to an account on either a test network or
+ * an actual blockchain network.
*/
public class RunViewPart extends ViewPart {
- /**
- * Empty constructor.
- */
- public RunViewPart() {
- // Do nothing
- }
+ /**
+ * Empty constructor.
+ */
+ public RunViewPart() {
+ // Do nothing
+ }
- @Override
- public void createPartControl(final Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
+ @Override
+ public void createPartControl(final Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.horizontalSpacing = 5;
- layout.verticalSpacing = 10;
- layout.makeColumnsEqualWidth = true;
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.horizontalSpacing = 5;
+ layout.verticalSpacing = 10;
+ layout.makeColumnsEqualWidth = true;
- composite.setLayout(layout);
+ composite.setLayout(layout);
- Button testNetButton = new Button(composite, SWT.RADIO);
- testNetButton.setText("TestNet");
+ Button testNetButton = new Button(composite, SWT.RADIO);
+ testNetButton.setText("TestNet");
- Combo testNetCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
- testNetCombo.add("TestNet A");
- testNetCombo.add("TestNet B");
- testNetCombo.add("TestNet C");
+ Combo testNetCombo = new Combo(composite,
+ SWT.DROP_DOWN | SWT.READ_ONLY);
+ testNetCombo.add("TestNet A");
+ testNetCombo.add("TestNet B");
+ testNetCombo.add("TestNet C");
- GridData gridTestNetCombo = commonGridDataCreation();
- testNetCombo.setLayoutData(gridTestNetCombo);
+ GridData gridTestNetCombo = commonGridDataCreation();
+ testNetCombo.setLayoutData(gridTestNetCombo);
- Button atAddressButton = new Button(composite, SWT.RADIO);
- atAddressButton.setText("At Address");
+ Button atAddressButton = new Button(composite, SWT.RADIO);
+ atAddressButton.setText("At Address");
- Text addressText = new Text(composite, SWT.BORDER);
- addressText.setText("0.0.0.0");
- GridData gridDataAddressText = commonGridDataCreation();
- addressText.setLayoutData(gridDataAddressText);
+ Text addressText = new Text(composite, SWT.BORDER);
+ addressText.setText("0.0.0.0");
+ GridData gridDataAddressText = commonGridDataCreation();
+ addressText.setLayoutData(gridDataAddressText);
- Label accountLabel = new Label(composite, 0);
- accountLabel.setText("Account");
+ Label accountLabel = new Label(composite, 0);
+ accountLabel.setText("Account");
- Combo accountCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
+ Combo accountCombo = new Combo(composite,
+ SWT.DROP_DOWN | SWT.READ_ONLY);
- accountCombo.add("0x76439311057c197e3ef6a9ad87f57e3550d36f5c");
- accountCombo.add("0xb304c9e034f29800b6cef17934a9e1a5564d9bc6");
- accountCombo.add("0x9d6a1232e12b793db22ba3f76a9e9f6650e4bf54");
- GridData gridDataAccText = commonGridDataCreation();
- accountCombo.setLayoutData(gridDataAccText);
+ accountCombo.add("0x76439311057c197e3ef6a9ad87f57e3550d36f5c");
+ accountCombo.add("0xb304c9e034f29800b6cef17934a9e1a5564d9bc6");
+ accountCombo.add("0x9d6a1232e12b793db22ba3f76a9e9f6650e4bf54");
+ GridData gridDataAccText = commonGridDataCreation();
+ accountCombo.setLayoutData(gridDataAccText);
+ Label gasLimitLabel = new Label(composite, 0);
+ gasLimitLabel.setText("Gas Limit");
- Label gasLimitLabel = new Label(composite, 0);
- gasLimitLabel.setText("Gas Limit");
+ Text gasLimitText = new Text(composite, SWT.BORDER);
+ gasLimitText.setText("10000");
+ GridData gridDataGasLimitText = commonGridDataCreation();
+ gasLimitText.setLayoutData(gridDataGasLimitText);
- Text gasLimitText = new Text(composite, SWT.BORDER);
- gasLimitText.setText("10000");
- GridData gridDataGasLimitText = commonGridDataCreation();
- gasLimitText.setLayoutData(gridDataGasLimitText);
+ Label valueLabel = new Label(composite, 0);
+ valueLabel.setText("Value");
+ Text valueText = new Text(composite, SWT.BORDER);
+ valueText.setText("0");
+ GridData gridDataValueText = commonGridDataCreation();
+ valueText.setLayoutData(gridDataValueText);
- Label valueLabel = new Label(composite, 0);
- valueLabel.setText("Value");
+ Label environmentLabel = new Label(composite, 0);
+ environmentLabel.setText("Smart Contract");
- Text valueText = new Text(composite, SWT.BORDER);
- valueText.setText("0");
- GridData gridDataValueText = commonGridDataCreation();
- valueText.setLayoutData(gridDataValueText);
+ Combo environmentCombo = new Combo(composite,
+ SWT.DROP_DOWN | SWT.READ_ONLY);
- Label environmentLabel = new Label(composite, 0);
- environmentLabel.setText("Smart Contract");
+ environmentCombo.add("SC 1");
+ environmentCombo.add("SC 2");
+ environmentCombo.add("SC 3");
+ GridData gridDataText = commonGridDataCreation();
+ environmentCombo.setLayoutData(gridDataText);
- Combo environmentCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
+ Button deployButton = new Button(composite, SWT.PUSH);
+ deployButton.setText("Deploy");
- environmentCombo.add("SC 1");
- environmentCombo.add("SC 2");
- environmentCombo.add("SC 3");
- GridData gridDataText = commonGridDataCreation();
- environmentCombo.setLayoutData(gridDataText);
+ GridData gridDataDeployButton = commonGridDataCreation();
+ gridDataDeployButton.horizontalSpan = 2;
+ deployButton.setLayoutData(gridDataDeployButton);
- Button deployButton = new Button(composite, SWT.PUSH);
- deployButton.setText("Deploy");
+ }
- GridData gridDataDeployButton = commonGridDataCreation();
- gridDataDeployButton.horizontalSpan = 2;
- deployButton.setLayoutData(gridDataDeployButton);
+ /**
+ * @return
+ */
+ private GridData commonGridDataCreation() {
+ GridData gridDataAddressText = new GridData();
+ gridDataAddressText.horizontalAlignment = GridData.FILL;
+ gridDataAddressText.grabExcessHorizontalSpace = true;
+ return gridDataAddressText;
+ }
- }
+ @Override
+ public void setFocus() {
- /**
- * @return
- */
- private GridData commonGridDataCreation() {
- GridData gridDataAddressText = new GridData();
- gridDataAddressText.horizontalAlignment = GridData.FILL;
- gridDataAddressText.grabExcessHorizontalSpace = true;
- return gridDataAddressText;
- }
+ }
- @Override
- public void setFocus() {
-
- }
-
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionHistoryView.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionHistoryView.java
index 9f6f213..78199c2 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionHistoryView.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionHistoryView.java
@@ -1,6 +1,17 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Abirami Bhologa Indiran - Initial contribution and API
+ * Adhith Gopal
+ *******************************************************************************/
package org.eclipse.blockchain.ui.views;
import java.io.IOException;
@@ -9,9 +20,9 @@
import org.eclipse.blockchain.core.BlockchainCore;
import org.eclipse.blockchain.core.BlockchainViewsRegistry;
-import org.eclipse.blockchain.core.IBlockchainView;
-import org.eclipse.blockchain.core.TransactionModel;
import org.eclipse.blockchain.core.Web3jHandler;
+import org.eclipse.blockchain.core.interfaces.IBlockchainView;
+import org.eclipse.blockchain.core.model.TransactionModel;
import org.eclipse.blockchain.ui.Activator;
import org.eclipse.fx.ui.workbench3.FXViewPart;
import org.eclipse.ui.IViewSite;
@@ -35,195 +46,237 @@
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
-
/**
- * @author ABB3COB
+ * A Table representation of Transactions
*/
-public class TransactionHistoryView extends FXViewPart implements IBlockchainView {
+public class TransactionHistoryView extends FXViewPart
+ implements
+ IBlockchainView {
- /**
- * Important Note - This view is added to the list of registered blockchain views in the Activator. Because this class
- * won't be initialized until user manually activate's the view. To avoid data loss this view is added in Activator
- */
- /**
- * These 2 are maintained as a static instance because FXViewPart creates one instance and we create another instance
- * inactivator. This small glitch can be handled later
- */
- private static TableView<TransactionModel> table;
- /**
- * A temporary model object
- */
- private static Set<TransactionModel> tableContents = new HashSet<>();
+ /**
+ * Important Note - This view is added to the list of registered blockchain
+ * views in the Activator. Because this class won't be initialized until
+ * user manually activate's the view. To avoid data loss this view is added
+ * in Activator
+ */
+ /**
+ * These 2 are maintained as a static instance because FXViewPart creates
+ * one instance and we create another instance inactivator. This small
+ * glitch can be handled later
+ */
+ private static TableView<TransactionModel> table;
+ /**
+ * A temporary model object
+ */
+ private static Set<TransactionModel> tableContents = new HashSet<>();
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IViewSite site) throws PartInitException {
- super.init(site);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IViewSite site) throws PartInitException {
+ super.init(site);
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected Scene createFxScene() {
- TransactionHistoryView.table = new TableView<>();
- // Create the VBox
- VBox root = new VBox(TransactionHistoryView.table);
- TransactionHistoryView.table.setVisible(true);
- TransactionHistoryView.table.setPlaceholder(new Label("No transactions to display"));
- TransactionHistoryView.table.setRowFactory(tv -> {
- TableRow<TransactionModel> row = new TableRow<>();
- row.setTooltip(new Tooltip("Double click to view details"));
- row.setTextOverrun(OverrunStyle.ELLIPSIS);
- row.setOnMouseClicked(event -> {
- if ((event.getClickCount() == 2) && !row.isEmpty()) {
- TransactionModel transaction = row.getItem();
- String transactionDetailsMsg = "blockHash : " + transaction.getBlockHash() + System.lineSeparator() +
- "blockNumber : " + transaction.getBlockNumber() + System.lineSeparator() + "from : " +
- transaction.getFromAddress() + System.lineSeparator() + "gas : " + transaction.getGas() +
- System.lineSeparator() + "gasPrice : " + transaction.getGasPrice() + System.lineSeparator() + "hash : " +
- transaction.getTransactionHash() + System.lineSeparator() + "input : " + transaction.getInput() +
- System.lineSeparator() + "nonce : " + transaction.getNonce() + System.lineSeparator() + "r : " +
- transaction.getR() + System.lineSeparator() + "s : " + transaction.getS() + System.lineSeparator() +
- "to : " + transaction.getToAddress() + System.lineSeparator() + "transactionIndex : " +
- transaction.getTransactionIndex() + System.lineSeparator() + "v : " + transaction.getV() +
- System.lineSeparator() + "value : " + transaction.getValue() + System.lineSeparator();
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Scene createFxScene() {
+ TransactionHistoryView.table = new TableView<>();
+ // Create the VBox
+ VBox root = new VBox(TransactionHistoryView.table);
+ TransactionHistoryView.table.setVisible(true);
+ TransactionHistoryView.table
+ .setPlaceholder(new Label("No transactions to display"));
+ TransactionHistoryView.table.setRowFactory(tv -> {
+ TableRow<TransactionModel> row = new TableRow<>();
+ row.setTooltip(new Tooltip("Double click to view details"));
+ row.setTextOverrun(OverrunStyle.ELLIPSIS);
+ row.setOnMouseClicked(event -> {
+ if ((event.getClickCount() == 2) && !row.isEmpty()) {
+ TransactionModel transaction = row.getItem();
+ String transactionDetailsMsg = "blockHash : "
+ + transaction.getBlockHash()
+ + System.lineSeparator() + "blockNumber : "
+ + transaction.getBlockNumber()
+ + System.lineSeparator() + "from : "
+ + transaction.getFromAddress()
+ + System.lineSeparator() + "gas : "
+ + transaction.getGas() + System.lineSeparator()
+ + "gasPrice : " + transaction.getGasPrice()
+ + System.lineSeparator() + "hash : "
+ + transaction.getTransactionHash()
+ + System.lineSeparator() + "input : "
+ + transaction.getInput() + System.lineSeparator()
+ + "nonce : " + transaction.getNonce()
+ + System.lineSeparator() + "r : "
+ + transaction.getR() + System.lineSeparator()
+ + "s : " + transaction.getS()
+ + System.lineSeparator() + "to : "
+ + transaction.getToAddress()
+ + System.lineSeparator() + "transactionIndex : "
+ + transaction.getTransactionIndex()
+ + System.lineSeparator() + "v : "
+ + transaction.getV() + System.lineSeparator()
+ + "value : " + transaction.getValue()
+ + System.lineSeparator();
- showAlert(transactionDetailsMsg, "Transaction details");
- }
- });
- return row;
- });
+ showAlert(transactionDetailsMsg, "Transaction details");
+ }
+ });
+ return row;
+ });
- TableColumn<TransactionModel, String> blockHashColumn = new TableColumn<>("Block Hash");
- blockHashColumn.setCellValueFactory(new PropertyValueFactory<>("blockHash"));
+ TableColumn<TransactionModel, String> blockHashColumn = new TableColumn<>(
+ "Block Hash");
+ blockHashColumn
+ .setCellValueFactory(new PropertyValueFactory<>("blockHash"));
- TableColumn<TransactionModel, String> blockNumberColumn = new TableColumn<>("block Number");
- blockNumberColumn.setCellValueFactory(new PropertyValueFactory<>("blockNumber"));
+ TableColumn<TransactionModel, String> blockNumberColumn = new TableColumn<>(
+ "block Number");
+ blockNumberColumn
+ .setCellValueFactory(new PropertyValueFactory<>("blockNumber"));
- TableColumn<TransactionModel, String> fromAddressColumn = new TableColumn<>("From");
- fromAddressColumn.setCellValueFactory(new PropertyValueFactory<>("fromAddress"));
+ TableColumn<TransactionModel, String> fromAddressColumn = new TableColumn<>(
+ "From");
+ fromAddressColumn
+ .setCellValueFactory(new PropertyValueFactory<>("fromAddress"));
- TableColumn<TransactionModel, String> gasColumn = new TableColumn<>("Gas");
- gasColumn.setCellValueFactory(new PropertyValueFactory<>("gas"));
+ TableColumn<TransactionModel, String> gasColumn = new TableColumn<>(
+ "Gas");
+ gasColumn.setCellValueFactory(new PropertyValueFactory<>("gas"));
- TableColumn<TransactionModel, String> gasPriceColumn = new TableColumn<>("Gas Price");
- gasPriceColumn.setCellValueFactory(new PropertyValueFactory<>("gasPrice"));
+ TableColumn<TransactionModel, String> gasPriceColumn = new TableColumn<>(
+ "Gas Price");
+ gasPriceColumn
+ .setCellValueFactory(new PropertyValueFactory<>("gasPrice"));
- TableColumn<TransactionModel, String> transactionHashColumn = new TableColumn<>("Hash");
- transactionHashColumn.setCellValueFactory(new PropertyValueFactory<>("transactionHash"));
+ TableColumn<TransactionModel, String> transactionHashColumn = new TableColumn<>(
+ "Hash");
+ transactionHashColumn.setCellValueFactory(
+ new PropertyValueFactory<>("transactionHash"));
- TableColumn<TransactionModel, String> inputColumn = new TableColumn<>("Input");
- inputColumn.setCellValueFactory(new PropertyValueFactory<>("input"));
+ TableColumn<TransactionModel, String> inputColumn = new TableColumn<>(
+ "Input");
+ inputColumn.setCellValueFactory(new PropertyValueFactory<>("input"));
- TableColumn<TransactionModel, String> nonceColumn = new TableColumn<>("Nonce");
- nonceColumn.setCellValueFactory(new PropertyValueFactory<>("nonce"));
+ TableColumn<TransactionModel, String> nonceColumn = new TableColumn<>(
+ "Nonce");
+ nonceColumn.setCellValueFactory(new PropertyValueFactory<>("nonce"));
- TableColumn<TransactionModel, String> rColumn = new TableColumn<>("R");
- rColumn.setCellValueFactory(new PropertyValueFactory<>("r"));
+ TableColumn<TransactionModel, String> rColumn = new TableColumn<>("R");
+ rColumn.setCellValueFactory(new PropertyValueFactory<>("r"));
- TableColumn<TransactionModel, String> sColumn = new TableColumn<>("S");
- sColumn.setCellValueFactory(new PropertyValueFactory<>("s"));
+ TableColumn<TransactionModel, String> sColumn = new TableColumn<>("S");
+ sColumn.setCellValueFactory(new PropertyValueFactory<>("s"));
- TableColumn<TransactionModel, String> toAddressColumn = new TableColumn<>("To");
- toAddressColumn.setCellValueFactory(new PropertyValueFactory<>("toAddress"));
+ TableColumn<TransactionModel, String> toAddressColumn = new TableColumn<>(
+ "To");
+ toAddressColumn
+ .setCellValueFactory(new PropertyValueFactory<>("toAddress"));
- TableColumn<TransactionModel, String> transactionIndexColumn = new TableColumn<>("Transaction Index");
- transactionIndexColumn.setCellValueFactory(new PropertyValueFactory<>("transactionIndex"));
- TransactionHistoryView.table.getColumns().add(blockHashColumn);
- TransactionHistoryView.table.getColumns().add(blockNumberColumn);
- TransactionHistoryView.table.getColumns().add(fromAddressColumn);
- TransactionHistoryView.table.getColumns().add(gasPriceColumn);
- TransactionHistoryView.table.getColumns().add(transactionHashColumn);
- TransactionHistoryView.table.getColumns().add(inputColumn);
- TransactionHistoryView.table.getColumns().add(nonceColumn);
- TransactionHistoryView.table.getColumns().add(rColumn);
- TransactionHistoryView.table.getColumns().add(sColumn);
- TransactionHistoryView.table.getColumns().add(toAddressColumn);
- TransactionHistoryView.table.getColumns().add(transactionIndexColumn);
+ TableColumn<TransactionModel, String> transactionIndexColumn = new TableColumn<>(
+ "Transaction Index");
+ transactionIndexColumn.setCellValueFactory(
+ new PropertyValueFactory<>("transactionIndex"));
+ TransactionHistoryView.table.getColumns().add(blockHashColumn);
+ TransactionHistoryView.table.getColumns().add(blockNumberColumn);
+ TransactionHistoryView.table.getColumns().add(fromAddressColumn);
+ TransactionHistoryView.table.getColumns().add(gasPriceColumn);
+ TransactionHistoryView.table.getColumns().add(transactionHashColumn);
+ TransactionHistoryView.table.getColumns().add(inputColumn);
+ TransactionHistoryView.table.getColumns().add(nonceColumn);
+ TransactionHistoryView.table.getColumns().add(rColumn);
+ TransactionHistoryView.table.getColumns().add(sColumn);
+ TransactionHistoryView.table.getColumns().add(toAddressColumn);
+ TransactionHistoryView.table.getColumns().add(transactionIndexColumn);
- TransactionHistoryView.table.setTableMenuButtonVisible(true);
- ContextMenu contextMenu = new ContextMenu();
+ TransactionHistoryView.table.setTableMenuButtonVisible(true);
+ ContextMenu contextMenu = new ContextMenu();
- MenuItem debugItem = new MenuItem("Debug");
- MenuItem exportMenu = new MenuItem("Export");
- MenuItem transactionReceiptMenu = new MenuItem("TX Receipt");
+ MenuItem debugItem = new MenuItem("Debug");
+ MenuItem exportMenu = new MenuItem("Export");
+ MenuItem transactionReceiptMenu = new MenuItem("TX Receipt");
- contextMenu.getItems().add(debugItem);
- contextMenu.getItems().add(exportMenu);
- contextMenu.getItems().add(transactionReceiptMenu);
- transactionReceiptMenu.setOnAction((final ActionEvent event) -> {
- try {
- TransactionModel selectedItem = TransactionHistoryView.table.getSelectionModel().getSelectedItem();
- showAlert(Web3jHandler.getInstance().getTransactionReceiptAsString(selectedItem.getTransactionHash()),
- "Transaction receipt");
- }
- catch (IOException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, "Error during transaction receipt generation",
- e);
- }
- });
+ contextMenu.getItems().add(debugItem);
+ contextMenu.getItems().add(exportMenu);
+ contextMenu.getItems().add(transactionReceiptMenu);
+ transactionReceiptMenu.setOnAction((final ActionEvent event) -> {
+ try {
+ TransactionModel selectedItem = TransactionHistoryView.table
+ .getSelectionModel().getSelectedItem();
+ showAlert(
+ Web3jHandler.getInstance()
+ .getTransactionReceiptAsString(
+ selectedItem.getTransactionHash()),
+ "Transaction receipt");
+ } catch (IOException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ "Error during transaction receipt generation", e);
+ }
+ });
- TransactionHistoryView.table.setContextMenu(contextMenu);
- TransactionHistoryView.table.autosize();
- if (!tableContents.isEmpty()) {
- TransactionHistoryView.table.getItems().addAll(tableContents);
- }
+ TransactionHistoryView.table.setContextMenu(contextMenu);
+ TransactionHistoryView.table.autosize();
+ if (!tableContents.isEmpty()) {
+ TransactionHistoryView.table.getItems().addAll(tableContents);
+ }
+ // Create the Scene
+ Scene scene = new Scene(root);
+ scene.getStylesheets()
+ .add(getClass().getResource("Views.css").toExternalForm());
+ return scene;
- // Create the Scene
- Scene scene = new Scene(root);
- scene.getStylesheets().add(getClass().getResource("Views.css").toExternalForm());
- return scene;
+ }
- }
+ private void showAlert(final String transactionDetailsMsg,
+ final String title) {
+ Alert transactionDetailsAlert = new Alert(AlertType.INFORMATION);
+ transactionDetailsAlert.setTitle(title);
- private void showAlert(final String transactionDetailsMsg, final String title) {
- Alert transactionDetailsAlert = new Alert(AlertType.INFORMATION);
- transactionDetailsAlert.setTitle(title);
+ TextArea detailsArea = new TextArea(transactionDetailsMsg);
+ detailsArea.setEditable(false);
+ detailsArea.setWrapText(true);
+ GridPane.setVgrow(detailsArea, Priority.ALWAYS);
+ GridPane.setHgrow(detailsArea, Priority.ALWAYS);
+ transactionDetailsAlert.getDialogPane()
+ .setExpandableContent(detailsArea);
+ transactionDetailsAlert.getDialogPane().setExpanded(true);
+ transactionDetailsAlert.showAndWait();
+ }
- TextArea detailsArea = new TextArea(transactionDetailsMsg);
- detailsArea.setEditable(false);
- detailsArea.setWrapText(true);
- GridPane.setVgrow(detailsArea, Priority.ALWAYS);
- GridPane.setHgrow(detailsArea, Priority.ALWAYS);
- transactionDetailsAlert.getDialogPane().setExpandableContent(detailsArea);
- transactionDetailsAlert.getDialogPane().setExpanded(true);
- transactionDetailsAlert.showAndWait();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setFxFocus() {
- /**
- * {@inheritDoc}
- */
- @Override
- protected void setFxFocus() {
+ }
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void updateView(final TransactionModel transactionModel) {
+ tableContents.add(transactionModel);
+ if (TransactionHistoryView.table == null) {
+ return;// We are not supposed to manually create this let the
+ // framework handle the creation. data loss wont happen
+ // because we store the transaction in a set.
+ }
+ TransactionHistoryView.table.getItems().add(transactionModel);
+ TransactionHistoryView.table.refresh();
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void updateView(final TransactionModel transactionModel) {
- tableContents.add(transactionModel);
- if (TransactionHistoryView.table == null) {
- return;// We are not supposed to manually create this let the framework handle the creation. data loss wont happen
- // because we store the transaction in a set.
- }
- TransactionHistoryView.table.getItems().add(transactionModel);
- TransactionHistoryView.table.refresh();
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ BlockchainViewsRegistry.dereisterBlockchainView(this);
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- super.dispose();
- BlockchainViewsRegistry.dereisterBlockchainView(this);
-
- }
-}
-
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionsViewPart.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionsViewPart.java
index 3423c2e..4ad4790 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionsViewPart.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/views/TransactionsViewPart.java
@@ -1,12 +1,23 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Deepthi Murugaiyan - Initial contribution and API
+ * Adhith Gopal
+ * Pavithra Krishna Reddy
+ *******************************************************************************/
package org.eclipse.blockchain.ui.views;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -15,18 +26,21 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.StringJoiner;
import java.util.stream.Collectors;
import org.eclipse.blockchain.core.BlockchainCore;
import org.eclipse.blockchain.core.CoreCommandExecutor;
-import org.eclipse.blockchain.core.EthereumProject;
-import org.eclipse.blockchain.core.EthereumProjectNature;
import org.eclipse.blockchain.core.ProjectCreator;
import org.eclipse.blockchain.core.SecoBlocksPreferenceConstants;
import org.eclipse.blockchain.core.Web3jHandler;
+import org.eclipse.blockchain.core.events.BlockchainBuildTrigger;
import org.eclipse.blockchain.core.events.BlockchainEnvironmentChangedTrigger;
+import org.eclipse.blockchain.core.events.IBlockchainBuildEvent;
+import org.eclipse.blockchain.core.events.IBlockchainBuildListener;
import org.eclipse.blockchain.core.events.IBlockchainEnvironmentChangedEvent;
import org.eclipse.blockchain.core.events.IBlockchainEnvironmentChangedListener;
+import org.eclipse.blockchain.model.ethproject.EthereumProject;
import org.eclipse.blockchain.ui.Activator;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -58,6 +72,8 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.ISources;
import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchListener;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.services.IEvaluationService;
@@ -86,629 +102,741 @@
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
-
/**
- * @author DMU1COB
+ * Deploy and Transactions view
*/
public class TransactionsViewPart extends FXViewPart
- implements IResourceChangeListener, IBlockchainEnvironmentChangedListener {
+ implements IResourceChangeListener, IBlockchainEnvironmentChangedListener, IBlockchainBuildListener {
- private static final String SOLIDITY_OUTPUT_FOLDER = "sol-output";
- static Map<String, Set<IResource>> projectToSolidityFilesMap = new HashMap<>();
- ComboBox<String> cmbSmartContracts = new ComboBox<>();
- List<Object> listOfObjects = new ArrayList<>();
- GridPane gridPane = new GridPane();
- TextField constructorArgs = new TextField();
- private String anyErrors = "Not Done";
- private String deploySmartContractMessage = "Not Done";
- private String invokeSmartContractMessage = "Not Done";
- private static boolean isInputShellActive = false;
- private String selectedEnvironment = "";
+ private static final String SOLIDITY_OUTPUT_FOLDER = "sol-output";
+ static Map<IProject, Set<IResource>> projectToSolidityFilesMap = new HashMap<>();
+ ComboBox<String> cmbSmartContracts = new ComboBox<>();
+ List<Object> listOfObjects = new ArrayList<>();
+ GridPane gridPane = new GridPane();
+ TextField constructorArgs = new TextField();
+ private final String anyErrors = "Not Done";
+ private String deploySmartContractMessage = "Not Done";
+ private String invokeSmartContractMessage = "Not Done";
+ private static boolean isInputShellActive = false;
+ private String selectedEnvironment = "";
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IViewSite site) throws PartInitException {
- super.init(site);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(this);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IViewSite site) throws PartInitException {
+ super.init(site);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+ BlockchainEnvironmentChangedTrigger.getInstance().addBlockchainEnvironmentChangedListener(this);
+ BlockchainBuildTrigger.getInstance().addBuildListener(this);
+ /**
+ * Pre-shutdown hook to ensure that the project data gets persisted in the
+ * corresponding project model
+ */
+ PlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {
- /**
- * {@inheritDoc}
- */
- @Override
- public void resourceChanged(final IResourceChangeEvent event) {
+ @Override
+ public boolean preShutdown(final IWorkbench workbench, final boolean forced) {
+ try {
+ ProjectCreator.getInstance().saveAllProjects();
+ } catch (IOException e) {
+ MessageDialog md = new MessageDialog(Display.getDefault().getActiveShell(), "Modal Save Error",
+ null, "Error occured while saving the modal " + e.getMessage(), MessageDialog.ERROR,
+ new String[] { "OK" }, 0);
+ md.open();
+ BlockchainCore.getInstance().logException("", e.getMessage(), e);
+ }
+ return true;
+ }
- if ((event.getDelta() != null)) {
- IResourceDelta rootDelta = event.getDelta();
- try {
- rootDelta.accept(new IResourceDeltaVisitor() {
+ @Override
+ public void postShutdown(final IWorkbench workbench) {
+ /**
+ * Not required
+ */
+ }
+ });
+ }
- @Override
- public boolean visit(final IResourceDelta delta) throws CoreException {
- if ((delta != null) && (delta.getResource() != null) && (delta.getResource() instanceof IFile) &&
- (delta.getResource().getFileExtension() != null) &&
- (delta.getResource().getFileExtension().equals("sol")) && (delta.getKind() == IResourceDelta.REMOVED)) {
- Object currentSelection = getCurrentSelectionProject();
- if ((currentSelection != null) &&
- projectToSolidityFilesMap.containsKey(((IProject) currentSelection).getName())) {
- projectToSolidityFilesMap.get(((IProject) currentSelection).getName()).remove(delta.getResource());
- Display.getDefault().syncExec(() -> {
- updateSmartContractsCombo((IProject) currentSelection);
- });
- }
- }
- return true;
- }
- });
- }
- catch (CoreException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- }
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void resourceChanged(final IResourceChangeEvent event) {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Scene createFxScene() {
- Scene scene = null;
- try {
+ if ((event.getDelta() != null)) {
+ IResourceDelta rootDelta = event.getDelta();
+ try {
+ rootDelta.accept(new IResourceDeltaVisitor() {
+ @Override
+ public boolean visit(final IResourceDelta delta) throws CoreException {
+ if ((delta != null) && (delta.getResource() != null) && (delta.getResource() instanceof IFile)
+ && (delta.getResource().getFileExtension() != null)
+ && (delta.getResource().getFileExtension().equals("sol"))
+ && (delta.getKind() == IResourceDelta.REMOVED)) {
+ Object currentSelection = getCurrentSelectionProject();
+ if ((currentSelection != null)
+ && projectToSolidityFilesMap.containsKey(((IProject) currentSelection).getName())) {
+ projectToSolidityFilesMap.get(((IProject) currentSelection).getName())
+ .remove(delta.getResource());
+ Display.getDefault().syncExec(() -> {
+ updateSmartContractsCombo();
+ });
+ }
+ }
+ return true;
+ }
+ });
+ } catch (CoreException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ }
+ }
- this.gridPane.setPadding(new Insets(20));
- this.gridPane.setHgap(10);
- this.gridPane.setVgap(10);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Scene createFxScene() {
+ Scene scene = null;
+ try {
- ToolBar toolBar = new ToolBar();
- Button btnCompile = new Button("Compile");
- toolBar.getItems().add(btnCompile);
- toolBar.getItems().add(new Separator());
- Button btnDeploy = new Button("Deploy");
- toolBar.getItems().add(btnDeploy);
- toolBar.getItems().add(new Separator());
- Button btnContractAddress = new Button("CxAddr");
- btnContractAddress.setTooltip(new Tooltip("Contract Address"));
- toolBar.getItems().add(btnContractAddress);
- Button eventInfo = new Button("Event Information");
- toolBar.getItems().add(eventInfo);
- toolBar.setOrientation(Orientation.HORIZONTAL);
+ this.gridPane.setPadding(new Insets(20));
+ this.gridPane.setHgap(10);
+ this.gridPane.setVgap(10);
- ProgressBar progressBar = new ProgressBar(0);
- progressBar.setProgress(0.5);
+ ToolBar toolBar = new ToolBar();
+ // Commenting compile button for now bcz builder is there
+ // Button btnCompile = new Button("Compile");
+ // toolBar.getItems().add(btnCompile);
+ toolBar.getItems().add(new Separator());
+ Button btnDeploy = new Button("Deploy");
+ toolBar.getItems().add(btnDeploy);
+ toolBar.getItems().add(new Separator());
+ Button btnContractAddress = new Button("CxAddr");
+ btnContractAddress.setTooltip(new Tooltip("Contract Address"));
+ toolBar.getItems().add(btnContractAddress);
+ Button eventInfo = new Button("Event Info");
+ toolBar.getItems().add(eventInfo);
+ toolBar.setOrientation(Orientation.HORIZONTAL);
- Label lblContract = new Label();
- lblContract.setText("Smart Contract");
+ ProgressBar progressBar = new ProgressBar(0);
+ progressBar.setProgress(0.5);
+ Label lblContract = new Label();
+ lblContract.setText("Smart Contract");
- this.cmbSmartContracts.setPrefWidth(200);
- ObservableList<String> smartContractList = FXCollections.observableArrayList();
- smartContractList.addAll(getSmartContracts((IProject) getCurrentSelectionProject()));
- this.cmbSmartContracts.setItems(smartContractList);
- this.cmbSmartContracts.getSelectionModel().selectFirst();
+ this.cmbSmartContracts.setPrefWidth(200);
+ ObservableList<String> smartContractList = FXCollections.observableArrayList();
+ smartContractList.addAll(getSmartContracts());
+ this.cmbSmartContracts.setItems(smartContractList);
+ this.cmbSmartContracts.getSelectionModel().selectFirst();
- // Add a ChangeListener to the ComboBox
- this.cmbSmartContracts.getSelectionModel().selectedItemProperty()
- .addListener((final ObservableValue<? extends String> ov, final String oldValue, final String newValue) -> {
- // on change of smart-contract load that corresponding details in the UI
- this.constructorArgs.setText("");
- this.gridPane.getChildren().remove(this.constructorArgs);
- constructorTextUI();
- clearWidgets();
- String solPath = getSolPath(newValue);
- if (!solPath.isEmpty()) {
- String projectName = solPath.split("--")[1];
- String scAbsPath = solPath.split("--")[0];
- EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
- if (ethProject.isSCDeployed(
- ethProject.getProject()
- .getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), "")),
- getSelectedEnvironment())) {
- constructUI(solPath);
- }
- }
- });
+ // Add a ChangeListener to the ComboBox
+ this.cmbSmartContracts.getSelectionModel().selectedItemProperty().addListener(
+ (final ObservableValue<? extends String> ov, final String oldValue, final String newValue) -> {
+ // on change of smart-contract load that corresponding
+ // details in the UI
+ this.constructorArgs.setText("");
+ this.gridPane.getChildren().remove(this.constructorArgs);
+ constructorTextUI();
+ clearWidgets();
+ String solPath = getSolPath(newValue);
+ if (!solPath.isEmpty()) {
+ String projectName = solPath.split("--")[1];
+ String scAbsPath = solPath.split("--")[0];
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
+ if (ProjectCreator.getInstance()
+ .isSCDeployed(
+ ethProject.getProject()
+ .getFile(scAbsPath.replace(
+ ethProject.getProject().getLocation().toOSString(), "")),
+ getSelectedEnvironment())) {
+ constructUI(solPath);
+ }
+ }
+ });
- // Contract Address
- btnContractAddress.setOnAction(event -> {
- String selectedContract = this.cmbSmartContracts.getSelectionModel().getSelectedItem();
- String solPath = getSolPath(selectedContract);
- String projectName = solPath.split("--")[1];
- String scAbsPath = solPath.split("--")[0];
- EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
- IFile file =
- ethProject.getProject().getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), ""));
- String contractAddr = "Not deployed!!!";
- if (ethProject.isSCDeployed(file, getSelectedEnvironment())) {
- contractAddr = file.getName() + "-" + ethProject.getContractAddress(file, getSelectedEnvironment());
- }
- showAlert("Contract Address", contractAddr);
- });
+ // Contract Address
+ btnContractAddress.setOnAction(event -> {
+ String selectedContract = this.cmbSmartContracts.getSelectionModel().getSelectedItem();
+ String solPath = getSolPath(selectedContract);
+ String projectName = solPath.split("--")[1];
+ String scAbsPath = solPath.split("--")[0];
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(projectName);
+ IFile file = ethProject.getProject()
+ .getFile(scAbsPath.replace(ethProject.getProject().getLocation().toOSString(), ""));
+ String contractAddr = "Not deployed!!!";
+ if (ProjectCreator.getInstance().isSCDeployed(file, getSelectedEnvironment())) {
+ contractAddr = file.getName() + "-"
+ + ProjectCreator.getInstance().getContractAddress(file, getSelectedEnvironment());
+ }
+ showAlert("Contract Address", contractAddr);
+ });
- // Event Information
- eventInfo.setOnAction(value -> {
+ // Event Information
+ eventInfo.setOnAction(value -> {
- MessageDialog eventInfoDialog = new MessageDialog(Display.getDefault().getActiveShell(), "Event Information",
- null, Web3jHandler.getInstance().getEvents(), MessageDialog.INFORMATION, new String[] { "OK" }, 0);
- eventInfoDialog.open();
- });
+ MessageDialog eventInfoDialog = new MessageDialog(Display.getDefault().getActiveShell(),
+ "Event Information", null, Web3jHandler.getInstance().getEvents(), MessageDialog.INFORMATION,
+ new String[] { "OK" }, 0);
+ eventInfoDialog.open();
+ });
- // Deploy
- btnDeploy.setOnAction(value -> {
- clearWidgets();
- String selectedContract = this.cmbSmartContracts.getSelectionModel().getSelectedItem();
- try {
- String solPath = getSolPath(selectedContract);
- this.deploySmartContractMessage = "Not Done";
- IRunnableWithProgress deployRunnable = new IRunnableWithProgress() {
+ // Deploy
+ btnDeploy.setOnAction(value -> {
+ clearWidgets();
+ String selectedContract = this.cmbSmartContracts.getSelectionModel().getSelectedItem();
+ try {
+ String solPath = getSolPath(selectedContract);
- @Override
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- TransactionsViewPart.this.deploySmartContractMessage =
- Web3jHandler.getInstance().deploySmartContract(solPath.split("--")[1], selectedContract,
- getOutputDirPath(selectedContract), solPath.split("--")[0],
- TransactionsViewPart.this.constructorArgs.getText(), EtherAccountViewPart.getSelectedItem());
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- }
- };
- new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false, deployRunnable);
+ this.deploySmartContractMessage = "Not Done";
+ IRunnableWithProgress deployRunnable = new IRunnableWithProgress() {
- if (this.deploySmartContractMessage.isEmpty()) {
- constructUI(solPath);
- }
- else {
- MessageDialog errorDialog = new MessageDialog(Display.getDefault().getActiveShell(), "Geth Server error",
- null, this.deploySmartContractMessage, MessageDialog.ERROR, new String[] { "OK" }, 0);
- errorDialog.open();
- }
- // If-end
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- });
+ @Override
+ public void run(final IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ try {
+ String[] solArray = solPath.split("--");
+ TransactionsViewPart.this.deploySmartContractMessage = Web3jHandler.getInstance()
+ .deploySmartContract(solArray[1], solArray[2], getOutputDirPath(solArray[2]),
+ solArray[0], TransactionsViewPart.this.constructorArgs.getText(),
+ EtherAccountViewPart.getSelectedItem());
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ }
+ };
+ new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false, deployRunnable);
- // Compile
- btnCompile.setOnAction(value -> {
- Object selection = getCurrentSelectionResource();
- if ((selection != null) && (selection instanceof IResource)) {
- IProject selectedProject = ((IResource) selection).getProject();
- this.constructorArgs.setText("");
- this.gridPane.getChildren().remove(this.constructorArgs);
- clearWidgets();
- Set<IResource> solidityFilesSet =
- projectToSolidityFilesMap.computeIfAbsent(selectedProject.getName(), s -> new HashSet<>());
+ if (this.deploySmartContractMessage.isEmpty()) {
+ constructUI(solPath);
+ } else {
+ MessageDialog errorDialog = new MessageDialog(Display.getDefault().getActiveShell(),
+ "Geth Server error", null, this.deploySmartContractMessage, MessageDialog.ERROR,
+ new String[] { "OK" }, 0);
+ errorDialog.open();
+ }
+ // If-end
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ });
- try {
- if (selection instanceof IProject) {
- /**
- * The existing list of solidity files should be cleared only if project level compilation is choosen,
- * else if single file is selected for compilation only add that file to the list
- */
- solidityFilesSet.clear();
- selectedProject.accept((final IResource resource) -> {
- if ((resource instanceof IFile) && (resource.getFileExtension() != null) &&
- resource.getFileExtension().equals("sol")) {
- solidityFilesSet.add(resource);
- }
- return true;
- });
- }
- else if ((((IResource) selection).getFileExtension() != null) &&
- (((IResource) selection).getFileExtension().equals("sol"))) {
- solidityFilesSet.add((IResource) selection);
- }
- if ((selection instanceof IProject) && selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).exists()) {
- selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).delete(true, new NullProgressMonitor());
- }
- if (!selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).exists()) {
- selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).create(true, true, new NullProgressMonitor());
- }
- this.anyErrors = "Not Done";
- IRunnableWithProgress compileRunnable = new IRunnableWithProgress() {
+ // Compile
+// btnCompile.setOnAction(value -> {
+// Object selection = getCurrentSelectionResource();
+// if ((selection != null) && (selection instanceof IResource)) {
+// IProject selectedProject = ((IResource) selection).getProject();
+// this.constructorArgs.setText("");
+// this.gridPane.getChildren().remove(this.constructorArgs);
+// clearWidgets();
+// Set<IResource> solidityFilesSet = projectToSolidityFilesMap
+// .computeIfAbsent(selectedProject.getName(), s -> new HashSet<>());
+//
+// try {
+// if (selection instanceof IProject) {
+// /**
+// * The existing list of solidity files should be cleared only if project level
+// * compilation is choosen, else if single file is selected for compilation only
+// * add that file to the list
+// */
+// solidityFilesSet.clear();
+// selectedProject.accept((final IResource resource) -> {
+// if ((resource instanceof IFile) && (resource.getFileExtension() != null)
+// && resource.getFileExtension().equals("sol")) {
+// solidityFilesSet.add(resource);
+// }
+// return true;
+// });
+// } else if ((((IResource) selection).getFileExtension() != null)
+// && (((IResource) selection).getFileExtension().equals("sol"))) {
+// solidityFilesSet.add((IResource) selection);
+// }
+// if ((selection instanceof IProject)
+// && selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).exists()) {
+// selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).delete(true, new NullProgressMonitor());
+// }
+// if (!selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).exists()) {
+// selectedProject.getFolder(SOLIDITY_OUTPUT_FOLDER).create(true, true,
+// new NullProgressMonitor());
+// }
+// this.anyErrors = "Not Done";
+// IRunnableWithProgress compileRunnable = new IRunnableWithProgress() {
+//
+// @Override
+// public void run(final IProgressMonitor monitor)
+// throws InvocationTargetException, InterruptedException {
+// try {
+// List<IResource> solFiles = new ArrayList<>();
+// if (selection instanceof IProject) {
+// solFiles.addAll(solidityFilesSet);
+// } else {
+// // Single sol file
+// solFiles.add((IResource) selection);
+// }
+// TransactionsViewPart.this.anyErrors = CoreCommandExecutor.getInstance()
+// .solidityCompile(selectedProject.getName(), solFiles,
+// selectedProject.findMember(SOLIDITY_OUTPUT_FOLDER));
+// selectedProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+// } catch (CoreException | IOException | InterruptedException
+// | ClassNotFoundException e) {
+// BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+// }
+// }
+// };
+// if (Arrays.asList(selectedProject.getDescription().getNatureIds())
+// .contains(EthereumNature.ETHEREUM_NATURE)) {
+// new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false,
+// compileRunnable);
+// } else {
+// this.anyErrors = "Selected project is not an Ethereum Project";
+// }
+//
+// if (!this.anyErrors.isEmpty()) {
+// MessageDialog errorDialog = new MessageDialog(Display.getDefault().getActiveShell(),
+// "Solc error", null, this.anyErrors, MessageDialog.ERROR, new String[] { "OK" }, 0);
+// errorDialog.open();
+// }
+// } catch (CoreException | InvocationTargetException | InterruptedException e) {
+// BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+// }
+// /**
+// * This below re-assignment is to ensure that the projectToSolidityFilesMap
+// * contains only compiled resources, since this is populated initially and
+// * during compilation if some error occurs then this map will contain
+// * un-compiled solidity files
+// */
+// solidityFilesSet.clear();
+// solidityFilesSet.addAll(ProjectCreator.getInstance().getEthProject(selectedProject.getName())
+// .getCompiledSolidityFiles());
+// updateSmartContractsCombo(selectedProject);
+// }
+// });// End of compile
- @Override
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- List<IResource> solFiles = new ArrayList<>();
- if (selection instanceof IProject) {
- solFiles.addAll(solidityFilesSet);
- }
- else {
- // Single sol file
- solFiles.add((IResource) selection);
- }
- TransactionsViewPart.this.anyErrors = CoreCommandExecutor.getInstance().solidityCompile(
- selectedProject.getName(), solFiles, selectedProject.findMember(SOLIDITY_OUTPUT_FOLDER));
- selectedProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- }
- catch (CoreException | IOException | InterruptedException | ClassNotFoundException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- }
- };
- if (Arrays.asList(selectedProject.getDescription().getNatureIds())
- .contains(EthereumProjectNature.ETHEREUM_NATURE)) {
- new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false, compileRunnable);
- }
- else {
- this.anyErrors = "Selected project is not an Ethereum Project";
- }
+ this.gridPane.add(toolBar, 0, 0);
+ // Info button to display details about input
+ ImageView imageView = new ImageView(new Image(this.getClass().getResourceAsStream("/icon/info.png")));
+ imageView.setOnMouseClicked((mouseEvent) -> {
+ // On click display how to enter input
+ String inputFormatMessage = "For multiple parameters enter all inputs separated by ; "
+ + "\n Eg: for add(uint a, uint b) -> input should be 10;12"
+ + "\n\n For Array enter array input's as comma separated value"
+ + "\n Eg: for add(uint[2] a, uintb) -> input should be 2:10,12;13"
+ + "\n here 2 denotes the number of array elements and 10,12 represent the "
+ + "\n actual array elements"
+ + "\n\n For multi-dimensional arrays mention dimension size along with elements"
+ + "\n Eg: for add(uint[2][] a) -> input should be 2,3:1,2,3,4,5,6"
+ + "\n here 2,3 denotes the 1st dimension size and 2nd dimension size"
+ + "\n : is the separator between dimension size and input elements"
+ + "\n and 1,2,3,4,5,6 are the input elements.";
+ showAlert("Input Format", inputFormatMessage);
+ });
- if (!this.anyErrors.isEmpty()) {
- MessageDialog errorDialog = new MessageDialog(Display.getDefault().getActiveShell(), "Solc error", null,
- this.anyErrors, MessageDialog.ERROR, new String[] { "OK" }, 0);
- errorDialog.open();
- }
- }
- catch (CoreException | InvocationTargetException | InterruptedException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- /**
- * This below re-assignment is to ensure that the projectToSolidityFilesMap contains only compiled resources,
- * since this is populated initially and during compilation if some error occurs then this map will contain
- * un-compiled solidity files
- */
- solidityFilesSet.clear();
- solidityFilesSet
- .addAll(ProjectCreator.getInstance().getEthProject(selectedProject.getName()).getCompiledSolidityFiles());
- updateSmartContractsCombo(selectedProject);
- }
- });// End of compile
+ this.gridPane.add(imageView, 2, 0);
+ this.gridPane.add(lblContract, 0, 1);
+ this.gridPane.add(this.cmbSmartContracts, 1, 1);
+ toolBar.getItems().add(new Separator());
- this.gridPane.add(toolBar, 0, 0);
- // Info button to display details about input
- ImageView imageView = new ImageView(new Image(this.getClass().getResourceAsStream("/icon/info.png")));
- imageView.setOnMouseClicked((mouseEvent) -> {
- // On click display how to enter input
- String inputFormatMessage = "For multiple parameters enter all inputs separated by ; " +
- "\n Eg: for add(uint a, uint b) -> input should be 10;12" +
- "\n\n For Array enter array input's as comma separated value" +
- "\n Eg: for add(uint[2] a, uintb) -> input should be 2:10,12;13" +
- "\n here 2 denotes the number of array elements and 10,12 represent the " + "\n actual array elements" +
- "\n\n For multi-dimensional arrays mention dimension size along with elements" +
- "\n Eg: for add(uint[2][] a) -> input should be 2,3:1,2,3,4,5,6" +
- "\n here 2,3 denotes the 1st dimension size and 2nd dimension size" +
- "\n : is the separator between dimension size and input elements" +
- "\n and 1,2,3,4,5,6 are the input elements.";
- showAlert("Input Format", inputFormatMessage);
- });
+ // gridPane.add(progressBar, 0, 2);
+ ScrollPane scrollPane = new ScrollPane(this.gridPane);
+ scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
+ scene = new Scene(scrollPane, 550, 400);
- this.gridPane.add(imageView, 2, 0);
- this.gridPane.add(lblContract, 0, 1);
- this.gridPane.add(this.cmbSmartContracts, 1, 1);
+ scene.getStylesheets().add(getClass().getResource("Views.css").toExternalForm());
- toolBar.getItems().add(new Separator());
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ return scene;
+ }
- // gridPane.add(progressBar, 0, 2);
- ScrollPane scrollPane = new ScrollPane(this.gridPane);
- scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
- scene = new Scene(scrollPane, 550, 400);
+ /**
+ * This will populate the deploy data on restart of workspace when projects are
+ * present
+ *
+ * For now its done only for restart need to check while closing and opening the
+ * view, also restart flag should be replaced by a proper way
+ */
+ private void initializeCombo() {
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for (IProject project : projects) {
+ deployUIUpdate(project, Collections.emptyList());
+ }
+ }
- scene.getStylesheets().add(getClass().getResource("Views.css").toExternalForm());
+ private void showAlert(final String title, final String message) {
+ Alert alert = new Alert(AlertType.INFORMATION);
+ alert.setTitle(title);
+ TextArea detailsArea = new TextArea(message);
+ detailsArea.setEditable(false);
+ detailsArea.setWrapText(true);
+ GridPane.setVgrow(detailsArea, Priority.ALWAYS);
+ GridPane.setHgrow(detailsArea, Priority.ALWAYS);
+ alert.getDialogPane().setExpandableContent(detailsArea);
+ alert.getDialogPane().setExpanded(true);
+ alert.showAndWait();
+ }
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- return scene;
+ private void constructUI(final String solPath) {
+ Map<String, String> uiComponentForSolidityFile = CoreCommandExecutor.getInstance()
+ .getUIComponentForSolidityFile(solPath.split("--")[0], false, solPath.split("--")[1]);
+ if (uiComponentForSolidityFile == null) {
+ return;
+ }
+ Set<Entry<String, String>> entrySet = uiComponentForSolidityFile.entrySet();
+ Iterator<Entry<String, String>> iterator = entrySet.iterator();
+ int row = 2;
+ int col = 0;
+ while (iterator.hasNext()) {
+ Entry<String, String> next = iterator.next();
+ String key = next.getKey();
+ String[] keyValue = key.split("-");
+ String value2 = next.getValue();
+ if (value2.isEmpty()) {
+ Button btnOK = new Button();
+ btnOK.setText(keyValue[0]);
+ Label lblAssign = new Label();
+ lblAssign.setMaxWidth(150);
+ btnOK.setOnAction(val -> {
+ this.invokeSmartContractMessage = "Not Done";
+ try {
+ IRunnableWithProgress invokeSCRunnable = new IRunnableWithProgress() {
- }
+ @Override
+ public void run(final IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ try {
+ TransactionsViewPart.this.invokeSmartContractMessage = Web3jHandler.getInstance()
+ .invokeSCFunction(solPath.split("--")[1], key, solPath.split("--")[0], "",
+ EtherAccountViewPart.getSelectedItem());
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ }
+ };
+ new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false,
+ invokeSCRunnable);
+ Display.getDefault().syncExec(() -> {
+ EtherAccountViewPart.updateView();
+ });
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ lblAssign.setText(this.invokeSmartContractMessage);
+ lblAssign.setTooltip(new Tooltip("Click to view in details"));
+ String localLabelValue = this.invokeSmartContractMessage;
+ lblAssign.setOnMouseClicked(m -> MessageDialog
+ .openInformation(Display.getDefault().getActiveShell(), "Value", localLabelValue));
+ });
+ this.gridPane.add(btnOK, col, row);
+ this.gridPane.add(lblAssign, col + 1, row);
+ row = row + 1;
+ col = 0;
+ this.listOfObjects.add(btnOK);
+ this.listOfObjects.add(lblAssign);
+ } else {
+ Button btnOK = new Button();
+ btnOK.setText(keyValue[0]);
+ TextField txtField = new TextField();
+ txtField.setTooltip(new Tooltip(
+ "Enter input args as ; separated text and if any array elements separate them with , - expected arguments "
+ + keyValue[1]));
+ txtField.setOnMouseClicked(mouseEvent -> {
+ if (!isInputShellActive) {
+ Shell inputShell = new Shell(Display.getDefault().getActiveShell(),
+ SWT.RESIZE | SWT.DIALOG_TRIM | SWT.ON_TOP);
+ inputShell.setLayout(new GridLayout(1, false));
+ inputShell.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Composite container = new Composite(inputShell, SWT.None);
+ container.setLayout(new GridLayout(1, false));
+ container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- private void showAlert(final String title, final String message) {
- Alert alert = new Alert(AlertType.INFORMATION);
- alert.setTitle(title);
- TextArea detailsArea = new TextArea(message);
- detailsArea.setEditable(false);
- detailsArea.setWrapText(true);
- GridPane.setVgrow(detailsArea, Priority.ALWAYS);
- GridPane.setHgrow(detailsArea, Priority.ALWAYS);
- alert.getDialogPane().setExpandableContent(detailsArea);
- alert.getDialogPane().setExpanded(true);
- alert.showAndWait();
- }
+ Text inputText = new Text(container, SWT.None);
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gridData.verticalSpan = 5;
+ inputText.setLayoutData(gridData);
+ inputText.setText(txtField.getText());
- private void constructUI(final String solPath) {
- Map<String, String> uiComponentForSolidityFile = CoreCommandExecutor.getInstance()
- .getUIComponentForSolidityFile(solPath.split("--")[0], false, solPath.split("--")[1]);
- if (uiComponentForSolidityFile == null) {
- return;
- }
- Set<Entry<String, String>> entrySet = uiComponentForSolidityFile.entrySet();
- Iterator<Entry<String, String>> iterator = entrySet.iterator();
- int row = 2;
- int col = 0;
- while (iterator.hasNext()) {
- Entry<String, String> next = iterator.next();
- String key = next.getKey();
- String[] keyValue = key.split("-");
- String value2 = next.getValue();
- if (value2.isEmpty()) {
- Button btnOK = new Button();
- btnOK.setText(keyValue[0]);
- Label lblAssign = new Label();
- lblAssign.setMaxWidth(150);
- btnOK.setOnAction(val -> {
- this.invokeSmartContractMessage = "Not Done";
- try {
- IRunnableWithProgress invokeSCRunnable = new IRunnableWithProgress() {
+ org.eclipse.swt.widgets.Button okButton = new org.eclipse.swt.widgets.Button(container,
+ SWT.None);
+ okButton.setText("Set");
+ okButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ okButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- TransactionsViewPart.this.invokeSmartContractMessage = Web3jHandler.getInstance().invokeSCFunction(
- solPath.split("--")[1], key, solPath.split("--")[0], "", EtherAccountViewPart.getSelectedItem());
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- }
- };
- new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false, invokeSCRunnable);
- Display.getDefault().syncExec(() -> {
- EtherAccountViewPart.updateView();
- });
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- lblAssign.setText(this.invokeSmartContractMessage);
- lblAssign.setTooltip(new Tooltip("Click to view in details"));
- String localLabelValue = this.invokeSmartContractMessage;
- lblAssign.setOnMouseClicked(
- m -> MessageDialog.openInformation(Display.getDefault().getActiveShell(), "Value", localLabelValue));
- });
- this.gridPane.add(btnOK, col, row);
- this.gridPane.add(lblAssign, col + 1, row);
- row = row + 1;
- col = 0;
- this.listOfObjects.add(btnOK);
- this.listOfObjects.add(lblAssign);
- }
- else {
- Button btnOK = new Button();
- btnOK.setText(keyValue[0]);
- TextField txtField = new TextField();
- txtField.setTooltip(new Tooltip(
- "Enter input args as ; separated text and if any array elements separate them with , - expected arguments " +
- keyValue[1]));
- txtField.setOnMouseClicked(mouseEvent -> {
- if (!isInputShellActive) {
- Shell inputShell =
- new Shell(Display.getDefault().getActiveShell(), SWT.RESIZE | SWT.DIALOG_TRIM | SWT.ON_TOP);
- inputShell.setLayout(new GridLayout(1, false));
- inputShell.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Composite container = new Composite(inputShell, SWT.None);
- container.setLayout(new GridLayout(1, false));
- container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ @Override
+ public void widgetSelected(final org.eclipse.swt.events.SelectionEvent e) {
+ txtField.setText(inputText.getText());
+ inputShell.dispose();
+ };
+ });
- Text inputText = new Text(container, SWT.None);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.verticalSpan = 5;
- inputText.setLayoutData(gridData);
- inputText.setText(txtField.getText());
+ inputShell.setSize(400, 250);
+ inputShell.open();
+ isInputShellActive = true;
- org.eclipse.swt.widgets.Button okButton = new org.eclipse.swt.widgets.Button(container, SWT.None);
- okButton.setText("Set");
- okButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- okButton.addSelectionListener(new SelectionAdapter() {
+ inputShell.addDisposeListener(new DisposeListener() {
- @Override
- public void widgetSelected(final org.eclipse.swt.events.SelectionEvent e) {
- txtField.setText(inputText.getText());
- inputShell.dispose();
- };
- });
+ @Override
+ public void widgetDisposed(final DisposeEvent e) {
+ isInputShellActive = false;
+ }
+ });
+ }
+ });
- inputShell.setSize(400, 250);
- inputShell.open();
- isInputShellActive = true;
+ Label lblAssign = new Label();
+ lblAssign.setMaxWidth(150);
+ btnOK.setOnAction(v -> {
+ this.invokeSmartContractMessage = "Not Done";
+ try {
+ IRunnableWithProgress invokeSCRunnable = new IRunnableWithProgress() {
- inputShell.addDisposeListener(new DisposeListener() {
+ @Override
+ public void run(final IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ try {
+ TransactionsViewPart.this.invokeSmartContractMessage = Web3jHandler.getInstance()
+ .invokeSCFunction(solPath.split("--")[1], key, solPath.split("--")[0],
+ txtField.getText(), EtherAccountViewPart.getSelectedItem());
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ }
+ };
+ new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false,
+ invokeSCRunnable);
+ Display.getDefault().syncExec(() -> {
+ EtherAccountViewPart.updateView();
+ });
+ } catch (Exception e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+ lblAssign.setText(this.invokeSmartContractMessage);
+ lblAssign.setTooltip(new Tooltip("Click to view in details"));
+ String localLabelValue = this.invokeSmartContractMessage;
+ lblAssign.setOnMouseClicked(m -> MessageDialog
+ .openInformation(Display.getDefault().getActiveShell(), "Value", localLabelValue));
+ });
+ this.listOfObjects.add(btnOK);
+ this.listOfObjects.add(lblAssign);
+ this.listOfObjects.add(txtField);
- @Override
- public void widgetDisposed(final DisposeEvent e) {
- isInputShellActive = false;
- }
- });
- }
- });
+ this.gridPane.add(btnOK, col, row);
+ this.gridPane.add(txtField, col + 1, row);
+ this.gridPane.add(lblAssign, col + 2, row);
+ row = row + 1;
+ col = 0;
+ }
+ }
- Label lblAssign = new Label();
- lblAssign.setMaxWidth(150);
- btnOK.setOnAction(v -> {
- this.invokeSmartContractMessage = "Not Done";
- try {
- IRunnableWithProgress invokeSCRunnable = new IRunnableWithProgress() {
+ }
- @Override
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- TransactionsViewPart.this.invokeSmartContractMessage =
- Web3jHandler.getInstance().invokeSCFunction(solPath.split("--")[1], key, solPath.split("--")[0],
- txtField.getText(), EtherAccountViewPart.getSelectedItem());
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- }
- };
- new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, false, invokeSCRunnable);
- Display.getDefault().syncExec(() -> {
- EtherAccountViewPart.updateView();
- });
- }
- catch (Exception e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- lblAssign.setText(this.invokeSmartContractMessage);
- lblAssign.setTooltip(new Tooltip("Click to view in details"));
- String localLabelValue = this.invokeSmartContractMessage;
- lblAssign.setOnMouseClicked(
- m -> MessageDialog.openInformation(Display.getDefault().getActiveShell(), "Value", localLabelValue));
- });
- this.listOfObjects.add(btnOK);
- this.listOfObjects.add(lblAssign);
- this.listOfObjects.add(txtField);
+ private Object getCurrentSelectionProject() {
+ Object variable = PlatformUI.getWorkbench().getService(IEvaluationService.class).getCurrentState()
+ .getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ variable = getFirstElement(variable);
+ return variable instanceof IResource ? ((IResource) variable).getProject()
+ : (projects.length > 0 ? projects[0] : null);
+ }
- this.gridPane.add(btnOK, col, row);
- this.gridPane.add(txtField, col + 1, row);
- this.gridPane.add(lblAssign, col + 2, row);
- row = row + 1;
- col = 0;
- }
- }
+ private Object getCurrentSelectionResource() {
+ Object variable = PlatformUI.getWorkbench().getService(IEvaluationService.class).getCurrentState()
+ .getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ variable = getFirstElement(variable);
+ return variable instanceof IResource ? ((IResource) variable) : (projects.length > 0 ? projects[0] : null);
+ }
- }
+ private Object getFirstElement(final Object variable) {
+ if ((variable instanceof ISelection) && (variable instanceof IStructuredSelection)) {
+ Object firstElement = ((IStructuredSelection) variable).getFirstElement();
+ if (firstElement instanceof IResource) {
+ return firstElement;
+ }
+ }
+ return null;
+ }
- private Object getCurrentSelectionProject() {
- Object variable = PlatformUI.getWorkbench().getService(IEvaluationService.class).getCurrentState()
- .getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- variable = getFirstElement(variable);
- return variable instanceof IResource ? ((IResource) variable).getProject()
- : (projects.length > 0 ? projects[0] : null);
- }
+ /**
+ * This returns solidity file path along with the project name to which the
+ * solidity file belongs to.
+ *
+ * @param selectedContract
+ * @return
+ */
+ private String getSolPath(final String selectedContract) {
+ Set<IResource> solFiles = (Set<IResource>) this.cmbSmartContracts.getUserData();
+ if (solFiles != null) {
+ for (IResource sol : solFiles) {
+ if ((sol.getLocation() != null) && getResourceNameForCombo(sol).equals(selectedContract)) {
+ return sol.getLocation().toOSString() + "--" + sol.getProject().getName() + "--"
+ + sol.getName().replace(".sol", "");
+ }
+ }
+ }
+ return "";
+ }
- private Object getCurrentSelectionResource() {
- Object variable = PlatformUI.getWorkbench().getService(IEvaluationService.class).getCurrentState()
- .getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- variable = getFirstElement(variable);
- return variable instanceof IResource ? ((IResource) variable) : (projects.length > 0 ? projects[0] : null);
- }
+ private String getOutputDirPath(final String selectedContract) {
+ Set<IResource> solFiles = (Set<IResource>) this.cmbSmartContracts.getUserData();
+ for (IResource sol : solFiles) {
+ if (sol.getName().replace(".sol", "").equals(selectedContract)) {
+ return sol.getProject().findMember(SOLIDITY_OUTPUT_FOLDER).getLocation().toOSString();
+ }
+ }
+ return "";
+ }
- private Object getFirstElement(final Object variable) {
- if ((variable instanceof ISelection) && (variable instanceof IStructuredSelection)) {
- Object firstElement = ((IStructuredSelection) variable).getFirstElement();
- if (firstElement instanceof IResource) {
- return firstElement;
- }
- }
- return null;
- }
+ private void clearWidgets() {
+ if (!this.listOfObjects.isEmpty()) {
+ for (Object obj : this.listOfObjects) {
+ this.gridPane.getChildren().remove(obj);
+ }
+ }
+ }
- /**
- * This returns solidity file path along with the project name to which the solidity file belongs to.
- *
- * @param selectedContract
- * @return
- */
- private String getSolPath(final String selectedContract) {
- Set<IResource> solFiles = (Set<IResource>) this.cmbSmartContracts.getUserData();
- if (solFiles != null) {
- for (IResource sol : solFiles) {
- if ((sol.getLocation() != null) && sol.getName().replace(".sol", "").equals(selectedContract)) {
- return sol.getLocation().toOSString() + "--" + sol.getProject().getName();
- }
- }
- }
- return "";
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setFxFocus() {
+ // TODO Auto-generated method stub
- private String getOutputDirPath(final String selectedContract) {
- Set<IResource> solFiles = (Set<IResource>) this.cmbSmartContracts.getUserData();
- for (IResource sol : solFiles) {
- if (sol.getName().replace(".sol", "").equals(selectedContract)) {
- return sol.getProject().findMember(SOLIDITY_OUTPUT_FOLDER).getLocation().toOSString();
- }
- }
- return "";
- }
+ }
- private void clearWidgets() {
- if (!this.listOfObjects.isEmpty()) {
- for (Object obj : this.listOfObjects) {
- this.gridPane.getChildren().remove(obj);
- }
- }
- }
+ private static Set<String> getSmartContracts() {
+ Set<IResource> solFiles = new HashSet<>();
+ projectToSolidityFilesMap.values().stream().forEach(s -> solFiles.addAll(s));
+ return solFiles.stream().map(r -> getResourceNameForCombo(r)).collect(Collectors.toSet());
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- protected void setFxFocus() {
- // TODO Auto-generated method stub
+ private static String getResourceNameForCombo(final IResource resource) {
+ StringJoiner displayName = new StringJoiner("/");
+ String[] segments = resource.getProjectRelativePath().segments();
+ int len = segments.length;
+ displayName.add(resource.getProject().getName());
+ for (int i = 0; i < len; i++) {
+ if (i == (len - 1)) {
+ displayName.add(resource.getName().replace(".sol", ""));
+ return displayName.toString();
+ }
+ displayName.add(segments[i].substring(0, 1));
+ }
- }
+ return displayName.toString();
+ }
- private static Set<String> getSmartContracts(final IProject project) {
- if (project == null) {
- return Collections.emptySet();
- }
- Set<IResource> solFiles = projectToSolidityFilesMap.computeIfAbsent(project.getName(), s -> new HashSet<>());
- return solFiles.stream().map(IResource::getName).map(r -> r.replace(".sol", "")).collect(Collectors.toSet());
- }
+ private void updateSmartContractsCombo() {
+ if (this.cmbSmartContracts != null) {
+ ObservableList<String> smartContractList = FXCollections.observableArrayList();
+ smartContractList.addAll(getSmartContracts());
+ this.cmbSmartContracts.setItems(smartContractList);
+ this.cmbSmartContracts.getSelectionModel().selectFirst();
+ Set<IResource> solFiles = new HashSet<>();
+ projectToSolidityFilesMap.values().stream().forEach(s -> solFiles.addAll(s));
+ this.cmbSmartContracts.setUserData(solFiles);
- private void updateSmartContractsCombo(final IProject project) {
- if (this.cmbSmartContracts != null) {
- ObservableList<String> smartContractList = FXCollections.observableArrayList();
- smartContractList.addAll(getSmartContracts(project));
- this.cmbSmartContracts.setItems(smartContractList);
- this.cmbSmartContracts.getSelectionModel().selectFirst();
- this.cmbSmartContracts.setUserData(projectToSolidityFilesMap.get(project.getName()));
+ constructorTextUI();
+ }
+ }
- constructorTextUI();
- }
- }
+ private void constructorTextUI() {
+ String solPathAndProjName = getSolPath(this.cmbSmartContracts.getSelectionModel().getSelectedItem());
+ if (solPathAndProjName.isEmpty()) {
+ return;
+ }
+ String solPath = solPathAndProjName.split("--")[0];
+ String projName = solPathAndProjName.split("--")[1];
+ Map<String, String> uiComponentForSolidityFile = CoreCommandExecutor.getInstance()
+ .getUIComponentForSolidityFile(solPath, true, projName);
+ Set<Entry<String, String>> entrySet = uiComponentForSolidityFile.entrySet();
+ Iterator<Entry<String, String>> iterator = entrySet.iterator();
- private void constructorTextUI() {
- String solPathAndProjName = getSolPath(this.cmbSmartContracts.getSelectionModel().getSelectedItem());
- if (solPathAndProjName.isEmpty()) {
- return;
- }
- String solPath = solPathAndProjName.split("--")[0];
- String projName = solPathAndProjName.split("--")[1];
- Map<String, String> uiComponentForSolidityFile =
- CoreCommandExecutor.getInstance().getUIComponentForSolidityFile(solPath, true, projName);
- Set<Entry<String, String>> entrySet = uiComponentForSolidityFile.entrySet();
- Iterator<Entry<String, String>> iterator = entrySet.iterator();
+ Entry<String, String> next = iterator.hasNext() ? iterator.next() : null;
+ if ((next != null) && !next.getValue().equals("")) {
+ if (!this.gridPane.getChildren().contains(this.constructorArgs)) {
+ this.gridPane.add(this.constructorArgs, 1, 0);
+ }
+ this.constructorArgs.setTooltip(new Tooltip(
+ "Enter input args as ; separated text and if any array elements separate them with , - expected arguments "
+ + next.getValue()));
+ }
+ }
- Entry<String, String> next = iterator.hasNext() ? iterator.next() : null;
- if ((next != null) && !next.getValue().equals("")) {
- if (!this.gridPane.getChildren().contains(this.constructorArgs)) {
- this.gridPane.add(this.constructorArgs, 1, 0);
- }
- this.constructorArgs.setTooltip(new Tooltip(
- "Enter input args as ; separated text and if any array elements separate them with , - expected arguments " +
- next.getValue()));
- }
- }
+ private String getSelectedEnvironment() {
+ if (!this.selectedEnvironment.isEmpty()) {
+ return this.selectedEnvironment;
+ }
+ return this.selectedEnvironment = InstanceScope.INSTANCE
+ .getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
+ SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
+ }
- private String getSelectedEnvironment() {
- if (!this.selectedEnvironment.isEmpty()) {
- return this.selectedEnvironment;
- }
- return this.selectedEnvironment = InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .get(SecoBlocksPreferenceConstants.ENVIRONMENT_PREF_KEY,
- SecoBlocksPreferenceConstants.EnvironmentType.EMBEDDED_EVM.toString());
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
+ clearWidgets();
+ // use the changed environment details to construct widgets.
+ this.selectedEnvironment = event.getActiveEvironment();
+ this.constructorArgs.setText("");
+ this.gridPane.getChildren().remove(this.constructorArgs);
+ constructorTextUI();
+ String solPath = getSolPath(this.cmbSmartContracts.getSelectionModel().getSelectedItem());
+ if (!solPath.isEmpty()) {
+ constructUI(solPath);
+ }
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void blockchainEnvironmentChanged(final IBlockchainEnvironmentChangedEvent event) {
- clearWidgets();
- // use the changed environment details to construct widgets.
- this.selectedEnvironment = event.getActiveEvironment();
- this.constructorArgs.setText("");
- this.gridPane.getChildren().remove(this.constructorArgs);
- constructorTextUI();
- String solPath = getSolPath(this.cmbSmartContracts.getSelectionModel().getSelectedItem());
- if (!solPath.isEmpty()) {
- constructUI(solPath);
- }
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void blockchainBuildComplete(final IBlockchainBuildEvent event) {
+ deployUIUpdate(event.getProject(), event.getErrors());
+ }
-}
+ private void deployUIUpdate(final IProject project, final List<String> errors) {
+ /**
+ * Check if any errors if so display those errors also update UI to display the
+ * changes
+ */
+ Set<IResource> solidityFilesSet = projectToSolidityFilesMap.computeIfAbsent(project, s -> new HashSet<>());
+ /**
+ * This below re-assignment is to ensure that the projectToSolidityFilesMap
+ * contains only compiled resources, since this is populated initially and
+ * during compilation if some error occurs then this map will contain
+ * un-compiled solidity files
+ */
+ solidityFilesSet.clear();
+ EthereumProject ethProject = ProjectCreator.getInstance().getEthProject(project.getName());
+ solidityFilesSet.addAll(ethProject.getCompiledSolidityFiles().stream()
+ .map(r -> ethProject.getProject().findMember(r)).collect(Collectors.toSet()));
+ // Compilation errors if any
+ if (!errors.isEmpty()) {
+ Display.getDefault().syncExec(() -> {
+ MessageDialog errorDialog = new MessageDialog(Display.getDefault().getActiveShell(), "Solc error", null,
+ errors.toString(), MessageDialog.ERROR, new String[] { "OK" }, 0);
+ errorDialog.open();
+ });
+ }
+
+ // UI update
+ Display.getDefault().syncExec(() -> {
+ updateSmartContractsCombo();
+ });
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizard.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizard.java
index d73c98f..0cce43d 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizard.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizard.java
@@ -1,6 +1,19 @@
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ * Pavithra Krishna Reddy
+ * Santhosh Gokhale D
+ * Abirami Bhologa Indiran
+ *******************************************************************************/
package org.eclipse.blockchain.ui.wizard;
import java.io.IOException;
@@ -26,95 +39,107 @@
import org.osgi.service.prefs.BackingStoreException;
/**
- * @author ADG5COB
+ * Ethereum Project creation/import wizard
*/
public class EthereumProjectWizard extends Wizard implements INewWizard {
- private EthereumProjectWizardPage ePWP = null;
+ private EthereumProjectWizardPage ePWP = null;
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(final IWorkbench workbench, final IStructuredSelection selection) {
- setWindowTitle("Ethereum Project Creation");
- this.ePWP = new EthereumProjectWizardPage("Ethereum Project Creation");
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(final IWorkbench workbench,
+ final IStructuredSelection selection) {
+ setWindowTitle("Ethereum Project Creation");
+ this.ePWP = new EthereumProjectWizardPage("Ethereum Project Creation");
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean performFinish() {
- try {
- String projectCreationResponse = "";
- // check if it is an existing/new project
- if (this.ePWP.isNewProjectToBeCreated()) {
- // New project
- String projectNameString = this.ePWP.getProjectNameString();
- projectCreationResponse =
- ProjectCreator.getInstance().createNewProject(projectNameString, this.ePWP.getNewProjectPath());
- ResourcesPlugin.getWorkspace().getRoot().getProject(projectNameString).refreshLocal(IResource.DEPTH_ONE,
- new NullProgressMonitor());
- if (projectCreationResponse.equals("")) {
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .put(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, this.ePWP.getSolcPathFromTextBox());
- InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE).flush();
- IFile solFile = ProjectCreator.getInstance().getFirstMatchingSolFile(projectNameString);
- if (solFile != null) {
- IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), solFile);
- }
- return true;
- }
- }
- else {
- String ethCheck = ProjectCreator.getInstance().isItAnEthereumProject(this.ePWP.getExistingProjectPath());
- if (ethCheck.isEmpty()) {
- // existing project
- projectCreationResponse =
- ProjectCreator.getInstance().createExistingProject(this.ePWP.getExistingProjectPath());
- if (projectCreationResponse.equals("")) {
- return true;
- }
- }
- else {
- if (ethCheck.equals("Not Ethereum project")) {
- if (MessageDialog.openQuestion(getShell(), "Project Not Ethereum Project",
- "Only if Ethereum nature is present you can import it. Would you like to add it???")) {
- projectCreationResponse =
- ProjectCreator.getInstance().createExistingProject(this.ePWP.getExistingProjectPath());
- if (projectCreationResponse.equals("")) {
- return true;
- }
- }
- else {
- return true;
- }
- }
- else {
- showError("Project Creation Error", ethCheck);
- }
- }
- }
- showError("Project Creation Error", projectCreationResponse);
- }
- catch (IOException | CoreException | BackingStoreException e) {
- BlockchainCore.getInstance().logException(Activator.PLUGIN_ID, e.getMessage(), e);
- }
- return false;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ String projectCreationResponse = "";
+ // check if it is an existing/new project
+ if (this.ePWP.isNewProjectToBeCreated()) {
+ // New project
+ String projectNameString = this.ePWP.getProjectNameString();
+ projectCreationResponse = ProjectCreator.getInstance()
+ .createNewProject(projectNameString,
+ this.ePWP.getNewProjectPath());
+ ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(projectNameString).refreshLocal(
+ IResource.DEPTH_ONE, new NullProgressMonitor());
+ if (projectCreationResponse.equals("")) {
+ InstanceScope.INSTANCE.getNode(
+ SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .put(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY,
+ this.ePWP.getSolcPathFromTextBox());
+ InstanceScope.INSTANCE.getNode(
+ SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .flush();
+ IFile solFile = ProjectCreator.getInstance()
+ .getFirstMatchingSolFile(projectNameString);
+ if (solFile != null) {
+ IDE.openEditor(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage(),
+ solFile);
+ }
+ return true;
+ }
+ } else {
+ String ethCheck = ProjectCreator.getInstance()
+ .isItAnEthereumProject(
+ this.ePWP.getExistingProjectPath());
+ if (ethCheck.isEmpty()) {
+ // existing project
+ projectCreationResponse = ProjectCreator.getInstance()
+ .createExistingProject(
+ this.ePWP.getExistingProjectPath());
+ if (projectCreationResponse.equals("")) {
+ return true;
+ }
+ } else {
+ if (ethCheck.equals("Not Ethereum project")) {
+ if (MessageDialog.openQuestion(getShell(),
+ "Project Not Ethereum Project",
+ "Only if Ethereum nature is present you can import it. Would you like to add it???")) {
+ projectCreationResponse = ProjectCreator
+ .getInstance().createExistingProject(
+ this.ePWP.getExistingProjectPath());
+ if (projectCreationResponse.equals("")) {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ } else {
+ showError("Project Creation Error", ethCheck);
+ }
+ }
+ }
+ showError("Project Creation Error", projectCreationResponse);
+ } catch (IOException | CoreException | BackingStoreException e) {
+ BlockchainCore.getInstance().logException(Activator.PLUGIN_ID,
+ e.getMessage(), e);
+ }
+ return false;
+ }
- private void showError(final String title, final String message) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), title, message);
- }
+ private void showError(final String title, final String message) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), title,
+ message);
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void addPages() {
- super.addPages();
- addPage(this.ePWP);
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void addPages() {
+ super.addPages();
+ addPage(this.ePWP);
+ }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizardPage.java b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizardPage.java
index 24d4427..19ebbf8 100644
--- a/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizardPage.java
+++ b/org.eclipse.blockchain.ui/src/org/eclipse/blockchain/ui/wizard/EthereumProjectWizardPage.java
@@ -1,7 +1,19 @@
-
-/*
- * Copyright (c) Robert Bosch GmbH. All rights reserved.
- */
+/*******************************************************************************
+ * Copyright (c) 2020 RBEI and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v. 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Adhith Gopal - Initial contribution and API
+ * Pavithra Krishna Reddy
+ * Santhosh Gokhale D
+ * Abirami Bhologa Indiran
+ *******************************************************************************/
package org.eclipse.blockchain.ui.wizard;
import java.io.File;
@@ -32,423 +44,409 @@
import org.eclipse.swt.widgets.Text;
/**
- * @author ADG5COB
+ * Ethereum Project create/import wizard page
*/
public class EthereumProjectWizardPage extends WizardPage {
- private Label projectNameLabel = null;
- private Text projectNameText = null;
- private String projectNameString;
- private final String projectNameError = "Project Name cannot be empty!!!";
- private final String existingProjectpathError = "Project paath cannot be empty!!!";
- private String projectTemplateToBeCreated = null;
- private boolean testNetTobeCreated = false;
- private Text solcPathText;
- private String solcPathString = "";
- private Text existingProjectPathText;
- private Text newProjectPathText;
- private Button newPrjButton;
- private Button existingPrjButton;
- Color greyColor = new Color(Display.getDefault(), new RGB(128, 128, 128));
+ private Label projectNameLabel = null;
+ private Text projectNameText = null;
+ private String projectNameString;
+ private final String projectNameError = "Project Name cannot be empty!!!";
+ private final String existingProjectpathError = "Project paath cannot be empty!!!";
+ private String projectTemplateToBeCreated = null;
+ private boolean testNetTobeCreated = false;
+ private Text solcPathText;
+ private String solcPathString = "";
+ private Text existingProjectPathText;
+ private Text newProjectPathText;
+ private Button newPrjButton;
+ private Button existingPrjButton;
+ Color greyColor = new Color(Display.getDefault(), new RGB(128, 128, 128));
- /**
- * @param pageName page name
- */
- protected EthereumProjectWizardPage(final String pageName) {
- super(pageName);
- setPageComplete(false);
- setTitle("New Ethereum Project");
- }
+ /**
+ * @param pageName page name
+ */
+ protected EthereumProjectWizardPage(final String pageName) {
+ super(pageName);
+ setPageComplete(false);
+ setTitle("New Ethereum Project");
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void createControl(final Composite parent) {
- Composite wizardContainer = new Composite(parent, SWT.None);
- GridLayout containerGrid = new GridLayout(2, false);
- GridData genericGridData = new GridData(GridData.FILL_BOTH);
- genericGridData.minimumHeight = 50;
- wizardContainer.setLayout(containerGrid);
- wizardContainer.setLayoutData(genericGridData);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void createControl(final Composite parent) {
+ Composite wizardContainer = new Composite(parent, SWT.None);
+ GridLayout containerGrid = new GridLayout(2, false);
+ GridData genericGridData = new GridData(GridData.FILL_BOTH);
+ genericGridData.minimumHeight = 50;
+ wizardContainer.setLayout(containerGrid);
+ wizardContainer.setLayoutData(genericGridData);
-// Select if it has to be imported as new or existing project
- Group newOrExistingGrp = new Group(wizardContainer, NONE);
- newOrExistingGrp.setLayout(new GridLayout(3, true));
- newOrExistingGrp.setLayoutData(new GridData(GridData.FILL_BOTH));
+ // Select if it has to be imported as new or existing project
+ Group newOrExistingGrp = new Group(wizardContainer, NONE);
+ newOrExistingGrp.setLayout(new GridLayout(3, true));
+ newOrExistingGrp.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridData gridData = new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1);
- Label importAs = new Label(newOrExistingGrp, SWT.NONE);
- importAs.setText("Import project as: ");
- importAs.setLayoutData(gridData);
+ GridData gridData = new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1);
+ Label importAs = new Label(newOrExistingGrp, SWT.NONE);
+ importAs.setText("Import project as: ");
+ importAs.setLayoutData(gridData);
- this.newPrjButton = new Button(newOrExistingGrp, SWT.RADIO);
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- this.newPrjButton.setLayoutData(gridData);
- this.newPrjButton.setText("New project");
+ this.newPrjButton = new Button(newOrExistingGrp, SWT.RADIO);
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ this.newPrjButton.setLayoutData(gridData);
+ this.newPrjButton.setText("New project");
- this.existingPrjButton = new Button(newOrExistingGrp, SWT.RADIO);
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- this.existingPrjButton.setText("Existing project");
- this.existingPrjButton.setLayoutData(gridData);
+ this.existingPrjButton = new Button(newOrExistingGrp, SWT.RADIO);
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ this.existingPrjButton.setText("Existing project");
+ this.existingPrjButton.setLayoutData(gridData);
- // create a group to for new project creation related widgets
+ // create a group to for new project creation related widgets
- Group newPrjGrp = new Group(wizardContainer, NONE);
- newPrjGrp.setLayout(new GridLayout(3, false));
- newPrjGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
- newPrjGrp.setText("New project");
+ Group newPrjGrp = new Group(wizardContainer, NONE);
+ newPrjGrp.setLayout(new GridLayout(3, false));
+ newPrjGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+ newPrjGrp.setText("New project");
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- this.projectNameLabel = new Label(newPrjGrp, SWT.None);
- this.projectNameLabel.setText("Project Name : ");
- this.projectNameLabel.setLayoutData(gridData);
- this.projectNameText = new Text(newPrjGrp, SWT.BORDER);
- gridData = new GridData(SWT.FILL, SWT.LEFT, true, true, 2, 1);
- this.projectNameText.setLayoutData(gridData);
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ this.projectNameLabel = new Label(newPrjGrp, SWT.None);
+ this.projectNameLabel.setText("Project Name : ");
+ this.projectNameLabel.setLayoutData(gridData);
+ this.projectNameText = new Text(newPrjGrp, SWT.BORDER);
+ gridData = new GridData(SWT.FILL, SWT.LEFT, true, true, 2, 1);
+ this.projectNameText.setLayoutData(gridData);
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- Label projectPath = new Label(newPrjGrp, SWT.None);
- projectPath.setText("Project path : ");
- projectPath.setLayoutData(gridData);
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ Label projectPath = new Label(newPrjGrp, SWT.None);
+ projectPath.setText("Project path : ");
+ projectPath.setLayoutData(gridData);
- this.newProjectPathText = new Text(newPrjGrp, SWT.BORDER);
- gridData = new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1);
- this.newProjectPathText.setLayoutData(gridData);
- String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
- this.newProjectPathText.setText(workspaceLocation);
+ this.newProjectPathText = new Text(newPrjGrp, SWT.BORDER);
+ gridData = new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1);
+ this.newProjectPathText.setLayoutData(gridData);
+ String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
+ this.newProjectPathText.setText(workspaceLocation);
+ Button newPrjPathBrowseButton = new Button(newPrjGrp, SWT.PUSH);
+ newPrjPathBrowseButton.setText("Browse");
+ gridData = new GridData(SWT.FILL, SWT.LEFT, false, false, 1, 1);
+ newPrjPathBrowseButton.setLayoutData(gridData);
- Button newPrjPathBrowseButton = new Button(newPrjGrp, SWT.PUSH);
- newPrjPathBrowseButton.setText("Browse");
- gridData = new GridData(SWT.FILL, SWT.LEFT, false, false, 1, 1);
- newPrjPathBrowseButton.setLayoutData(gridData);
+ newPrjPathBrowseButton.addSelectionListener(new SelectionListener() {
- newPrjPathBrowseButton.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ DirectoryDialog prjPathDialog = new DirectoryDialog(parent.getShell());
+ prjPathDialog.setFilterPath(workspaceLocation);
+ String selectedDir = prjPathDialog.open();
+ if (selectedDir != null) {
+ EthereumProjectWizardPage.this.newProjectPathText.setText(selectedDir);
+ }
- @Override
- public void widgetSelected(final SelectionEvent e) {
- DirectoryDialog prjPathDialog = new DirectoryDialog(parent.getShell());
- prjPathDialog.setFilterPath(workspaceLocation);
- String selectedDir = prjPathDialog.open();
- if (selectedDir != null) {
- EthereumProjectWizardPage.this.newProjectPathText.setText(selectedDir);
- }
+ }
- }
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // do nothing
+ }
+ });
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- // do nothing
- }
- });
+ // project template section
+ Label projectTemplateGroup = new Label(newPrjGrp, SWT.SHADOW_ETCHED_IN);
+ projectTemplateGroup.setText("Project Template : ");
- // project template section
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ projectTemplateGroup.setLayoutData(gridData);
- Label projectTemplateGroup = new Label(newPrjGrp, SWT.SHADOW_ETCHED_IN);
- projectTemplateGroup.setText("Project Template : ");
+ // combo for project selection
+ Combo projectTemplateSelection = new Combo(newPrjGrp, NONE);
+ // Only simple project is supported for now - , "Web project", "Angular
+ // JS Project", "React Js Project"
+ projectTemplateSelection.setItems("Simple project");
+ projectTemplateSelection.setLayoutData(gridData);
+ projectTemplateSelection.select(0);
+ setProjectTemplateToBeImported(projectTemplateSelection.getText());
+ projectTemplateSelection.addSelectionListener(new SelectionAdapter() {
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- projectTemplateGroup.setLayoutData(gridData);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ setProjectTemplateToBeImported(projectTemplateSelection.getText());
+ }
+ });
+ // existing project section
+ Group existingPrjGrp = new Group(wizardContainer, NONE);
+ existingPrjGrp.setLayout(new GridLayout(3, false));
+ existingPrjGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+ existingPrjGrp.setText("Existing project");
- // combo for project selection
- Combo projectTemplateSelection = new Combo(newPrjGrp, NONE);
- // Only simple project is supported for now - , "Web project", "Angular JS Project", "React Js Project"
- projectTemplateSelection.setItems("Simple project");
- projectTemplateSelection.setLayoutData(gridData);
- projectTemplateSelection.select(0);
- setProjectTemplateToBeImported(projectTemplateSelection.getText());
- projectTemplateSelection.addSelectionListener(new SelectionAdapter() {
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ Label newProjectPath = new Label(existingPrjGrp, SWT.None);
+ newProjectPath.setText("Project path : ");
+ newProjectPath.setLayoutData(gridData);
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- setProjectTemplateToBeImported(projectTemplateSelection.getText());
- }
- });
+ this.existingProjectPathText = new Text(existingPrjGrp, SWT.BORDER);
+ gridData = new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1);
+ this.existingProjectPathText.setLayoutData(gridData);
- // existing project section
- Group existingPrjGrp = new Group(wizardContainer, NONE);
- existingPrjGrp.setLayout(new GridLayout(3, false));
- existingPrjGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
- existingPrjGrp.setText("Existing project");
+ this.existingProjectPathText.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(final ModifyEvent e) {
+ if (getTextBoxText(EthereumProjectWizardPage.this.existingProjectPathText).trim().isEmpty()) {
+ setPageComplete(false);
+ setErrorMessage(EthereumProjectWizardPage.this.existingProjectpathError);
+ } else {
+ setPageComplete(true);
+ setErrorMessage(null);
+ }
+ }
+ });
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- Label newProjectPath = new Label(existingPrjGrp, SWT.None);
- newProjectPath.setText("Project path : ");
- newProjectPath.setLayoutData(gridData);
+ Button existingPrjPathBrowseButton = new Button(existingPrjGrp, SWT.PUSH);
+ existingPrjPathBrowseButton.setText("Browse");
+ gridData = new GridData(SWT.FILL, SWT.LEFT, false, false, 1, 1);
+ existingPrjPathBrowseButton.setLayoutData(gridData);
- this.existingProjectPathText = new Text(existingPrjGrp, SWT.BORDER);
- gridData = new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1);
- this.existingProjectPathText.setLayoutData(gridData);
+ existingPrjPathBrowseButton.addSelectionListener(new SelectionListener() {
- this.existingProjectPathText.addModifyListener(new ModifyListener() {
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ DirectoryDialog prjPathDialog = new DirectoryDialog(parent.getShell());
+ prjPathDialog.setFilterPath(System.getProperty("user.dir"));
+ String selectedDir = prjPathDialog.open();
+ if ((selectedDir != null) && !selectedDir.equals("")) {
+ setPageComplete(true);
+ setErrorMessage(null);
+ EthereumProjectWizardPage.this.existingProjectPathText.setText(selectedDir);
+ } else {
+ setErrorMessage(EthereumProjectWizardPage.this.existingProjectpathError);
+ setPageComplete(false);
+ }
- @Override
- public void modifyText(final ModifyEvent e) {
- if (getTextBoxText(EthereumProjectWizardPage.this.existingProjectPathText).trim().isEmpty()) {
- setPageComplete(false);
- setErrorMessage(EthereumProjectWizardPage.this.existingProjectpathError);
- }
- else {
- setPageComplete(true);
- setErrorMessage(null);
- }
- }
- });
+ }
- Button existingPrjPathBrowseButton = new Button(existingPrjGrp, SWT.PUSH);
- existingPrjPathBrowseButton.setText("Browse");
- gridData = new GridData(SWT.FILL, SWT.LEFT, false, false, 1, 1);
- existingPrjPathBrowseButton.setLayoutData(gridData);
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // do nothing
+ }
+ });
- existingPrjPathBrowseButton.addSelectionListener(new SelectionListener() {
+ // Enable the new/existing fiel import depending on the radio button
+ // selection
- @Override
- public void widgetSelected(final SelectionEvent e) {
- DirectoryDialog prjPathDialog = new DirectoryDialog(parent.getShell());
- prjPathDialog.setFilterPath(System.getProperty("user.dir"));
- String selectedDir = prjPathDialog.open();
- if ((selectedDir != null) && !selectedDir.equals("")) {
- setPageComplete(true);
- setErrorMessage(null);
- EthereumProjectWizardPage.this.existingProjectPathText.setText(selectedDir);
- }
- else {
- setErrorMessage(EthereumProjectWizardPage.this.existingProjectpathError);
- setPageComplete(false);
- }
+ this.newPrjButton.addSelectionListener(new SelectionListener() {
- }
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ // Enable the new project creation group
+ newPrjGrp.setEnabled(true);
+ newPrjGrp.setForeground(null);
+ setForeGroundToChildren(newPrjGrp.getChildren(), null);
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- // do nothing
- }
- });
+ // Disable existing project creation
+ existingPrjGrp.setEnabled(false);
+ existingPrjGrp.setForeground(EthereumProjectWizardPage.this.greyColor);
+ setForeGroundToChildren(existingPrjGrp.getChildren(), EthereumProjectWizardPage.this.greyColor);
+ }
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
- // Enable the new/existing fiel import depending on the radio button selection
+ this.existingPrjButton.addSelectionListener(new SelectionListener() {
- this.newPrjButton.addSelectionListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(final SelectionEvent e) {
- // Enable the new project creation group
- newPrjGrp.setEnabled(true);
- newPrjGrp.setForeground(null);
- setForeGroundToChildren(newPrjGrp.getChildren(), null);
-
- // Disable existing project creation
- existingPrjGrp.setEnabled(false);
- existingPrjGrp.setForeground(EthereumProjectWizardPage.this.greyColor);
- setForeGroundToChildren(existingPrjGrp.getChildren(), EthereumProjectWizardPage.this.greyColor);
- }
-
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
-
- this.existingPrjButton.addSelectionListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(final SelectionEvent e) {
- newPrjGrp.setEnabled(false);
- newPrjGrp.setForeground(EthereumProjectWizardPage.this.greyColor);
- setForeGroundToChildren(newPrjGrp.getChildren(), EthereumProjectWizardPage.this.greyColor);
-
-
- existingPrjGrp.setEnabled(true);
- existingPrjGrp.setForeground(null);
- setForeGroundToChildren(existingPrjGrp.getChildren(), null);
- }
-
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
- // compiler section
-
- Group compilerGrp = new Group(wizardContainer, NONE);
- compilerGrp.setLayout(new GridLayout(3, false));
- compilerGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
- compilerGrp.setText("Compiler settings");
-
-
- Label solcLabel = new Label(compilerGrp, SWT.NONE);
- solcLabel.setText("Solidity compiler path : ");
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- solcLabel.setLayoutData(gridData);
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ newPrjGrp.setEnabled(false);
+ newPrjGrp.setForeground(EthereumProjectWizardPage.this.greyColor);
+ setForeGroundToChildren(newPrjGrp.getChildren(), EthereumProjectWizardPage.this.greyColor);
+ existingPrjGrp.setEnabled(true);
+ existingPrjGrp.setForeground(null);
+ setForeGroundToChildren(existingPrjGrp.getChildren(), null);
+ }
- this.solcPathText = new Text(compilerGrp, SWT.BORDER);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
- this.solcPathText.setLayoutData(gridData);
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+ // compiler section
- Button compilerPathBrowseButton = new Button(compilerGrp, SWT.PUSH);
- compilerPathBrowseButton.setText("Browse");
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- compilerPathBrowseButton.setLayoutData(gridData);
+ Group compilerGrp = new Group(wizardContainer, NONE);
+ compilerGrp.setLayout(new GridLayout(3, false));
+ compilerGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+ compilerGrp.setText("Compiler settings");
- compilerPathBrowseButton.addSelectionListener(new SelectionListener() {
+ Label solcLabel = new Label(compilerGrp, SWT.NONE);
+ solcLabel.setText("Solidity compiler path : ");
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ solcLabel.setLayoutData(gridData);
- @Override
- public void widgetSelected(final SelectionEvent e) {
- DirectoryDialog solcCompilerPathDialog = new DirectoryDialog(parent.getShell());
- solcCompilerPathDialog.setFilterPath(System.getProperty("user.dir"));
- String selectedDir = solcCompilerPathDialog.open();
- if (selectedDir != null) {
- EthereumProjectWizardPage.this.solcPathText.setText(selectedDir);
- }
+ this.solcPathText = new Text(compilerGrp, SWT.BORDER);
+ gridData = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+ this.solcPathText.setLayoutData(gridData);
- }
+ Button compilerPathBrowseButton = new Button(compilerGrp, SWT.PUSH);
+ compilerPathBrowseButton.setText("Browse");
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ compilerPathBrowseButton.setLayoutData(gridData);
- @Override
- public void widgetDefaultSelected(final SelectionEvent e) {
- // do nothing
- }
- });
+ compilerPathBrowseButton.addSelectionListener(new SelectionListener() {
- Label solcVerLabel = new Label(compilerGrp, SWT.NONE);
- solcVerLabel.setText("Solidity versions available");
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- solcVerLabel.setLayoutData(gridData);
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ DirectoryDialog solcCompilerPathDialog = new DirectoryDialog(parent.getShell());
+ solcCompilerPathDialog.setFilterPath(System.getProperty("user.dir"));
+ String selectedDir = solcCompilerPathDialog.open();
+ if (selectedDir != null) {
+ EthereumProjectWizardPage.this.solcPathText.setText(selectedDir);
+ }
- // combo for project selection
- Combo compilerSelection = new Combo(compilerGrp, NONE);
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- compilerSelection.setLayoutData(gridData);
- String list = Platform.getPreferencesService().getString(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
- SecoBlocksPreferenceConstants.PREF_KEY_SelectedList, null, null);
- compilerSelection.setItems((list != null) ? list.split(",") : new String[0]);
- compilerSelection.setLayoutData(gridData);
- compilerSelection.select(0);
- String solcPathWithVersion = getSolcPath() + File.pathSeparator + compilerSelection.getText();
- EthereumProjectWizardPage.this.solcPathText.setText(solcPathWithVersion);
- compilerSelection.addSelectionListener(new SelectionAdapter() {
+ }
- /**
- * {@inheritDoc}
- */
- @Override
- public void widgetSelected(final SelectionEvent e) {
- EthereumProjectWizardPage.this.solcPathText.setText(solcPathWithVersion);
- }
- });
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // do nothing
+ }
+ });
- setControl(wizardContainer);
- setErrorMessage(this.projectNameError);
+ Label solcVerLabel = new Label(compilerGrp, SWT.NONE);
+ solcVerLabel.setText("Solidity versions available");
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ solcVerLabel.setLayoutData(gridData);
- addButtonListeners();
- }
+ // combo for project selection
+ Combo compilerSelection = new Combo(compilerGrp, NONE);
+ gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
+ compilerSelection.setLayoutData(gridData);
+ String list = Platform.getPreferencesService().getString(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE,
+ SecoBlocksPreferenceConstants.PREF_KEY_SelectedList, null, null);
+ compilerSelection.setItems((list != null) ? list.split(",") : new String[0]);
+ compilerSelection.setLayoutData(gridData);
+ compilerSelection.select(0);
+ String solcPathWithVersion = getSolcPath() + File.separator + compilerSelection.getText();
+ EthereumProjectWizardPage.this.solcPathText.setText(solcPathWithVersion);
+ compilerSelection.addSelectionListener(new SelectionAdapter() {
- private void setForeGroundToChildren(final Control[] children, final Color color) {
- for (Control child : children) {
- if ((child instanceof Text)) {
- ((Text) child).setEditable(color == null);
- }
- child.setForeground(color);
- }
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ EthereumProjectWizardPage.this.solcPathText.setText(solcPathWithVersion);
+ }
+ });
- private String getSolcPath() {
- return InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
- .get(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, "");
- }
+ setControl(wizardContainer);
+ setErrorMessage(this.projectNameError);
- private void addButtonListeners() {
- this.projectNameText.addModifyListener((final ModifyEvent e) -> {
- if (!getTextBoxText(this.projectNameText).trim().equals("")) {
- setPageComplete(true);
- setErrorMessage(null);
- }
- else {
- setPageComplete(false);
- setErrorMessage(this.projectNameError);
- }
- });
- }
+ addButtonListeners();
+ }
- private String getTextBoxText(final Text textBox) {
- Display.getDefault().syncExec(() -> this.projectNameString = textBox.getText());
- return this.projectNameString;
- }
+ private void setForeGroundToChildren(final Control[] children, final Color color) {
+ for (Control child : children) {
+ if ((child instanceof Text)) {
+ ((Text) child).setEditable(color == null);
+ }
+ child.setForeground(color);
+ }
+ }
- /**
- * @return -
- */
- public String getSolcPathFromTextBox() {
- Display.getDefault().syncExec(() -> this.solcPathString = this.solcPathText.getText());
- return this.solcPathString;
- }
+ private String getSolcPath() {
+ return InstanceScope.INSTANCE.getNode(SecoBlocksPreferenceConstants.SECOBLOCKS_PREF_NODE)
+ .get(SecoBlocksPreferenceConstants.SOLIDITY_COMPILER_PREF_KEY, "");
+ }
- /**
- * @return
- */
- public String getNewProjectPath() {
- return this.newProjectPathText.getText();
- }
+ private void addButtonListeners() {
+ this.projectNameText.addModifyListener((final ModifyEvent e) -> {
+ if (!getTextBoxText(this.projectNameText).trim().equals("")) {
+ setPageComplete(true);
+ setErrorMessage(null);
+ } else {
+ setPageComplete(false);
+ setErrorMessage(this.projectNameError);
+ }
+ });
+ }
- /**
- * @return
- */
- public String getExistingProjectPath() {
- return this.existingProjectPathText.getText();
- }
+ private String getTextBoxText(final Text textBox) {
+ Display.getDefault().syncExec(() -> this.projectNameString = textBox.getText());
+ return this.projectNameString;
+ }
- /**
- * @return
- */
- public boolean isNewProjectToBeCreated() {
- return this.newPrjButton.getSelection();
- }
+ /**
+ * @return -
+ */
+ public String getSolcPathFromTextBox() {
+ Display.getDefault().syncExec(() -> this.solcPathString = this.solcPathText.getText());
+ return this.solcPathString;
+ }
- /**
- * @return - The project name entered in project creation wizard
- */
- public String getProjectNameString() {
- return this.projectNameString;
- }
+ /**
+ * @return
+ */
+ public String getNewProjectPath() {
+ return this.newProjectPathText.getText();
+ }
+ /**
+ * @return
+ */
+ public String getExistingProjectPath() {
+ return this.existingProjectPathText.getText();
+ }
- /**
- * @return the selectedProject
- */
- public String getProjectTemplaeToBeCreated() {
- return this.projectTemplateToBeCreated;
- }
+ /**
+ * @return
+ */
+ public boolean isNewProjectToBeCreated() {
+ return this.newPrjButton.getSelection();
+ }
+ /**
+ * @return - The project name entered in project creation wizard
+ */
+ public String getProjectNameString() {
+ return this.projectNameString;
+ }
- /**
- * @param selectedProject the selectedProject to set
- */
- public void setProjectTemplateToBeImported(final String selectedProject) {
- this.projectTemplateToBeCreated = selectedProject;
- }
+ /**
+ * @return the selectedProject
+ */
+ public String getProjectTemplaeToBeCreated() {
+ return this.projectTemplateToBeCreated;
+ }
+ /**
+ * @param selectedProject the selectedProject to set
+ */
+ public void setProjectTemplateToBeImported(final String selectedProject) {
+ this.projectTemplateToBeCreated = selectedProject;
+ }
- /**
- * @return the testNetTobeCreated
- */
- public boolean isTestNetTobeCreated() {
- return this.testNetTobeCreated;
- }
+ /**
+ * @return the testNetTobeCreated
+ */
+ public boolean isTestNetTobeCreated() {
+ return this.testNetTobeCreated;
+ }
- /**
- * @param testNetTobeCreated the testNetTobeCreated to set
- */
- public void setTestNetTobeCreated(final boolean testNetTobeCreated) {
- this.testNetTobeCreated = testNetTobeCreated;
- }
-}
+ /**
+ * @param testNetTobeCreated the testNetTobeCreated to set
+ */
+ public void setTestNetTobeCreated(final boolean testNetTobeCreated) {
+ this.testNetTobeCreated = testNetTobeCreated;
+ }
+}
\ No newline at end of file
diff --git a/target-blockchain/2019.2.target b/target-blockchain/2019.2.target
index 4592fb8..e47f755 100644
--- a/target-blockchain/2019.2.target
+++ b/target-blockchain/2019.2.target
@@ -3,6 +3,7 @@
<location path="C:/toolbase/ecl_gmf_notation/test19_1.12.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_birt/test52_4.8.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_emf_compare/test29_3.3.0_sdk/eclipse" type="Directory"/>
+<location path="C:/toolbase/ecl_datatools/test26_1.14.100_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_emf_json/test9_1.2.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_xtext/test62_2.15.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_ocl/test59_3.8.0_sdk/eclipse" type="Directory"/>
@@ -11,21 +12,20 @@
<location path="C:/toolbase/ecl_emf_query/test24_1.12.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_sphinx/test54_0.11.2_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_xpand/test53_2.2.1_sdk/eclipse" type="Directory"/>
+<location path="C:/toolbase/ecl_jdt/test54_3.14.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_emf_validation/test24_1.12.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_gmf_runtime/test18_1.12.0_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_assertj_core/test26_3.9.1_sdk/eclipse" type="Directory"/>
<location path="C:/toolbase/ecl_mwe/test49_2.9.1_sdk/eclipse" type="Directory"/>
+<location path="C:\Users\adg5cob\Downloads\webtools.servertools-201303121615" type="Directory"/>
+ <location path="C:\Users\adg5cob\AppData\Roaming\workspace\BBM\orion\11.0.0\workspace\Yakindu\yakindu\eclipse" type="Directory"/>
<location path="C:\Users\adg5cob\AppData\Roaming\workspace\BBM\orion\11.0.0\default.configuration\plugins" type="Directory"/>
+ <location path="C:/toolbase/ecl_platform/test313_4.8.0_sdk/eclipse" type="Directory"/>
<location path="C:\toolbase\ecl_epsilon\test20_1.5.0_sdk\eclipse\plugins" type="Directory"/>
<location path="D:\block-chain\ecl_blockchain" type="Directory"/>
<location path="C:\toolbase\ecl_wst\test44_3.10.0_sdk\eclipse" type="Directory"/>
<location path="C:\toolbase\ecl_orbit\test85_3.1.0_sdk\eclipse\plugins" type="Directory"/>
<location path="C:\toolbase\ecl_emf\test41_2.14.0_sdk\eclipse\plugins" type="Directory"/>
- <location path="C:\toolbase\ecl_datatools\test39_1.14.100_sdk\eclipse" type="Directory"/>
- <location path="C:\toolbase\ecl_jdt\test62_3.14.0_sdk\eclipse" type="Directory"/>
- <location path="C:\toolbase\ecl_platform\test319_4.8.0_sdk\eclipse" type="Directory"/>
- <location path="C:\Users\adg5cob\AppData\Roaming\workspace\BBM\orion\11.0.0\workspace\Yakindu\yakindu\eclipse" type="Directory"/>
- <location path="C:/Users/adg5cob/AppData/Roaming/workspace/BBM/orion/11.0.0/eclipse-commit-workspace/com.test.maven/target/repository" type="Directory"/>
</locations>
<environment>
<arch>x86_64</arch>
@@ -51,8 +51,8 @@
<plugin id="com.fasterxml.jackson.core.jackson-core.source"/>
<plugin id="com.fasterxml.jackson.core.jackson-databind"/>
<plugin id="com.fasterxml.jackson.core.jackson-databind.source"/>
- <plugin id="com.google.gson" version="2.7.0.v20170129-0911"/>
<plugin id="com.google.gson" version="2.8.2.v20180104-1110"/>
+ <plugin id="com.google.gson" version="2.7.0.v20170129-0911"/>
<plugin id="com.google.gson.source"/>
<plugin id="com.google.guava" version="21.0.0.v20170206-1425"/>
<plugin id="com.google.guava.source"/>
@@ -62,8 +62,8 @@
<plugin id="com.google.inject.assistedinject.source"/>
<plugin id="com.google.inject.multibindings"/>
<plugin id="com.google.inject.multibindings.source"/>
- <plugin id="com.google.inject.source" version="3.0.0.v201312141243"/>
<plugin id="com.google.inject.source" version="3.0.0.v201605172100"/>
+ <plugin id="com.google.inject.source" version="3.0.0.v201312141243"/>
<plugin id="com.google.javascript"/>
<plugin id="com.google.protobuf"/>
<plugin id="com.ibm.icu"/>
@@ -95,8 +95,8 @@
<plugin id="javax.servlet.jsp.source"/>
<plugin id="javax.servlet.source"/>
<plugin id="javax.transaction"/>
- <plugin id="javax.wsdl" version="1.5.1.v201012040544"/>
<plugin id="javax.wsdl" version="1.6.2.v201012040545"/>
+ <plugin id="javax.wsdl" version="1.5.1.v201012040544"/>
<plugin id="javax.xml" version="1.3.4.v201005080400"/>
<plugin id="javax.xml.bind"/>
<plugin id="javax.xml.bind.source"/>
@@ -115,43 +115,43 @@
<plugin id="org.apache.axis" version="1.4.0.v201411182030"/>
<plugin id="org.apache.batik.bridge" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.bridge" version="1.6.0.v201011041432"/>
- <plugin id="org.apache.batik.bridge.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.bridge.source" version="1.6.0.v201011041432"/>
+ <plugin id="org.apache.batik.bridge.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.constants"/>
<plugin id="org.apache.batik.constants.source"/>
- <plugin id="org.apache.batik.css" version="1.9.1.v20180313-1559"/>
- <plugin id="org.apache.batik.css" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.css" version="1.6.0.v201011041432"/>
- <plugin id="org.apache.batik.css.source" version="1.9.1.v20180313-1559"/>
+ <plugin id="org.apache.batik.css" version="1.7.0.v201011041433"/>
+ <plugin id="org.apache.batik.css" version="1.9.1.v20180313-1559"/>
<plugin id="org.apache.batik.css.source" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.css.source" version="1.7.0.v201011041433"/>
+ <plugin id="org.apache.batik.css.source" version="1.9.1.v20180313-1559"/>
<plugin id="org.apache.batik.dom" version="1.6.1.v201505192100"/>
<plugin id="org.apache.batik.dom" version="1.7.1.v201505191845"/>
- <plugin id="org.apache.batik.dom.source" version="1.7.1.v201505191845"/>
<plugin id="org.apache.batik.dom.source" version="1.6.1.v201505192100"/>
- <plugin id="org.apache.batik.dom.svg" version="1.7.0.v201011041433"/>
+ <plugin id="org.apache.batik.dom.source" version="1.7.1.v201505191845"/>
<plugin id="org.apache.batik.dom.svg" version="1.6.0.v201011041432"/>
+ <plugin id="org.apache.batik.dom.svg" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.dom.svg.source" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.dom.svg.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.ext.awt" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.ext.awt" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.ext.awt.extension"/>
<plugin id="org.apache.batik.ext.awt.extension.source"/>
- <plugin id="org.apache.batik.ext.awt.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.ext.awt.source" version="1.6.0.v201011041432"/>
+ <plugin id="org.apache.batik.ext.awt.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.i18n"/>
<plugin id="org.apache.batik.i18n.source"/>
<plugin id="org.apache.batik.parser" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.parser" version="1.7.0.v201011041433"/>
- <plugin id="org.apache.batik.parser.source" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.parser.source" version="1.7.0.v201011041433"/>
+ <plugin id="org.apache.batik.parser.source" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.pdf"/>
<plugin id="org.apache.batik.svggen" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.svggen" version="1.6.0.v201011041432"/>
- <plugin id="org.apache.batik.svggen.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.svggen.source" version="1.6.0.v201011041432"/>
- <plugin id="org.apache.batik.transcoder" version="1.6.0.v201011041432"/>
+ <plugin id="org.apache.batik.svggen.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.transcoder" version="1.7.0.v201011041433"/>
+ <plugin id="org.apache.batik.transcoder" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.transcoder.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.transcoder.source" version="1.6.0.v201011041432"/>
<plugin id="org.apache.batik.util" version="1.9.1.v20180227-1645"/>
@@ -159,13 +159,13 @@
<plugin id="org.apache.batik.util.source" version="1.9.1.v20180227-1645"/>
<plugin id="org.apache.batik.xml" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.xml" version="1.6.0.v201011041432"/>
- <plugin id="org.apache.batik.xml.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.batik.xml.source" version="1.6.0.v201011041432"/>
+ <plugin id="org.apache.batik.xml.source" version="1.7.0.v201011041433"/>
<plugin id="org.apache.bcel"/>
- <plugin id="org.apache.commons.cli" version="1.4.0"/>
<plugin id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
- <plugin id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
+ <plugin id="org.apache.commons.cli" version="1.4.0"/>
<plugin id="org.apache.commons.codec" version="1.9.0.v20170208-1614"/>
+ <plugin id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<plugin id="org.apache.commons.codec.source" version="1.9.0.v20170208-1614"/>
<plugin id="org.apache.commons.collections"/>
<plugin id="org.apache.commons.collections.source"/>
@@ -1010,9 +1010,9 @@
<plugin id="org.eclipse.fx.code.editor.configuration"/>
<plugin id="org.eclipse.fx.code.editor.ldef"/>
<plugin id="org.eclipse.fx.code.editor.ldef.ui"/>
+ <plugin id="org.eclipse.fx.core" version="3.3.0.201805280600"/>
<plugin id="org.eclipse.fx.core" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.core" version="3.3.0.201805280847"/>
- <plugin id="org.eclipse.fx.core" version="3.3.0.201805280600"/>
<plugin id="org.eclipse.fx.core.databinding" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.core.databinding" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.core.databinding.source"/>
@@ -1022,8 +1022,8 @@
<plugin id="org.eclipse.fx.core.di.context" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.core.di.context.source"/>
<plugin id="org.eclipse.fx.core.di.source"/>
- <plugin id="org.eclipse.fx.core.fxml" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.core.fxml" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.core.fxml" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.core.fxml.source"/>
<plugin id="org.eclipse.fx.core.guice" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.core.guice" version="3.3.0.201805280600"/>
@@ -1039,13 +1039,13 @@
<plugin id="org.eclipse.fx.core.slf4j" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.core.slf4j.source"/>
<plugin id="org.eclipse.fx.core.source"/>
- <plugin id="org.eclipse.fx.emf.databinding" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.emf.databinding" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.emf.databinding" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.emf.databinding.source"/>
<plugin id="org.eclipse.fx.emf.edit.ui"/>
<plugin id="org.eclipse.fx.emf.edit.ui.source"/>
- <plugin id="org.eclipse.fx.formats.svg" version="3.3.0.201805280600"/>
<plugin id="org.eclipse.fx.formats.svg" version="3.3.0.201805280847"/>
+ <plugin id="org.eclipse.fx.formats.svg" version="3.3.0.201805280600"/>
<plugin id="org.eclipse.fx.formats.svg.source"/>
<plugin id="org.eclipse.fx.ide.converter"/>
<plugin id="org.eclipse.fx.ide.css"/>
@@ -1078,25 +1078,25 @@
<plugin id="org.eclipse.fx.ide.rrobot.model"/>
<plugin id="org.eclipse.fx.ide.ui"/>
<plugin id="org.eclipse.fx.ide.ui.preview"/>
- <plugin id="org.eclipse.fx.osgi" version="3.6.1.201909200822"/>
<plugin id="org.eclipse.fx.osgi" version="3.3.0.201805280500"/>
+ <plugin id="org.eclipse.fx.osgi" version="3.6.1.201909200822"/>
<plugin id="org.eclipse.fx.osgi.source"/>
<plugin id="org.eclipse.fx.osgi.util" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.osgi.util" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.osgi.util" version="3.3.0.201805280600"/>
<plugin id="org.eclipse.fx.osgi.util.source"/>
- <plugin id="org.eclipse.fx.ui.animation" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.animation" version="3.3.0.201805280600"/>
+ <plugin id="org.eclipse.fx.ui.animation" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.animation.source"/>
- <plugin id="org.eclipse.fx.ui.controls" version="3.3.0.201805280847"/>
- <plugin id="org.eclipse.fx.ui.controls" version="3.3.0.201805280600"/>
<plugin id="org.eclipse.fx.ui.controls" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.ui.controls" version="3.3.0.201805280600"/>
+ <plugin id="org.eclipse.fx.ui.controls" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.controls.nl"/>
<plugin id="org.eclipse.fx.ui.controls.source"/>
<plugin id="org.eclipse.fx.ui.databinding"/>
<plugin id="org.eclipse.fx.ui.databinding.source"/>
- <plugin id="org.eclipse.fx.ui.di" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.di" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.ui.di" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.di.interopt"/>
<plugin id="org.eclipse.fx.ui.di.source"/>
<plugin id="org.eclipse.fx.ui.dialogs" version="3.6.1.201909200827"/>
@@ -1113,16 +1113,16 @@
<plugin id="org.eclipse.fx.ui.keybindings.source"/>
<plugin id="org.eclipse.fx.ui.mobile"/>
<plugin id="org.eclipse.fx.ui.mobile.source"/>
+ <plugin id="org.eclipse.fx.ui.panes" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.panes" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.ui.panes" version="3.3.0.201805280600"/>
- <plugin id="org.eclipse.fx.ui.panes" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.panes.source"/>
<plugin id="org.eclipse.fx.ui.preferences" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.preferences" version="3.6.1.201909200827"/>
- <plugin id="org.eclipse.fx.ui.preferences.context" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.preferences.context" version="3.6.1.201909200827"/>
- <plugin id="org.eclipse.fx.ui.services" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.ui.preferences.context" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.services" version="3.3.0.201805280847"/>
+ <plugin id="org.eclipse.fx.ui.services" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.ui.services.source"/>
<plugin id="org.eclipse.fx.ui.theme" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.ui.theme" version="3.3.0.201805280847"/>
@@ -1130,14 +1130,14 @@
<plugin id="org.eclipse.fx.ui.workbench.base" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.workbench.base" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.ui.workbench.base.source"/>
- <plugin id="org.eclipse.fx.ui.workbench.fx" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.workbench.fx" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.ui.workbench.fx" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.workbench.fx.source"/>
- <plugin id="org.eclipse.fx.ui.workbench.renderers.base" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.ui.workbench.renderers.base" version="3.3.0.201805280847"/>
+ <plugin id="org.eclipse.fx.ui.workbench.renderers.base" version="3.6.1.201909200827"/>
<plugin id="org.eclipse.fx.ui.workbench.renderers.base.source"/>
- <plugin id="org.eclipse.fx.ui.workbench.renderers.fx" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.workbench.renderers.fx" version="3.6.1.201909200827"/>
+ <plugin id="org.eclipse.fx.ui.workbench.renderers.fx" version="3.3.0.201805280847"/>
<plugin id="org.eclipse.fx.ui.workbench.renderers.fx.nl"/>
<plugin id="org.eclipse.fx.ui.workbench.renderers.fx.source"/>
<plugin id="org.eclipse.fx.ui.workbench.services" version="3.6.1.201909200827"/>
@@ -1240,10 +1240,10 @@
<plugin id="org.eclipse.help.webapp"/>
<plugin id="org.eclipse.help.webapp.source"/>
<plugin id="org.eclipse.jdt"/>
- <plugin id="org.eclipse.jdt.annotation" version="2.2.0.v20180417-0931"/>
<plugin id="org.eclipse.jdt.annotation" version="1.1.200.v20171205-1334"/>
- <plugin id="org.eclipse.jdt.annotation.source" version="2.2.0.v20180417-0931"/>
+ <plugin id="org.eclipse.jdt.annotation" version="2.2.0.v20180417-0931"/>
<plugin id="org.eclipse.jdt.annotation.source" version="1.1.200.v20171205-1334"/>
+ <plugin id="org.eclipse.jdt.annotation.source" version="2.2.0.v20180417-0931"/>
<plugin id="org.eclipse.jdt.apt.core"/>
<plugin id="org.eclipse.jdt.apt.core.source"/>
<plugin id="org.eclipse.jdt.apt.pluggable.core"/>
@@ -1380,10 +1380,22 @@
<plugin id="org.eclipse.jst.pagedesigner"/>
<plugin id="org.eclipse.jst.pagedesigner.jsf.ui"/>
<plugin id="org.eclipse.jst.pagedesigner.jsp.core"/>
- <plugin id="org.eclipse.jst.server.core"/>
+ <plugin id="org.eclipse.jst.server.core" version="1.2.500.v201802202048"/>
+ <plugin id="org.eclipse.jst.server.core" version="1.2.302.qualifier"/>
<plugin id="org.eclipse.jst.server.core.source"/>
- <plugin id="org.eclipse.jst.server.generic.core"/>
+ <plugin id="org.eclipse.jst.server.generic.core" version="1.0.800.qualifier"/>
+ <plugin id="org.eclipse.jst.server.generic.core" version="1.0.900.v201606081655"/>
<plugin id="org.eclipse.jst.server.generic.core.source"/>
+ <plugin id="org.eclipse.jst.server.generic.jboss"/>
+ <plugin id="org.eclipse.jst.server.generic.jonas"/>
+ <plugin id="org.eclipse.jst.server.generic.oc4j"/>
+ <plugin id="org.eclipse.jst.server.generic.pde"/>
+ <plugin id="org.eclipse.jst.server.generic.ui"/>
+ <plugin id="org.eclipse.jst.server.preview.adapter"/>
+ <plugin id="org.eclipse.jst.server.tomcat.core"/>
+ <plugin id="org.eclipse.jst.server.tomcat.ui"/>
+ <plugin id="org.eclipse.jst.server.ui"/>
+ <plugin id="org.eclipse.jst.server.websphere.core"/>
<plugin id="org.eclipse.jst.standard.schemas"/>
<plugin id="org.eclipse.ltk.core.refactoring"/>
<plugin id="org.eclipse.ltk.core.refactoring.source"/>
@@ -1614,9 +1626,11 @@
<plugin id="org.eclipse.wst.html.ui.source"/>
<plugin id="org.eclipse.wst.internet.cache"/>
<plugin id="org.eclipse.wst.internet.cache.source"/>
- <plugin id="org.eclipse.wst.internet.monitor.core"/>
+ <plugin id="org.eclipse.wst.internet.monitor.core" version="1.0.600.v201309182039"/>
+ <plugin id="org.eclipse.wst.internet.monitor.core" version="1.0.505.qualifier"/>
<plugin id="org.eclipse.wst.internet.monitor.core.source"/>
- <plugin id="org.eclipse.wst.internet.monitor.ui"/>
+ <plugin id="org.eclipse.wst.internet.monitor.ui" version="1.0.606.qualifier"/>
+ <plugin id="org.eclipse.wst.internet.monitor.ui" version="1.0.700.v201309182039"/>
<plugin id="org.eclipse.wst.internet.monitor.ui.source"/>
<plugin id="org.eclipse.wst.jsdt.chromium"/>
<plugin id="org.eclipse.wst.jsdt.chromium.debug"/>
@@ -1685,11 +1699,16 @@
<plugin id="org.eclipse.wst.json.schemaprocessor.source"/>
<plugin id="org.eclipse.wst.json.ui"/>
<plugin id="org.eclipse.wst.json.ui.source"/>
- <plugin id="org.eclipse.wst.server.core"/>
+ <plugin id="org.eclipse.wst.server.core" version="1.10.0.v201803052214"/>
<plugin id="org.eclipse.wst.server.core.source"/>
- <plugin id="org.eclipse.wst.server.discovery"/>
+ <plugin id="org.eclipse.wst.server.discovery" version="1.3.100.v201805282004"/>
<plugin id="org.eclipse.wst.server.discovery.source"/>
- <plugin id="org.eclipse.wst.server.ui"/>
+ <plugin id="org.eclipse.wst.server.http.core"/>
+ <plugin id="org.eclipse.wst.server.http.ui"/>
+ <plugin id="org.eclipse.wst.server.preview"/>
+ <plugin id="org.eclipse.wst.server.preview.adapter"/>
+ <plugin id="org.eclipse.wst.server.ui" version="1.4.101.qualifier"/>
+ <plugin id="org.eclipse.wst.server.ui" version="1.5.401.v201804051745"/>
<plugin id="org.eclipse.wst.server.ui.doc.user"/>
<plugin id="org.eclipse.wst.server.ui.doc.user.source"/>
<plugin id="org.eclipse.wst.server.ui.infopop"/>
@@ -2005,8 +2024,8 @@
<plugin id="org.mozilla.javascript.source" version="1.7.5.v201504281450"/>
<plugin id="org.objectweb.asm" version="6.2.1.v20180823-1831"/>
<plugin id="org.objectweb.asm.all"/>
- <plugin id="org.objectweb.asm.source" version="6.1.1.v20180414-0329"/>
<plugin id="org.objectweb.asm.source" version="6.2.1.v20180823-1831"/>
+ <plugin id="org.objectweb.asm.source" version="6.1.1.v20180414-0329"/>
<plugin id="org.objectweb.asm.tree"/>
<plugin id="org.objectweb.asm.tree.source"/>
<plugin id="org.opentest4j"/>
@@ -2048,7 +2067,5 @@
<plugin id="org.eclipse.xtext.ui.shared.source"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64"/>
<plugin id="org.eclipse.swt"/>
- <plugin id="commons-io"/>
- <plugin id="org.eclipse.xtext.ui.shared"/>
</includeBundles>
</target>
\ No newline at end of file
diff --git a/target-blockchain/blockchain.target b/target-blockchain/blockchain.target
index 22c4c1a..ba679b0 100644
--- a/target-blockchain/blockchain.target
+++ b/target-blockchain/blockchain.target
@@ -631,7 +631,6 @@
<unit id="org.slf4j.nop.source" version="1.7.2.v201212060727"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180606145124/repository"/>
</location>
- <location path="${workspace_loc}/ecl_blockchain_additional_plugins/linuxandcocoa" type="Directory"/>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtend.sdk.feature.group" version="2.15.0.v20180916-1232"/>
<unit id="org.eclipse.xtext.sdk.feature.group" version="2.15.0.v20180916-1232"/>
@@ -643,7 +642,8 @@
<unit id="org.objectweb.asm.tree.source" version="6.2.1.v20180823-1831"/>
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.15.0/"/>
</location>
- <location path="${workspace_loc}/Yakindu/yakindu/eclipse/plugins" type="Directory"/>
+ <location path="${workspace_loc}/seco-blocks/ecl_blockchain_additional_plugins/linuxandcocoa" type="Directory"/>
+ <location path="${workspace_loc}/seco-blocks/Yakindu/yakindu/eclipse/plugins" type="Directory"/>
</locations>
<includeBundles>
<plugin id="ch.qos.logback.classic" version="1.1.2.v20171220-1825"/>