Go project natrue and new go project wizard.
diff --git a/.gitignore b/.gitignore
index 0026861..cd78b6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,22 +1,7 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
+*.class
# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
+bin/
*.exe
diff --git a/epl-v10.html b/epl-v10.html
new file mode 100644
index 0000000..ed4b196
--- /dev/null
+++ b/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/me.dollyn.goide.tests/src-gen/me/dollyn/goide/GolangInjectorProvider.java b/me.dollyn.goide.tests/src-gen/me/dollyn/goide/GolangInjectorProvider.java
new file mode 100644
index 0000000..eef63ac
--- /dev/null
+++ b/me.dollyn.goide.tests/src-gen/me/dollyn/goide/GolangInjectorProvider.java
@@ -0,0 +1,45 @@
+/*
+* generated by Xtext
+*/
+package me.dollyn.goide;
+
+import org.eclipse.xtext.junit4.GlobalRegistries;
+import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento;
+import org.eclipse.xtext.junit4.IInjectorProvider;
+import org.eclipse.xtext.junit4.IRegistryConfigurator;
+
+import com.google.inject.Injector;
+
+public class GolangInjectorProvider implements IInjectorProvider, IRegistryConfigurator {
+
+ protected GlobalStateMemento stateBeforeInjectorCreation;
+ protected GlobalStateMemento stateAfterInjectorCreation;
+ protected Injector injector;
+
+ static {
+ GlobalRegistries.initializeDefaults();
+ }
+
+ public Injector getInjector()
+ {
+ if (injector == null) {
+ stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
+ this.injector = internalCreateInjector();
+ stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
+ }
+ return injector;
+ }
+
+ protected Injector internalCreateInjector() {
+ return new GolangStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+
+ public void restoreRegistry() {
+ stateBeforeInjectorCreation.restoreGlobalState();
+ }
+
+ public void setupRegistry() {
+ getInjector();
+ stateAfterInjectorCreation.restoreGlobalState();
+ }
+}
diff --git a/me.dollyn.goide.tests/src-gen/me/dollyn/goide/GolangUiInjectorProvider.java b/me.dollyn.goide.tests/src-gen/me/dollyn/goide/GolangUiInjectorProvider.java
new file mode 100644
index 0000000..b8c834f
--- /dev/null
+++ b/me.dollyn.goide.tests/src-gen/me/dollyn/goide/GolangUiInjectorProvider.java
@@ -0,0 +1,16 @@
+/*
+* generated by Xtext
+*/
+package me.dollyn.goide;
+
+import org.eclipse.xtext.junit4.IInjectorProvider;
+
+import com.google.inject.Injector;
+
+public class GolangUiInjectorProvider implements IInjectorProvider {
+
+ public Injector getInjector() {
+ return me.dollyn.goide.ui.internal.GolangActivator.getInstance().getInjector("me.dollyn.goide.Golang");
+ }
+
+}
diff --git a/me.dollyn.goide.ui/.settings/org.eclipse.jdt.ui.prefs b/me.dollyn.goide.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..313f3ed
--- /dev/null
+++ b/me.dollyn.goide.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) 2012, 2013 dollyn(dollyn.sun@gmail.com).\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * dollyn(dollyn.sun@gmail.com) - initial API and implementation\r\n *******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/me.dollyn.goide.ui/icon/icon.png b/me.dollyn.goide.ui/icon/icon.png
new file mode 100644
index 0000000..211d347
--- /dev/null
+++ b/me.dollyn.goide.ui/icon/icon.png
Binary files differ
diff --git a/me.dollyn.goide.ui/plugin.xml b/me.dollyn.goide.ui/plugin.xml
index 6360a06..29c48f9 100644
--- a/me.dollyn.goide.ui/plugin.xml
+++ b/me.dollyn.goide.ui/plugin.xml
@@ -392,5 +392,29 @@
extensions="go">
</provider>
</extension>
+ <extension
+ point="org.eclipse.ui.ide.projectNatureImages">
+ <image
+ icon="icon/icon.png"
+ id="me.dollyn.goide.ui.image"
+ natureId="me.dollyn.goide.golang">
+ </image>
+ </extension>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ id="me.dollyn.goide.ui.category"
+ name="GoIDE">
+ </category>
+ <wizard
+ category="me.dollyn.goide.ui.category"
+ class="me.dollyn.goide.ui.wizards.NewGoProjectWizard"
+ descriptionImage="icon/icon.png"
+ icon="icon/icon.png"
+ id="me.dollyn.goide.ui.wizard"
+ name="Go Project"
+ project="true">
+ </wizard>
+ </extension>
</plugin>
diff --git a/me.dollyn.goide.ui/plugin.xml_gen b/me.dollyn.goide.ui/plugin.xml_gen
new file mode 100644
index 0000000..6360a06
--- /dev/null
+++ b/me.dollyn.goide.ui/plugin.xml_gen
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="go"
+ id="me.dollyn.goide.Golang"
+ name="Golang Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="me.dollyn.goide.Golang.validate">
+ <activeWhen>
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <!-- copy qualified name -->
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
+ <activeWhen>
+ <reference definitionId="me.dollyn.goide.Golang.Editor.opened" />
+ </activeWhen>
+ </handler>
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
+ <activeWhen>
+ <and>
+ <reference definitionId="me.dollyn.goide.Golang.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="me.dollyn.goide.Golang.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="me.dollyn.goide.Golang"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ <definition id="me.dollyn.goide.Golang.XtextEditor.opened">
+ <and>
+ <reference definitionId="isXtextEditorActive"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="me.dollyn.goide.Golang"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="me.dollyn.goide.Golang"
+ name="Golang">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ </page>
+ <page
+ category="me.dollyn.goide.Golang"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="me.dollyn.goide.Golang.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ </page>
+ <page
+ category="me.dollyn.goide.Golang"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="me.dollyn.goide.Golang.templates"
+ name="Templates">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="me.dollyn.goide.Golang"
+ name="Golang">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="me.dollyn.goide.ui.keyword_Golang"
+ label="Golang"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="me.dollyn.goide.Golang.validate"
+ name="Validate">
+ </command>
+ <!-- copy qualified name -->
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="me.dollyn.goide.Golang.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <!-- copy qualified name -->
+ <menuContribution locationURI="popup:#TextEditorContext?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="me.dollyn.goide.Golang.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="menu:edit?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="me.dollyn.goide.Golang.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <reference definitionId="me.dollyn.goide.Golang.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="go">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="go">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for me.dollyn.goide.Golang -->
+ <extension
+ id="golang.check.fast"
+ name="Golang Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="golang.check.normal"
+ name="Golang Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="golang.check.expensive"
+ name="Golang Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="me.dollyn.goide.Golang"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="me.dollyn.goide.Golang.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="me.dollyn.goide.Golang"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="me.dollyn.goide.Golang.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="me.dollyn.goide.Golang.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for me.dollyn.goide.Golang -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="me.dollyn.goide.ui.golang.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="me.dollyn.goide.ui.golang.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="me.dollyn.goide.ui.golang.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <!-- Rename Refactoring -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
+ commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
+ <activeWhen>
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="me.dollyn.goide.Golang.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="me.dollyn.goide.Golang"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+ id="me.dollyn.goide.Golang.refactoring"
+ name="Refactoring">
+ <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.compare.contentViewers">
+ <viewer id="me.dollyn.goide.Golang.compare.contentViewers"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="go">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer id="me.dollyn.goide.Golang.compare.contentMergeViewers"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="go" label="Golang Compare">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider id="me.dollyn.goide.Golang.editors.documentProviders"
+ class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+ extensions="go">
+ </provider>
+ </extension>
+
+</plugin>
diff --git a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/AbstractGolangProposalProvider.java b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/AbstractGolangProposalProvider.java
index 2315f07..0c9e698 100644
--- a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/AbstractGolangProposalProvider.java
+++ b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/AbstractGolangProposalProvider.java
@@ -25,7 +25,7 @@
public void completePackage_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
- public void completeImport_Path(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ public void completeImport_Package(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
diff --git a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/GolangParser.java b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/GolangParser.java
index 84bbf38..bba0f8b 100644
--- a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/GolangParser.java
+++ b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/GolangParser.java
@@ -43,7 +43,7 @@
put(grammarAccess.getGoModelAccess().getPackageAssignment_0(), "rule__GoModel__PackageAssignment_0");
put(grammarAccess.getGoModelAccess().getImportsAssignment_1(), "rule__GoModel__ImportsAssignment_1");
put(grammarAccess.getPackageAccess().getNameAssignment_1(), "rule__Package__NameAssignment_1");
- put(grammarAccess.getImportAccess().getPathAssignment_1(), "rule__Import__PathAssignment_1");
+ put(grammarAccess.getImportAccess().getPackageAssignment_1(), "rule__Import__PackageAssignment_1");
}
};
}
diff --git a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g
index 9bfa10c..32e5600 100644
--- a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g
+++ b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g
@@ -84,32 +84,6 @@
-// Entry rule entryRulePackage
-entryRulePackage
-:
-{ before(grammarAccess.getPackageRule()); }
- rulePackage
-{ after(grammarAccess.getPackageRule()); }
- EOF
-;
-
-// Rule Package
-rulePackage
- @init {
- int stackSize = keepStackSize();
- }
- :
-(
-{ before(grammarAccess.getPackageAccess().getGroup()); }
-(rule__Package__Group__0)
-{ after(grammarAccess.getPackageAccess().getGroup()); }
-)
-
-;
-finally {
- restoreStackSize(stackSize);
-}
-
// Entry rule entryRuleImport
@@ -204,68 +178,6 @@
-rule__Package__Group__0
- @init {
- int stackSize = keepStackSize();
- }
-:
- rule__Package__Group__0__Impl
- rule__Package__Group__1
-;
-finally {
- restoreStackSize(stackSize);
-}
-
-rule__Package__Group__0__Impl
- @init {
- int stackSize = keepStackSize();
- }
-:
-(
-{ before(grammarAccess.getPackageAccess().getPackageKeyword_0()); }
-
- 'package'
-
-{ after(grammarAccess.getPackageAccess().getPackageKeyword_0()); }
-)
-
-;
-finally {
- restoreStackSize(stackSize);
-}
-
-
-rule__Package__Group__1
- @init {
- int stackSize = keepStackSize();
- }
-:
- rule__Package__Group__1__Impl
-;
-finally {
- restoreStackSize(stackSize);
-}
-
-rule__Package__Group__1__Impl
- @init {
- int stackSize = keepStackSize();
- }
-:
-(
-{ before(grammarAccess.getPackageAccess().getNameAssignment_1()); }
-(rule__Package__NameAssignment_1)
-{ after(grammarAccess.getPackageAccess().getNameAssignment_1()); }
-)
-
-;
-finally {
- restoreStackSize(stackSize);
-}
-
-
-
-
-
rule__Import__Group__0
@init {
@@ -315,9 +227,9 @@
}
:
(
-{ before(grammarAccess.getImportAccess().getPathAssignment_1()); }
-(rule__Import__PathAssignment_1)
-{ after(grammarAccess.getImportAccess().getPathAssignment_1()); }
+{ before(grammarAccess.getImportAccess().getPackageAssignment_1()); }
+(rule__Import__PackageAssignment_1)
+{ after(grammarAccess.getImportAccess().getPackageAssignment_1()); }
)
;
@@ -337,8 +249,8 @@
}
:
(
-{ before(grammarAccess.getGoModelAccess().getPackagePackageParserRuleCall_0_0()); }
- rulePackage{ after(grammarAccess.getGoModelAccess().getPackagePackageParserRuleCall_0_0()); }
+{ before(grammarAccess.getGoModelAccess().getPackageIDTerminalRuleCall_0_0()); }
+ RULE_ID{ after(grammarAccess.getGoModelAccess().getPackageIDTerminalRuleCall_0_0()); }
)
;
@@ -361,29 +273,15 @@
restoreStackSize(stackSize);
}
-rule__Package__NameAssignment_1
+
+rule__Import__PackageAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
-{ before(grammarAccess.getPackageAccess().getNameIDTerminalRuleCall_1_0()); }
- RULE_ID{ after(grammarAccess.getPackageAccess().getNameIDTerminalRuleCall_1_0()); }
-)
-
-;
-finally {
- restoreStackSize(stackSize);
-}
-
-rule__Import__PathAssignment_1
- @init {
- int stackSize = keepStackSize();
- }
-:
-(
-{ before(grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0()); }
- RULE_STRING{ after(grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0()); }
+{ before(grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0()); }
+ RULE_STRING{ after(grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0()); }
)
;
diff --git a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.tokens b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.tokens
index fc51365..039a92b 100644
--- a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.tokens
+++ b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.tokens
@@ -1,11 +1,9 @@
RULE_ID=4
RULE_STRING=5
-T__12=12
T__11=11
RULE_ANY_OTHER=10
RULE_INT=6
RULE_WS=9
RULE_SL_COMMENT=8
RULE_ML_COMMENT=7
-'package'=11
-'import'=12
+'import'=11
diff --git a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangLexer.java b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangLexer.java
index 12b8ca8..fb9abbe 100644
--- a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangLexer.java
+++ b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangLexer.java
@@ -14,7 +14,6 @@
public class InternalGolangLexer extends Lexer {
public static final int RULE_ID=4;
public static final int RULE_STRING=5;
- public static final int T__12=12;
public static final int T__11=11;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_INT=6;
@@ -41,29 +40,8 @@
try {
int _type = T__11;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:11:7: ( 'package' )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:11:9: 'package'
- {
- match("package");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__11"
-
- // $ANTLR start "T__12"
- public final void mT__12() throws RecognitionException {
- try {
- int _type = T__12;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:12:7: ( 'import' )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:12:9: 'import'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:11:7: ( 'import' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:11:9: 'import'
{
match("import");
@@ -76,17 +54,17 @@
finally {
}
}
- // $ANTLR end "T__12"
+ // $ANTLR end "T__11"
// $ANTLR start "RULE_ID"
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:395:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:395:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:293:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:293:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:395:11: ( '^' )?
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:293:11: ( '^' )?
int alt1=2;
int LA1_0 = input.LA(1);
@@ -95,7 +73,7 @@
}
switch (alt1) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:395:11: '^'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:293:11: '^'
{
match('^');
@@ -113,7 +91,7 @@
recover(mse);
throw mse;}
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:395:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:293:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
loop2:
do {
int alt2=2;
@@ -162,10 +140,10 @@
try {
int _type = RULE_INT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:397:10: ( ( '0' .. '9' )+ )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:397:12: ( '0' .. '9' )+
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:295:10: ( ( '0' .. '9' )+ )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:295:12: ( '0' .. '9' )+
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:397:12: ( '0' .. '9' )+
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:295:12: ( '0' .. '9' )+
int cnt3=0;
loop3:
do {
@@ -179,7 +157,7 @@
switch (alt3) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:397:13: '0' .. '9'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:295:13: '0' .. '9'
{
matchRange('0','9');
@@ -211,10 +189,10 @@
try {
int _type = RULE_STRING;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
int alt6=2;
int LA6_0 = input.LA(1);
@@ -232,10 +210,10 @@
}
switch (alt6) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
loop4:
do {
int alt4=3;
@@ -251,7 +229,7 @@
switch (alt4) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
@@ -267,7 +245,7 @@
}
break;
case 2 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:66: ~ ( ( '\\\\' | '\"' ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:66: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -292,10 +270,10 @@
}
break;
case 2 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
{
match('\'');
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
loop5:
do {
int alt5=3;
@@ -311,7 +289,7 @@
switch (alt5) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
@@ -327,7 +305,7 @@
}
break;
case 2 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:399:137: ~ ( ( '\\\\' | '\\'' ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:297:137: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -370,12 +348,12 @@
try {
int _type = RULE_ML_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:401:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:401:19: '/*' ( options {greedy=false; } : . )* '*/'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:299:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:299:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:401:24: ( options {greedy=false; } : . )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:299:24: ( options {greedy=false; } : . )*
loop7:
do {
int alt7=2;
@@ -400,7 +378,7 @@
switch (alt7) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:401:52: .
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:299:52: .
{
matchAny();
@@ -430,12 +408,12 @@
try {
int _type = RULE_SL_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("//");
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:24: (~ ( ( '\\n' | '\\r' ) ) )*
loop8:
do {
int alt8=2;
@@ -448,7 +426,7 @@
switch (alt8) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:24: ~ ( ( '\\n' | '\\r' ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:24: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -468,7 +446,7 @@
}
} while (true);
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:40: ( ( '\\r' )? '\\n' )?
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:40: ( ( '\\r' )? '\\n' )?
int alt10=2;
int LA10_0 = input.LA(1);
@@ -477,9 +455,9 @@
}
switch (alt10) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:41: ( '\\r' )? '\\n'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:41: ( '\\r' )? '\\n'
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:41: ( '\\r' )?
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:41: ( '\\r' )?
int alt9=2;
int LA9_0 = input.LA(1);
@@ -488,7 +466,7 @@
}
switch (alt9) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:403:41: '\\r'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:41: '\\r'
{
match('\r');
@@ -520,10 +498,10 @@
try {
int _type = RULE_WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:405:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:405:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:303:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:303:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:405:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:303:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt11=0;
loop11:
do {
@@ -577,8 +555,8 @@
try {
int _type = RULE_ANY_OTHER;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:407:16: ( . )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:407:18: .
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:305:16: ( . )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:305:18: .
{
matchAny();
@@ -593,8 +571,8 @@
// $ANTLR end "RULE_ANY_OTHER"
public void mTokens() throws RecognitionException {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:8: ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
- int alt12=9;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:8: ( T__11 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=8;
alt12 = dfa12.predict(input);
switch (alt12) {
case 1 :
@@ -605,56 +583,49 @@
}
break;
case 2 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:16: T__12
- {
- mT__12();
-
- }
- break;
- case 3 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:22: RULE_ID
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:16: RULE_ID
{
mRULE_ID();
}
break;
- case 4 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:30: RULE_INT
+ case 3 :
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:24: RULE_INT
{
mRULE_INT();
}
break;
- case 5 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:39: RULE_STRING
+ case 4 :
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:33: RULE_STRING
{
mRULE_STRING();
}
break;
- case 6 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:51: RULE_ML_COMMENT
+ case 5 :
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:45: RULE_ML_COMMENT
{
mRULE_ML_COMMENT();
}
break;
- case 7 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:67: RULE_SL_COMMENT
+ case 6 :
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:61: RULE_SL_COMMENT
{
mRULE_SL_COMMENT();
}
break;
- case 8 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:83: RULE_WS
+ case 7 :
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:77: RULE_WS
{
mRULE_WS();
}
break;
- case 9 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:91: RULE_ANY_OTHER
+ case 8 :
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:1:85: RULE_ANY_OTHER
{
mRULE_ANY_OTHER();
@@ -668,54 +639,44 @@
protected DFA12 dfa12 = new DFA12(this);
static final String DFA12_eotS =
- "\1\uffff\2\14\1\12\2\uffff\3\12\2\uffff\1\14\1\uffff\1\14\5\uffff"+
- "\7\14\1\34\1\35\2\uffff";
+ "\1\uffff\1\13\1\11\2\uffff\3\11\2\uffff\1\13\6\uffff\3\13\1\25"+
+ "\1\uffff";
static final String DFA12_eofS =
- "\36\uffff";
+ "\26\uffff";
static final String DFA12_minS =
- "\1\0\1\141\1\155\1\101\2\uffff\2\0\1\52\2\uffff\1\143\1\uffff\1"+
- "\160\5\uffff\1\153\1\157\1\141\1\162\1\147\1\164\1\145\2\60\2\uffff";
+ "\1\0\1\155\1\101\2\uffff\2\0\1\52\2\uffff\1\160\6\uffff\1\157\1"+
+ "\162\1\164\1\60\1\uffff";
static final String DFA12_maxS =
- "\1\uffff\1\141\1\155\1\172\2\uffff\2\uffff\1\57\2\uffff\1\143\1"+
- "\uffff\1\160\5\uffff\1\153\1\157\1\141\1\162\1\147\1\164\1\145\2"+
- "\172\2\uffff";
+ "\1\uffff\1\155\1\172\2\uffff\2\uffff\1\57\2\uffff\1\160\6\uffff"+
+ "\1\157\1\162\1\164\1\172\1\uffff";
static final String DFA12_acceptS =
- "\4\uffff\1\3\1\4\3\uffff\1\10\1\11\1\uffff\1\3\1\uffff\1\4\1\5"+
- "\1\6\1\7\1\10\11\uffff\1\2\1\1";
+ "\3\uffff\1\2\1\3\3\uffff\1\7\1\10\1\uffff\1\2\1\3\1\4\1\5\1\6\1"+
+ "\7\4\uffff\1\1";
static final String DFA12_specialS =
- "\1\1\5\uffff\1\2\1\0\26\uffff}>";
+ "\1\1\4\uffff\1\2\1\0\17\uffff}>";
static final String[] DFA12_transitionS = {
- "\11\12\2\11\2\12\1\11\22\12\1\11\1\12\1\6\4\12\1\7\7\12\1\10"+
- "\12\5\7\12\32\4\3\12\1\3\1\4\1\12\10\4\1\2\6\4\1\1\12\4\uff85"+
- "\12",
- "\1\13",
- "\1\15",
- "\32\14\4\uffff\1\14\1\uffff\32\14",
+ "\11\11\2\10\2\11\1\10\22\11\1\10\1\11\1\5\4\11\1\6\7\11\1\7"+
+ "\12\4\7\11\32\3\3\11\1\2\1\3\1\11\10\3\1\1\21\3\uff85\11",
+ "\1\12",
+ "\32\13\4\uffff\1\13\1\uffff\32\13",
"",
"",
- "\0\17",
- "\0\17",
- "\1\20\4\uffff\1\21",
+ "\0\15",
+ "\0\15",
+ "\1\16\4\uffff\1\17",
"",
"",
+ "\1\21",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\22",
"\1\23",
- "",
"\1\24",
- "",
- "",
- "",
- "",
- "",
- "\1\25",
- "\1\26",
- "\1\27",
- "\1\30",
- "\1\31",
- "\1\32",
- "\1\33",
- "\12\14\7\uffff\32\14\4\uffff\1\14\1\uffff\32\14",
- "\12\14\7\uffff\32\14\4\uffff\1\14\1\uffff\32\14",
- "",
+ "\12\13\7\uffff\32\13\4\uffff\1\13\1\uffff\32\13",
""
};
@@ -749,19 +710,19 @@
this.transition = DFA12_transition;
}
public String getDescription() {
- return "1:1: Tokens : ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ return "1:1: Tokens : ( T__11 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
}
public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
IntStream input = _input;
int _s = s;
switch ( s ) {
case 0 :
- int LA12_7 = input.LA(1);
+ int LA12_6 = input.LA(1);
s = -1;
- if ( ((LA12_7>='\u0000' && LA12_7<='\uFFFF')) ) {s = 15;}
+ if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFF')) ) {s = 13;}
- else s = 10;
+ else s = 9;
if ( s>=0 ) return s;
break;
@@ -769,35 +730,33 @@
int LA12_0 = input.LA(1);
s = -1;
- if ( (LA12_0=='p') ) {s = 1;}
+ if ( (LA12_0=='i') ) {s = 1;}
- else if ( (LA12_0=='i') ) {s = 2;}
+ else if ( (LA12_0=='^') ) {s = 2;}
- else if ( (LA12_0=='^') ) {s = 3;}
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='h')||(LA12_0>='j' && LA12_0<='z')) ) {s = 3;}
- else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='h')||(LA12_0>='j' && LA12_0<='o')||(LA12_0>='q' && LA12_0<='z')) ) {s = 4;}
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 4;}
- else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 5;}
+ else if ( (LA12_0=='\"') ) {s = 5;}
- else if ( (LA12_0=='\"') ) {s = 6;}
+ else if ( (LA12_0=='\'') ) {s = 6;}
- else if ( (LA12_0=='\'') ) {s = 7;}
+ else if ( (LA12_0=='/') ) {s = 7;}
- else if ( (LA12_0=='/') ) {s = 8;}
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 8;}
- else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 9;}
-
- else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 10;}
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 9;}
if ( s>=0 ) return s;
break;
case 2 :
- int LA12_6 = input.LA(1);
+ int LA12_5 = input.LA(1);
s = -1;
- if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFF')) ) {s = 15;}
+ if ( ((LA12_5>='\u0000' && LA12_5<='\uFFFF')) ) {s = 13;}
- else s = 10;
+ else s = 9;
if ( s>=0 ) return s;
break;
diff --git a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangParser.java b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangParser.java
index 282acc9..a3416e7 100644
--- a/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangParser.java
+++ b/me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolangParser.java
@@ -22,11 +22,10 @@
@SuppressWarnings("all")
public class InternalGolangParser extends AbstractInternalContentAssistParser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package'", "'import'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'import'"
};
public static final int RULE_ID=4;
public static final int RULE_STRING=5;
- public static final int T__12=12;
public static final int T__11=11;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_INT=6;
@@ -149,98 +148,21 @@
// $ANTLR end "ruleGoModel"
- // $ANTLR start "entryRulePackage"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:88:1: entryRulePackage : rulePackage EOF ;
- public final void entryRulePackage() throws RecognitionException {
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:89:1: ( rulePackage EOF )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:90:1: rulePackage EOF
- {
- before(grammarAccess.getPackageRule());
- pushFollow(FOLLOW_rulePackage_in_entryRulePackage121);
- rulePackage();
-
- state._fsp--;
-
- after(grammarAccess.getPackageRule());
- match(input,EOF,FOLLOW_EOF_in_entryRulePackage128);
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return ;
- }
- // $ANTLR end "entryRulePackage"
-
-
- // $ANTLR start "rulePackage"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:97:1: rulePackage : ( ( rule__Package__Group__0 ) ) ;
- public final void rulePackage() throws RecognitionException {
-
- int stackSize = keepStackSize();
-
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:101:2: ( ( ( rule__Package__Group__0 ) ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:102:1: ( ( rule__Package__Group__0 ) )
- {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:102:1: ( ( rule__Package__Group__0 ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:103:1: ( rule__Package__Group__0 )
- {
- before(grammarAccess.getPackageAccess().getGroup());
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:104:1: ( rule__Package__Group__0 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:104:2: rule__Package__Group__0
- {
- pushFollow(FOLLOW_rule__Package__Group__0_in_rulePackage154);
- rule__Package__Group__0();
-
- state._fsp--;
-
-
- }
-
- after(grammarAccess.getPackageAccess().getGroup());
-
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
-
- restoreStackSize(stackSize);
-
- }
- return ;
- }
- // $ANTLR end "rulePackage"
-
-
// $ANTLR start "entryRuleImport"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:116:1: entryRuleImport : ruleImport EOF ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:90:1: entryRuleImport : ruleImport EOF ;
public final void entryRuleImport() throws RecognitionException {
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:117:1: ( ruleImport EOF )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:118:1: ruleImport EOF
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:91:1: ( ruleImport EOF )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:92:1: ruleImport EOF
{
before(grammarAccess.getImportRule());
- pushFollow(FOLLOW_ruleImport_in_entryRuleImport181);
+ pushFollow(FOLLOW_ruleImport_in_entryRuleImport123);
ruleImport();
state._fsp--;
after(grammarAccess.getImportRule());
- match(input,EOF,FOLLOW_EOF_in_entryRuleImport188);
+ match(input,EOF,FOLLOW_EOF_in_entryRuleImport130);
}
@@ -257,23 +179,23 @@
// $ANTLR start "ruleImport"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:125:1: ruleImport : ( ( rule__Import__Group__0 ) ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:99:1: ruleImport : ( ( rule__Import__Group__0 ) ) ;
public final void ruleImport() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:129:2: ( ( ( rule__Import__Group__0 ) ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:130:1: ( ( rule__Import__Group__0 ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:103:2: ( ( ( rule__Import__Group__0 ) ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:104:1: ( ( rule__Import__Group__0 ) )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:130:1: ( ( rule__Import__Group__0 ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:131:1: ( rule__Import__Group__0 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:104:1: ( ( rule__Import__Group__0 ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:105:1: ( rule__Import__Group__0 )
{
before(grammarAccess.getImportAccess().getGroup());
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:132:1: ( rule__Import__Group__0 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:132:2: rule__Import__Group__0
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:106:1: ( rule__Import__Group__0 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:106:2: rule__Import__Group__0
{
- pushFollow(FOLLOW_rule__Import__Group__0_in_ruleImport214);
+ pushFollow(FOLLOW_rule__Import__Group__0_in_ruleImport156);
rule__Import__Group__0();
state._fsp--;
@@ -304,21 +226,21 @@
// $ANTLR start "rule__GoModel__Group__0"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:146:1: rule__GoModel__Group__0 : rule__GoModel__Group__0__Impl rule__GoModel__Group__1 ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:120:1: rule__GoModel__Group__0 : rule__GoModel__Group__0__Impl rule__GoModel__Group__1 ;
public final void rule__GoModel__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:150:1: ( rule__GoModel__Group__0__Impl rule__GoModel__Group__1 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:151:2: rule__GoModel__Group__0__Impl rule__GoModel__Group__1
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:124:1: ( rule__GoModel__Group__0__Impl rule__GoModel__Group__1 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:125:2: rule__GoModel__Group__0__Impl rule__GoModel__Group__1
{
- pushFollow(FOLLOW_rule__GoModel__Group__0__Impl_in_rule__GoModel__Group__0248);
+ pushFollow(FOLLOW_rule__GoModel__Group__0__Impl_in_rule__GoModel__Group__0190);
rule__GoModel__Group__0__Impl();
state._fsp--;
- pushFollow(FOLLOW_rule__GoModel__Group__1_in_rule__GoModel__Group__0251);
+ pushFollow(FOLLOW_rule__GoModel__Group__1_in_rule__GoModel__Group__0193);
rule__GoModel__Group__1();
state._fsp--;
@@ -342,23 +264,23 @@
// $ANTLR start "rule__GoModel__Group__0__Impl"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:158:1: rule__GoModel__Group__0__Impl : ( ( rule__GoModel__PackageAssignment_0 ) ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:132:1: rule__GoModel__Group__0__Impl : ( ( rule__GoModel__PackageAssignment_0 ) ) ;
public final void rule__GoModel__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:162:1: ( ( ( rule__GoModel__PackageAssignment_0 ) ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:163:1: ( ( rule__GoModel__PackageAssignment_0 ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:136:1: ( ( ( rule__GoModel__PackageAssignment_0 ) ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:137:1: ( ( rule__GoModel__PackageAssignment_0 ) )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:163:1: ( ( rule__GoModel__PackageAssignment_0 ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:164:1: ( rule__GoModel__PackageAssignment_0 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:137:1: ( ( rule__GoModel__PackageAssignment_0 ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:138:1: ( rule__GoModel__PackageAssignment_0 )
{
before(grammarAccess.getGoModelAccess().getPackageAssignment_0());
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:165:1: ( rule__GoModel__PackageAssignment_0 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:165:2: rule__GoModel__PackageAssignment_0
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:139:1: ( rule__GoModel__PackageAssignment_0 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:139:2: rule__GoModel__PackageAssignment_0
{
- pushFollow(FOLLOW_rule__GoModel__PackageAssignment_0_in_rule__GoModel__Group__0__Impl278);
+ pushFollow(FOLLOW_rule__GoModel__PackageAssignment_0_in_rule__GoModel__Group__0__Impl220);
rule__GoModel__PackageAssignment_0();
state._fsp--;
@@ -389,16 +311,16 @@
// $ANTLR start "rule__GoModel__Group__1"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:175:1: rule__GoModel__Group__1 : rule__GoModel__Group__1__Impl ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:149:1: rule__GoModel__Group__1 : rule__GoModel__Group__1__Impl ;
public final void rule__GoModel__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:179:1: ( rule__GoModel__Group__1__Impl )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:180:2: rule__GoModel__Group__1__Impl
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:153:1: ( rule__GoModel__Group__1__Impl )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:154:2: rule__GoModel__Group__1__Impl
{
- pushFollow(FOLLOW_rule__GoModel__Group__1__Impl_in_rule__GoModel__Group__1308);
+ pushFollow(FOLLOW_rule__GoModel__Group__1__Impl_in_rule__GoModel__Group__1250);
rule__GoModel__Group__1__Impl();
state._fsp--;
@@ -422,35 +344,35 @@
// $ANTLR start "rule__GoModel__Group__1__Impl"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:186:1: rule__GoModel__Group__1__Impl : ( ( rule__GoModel__ImportsAssignment_1 )* ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:160:1: rule__GoModel__Group__1__Impl : ( ( rule__GoModel__ImportsAssignment_1 )* ) ;
public final void rule__GoModel__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:190:1: ( ( ( rule__GoModel__ImportsAssignment_1 )* ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:191:1: ( ( rule__GoModel__ImportsAssignment_1 )* )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:164:1: ( ( ( rule__GoModel__ImportsAssignment_1 )* ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:165:1: ( ( rule__GoModel__ImportsAssignment_1 )* )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:191:1: ( ( rule__GoModel__ImportsAssignment_1 )* )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:192:1: ( rule__GoModel__ImportsAssignment_1 )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:165:1: ( ( rule__GoModel__ImportsAssignment_1 )* )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:166:1: ( rule__GoModel__ImportsAssignment_1 )*
{
before(grammarAccess.getGoModelAccess().getImportsAssignment_1());
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:193:1: ( rule__GoModel__ImportsAssignment_1 )*
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:167:1: ( rule__GoModel__ImportsAssignment_1 )*
loop1:
do {
int alt1=2;
int LA1_0 = input.LA(1);
- if ( (LA1_0==12) ) {
+ if ( (LA1_0==11) ) {
alt1=1;
}
switch (alt1) {
case 1 :
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:193:2: rule__GoModel__ImportsAssignment_1
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:167:2: rule__GoModel__ImportsAssignment_1
{
- pushFollow(FOLLOW_rule__GoModel__ImportsAssignment_1_in_rule__GoModel__Group__1__Impl335);
+ pushFollow(FOLLOW_rule__GoModel__ImportsAssignment_1_in_rule__GoModel__Group__1__Impl277);
rule__GoModel__ImportsAssignment_1();
state._fsp--;
@@ -486,177 +408,22 @@
// $ANTLR end "rule__GoModel__Group__1__Impl"
- // $ANTLR start "rule__Package__Group__0"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:207:1: rule__Package__Group__0 : rule__Package__Group__0__Impl rule__Package__Group__1 ;
- public final void rule__Package__Group__0() throws RecognitionException {
-
- int stackSize = keepStackSize();
-
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:211:1: ( rule__Package__Group__0__Impl rule__Package__Group__1 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:212:2: rule__Package__Group__0__Impl rule__Package__Group__1
- {
- pushFollow(FOLLOW_rule__Package__Group__0__Impl_in_rule__Package__Group__0370);
- rule__Package__Group__0__Impl();
-
- state._fsp--;
-
- pushFollow(FOLLOW_rule__Package__Group__1_in_rule__Package__Group__0373);
- rule__Package__Group__1();
-
- state._fsp--;
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
-
- restoreStackSize(stackSize);
-
- }
- return ;
- }
- // $ANTLR end "rule__Package__Group__0"
-
-
- // $ANTLR start "rule__Package__Group__0__Impl"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:219:1: rule__Package__Group__0__Impl : ( 'package' ) ;
- public final void rule__Package__Group__0__Impl() throws RecognitionException {
-
- int stackSize = keepStackSize();
-
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:223:1: ( ( 'package' ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:224:1: ( 'package' )
- {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:224:1: ( 'package' )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:225:1: 'package'
- {
- before(grammarAccess.getPackageAccess().getPackageKeyword_0());
- match(input,11,FOLLOW_11_in_rule__Package__Group__0__Impl401);
- after(grammarAccess.getPackageAccess().getPackageKeyword_0());
-
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
-
- restoreStackSize(stackSize);
-
- }
- return ;
- }
- // $ANTLR end "rule__Package__Group__0__Impl"
-
-
- // $ANTLR start "rule__Package__Group__1"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:238:1: rule__Package__Group__1 : rule__Package__Group__1__Impl ;
- public final void rule__Package__Group__1() throws RecognitionException {
-
- int stackSize = keepStackSize();
-
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:242:1: ( rule__Package__Group__1__Impl )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:243:2: rule__Package__Group__1__Impl
- {
- pushFollow(FOLLOW_rule__Package__Group__1__Impl_in_rule__Package__Group__1432);
- rule__Package__Group__1__Impl();
-
- state._fsp--;
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
-
- restoreStackSize(stackSize);
-
- }
- return ;
- }
- // $ANTLR end "rule__Package__Group__1"
-
-
- // $ANTLR start "rule__Package__Group__1__Impl"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:249:1: rule__Package__Group__1__Impl : ( ( rule__Package__NameAssignment_1 ) ) ;
- public final void rule__Package__Group__1__Impl() throws RecognitionException {
-
- int stackSize = keepStackSize();
-
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:253:1: ( ( ( rule__Package__NameAssignment_1 ) ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:254:1: ( ( rule__Package__NameAssignment_1 ) )
- {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:254:1: ( ( rule__Package__NameAssignment_1 ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:255:1: ( rule__Package__NameAssignment_1 )
- {
- before(grammarAccess.getPackageAccess().getNameAssignment_1());
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:256:1: ( rule__Package__NameAssignment_1 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:256:2: rule__Package__NameAssignment_1
- {
- pushFollow(FOLLOW_rule__Package__NameAssignment_1_in_rule__Package__Group__1__Impl459);
- rule__Package__NameAssignment_1();
-
- state._fsp--;
-
-
- }
-
- after(grammarAccess.getPackageAccess().getNameAssignment_1());
-
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
-
- restoreStackSize(stackSize);
-
- }
- return ;
- }
- // $ANTLR end "rule__Package__Group__1__Impl"
-
-
// $ANTLR start "rule__Import__Group__0"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:270:1: rule__Import__Group__0 : rule__Import__Group__0__Impl rule__Import__Group__1 ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:182:1: rule__Import__Group__0 : rule__Import__Group__0__Impl rule__Import__Group__1 ;
public final void rule__Import__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:274:1: ( rule__Import__Group__0__Impl rule__Import__Group__1 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:275:2: rule__Import__Group__0__Impl rule__Import__Group__1
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:186:1: ( rule__Import__Group__0__Impl rule__Import__Group__1 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:187:2: rule__Import__Group__0__Impl rule__Import__Group__1
{
- pushFollow(FOLLOW_rule__Import__Group__0__Impl_in_rule__Import__Group__0493);
+ pushFollow(FOLLOW_rule__Import__Group__0__Impl_in_rule__Import__Group__0313);
rule__Import__Group__0__Impl();
state._fsp--;
- pushFollow(FOLLOW_rule__Import__Group__1_in_rule__Import__Group__0496);
+ pushFollow(FOLLOW_rule__Import__Group__1_in_rule__Import__Group__0316);
rule__Import__Group__1();
state._fsp--;
@@ -680,20 +447,20 @@
// $ANTLR start "rule__Import__Group__0__Impl"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:282:1: rule__Import__Group__0__Impl : ( 'import' ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:194:1: rule__Import__Group__0__Impl : ( 'import' ) ;
public final void rule__Import__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:286:1: ( ( 'import' ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:287:1: ( 'import' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:198:1: ( ( 'import' ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:199:1: ( 'import' )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:287:1: ( 'import' )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:288:1: 'import'
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:199:1: ( 'import' )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:200:1: 'import'
{
before(grammarAccess.getImportAccess().getImportKeyword_0());
- match(input,12,FOLLOW_12_in_rule__Import__Group__0__Impl524);
+ match(input,11,FOLLOW_11_in_rule__Import__Group__0__Impl344);
after(grammarAccess.getImportAccess().getImportKeyword_0());
}
@@ -717,16 +484,16 @@
// $ANTLR start "rule__Import__Group__1"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:301:1: rule__Import__Group__1 : rule__Import__Group__1__Impl ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:213:1: rule__Import__Group__1 : rule__Import__Group__1__Impl ;
public final void rule__Import__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:305:1: ( rule__Import__Group__1__Impl )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:306:2: rule__Import__Group__1__Impl
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:217:1: ( rule__Import__Group__1__Impl )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:218:2: rule__Import__Group__1__Impl
{
- pushFollow(FOLLOW_rule__Import__Group__1__Impl_in_rule__Import__Group__1555);
+ pushFollow(FOLLOW_rule__Import__Group__1__Impl_in_rule__Import__Group__1375);
rule__Import__Group__1__Impl();
state._fsp--;
@@ -750,31 +517,31 @@
// $ANTLR start "rule__Import__Group__1__Impl"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:312:1: rule__Import__Group__1__Impl : ( ( rule__Import__PathAssignment_1 ) ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:224:1: rule__Import__Group__1__Impl : ( ( rule__Import__PackageAssignment_1 ) ) ;
public final void rule__Import__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:316:1: ( ( ( rule__Import__PathAssignment_1 ) ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:317:1: ( ( rule__Import__PathAssignment_1 ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:228:1: ( ( ( rule__Import__PackageAssignment_1 ) ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:229:1: ( ( rule__Import__PackageAssignment_1 ) )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:317:1: ( ( rule__Import__PathAssignment_1 ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:318:1: ( rule__Import__PathAssignment_1 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:229:1: ( ( rule__Import__PackageAssignment_1 ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:230:1: ( rule__Import__PackageAssignment_1 )
{
- before(grammarAccess.getImportAccess().getPathAssignment_1());
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:319:1: ( rule__Import__PathAssignment_1 )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:319:2: rule__Import__PathAssignment_1
+ before(grammarAccess.getImportAccess().getPackageAssignment_1());
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:231:1: ( rule__Import__PackageAssignment_1 )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:231:2: rule__Import__PackageAssignment_1
{
- pushFollow(FOLLOW_rule__Import__PathAssignment_1_in_rule__Import__Group__1__Impl582);
- rule__Import__PathAssignment_1();
+ pushFollow(FOLLOW_rule__Import__PackageAssignment_1_in_rule__Import__Group__1__Impl402);
+ rule__Import__PackageAssignment_1();
state._fsp--;
}
- after(grammarAccess.getImportAccess().getPathAssignment_1());
+ after(grammarAccess.getImportAccess().getPackageAssignment_1());
}
@@ -797,25 +564,21 @@
// $ANTLR start "rule__GoModel__PackageAssignment_0"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:334:1: rule__GoModel__PackageAssignment_0 : ( rulePackage ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:246:1: rule__GoModel__PackageAssignment_0 : ( RULE_ID ) ;
public final void rule__GoModel__PackageAssignment_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:338:1: ( ( rulePackage ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:339:1: ( rulePackage )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:250:1: ( ( RULE_ID ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:251:1: ( RULE_ID )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:339:1: ( rulePackage )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:340:1: rulePackage
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:251:1: ( RULE_ID )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:252:1: RULE_ID
{
- before(grammarAccess.getGoModelAccess().getPackagePackageParserRuleCall_0_0());
- pushFollow(FOLLOW_rulePackage_in_rule__GoModel__PackageAssignment_0621);
- rulePackage();
-
- state._fsp--;
-
- after(grammarAccess.getGoModelAccess().getPackagePackageParserRuleCall_0_0());
+ before(grammarAccess.getGoModelAccess().getPackageIDTerminalRuleCall_0_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__GoModel__PackageAssignment_0441);
+ after(grammarAccess.getGoModelAccess().getPackageIDTerminalRuleCall_0_0());
}
@@ -838,20 +601,20 @@
// $ANTLR start "rule__GoModel__ImportsAssignment_1"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:349:1: rule__GoModel__ImportsAssignment_1 : ( ruleImport ) ;
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:261:1: rule__GoModel__ImportsAssignment_1 : ( ruleImport ) ;
public final void rule__GoModel__ImportsAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:353:1: ( ( ruleImport ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:354:1: ( ruleImport )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:265:1: ( ( ruleImport ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:266:1: ( ruleImport )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:354:1: ( ruleImport )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:355:1: ruleImport
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:266:1: ( ruleImport )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:267:1: ruleImport
{
before(grammarAccess.getGoModelAccess().getImportsImportParserRuleCall_1_0());
- pushFollow(FOLLOW_ruleImport_in_rule__GoModel__ImportsAssignment_1652);
+ pushFollow(FOLLOW_ruleImport_in_rule__GoModel__ImportsAssignment_1472);
ruleImport();
state._fsp--;
@@ -878,22 +641,22 @@
// $ANTLR end "rule__GoModel__ImportsAssignment_1"
- // $ANTLR start "rule__Package__NameAssignment_1"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:364:1: rule__Package__NameAssignment_1 : ( RULE_ID ) ;
- public final void rule__Package__NameAssignment_1() throws RecognitionException {
+ // $ANTLR start "rule__Import__PackageAssignment_1"
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:277:1: rule__Import__PackageAssignment_1 : ( RULE_STRING ) ;
+ public final void rule__Import__PackageAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:368:1: ( ( RULE_ID ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:369:1: ( RULE_ID )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:281:1: ( ( RULE_STRING ) )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:282:1: ( RULE_STRING )
{
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:369:1: ( RULE_ID )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:370:1: RULE_ID
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:282:1: ( RULE_STRING )
+ // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:283:1: RULE_STRING
{
- before(grammarAccess.getPackageAccess().getNameIDTerminalRuleCall_1_0());
- match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Package__NameAssignment_1683);
- after(grammarAccess.getPackageAccess().getNameIDTerminalRuleCall_1_0());
+ before(grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0());
+ match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rule__Import__PackageAssignment_1504);
+ after(grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0());
}
@@ -912,44 +675,7 @@
}
return ;
}
- // $ANTLR end "rule__Package__NameAssignment_1"
-
-
- // $ANTLR start "rule__Import__PathAssignment_1"
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:379:1: rule__Import__PathAssignment_1 : ( RULE_STRING ) ;
- public final void rule__Import__PathAssignment_1() throws RecognitionException {
-
- int stackSize = keepStackSize();
-
- try {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:383:1: ( ( RULE_STRING ) )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:384:1: ( RULE_STRING )
- {
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:384:1: ( RULE_STRING )
- // ../me.dollyn.goide.ui/src-gen/me/dollyn/goide/ui/contentassist/antlr/internal/InternalGolang.g:385:1: RULE_STRING
- {
- before(grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0());
- match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rule__Import__PathAssignment_1714);
- after(grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0());
-
- }
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
-
- restoreStackSize(stackSize);
-
- }
- return ;
- }
- // $ANTLR end "rule__Import__PathAssignment_1"
+ // $ANTLR end "rule__Import__PackageAssignment_1"
// Delegated rules
@@ -959,30 +685,21 @@
public static final BitSet FOLLOW_ruleGoModel_in_entryRuleGoModel61 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleGoModel68 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__GoModel__Group__0_in_ruleGoModel94 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rulePackage_in_entryRulePackage121 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRulePackage128 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Package__Group__0_in_rulePackage154 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleImport_in_entryRuleImport181 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRuleImport188 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Import__Group__0_in_ruleImport214 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__GoModel__Group__0__Impl_in_rule__GoModel__Group__0248 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_rule__GoModel__Group__1_in_rule__GoModel__Group__0251 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__GoModel__PackageAssignment_0_in_rule__GoModel__Group__0__Impl278 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__GoModel__Group__1__Impl_in_rule__GoModel__Group__1308 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__GoModel__ImportsAssignment_1_in_rule__GoModel__Group__1__Impl335 = new BitSet(new long[]{0x0000000000001002L});
- public static final BitSet FOLLOW_rule__Package__Group__0__Impl_in_rule__Package__Group__0370 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_rule__Package__Group__1_in_rule__Package__Group__0373 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_11_in_rule__Package__Group__0__Impl401 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Package__Group__1__Impl_in_rule__Package__Group__1432 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Package__NameAssignment_1_in_rule__Package__Group__1__Impl459 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Import__Group__0__Impl_in_rule__Import__Group__0493 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_rule__Import__Group__1_in_rule__Import__Group__0496 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_12_in_rule__Import__Group__0__Impl524 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Import__Group__1__Impl_in_rule__Import__Group__1555 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rule__Import__PathAssignment_1_in_rule__Import__Group__1__Impl582 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rulePackage_in_rule__GoModel__PackageAssignment_0621 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleImport_in_rule__GoModel__ImportsAssignment_1652 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_ID_in_rule__Package__NameAssignment_1683 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_STRING_in_rule__Import__PathAssignment_1714 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImport_in_entryRuleImport123 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleImport130 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Import__Group__0_in_ruleImport156 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__GoModel__Group__0__Impl_in_rule__GoModel__Group__0190 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_rule__GoModel__Group__1_in_rule__GoModel__Group__0193 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__GoModel__PackageAssignment_0_in_rule__GoModel__Group__0__Impl220 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__GoModel__Group__1__Impl_in_rule__GoModel__Group__1250 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__GoModel__ImportsAssignment_1_in_rule__GoModel__Group__1__Impl277 = new BitSet(new long[]{0x0000000000000802L});
+ public static final BitSet FOLLOW_rule__Import__Group__0__Impl_in_rule__Import__Group__0313 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_rule__Import__Group__1_in_rule__Import__Group__0316 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_rule__Import__Group__0__Impl344 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Import__Group__1__Impl_in_rule__Import__Group__1375 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Import__PackageAssignment_1_in_rule__Import__Group__1__Impl402 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__GoModel__PackageAssignment_0441 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImport_in_rule__GoModel__ImportsAssignment_1472 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_STRING_in_rule__Import__PackageAssignment_1504 = new BitSet(new long[]{0x0000000000000002L});
}
\ No newline at end of file
diff --git a/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/NewGoProjectWizard.java b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/NewGoProjectWizard.java
new file mode 100644
index 0000000..8e5e429
--- /dev/null
+++ b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/NewGoProjectWizard.java
@@ -0,0 +1,533 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 dollyn(dollyn.sun@gmail.com).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * dollyn(dollyn.sun@gmail.com) - initial API and implementation
+ *******************************************************************************/
+package me.dollyn.goide.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import me.dollyn.goide.ui.internal.GolangActivator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveRegistry;
+import org.eclipse.ui.IPluginContribution;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.activities.IActivityManager;
+import org.eclipse.ui.activities.IIdentifier;
+import org.eclipse.ui.activities.IWorkbenchActivitySupport;
+import org.eclipse.ui.activities.WorkbenchActivityHelper;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.ide.undo.CreateProjectOperation;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
+import org.eclipse.ui.internal.IPreferenceConstants;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.StatusUtil;
+import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
+import org.eclipse.ui.internal.util.PrefUtil;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
+
+public class NewGoProjectWizard extends BasicNewResourceWizard implements INewWizard {
+
+ private WizardNewProjectCreationPage mainPage;
+ // cache of newly-created project
+ private IProject newProject;
+ /**
+ * The config element which declares this wizard.
+ */
+ private IConfigurationElement configElement;
+
+ private static String WINDOW_PROBLEMS_TITLE = ""; //$NON-NLS-1$
+
+ /**
+ * Extension attribute name for final perspective.
+ */
+ private static final String FINAL_PERSPECTIVE = "finalPerspective"; //$NON-NLS-1$
+
+ /**
+ * Extension attribute name for preferred perspectives.
+ */
+ private static final String PREFERRED_PERSPECTIVES = "preferredPerspectives"; //$NON-NLS-1$
+
+ public NewGoProjectWizard() {
+ IDialogSettings workbenchSettings = GolangActivator.getInstance().getDialogSettings();
+ IDialogSettings section = workbenchSettings.getSection("NewGoProjectWizard");//$NON-NLS-1$
+ if (section == null) {
+ section = workbenchSettings.addNewSection("NewGoProjectWizard");//$NON-NLS-1$
+ }
+ setDialogSettings(section);
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ setNeedsProgressMonitor(true);
+ setWindowTitle(ResourceMessages.NewGoProjectWizard_NewGoProjectTitle);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ @Override
+ public void addPages() {
+ mainPage = new WizardNewProjectCreationPage("basicNewProjectPage") { //$NON-NLS-1$
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ createWorkingSetGroup(
+ (Composite) getControl(),
+ selection,
+ new String[] { "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$
+ Dialog.applyDialogFont(getControl());
+ }
+ };
+ mainPage.setTitle(ResourceMessages.NewGoProjectWizard_NewGoProjectTitle);
+ mainPage.setDescription(ResourceMessages.NewGoProjectWizard_NewGoProjectDescription);
+ this.addPage(mainPage);
+ }
+
+ /**
+ * Returns the newly created project.
+ *
+ * @return the created project, or <code>null</code> if project not
+ * created
+ */
+ public IProject getNewProject() {
+ return newProject;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on BasicNewResourceWizard.
+ */
+ protected void initializeDefaultPageImageDescriptor() {
+ ImageDescriptor desc = IDEWorkbenchPlugin
+ .getIDEImageDescriptor("wizban/newprj_wiz.png");//$NON-NLS-1$
+ setDefaultPageImageDescriptor(desc);
+ }
+
+ /*
+ * (non-Javadoc) Opens a new window with a particular perspective and input.
+ */
+ private static void openInNewWindow(IPerspectiveDescriptor desc) {
+
+ // Open the page.
+ try {
+ PlatformUI.getWorkbench().openWorkbenchWindow(desc.getId(),
+ ResourcesPlugin.getWorkspace().getRoot());
+ } catch (WorkbenchException e) {
+ IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+ if (window != null) {
+ ErrorDialog.openError(window.getShell(), WINDOW_PROBLEMS_TITLE,
+ e.getMessage(), e.getStatus());
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc) Method declared on IWizard.
+ */
+ public boolean performFinish() {
+ createNewProject();
+
+ if (newProject == null) {
+ return false;
+ }
+
+ IWorkingSet[] workingSets = mainPage.getSelectedWorkingSets();
+ getWorkbench().getWorkingSetManager().addToWorkingSets(newProject, workingSets);
+
+ updatePerspective();
+ selectAndReveal(newProject);
+
+ return true;
+ }
+
+ private IProject createNewProject() {
+ if (newProject != null) {
+ return newProject;
+ }
+
+ // get a project handle
+ final IProject newProjectHandle = mainPage.getProjectHandle();
+
+ // get a project descriptor
+ URI location = null;
+ if (!mainPage.useDefaults()) {
+ location = mainPage.getLocationURI();
+ }
+
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ final IProjectDescription description = workspace
+ .newProjectDescription(newProjectHandle.getName());
+ description.setLocationURI(location);
+
+ // create the new project operation
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException {
+ CreateProjectOperation op = new CreateProjectOperation(
+ description, ResourceMessages.NewGoProjectWizard_NewGoProjectTitle);
+ try {
+ // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=219901
+ // directly execute the operation so that the undo state is
+ // not preserved. Making this undoable resulted in too many
+ // accidental file deletions.
+ op.execute(monitor, WorkspaceUndoUtil
+ .getUIInfoAdapter(getShell()));
+ } catch (ExecutionException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ };
+
+ // run the new project creation operation
+ try {
+ getContainer().run(true, true, op);
+ } catch (InterruptedException e) {
+ return null;
+ } catch (InvocationTargetException e) {
+ Throwable t = e.getTargetException();
+ if (t instanceof ExecutionException
+ && t.getCause() instanceof CoreException) {
+ CoreException cause = (CoreException) t.getCause();
+ StatusAdapter status;
+ if (cause.getStatus().getCode() == IResourceStatus.CASE_VARIANT_EXISTS) {
+ status = new StatusAdapter(
+ StatusUtil
+ .newStatus(
+ IStatus.WARNING,
+ NLS
+ .bind(
+ org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_caseVariantExistsError,
+ newProjectHandle
+ .getName()),
+ cause));
+ } else {
+ status = new StatusAdapter(StatusUtil.newStatus(cause
+ .getStatus().getSeverity(),
+ org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_errorMessage, cause));
+ }
+ status.setProperty(StatusAdapter.TITLE_PROPERTY,
+ org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_errorMessage);
+ StatusManager.getManager().handle(status, StatusManager.BLOCK);
+ } else {
+ StatusAdapter status = new StatusAdapter(new Status(
+ IStatus.WARNING, IDEWorkbenchPlugin.IDE_WORKBENCH, 0,
+ NLS.bind(org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_internalError, t
+ .getMessage()), t));
+ status.setProperty(StatusAdapter.TITLE_PROPERTY,
+ org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_errorMessage);
+ StatusManager.getManager().handle(status,
+ StatusManager.LOG | StatusManager.BLOCK);
+ }
+ return null;
+ }
+
+ newProject = newProjectHandle;
+
+ return newProject;
+ }
+
+ /*
+ * (non-Javadoc) Replaces the current perspective with the new one.
+ */
+ private static void replaceCurrentPerspective(IPerspectiveDescriptor persp) {
+
+ // Get the active page.
+ IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+ if (window == null) {
+ return;
+ }
+ IWorkbenchPage page = window.getActivePage();
+ if (page == null) {
+ return;
+ }
+
+ // Set the perspective.
+ page.setPerspective(persp);
+ }
+
+ /**
+ * Stores the configuration element for the wizard. The config element will
+ * be used in <code>performFinish</code> to set the result perspective.
+ */
+ public void setInitializationData(IConfigurationElement cfig,
+ String propertyName, Object data) {
+ configElement = cfig;
+ }
+
+ /**
+ * Updates the perspective for the active page within the window.
+ */
+ protected void updatePerspective() {
+ updatePerspective(configElement);
+ }
+
+ /**
+ * Updates the perspective based on the current settings in the
+ * Workbench/Perspectives preference page.
+ *
+ * Use the setting for the new perspective opening if we are set to open in
+ * a new perspective.
+ * <p>
+ * A new project wizard class will need to implement the
+ * <code>IExecutableExtension</code> interface so as to gain access to the
+ * wizard's <code>IConfigurationElement</code>. That is the configuration
+ * element to pass into this method.
+ * </p>
+ *
+ * @param configElement -
+ * the element we are updating with
+ *
+ * @see IPreferenceConstants#OPM_NEW_WINDOW
+ * @see IPreferenceConstants#OPM_ACTIVE_PAGE
+ * @see IWorkbenchPreferenceConstants#NO_NEW_PERSPECTIVE
+ */
+ public static void updatePerspective(IConfigurationElement configElement) {
+ // Do not change perspective if the configuration element is
+ // not specified.
+ if (configElement == null) {
+ return;
+ }
+
+ // Retrieve the new project open perspective preference setting
+ String perspSetting = PrefUtil.getAPIPreferenceStore().getString(
+ IDE.Preferences.PROJECT_OPEN_NEW_PERSPECTIVE);
+
+ String promptSetting = IDEWorkbenchPlugin.getDefault()
+ .getPreferenceStore().getString(
+ IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE);
+
+ // Return if do not switch perspective setting and are not prompting
+ if (!(promptSetting.equals(MessageDialogWithToggle.PROMPT))
+ && perspSetting
+ .equals(IWorkbenchPreferenceConstants.NO_NEW_PERSPECTIVE)) {
+ return;
+ }
+
+ // Read the requested perspective id to be opened.
+ String finalPerspId = configElement.getAttribute(FINAL_PERSPECTIVE);
+ if (finalPerspId == null) {
+ return;
+ }
+
+ // Map perspective id to descriptor.
+ IPerspectiveRegistry reg = PlatformUI.getWorkbench()
+ .getPerspectiveRegistry();
+
+ // leave this code in - the perspective of a given project may map to
+ // activities other than those that the wizard itself maps to.
+ IPerspectiveDescriptor finalPersp = reg
+ .findPerspectiveWithId(finalPerspId);
+ if (finalPersp != null && finalPersp instanceof IPluginContribution) {
+ IPluginContribution contribution = (IPluginContribution) finalPersp;
+ if (contribution.getPluginId() != null) {
+ IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI
+ .getWorkbench().getActivitySupport();
+ IActivityManager activityManager = workbenchActivitySupport
+ .getActivityManager();
+ IIdentifier identifier = activityManager
+ .getIdentifier(WorkbenchActivityHelper
+ .createUnifiedId(contribution));
+ Set idActivities = identifier.getActivityIds();
+
+ if (!idActivities.isEmpty()) {
+ Set enabledIds = new HashSet(activityManager
+ .getEnabledActivityIds());
+
+ if (enabledIds.addAll(idActivities)) {
+ workbenchActivitySupport
+ .setEnabledActivityIds(enabledIds);
+ }
+ }
+ }
+ } else {
+ IDEWorkbenchPlugin.log("Unable to find persective " //$NON-NLS-1$
+ + finalPerspId
+ + " in BasicNewProjectResourceWizard.updatePerspective"); //$NON-NLS-1$
+ return;
+ }
+
+ // gather the preferred perspectives
+ // always consider the final perspective (and those derived from it)
+ // to be preferred
+ ArrayList preferredPerspIds = new ArrayList();
+ addPerspectiveAndDescendants(preferredPerspIds, finalPerspId);
+ String preferred = configElement.getAttribute(PREFERRED_PERSPECTIVES);
+ if (preferred != null) {
+ StringTokenizer tok = new StringTokenizer(preferred, " \t\n\r\f,"); //$NON-NLS-1$
+ while (tok.hasMoreTokens()) {
+ addPerspectiveAndDescendants(preferredPerspIds, tok.nextToken());
+ }
+ }
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ IPerspectiveDescriptor currentPersp = page.getPerspective();
+
+ // don't switch if the current perspective is a preferred
+ // perspective
+ if (currentPersp != null
+ && preferredPerspIds.contains(currentPersp.getId())) {
+ return;
+ }
+ }
+
+ // prompt the user to switch
+ if (!confirmPerspectiveSwitch(window, finalPersp)) {
+ return;
+ }
+ }
+
+ int workbenchPerspectiveSetting = WorkbenchPlugin.getDefault()
+ .getPreferenceStore().getInt(
+ IPreferenceConstants.OPEN_PERSP_MODE);
+
+ // open perspective in new window setting
+ if (workbenchPerspectiveSetting == IPreferenceConstants.OPM_NEW_WINDOW) {
+ openInNewWindow(finalPersp);
+ return;
+ }
+
+ // replace active perspective setting otherwise
+ replaceCurrentPerspective(finalPersp);
+ }
+ /**
+ * Adds to the list all perspective IDs in the Workbench who's original ID
+ * matches the given ID.
+ *
+ * @param perspectiveIds
+ * the list of perspective IDs to supplement.
+ * @param id
+ * the id to query.
+ * @since 3.0
+ */
+ private static void addPerspectiveAndDescendants(List perspectiveIds,
+ String id) {
+ IPerspectiveRegistry registry = PlatformUI.getWorkbench()
+ .getPerspectiveRegistry();
+ IPerspectiveDescriptor[] perspectives = registry.getPerspectives();
+ for (int i = 0; i < perspectives.length; i++) {
+ // @issue illegal ref to workbench internal class;
+ // consider adding getOriginalId() as API on IPerspectiveDescriptor
+ PerspectiveDescriptor descriptor = ((PerspectiveDescriptor) perspectives[i]);
+ if (descriptor.getOriginalId().equals(id)) {
+ perspectiveIds.add(descriptor.getId());
+ }
+ }
+ }
+
+ /**
+ * Prompts the user for whether to switch perspectives.
+ *
+ * @param window
+ * The workbench window in which to switch perspectives; must not
+ * be <code>null</code>
+ * @param finalPersp
+ * The perspective to switch to; must not be <code>null</code>.
+ *
+ * @return <code>true</code> if it's OK to switch, <code>false</code>
+ * otherwise
+ */
+ private static boolean confirmPerspectiveSwitch(IWorkbenchWindow window,
+ IPerspectiveDescriptor finalPersp) {
+ IPreferenceStore store = IDEWorkbenchPlugin.getDefault()
+ .getPreferenceStore();
+ String pspm = store
+ .getString(IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE);
+ if (!IDEInternalPreferences.PSPM_PROMPT.equals(pspm)) {
+ // Return whether or not we should always switch
+ return IDEInternalPreferences.PSPM_ALWAYS.equals(pspm);
+ }
+ String desc = finalPersp.getDescription();
+ String message;
+ if (desc == null || desc.length() == 0)
+ message = NLS.bind(org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_perspSwitchMessage,
+ finalPersp.getLabel());
+ else
+ message = NLS.bind(
+ org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_perspSwitchMessageWithDesc,
+ new String[] { finalPersp.getLabel(), desc });
+
+ MessageDialogWithToggle dialog = MessageDialogWithToggle
+ .openYesNoQuestion(window.getShell(),
+ org.eclipse.ui.internal.wizards.newresource.ResourceMessages.NewProject_perspSwitchTitle, message,
+ null /* use the default message for the toggle */,
+ false /* toggle is initially unchecked */, store,
+ IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE);
+ int result = dialog.getReturnCode();
+
+ // If we are not going to prompt anymore propogate the choice.
+ if (dialog.getToggleState()) {
+ String preferenceValue;
+ if (result == IDialogConstants.YES_ID) {
+ // Doesn't matter if it is replace or new window
+ // as we are going to use the open perspective setting
+ preferenceValue = IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_REPLACE;
+ } else {
+ preferenceValue = IWorkbenchPreferenceConstants.NO_NEW_PERSPECTIVE;
+ }
+
+ // update PROJECT_OPEN_NEW_PERSPECTIVE to correspond
+ PrefUtil.getAPIPreferenceStore().setValue(
+ IDE.Preferences.PROJECT_OPEN_NEW_PERSPECTIVE,
+ preferenceValue);
+ }
+ return result == IDialogConstants.YES_ID;
+ }
+
+}
diff --git a/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/ResourceMessages.java b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/ResourceMessages.java
new file mode 100644
index 0000000..146b26d
--- /dev/null
+++ b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/ResourceMessages.java
@@ -0,0 +1,16 @@
+package me.dollyn.goide.ui.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ResourceMessages extends NLS {
+ private static final String BUNDLE_NAME = "me.dollyn.goide.ui.wizards.messages"; //$NON-NLS-1$
+ public static String NewGoProjectWizard_NewGoProjectTitle;
+ public static String NewGoProjectWizard_NewGoProjectDescription;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, ResourceMessages.class);
+ }
+
+ private ResourceMessages() {
+ }
+}
diff --git a/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/messages.properties b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/messages.properties
new file mode 100644
index 0000000..01a3def
--- /dev/null
+++ b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/messages.properties
@@ -0,0 +1,4 @@
+#Created by JInto - www.guh-software.de
+#Wed May 29 22:52:39 CST 2013
+NewGoProjectWizard_NewGoProjectDescription=Create a new golang project
+NewGoProjectWizard_NewGoProjectTitle=New Go Project
diff --git a/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/messages_zh_CN.properties b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/messages_zh_CN.properties
new file mode 100644
index 0000000..fa56cac
--- /dev/null
+++ b/me.dollyn.goide.ui/xtend-gen/me/dollyn/goide/ui/wizards/messages_zh_CN.properties
@@ -0,0 +1,4 @@
+#Created by JInto - www.guh-software.de
+#Wed May 29 22:52:39 CST 2013
+NewGoProjectWizard_NewGoProjectDescription=\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684Go\u8BED\u8A00\u9879\u76EE
+NewGoProjectWizard_NewGoProjectTitle=\u65B0\u5EFAGo\u9879\u76EE
diff --git a/me.dollyn.goide/.settings/org.eclipse.jdt.ui.prefs b/me.dollyn.goide/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..fb6f5d8
--- /dev/null
+++ b/me.dollyn.goide/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) 2012, 2013 dollyn(dollyn.sun@gmail.com).\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * dollyn(dollyn.sun@gmail.com) - initial API and implementation\r\n *******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/me.dollyn.goide/META-INF/MANIFEST.MF b/me.dollyn.goide/META-INF/MANIFEST.MF
index 9770f18..5709df9 100644
--- a/me.dollyn.goide/META-INF/MANIFEST.MF
+++ b/me.dollyn.goide/META-INF/MANIFEST.MF
@@ -16,7 +16,9 @@
org.eclipse.emf.ecore,
org.eclipse.emf.common,
org.antlr.runtime,
- org.eclipse.xtext.common.types
+ org.eclipse.xtext.common.types,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime
Import-Package: org.apache.log4j,
org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/me.dollyn.goide/plugin.xml b/me.dollyn.goide/plugin.xml
index 4adedd8..1488c44 100644
--- a/me.dollyn.goide/plugin.xml
+++ b/me.dollyn.goide/plugin.xml
@@ -10,6 +10,15 @@
genModel = "me/dollyn/goide/Golang.genmodel" />
</extension>
+ <extension
+ id="golang"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run
+ class="me.dollyn.goide.GoProjectNature">
+ </run>
+ </runtime>
+ </extension>
diff --git a/me.dollyn.goide/plugin.xml_gen b/me.dollyn.goide/plugin.xml_gen
new file mode 100644
index 0000000..4adedd8
--- /dev/null
+++ b/me.dollyn.goide/plugin.xml_gen
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.dollyn.me/goide/Golang"
+ class = "me.dollyn.goide.golang.GolangPackage"
+ genModel = "me/dollyn/goide/Golang.genmodel" />
+
+ </extension>
+
+
+
+</plugin>
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.ecore b/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.ecore
index 2893e43..92f39ad 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.ecore
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.ecore
@@ -4,8 +4,7 @@
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="golang"
nsURI="http://www.dollyn.me/goide/Golang" nsPrefix="golang">
<eClassifiers xsi:type="ecore:EClass" name="GoModel">
- <eStructuralFeatures xsi:type="ecore:EReference" name="package" upperBound="-1"
- eType="#//Package" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="package" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
eType="#//Import" containment="true"/>
</eClassifiers>
@@ -13,6 +12,6 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Import">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="package" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.genmodel b/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.genmodel
index c75a7c7..3e9d2d3 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.genmodel
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.genmodel
@@ -10,14 +10,14 @@
<genPackages prefix="Golang" basePackage="me.dollyn.goide" disposableProviderFactory="true"
fileExtensions="go" ecorePackage="Golang.ecore#/">
<genClasses ecoreClass="Golang.ecore#//GoModel">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Golang.ecore#//GoModel/package"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Golang.ecore#//GoModel/package"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Golang.ecore#//GoModel/imports"/>
</genClasses>
<genClasses ecoreClass="Golang.ecore#//Package">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Golang.ecore#//Package/name"/>
</genClasses>
<genClasses ecoreClass="Golang.ecore#//Import">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Golang.ecore#//Import/path"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Golang.ecore#//Import/package"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.xmi b/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.xmi
index 72959fe..944c1bb 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.xmi
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/Golang.xmi
@@ -9,8 +9,8 @@
<classifier xsi:type="ecore:EClass" href="http://www.dollyn.me/goide/Golang#//GoModel"/>
</type>
<alternatives xsi:type="xtext:Group">
- <elements xsi:type="xtext:Assignment" feature="package" operator="+=">
- <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
+ <elements xsi:type="xtext:Assignment" feature="package" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
</elements>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="imports" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="/0/@rules.2"/>
@@ -34,7 +34,7 @@
</type>
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Keyword" value="import"/>
- <elements xsi:type="xtext:Assignment" feature="path" operator="=">
+ <elements xsi:type="xtext:Assignment" feature="package" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="/1/@rules.2"/>
</elements>
</alternatives>
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GoModel.java b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GoModel.java
index 9723f4c..96a3344 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GoModel.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GoModel.java
@@ -30,20 +30,30 @@
public interface GoModel extends EObject
{
/**
- * Returns the value of the '<em><b>Package</b></em>' containment reference list.
- * The list contents are of type {@link me.dollyn.goide.golang.Package}.
+ * Returns the value of the '<em><b>Package</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Package</em>' containment reference list isn't clear,
+ * If the meaning of the '<em>Package</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Package</em>' containment reference list.
+ * @return the value of the '<em>Package</em>' attribute.
+ * @see #setPackage(String)
* @see me.dollyn.goide.golang.GolangPackage#getGoModel_Package()
- * @model containment="true"
+ * @model
* @generated
*/
- EList<me.dollyn.goide.golang.Package> getPackage();
+ String getPackage();
+
+ /**
+ * Sets the value of the '{@link me.dollyn.goide.golang.GoModel#getPackage <em>Package</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Package</em>' attribute.
+ * @see #getPackage()
+ * @generated
+ */
+ void setPackage(String value);
/**
* Returns the value of the '<em><b>Imports</b></em>' containment reference list.
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GolangPackage.java b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GolangPackage.java
index 24678c2..cda8a89 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GolangPackage.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/GolangPackage.java
@@ -71,7 +71,7 @@
int GO_MODEL = 0;
/**
- * The feature id for the '<em><b>Package</b></em>' containment reference list.
+ * The feature id for the '<em><b>Package</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -136,13 +136,13 @@
int IMPORT = 2;
/**
- * The feature id for the '<em><b>Path</b></em>' attribute.
+ * The feature id for the '<em><b>Package</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int IMPORT__PATH = 0;
+ int IMPORT__PACKAGE = 0;
/**
* The number of structural features of the '<em>Import</em>' class.
@@ -165,15 +165,15 @@
EClass getGoModel();
/**
- * Returns the meta object for the containment reference list '{@link me.dollyn.goide.golang.GoModel#getPackage <em>Package</em>}'.
+ * Returns the meta object for the attribute '{@link me.dollyn.goide.golang.GoModel#getPackage <em>Package</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Package</em>'.
+ * @return the meta object for the attribute '<em>Package</em>'.
* @see me.dollyn.goide.golang.GoModel#getPackage()
* @see #getGoModel()
* @generated
*/
- EReference getGoModel_Package();
+ EAttribute getGoModel_Package();
/**
* Returns the meta object for the containment reference list '{@link me.dollyn.goide.golang.GoModel#getImports <em>Imports</em>}'.
@@ -218,15 +218,15 @@
EClass getImport();
/**
- * Returns the meta object for the attribute '{@link me.dollyn.goide.golang.Import#getPath <em>Path</em>}'.
+ * Returns the meta object for the attribute '{@link me.dollyn.goide.golang.Import#getPackage <em>Package</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Path</em>'.
- * @see me.dollyn.goide.golang.Import#getPath()
+ * @return the meta object for the attribute '<em>Package</em>'.
+ * @see me.dollyn.goide.golang.Import#getPackage()
* @see #getImport()
* @generated
*/
- EAttribute getImport_Path();
+ EAttribute getImport_Package();
/**
* Returns the factory that creates the instances of the model.
@@ -262,12 +262,12 @@
EClass GO_MODEL = eINSTANCE.getGoModel();
/**
- * The meta object literal for the '<em><b>Package</b></em>' containment reference list feature.
+ * The meta object literal for the '<em><b>Package</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EReference GO_MODEL__PACKAGE = eINSTANCE.getGoModel_Package();
+ EAttribute GO_MODEL__PACKAGE = eINSTANCE.getGoModel_Package();
/**
* The meta object literal for the '<em><b>Imports</b></em>' containment reference list feature.
@@ -306,12 +306,12 @@
EClass IMPORT = eINSTANCE.getImport();
/**
- * The meta object literal for the '<em><b>Path</b></em>' attribute feature.
+ * The meta object literal for the '<em><b>Package</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EAttribute IMPORT__PATH = eINSTANCE.getImport_Path();
+ EAttribute IMPORT__PACKAGE = eINSTANCE.getImport_Package();
}
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/Import.java b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/Import.java
index fd5afde..8dfa14a 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/Import.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/Import.java
@@ -16,7 +16,7 @@
* <p>
* The following features are supported:
* <ul>
- * <li>{@link me.dollyn.goide.golang.Import#getPath <em>Path</em>}</li>
+ * <li>{@link me.dollyn.goide.golang.Import#getPackage <em>Package</em>}</li>
* </ul>
* </p>
*
@@ -27,29 +27,29 @@
public interface Import extends EObject
{
/**
- * Returns the value of the '<em><b>Path</b></em>' attribute.
+ * Returns the value of the '<em><b>Package</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Path</em>' attribute isn't clear,
+ * If the meaning of the '<em>Package</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Path</em>' attribute.
- * @see #setPath(String)
- * @see me.dollyn.goide.golang.GolangPackage#getImport_Path()
+ * @return the value of the '<em>Package</em>' attribute.
+ * @see #setPackage(String)
+ * @see me.dollyn.goide.golang.GolangPackage#getImport_Package()
* @model
* @generated
*/
- String getPath();
+ String getPackage();
/**
- * Sets the value of the '{@link me.dollyn.goide.golang.Import#getPath <em>Path</em>}' attribute.
+ * Sets the value of the '{@link me.dollyn.goide.golang.Import#getPackage <em>Package</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Path</em>' attribute.
- * @see #getPath()
+ * @param value the new value of the '<em>Package</em>' attribute.
+ * @see #getPackage()
* @generated
*/
- void setPath(String value);
+ void setPackage(String value);
} // Import
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GoModelImpl.java b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GoModelImpl.java
index e719125..5f7a027 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GoModelImpl.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GoModelImpl.java
@@ -12,6 +12,7 @@
import me.dollyn.goide.golang.GolangPackage;
import me.dollyn.goide.golang.Import;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
@@ -19,6 +20,7 @@
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;
@@ -41,14 +43,24 @@
public class GoModelImpl extends MinimalEObjectImpl.Container implements GoModel
{
/**
- * The cached value of the '{@link #getPackage() <em>Package</em>}' containment reference list.
+ * The default value of the '{@link #getPackage() <em>Package</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPackage()
* @generated
* @ordered
*/
- protected EList<me.dollyn.goide.golang.Package> package_;
+ protected static final String PACKAGE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPackage() <em>Package</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPackage()
+ * @generated
+ * @ordered
+ */
+ protected String package_ = PACKAGE_EDEFAULT;
/**
* The cached value of the '{@link #getImports() <em>Imports</em>}' containment reference list.
@@ -86,12 +98,8 @@
* <!-- end-user-doc -->
* @generated
*/
- public EList<me.dollyn.goide.golang.Package> getPackage()
+ public String getPackage()
{
- if (package_ == null)
- {
- package_ = new EObjectContainmentEList<me.dollyn.goide.golang.Package>(me.dollyn.goide.golang.Package.class, this, GolangPackage.GO_MODEL__PACKAGE);
- }
return package_;
}
@@ -100,6 +108,19 @@
* <!-- end-user-doc -->
* @generated
*/
+ public void setPackage(String newPackage)
+ {
+ String oldPackage = package_;
+ package_ = newPackage;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GolangPackage.GO_MODEL__PACKAGE, oldPackage, package_));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EList<Import> getImports()
{
if (imports == null)
@@ -119,8 +140,6 @@
{
switch (featureID)
{
- case GolangPackage.GO_MODEL__PACKAGE:
- return ((InternalEList<?>)getPackage()).basicRemove(otherEnd, msgs);
case GolangPackage.GO_MODEL__IMPORTS:
return ((InternalEList<?>)getImports()).basicRemove(otherEnd, msgs);
}
@@ -157,8 +176,7 @@
switch (featureID)
{
case GolangPackage.GO_MODEL__PACKAGE:
- getPackage().clear();
- getPackage().addAll((Collection<? extends me.dollyn.goide.golang.Package>)newValue);
+ setPackage((String)newValue);
return;
case GolangPackage.GO_MODEL__IMPORTS:
getImports().clear();
@@ -179,7 +197,7 @@
switch (featureID)
{
case GolangPackage.GO_MODEL__PACKAGE:
- getPackage().clear();
+ setPackage(PACKAGE_EDEFAULT);
return;
case GolangPackage.GO_MODEL__IMPORTS:
getImports().clear();
@@ -199,11 +217,28 @@
switch (featureID)
{
case GolangPackage.GO_MODEL__PACKAGE:
- return package_ != null && !package_.isEmpty();
+ return PACKAGE_EDEFAULT == null ? package_ != null : !PACKAGE_EDEFAULT.equals(package_);
case GolangPackage.GO_MODEL__IMPORTS:
return imports != null && !imports.isEmpty();
}
return super.eIsSet(featureID);
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (package: ");
+ result.append(package_);
+ result.append(')');
+ return result.toString();
+ }
+
} //GoModelImpl
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GolangPackageImpl.java b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GolangPackageImpl.java
index 2671cba..a987cc7 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GolangPackageImpl.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/GolangPackageImpl.java
@@ -125,9 +125,9 @@
* <!-- end-user-doc -->
* @generated
*/
- public EReference getGoModel_Package()
+ public EAttribute getGoModel_Package()
{
- return (EReference)goModelEClass.getEStructuralFeatures().get(0);
+ return (EAttribute)goModelEClass.getEStructuralFeatures().get(0);
}
/**
@@ -175,7 +175,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getImport_Path()
+ public EAttribute getImport_Package()
{
return (EAttribute)importEClass.getEStructuralFeatures().get(0);
}
@@ -211,14 +211,14 @@
// Create classes and their features
goModelEClass = createEClass(GO_MODEL);
- createEReference(goModelEClass, GO_MODEL__PACKAGE);
+ createEAttribute(goModelEClass, GO_MODEL__PACKAGE);
createEReference(goModelEClass, GO_MODEL__IMPORTS);
packageEClass = createEClass(PACKAGE);
createEAttribute(packageEClass, PACKAGE__NAME);
importEClass = createEClass(IMPORT);
- createEAttribute(importEClass, IMPORT__PATH);
+ createEAttribute(importEClass, IMPORT__PACKAGE);
}
/**
@@ -253,14 +253,14 @@
// Initialize classes and features; add operations and parameters
initEClass(goModelEClass, GoModel.class, "GoModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getGoModel_Package(), this.getPackage(), null, "package", null, 0, -1, GoModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGoModel_Package(), ecorePackage.getEString(), "package", null, 0, 1, GoModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getGoModel_Imports(), this.getImport(), null, "imports", null, 0, -1, GoModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(packageEClass, me.dollyn.goide.golang.Package.class, "Package", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPackage_Name(), ecorePackage.getEString(), "name", null, 0, 1, me.dollyn.goide.golang.Package.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(importEClass, Import.class, "Import", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getImport_Path(), ecorePackage.getEString(), "path", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getImport_Package(), ecorePackage.getEString(), "package", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/ImportImpl.java b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/ImportImpl.java
index 05313be..b3b6f00 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/ImportImpl.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/golang/impl/ImportImpl.java
@@ -23,7 +23,7 @@
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link me.dollyn.goide.golang.impl.ImportImpl#getPath <em>Path</em>}</li>
+ * <li>{@link me.dollyn.goide.golang.impl.ImportImpl#getPackage <em>Package</em>}</li>
* </ul>
* </p>
*
@@ -32,24 +32,24 @@
public class ImportImpl extends MinimalEObjectImpl.Container implements Import
{
/**
- * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
+ * The default value of the '{@link #getPackage() <em>Package</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getPath()
+ * @see #getPackage()
* @generated
* @ordered
*/
- protected static final String PATH_EDEFAULT = null;
+ protected static final String PACKAGE_EDEFAULT = null;
/**
- * The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
+ * The cached value of the '{@link #getPackage() <em>Package</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getPath()
+ * @see #getPackage()
* @generated
* @ordered
*/
- protected String path = PATH_EDEFAULT;
+ protected String package_ = PACKAGE_EDEFAULT;
/**
* <!-- begin-user-doc -->
@@ -77,9 +77,9 @@
* <!-- end-user-doc -->
* @generated
*/
- public String getPath()
+ public String getPackage()
{
- return path;
+ return package_;
}
/**
@@ -87,12 +87,12 @@
* <!-- end-user-doc -->
* @generated
*/
- public void setPath(String newPath)
+ public void setPackage(String newPackage)
{
- String oldPath = path;
- path = newPath;
+ String oldPackage = package_;
+ package_ = newPackage;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GolangPackage.IMPORT__PATH, oldPath, path));
+ eNotify(new ENotificationImpl(this, Notification.SET, GolangPackage.IMPORT__PACKAGE, oldPackage, package_));
}
/**
@@ -105,8 +105,8 @@
{
switch (featureID)
{
- case GolangPackage.IMPORT__PATH:
- return getPath();
+ case GolangPackage.IMPORT__PACKAGE:
+ return getPackage();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -121,8 +121,8 @@
{
switch (featureID)
{
- case GolangPackage.IMPORT__PATH:
- setPath((String)newValue);
+ case GolangPackage.IMPORT__PACKAGE:
+ setPackage((String)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -138,8 +138,8 @@
{
switch (featureID)
{
- case GolangPackage.IMPORT__PATH:
- setPath(PATH_EDEFAULT);
+ case GolangPackage.IMPORT__PACKAGE:
+ setPackage(PACKAGE_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -155,8 +155,8 @@
{
switch (featureID)
{
- case GolangPackage.IMPORT__PATH:
- return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
+ case GolangPackage.IMPORT__PACKAGE:
+ return PACKAGE_EDEFAULT == null ? package_ != null : !PACKAGE_EDEFAULT.equals(package_);
}
return super.eIsSet(featureID);
}
@@ -172,8 +172,8 @@
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (path: ");
- result.append(path);
+ result.append(" (package: ");
+ result.append(package_);
result.append(')');
return result.toString();
}
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g
index 13150ff..6f489d6 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g
@@ -79,19 +79,19 @@
@after { leaveRule(); }:
((
(
- {
- newCompositeNode(grammarAccess.getGoModelAccess().getPackagePackageParserRuleCall_0_0());
- }
- lv_package_0_0=rulePackage {
+ lv_package_0_0=RULE_ID
+ {
+ newLeafNode(lv_package_0_0, grammarAccess.getGoModelAccess().getPackageIDTerminalRuleCall_0_0());
+ }
+ {
if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getGoModelRule());
+ $current = createModelElement(grammarAccess.getGoModelRule());
}
- add(
+ setWithLastConsumed(
$current,
"package",
lv_package_0_0,
- "Package");
- afterParserOrEnumRuleCall();
+ "ID");
}
)
@@ -120,47 +120,6 @@
-// Entry rule entryRulePackage
-entryRulePackage returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getPackageRule()); }
- iv_rulePackage=rulePackage
- { $current=$iv_rulePackage.current; }
- EOF
-;
-
-// Rule Package
-rulePackage returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='package'
- {
- newLeafNode(otherlv_0, grammarAccess.getPackageAccess().getPackageKeyword_0());
- }
-(
-(
- lv_name_1_0=RULE_ID
- {
- newLeafNode(lv_name_1_0, grammarAccess.getPackageAccess().getNameIDTerminalRuleCall_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getPackageRule());
- }
- setWithLastConsumed(
- $current,
- "name",
- lv_name_1_0,
- "ID");
- }
-
-)
-))
-;
-
-
-
// Entry rule entryRuleImport
@@ -183,9 +142,9 @@
}
(
(
- lv_path_1_0=RULE_STRING
+ lv_package_1_0=RULE_STRING
{
- newLeafNode(lv_path_1_0, grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0());
+ newLeafNode(lv_package_1_0, grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0());
}
{
if ($current==null) {
@@ -193,8 +152,8 @@
}
setWithLastConsumed(
$current,
- "path",
- lv_path_1_0,
+ "package",
+ lv_package_1_0,
"STRING");
}
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.tokens b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.tokens
index fc51365..039a92b 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.tokens
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.tokens
@@ -1,11 +1,9 @@
RULE_ID=4
RULE_STRING=5
-T__12=12
T__11=11
RULE_ANY_OTHER=10
RULE_INT=6
RULE_WS=9
RULE_SL_COMMENT=8
RULE_ML_COMMENT=7
-'package'=11
-'import'=12
+'import'=11
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangLexer.java b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangLexer.java
index 1c3ce6a..0635923 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangLexer.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangLexer.java
@@ -14,7 +14,6 @@
public class InternalGolangLexer extends Lexer {
public static final int RULE_ID=4;
public static final int RULE_STRING=5;
- public static final int T__12=12;
public static final int T__11=11;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_INT=6;
@@ -41,29 +40,8 @@
try {
int _type = T__11;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:11:7: ( 'package' )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:11:9: 'package'
- {
- match("package");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__11"
-
- // $ANTLR start "T__12"
- public final void mT__12() throws RecognitionException {
- try {
- int _type = T__12;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:12:7: ( 'import' )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:12:9: 'import'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:11:7: ( 'import' )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:11:9: 'import'
{
match("import");
@@ -76,17 +54,17 @@
finally {
}
}
- // $ANTLR end "T__12"
+ // $ANTLR end "T__11"
// $ANTLR start "RULE_ID"
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:209:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:209:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:168:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:168:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:209:11: ( '^' )?
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:168:11: ( '^' )?
int alt1=2;
int LA1_0 = input.LA(1);
@@ -95,7 +73,7 @@
}
switch (alt1) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:209:11: '^'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:168:11: '^'
{
match('^');
@@ -113,7 +91,7 @@
recover(mse);
throw mse;}
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:209:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:168:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
loop2:
do {
int alt2=2;
@@ -162,10 +140,10 @@
try {
int _type = RULE_INT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:211:10: ( ( '0' .. '9' )+ )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:211:12: ( '0' .. '9' )+
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:170:10: ( ( '0' .. '9' )+ )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:170:12: ( '0' .. '9' )+
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:211:12: ( '0' .. '9' )+
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:170:12: ( '0' .. '9' )+
int cnt3=0;
loop3:
do {
@@ -179,7 +157,7 @@
switch (alt3) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:211:13: '0' .. '9'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:170:13: '0' .. '9'
{
matchRange('0','9');
@@ -211,10 +189,10 @@
try {
int _type = RULE_STRING;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
int alt6=2;
int LA6_0 = input.LA(1);
@@ -232,10 +210,10 @@
}
switch (alt6) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
loop4:
do {
int alt4=3;
@@ -251,7 +229,7 @@
switch (alt4) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
@@ -267,7 +245,7 @@
}
break;
case 2 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:66: ~ ( ( '\\\\' | '\"' ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:66: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -292,10 +270,10 @@
}
break;
case 2 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
{
match('\'');
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
loop5:
do {
int alt5=3;
@@ -311,7 +289,7 @@
switch (alt5) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
@@ -327,7 +305,7 @@
}
break;
case 2 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:213:137: ~ ( ( '\\\\' | '\\'' ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:172:137: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -370,12 +348,12 @@
try {
int _type = RULE_ML_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:215:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:215:19: '/*' ( options {greedy=false; } : . )* '*/'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:174:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:174:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:215:24: ( options {greedy=false; } : . )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:174:24: ( options {greedy=false; } : . )*
loop7:
do {
int alt7=2;
@@ -400,7 +378,7 @@
switch (alt7) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:215:52: .
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:174:52: .
{
matchAny();
@@ -430,12 +408,12 @@
try {
int _type = RULE_SL_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("//");
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:24: (~ ( ( '\\n' | '\\r' ) ) )*
loop8:
do {
int alt8=2;
@@ -448,7 +426,7 @@
switch (alt8) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:24: ~ ( ( '\\n' | '\\r' ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:24: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -468,7 +446,7 @@
}
} while (true);
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:40: ( ( '\\r' )? '\\n' )?
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:40: ( ( '\\r' )? '\\n' )?
int alt10=2;
int LA10_0 = input.LA(1);
@@ -477,9 +455,9 @@
}
switch (alt10) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:41: ( '\\r' )? '\\n'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:41: ( '\\r' )? '\\n'
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:41: ( '\\r' )?
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:41: ( '\\r' )?
int alt9=2;
int LA9_0 = input.LA(1);
@@ -488,7 +466,7 @@
}
switch (alt9) {
case 1 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:217:41: '\\r'
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:41: '\\r'
{
match('\r');
@@ -520,10 +498,10 @@
try {
int _type = RULE_WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:219:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:219:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:178:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:178:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:219:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:178:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt11=0;
loop11:
do {
@@ -577,8 +555,8 @@
try {
int _type = RULE_ANY_OTHER;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:221:16: ( . )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:221:18: .
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:180:16: ( . )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:180:18: .
{
matchAny();
@@ -593,8 +571,8 @@
// $ANTLR end "RULE_ANY_OTHER"
public void mTokens() throws RecognitionException {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:8: ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
- int alt12=9;
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:8: ( T__11 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=8;
alt12 = dfa12.predict(input);
switch (alt12) {
case 1 :
@@ -605,56 +583,49 @@
}
break;
case 2 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:16: T__12
- {
- mT__12();
-
- }
- break;
- case 3 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:22: RULE_ID
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:16: RULE_ID
{
mRULE_ID();
}
break;
- case 4 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:30: RULE_INT
+ case 3 :
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:24: RULE_INT
{
mRULE_INT();
}
break;
- case 5 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:39: RULE_STRING
+ case 4 :
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:33: RULE_STRING
{
mRULE_STRING();
}
break;
- case 6 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:51: RULE_ML_COMMENT
+ case 5 :
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:45: RULE_ML_COMMENT
{
mRULE_ML_COMMENT();
}
break;
- case 7 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:67: RULE_SL_COMMENT
+ case 6 :
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:61: RULE_SL_COMMENT
{
mRULE_SL_COMMENT();
}
break;
- case 8 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:83: RULE_WS
+ case 7 :
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:77: RULE_WS
{
mRULE_WS();
}
break;
- case 9 :
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:91: RULE_ANY_OTHER
+ case 8 :
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:1:85: RULE_ANY_OTHER
{
mRULE_ANY_OTHER();
@@ -668,54 +639,44 @@
protected DFA12 dfa12 = new DFA12(this);
static final String DFA12_eotS =
- "\1\uffff\2\14\1\12\2\uffff\3\12\2\uffff\1\14\1\uffff\1\14\5\uffff"+
- "\7\14\1\34\1\35\2\uffff";
+ "\1\uffff\1\13\1\11\2\uffff\3\11\2\uffff\1\13\6\uffff\3\13\1\25"+
+ "\1\uffff";
static final String DFA12_eofS =
- "\36\uffff";
+ "\26\uffff";
static final String DFA12_minS =
- "\1\0\1\141\1\155\1\101\2\uffff\2\0\1\52\2\uffff\1\143\1\uffff\1"+
- "\160\5\uffff\1\153\1\157\1\141\1\162\1\147\1\164\1\145\2\60\2\uffff";
+ "\1\0\1\155\1\101\2\uffff\2\0\1\52\2\uffff\1\160\6\uffff\1\157\1"+
+ "\162\1\164\1\60\1\uffff";
static final String DFA12_maxS =
- "\1\uffff\1\141\1\155\1\172\2\uffff\2\uffff\1\57\2\uffff\1\143\1"+
- "\uffff\1\160\5\uffff\1\153\1\157\1\141\1\162\1\147\1\164\1\145\2"+
- "\172\2\uffff";
+ "\1\uffff\1\155\1\172\2\uffff\2\uffff\1\57\2\uffff\1\160\6\uffff"+
+ "\1\157\1\162\1\164\1\172\1\uffff";
static final String DFA12_acceptS =
- "\4\uffff\1\3\1\4\3\uffff\1\10\1\11\1\uffff\1\3\1\uffff\1\4\1\5"+
- "\1\6\1\7\1\10\11\uffff\1\2\1\1";
+ "\3\uffff\1\2\1\3\3\uffff\1\7\1\10\1\uffff\1\2\1\3\1\4\1\5\1\6\1"+
+ "\7\4\uffff\1\1";
static final String DFA12_specialS =
- "\1\1\5\uffff\1\2\1\0\26\uffff}>";
+ "\1\1\4\uffff\1\2\1\0\17\uffff}>";
static final String[] DFA12_transitionS = {
- "\11\12\2\11\2\12\1\11\22\12\1\11\1\12\1\6\4\12\1\7\7\12\1\10"+
- "\12\5\7\12\32\4\3\12\1\3\1\4\1\12\10\4\1\2\6\4\1\1\12\4\uff85"+
- "\12",
- "\1\13",
- "\1\15",
- "\32\14\4\uffff\1\14\1\uffff\32\14",
+ "\11\11\2\10\2\11\1\10\22\11\1\10\1\11\1\5\4\11\1\6\7\11\1\7"+
+ "\12\4\7\11\32\3\3\11\1\2\1\3\1\11\10\3\1\1\21\3\uff85\11",
+ "\1\12",
+ "\32\13\4\uffff\1\13\1\uffff\32\13",
"",
"",
- "\0\17",
- "\0\17",
- "\1\20\4\uffff\1\21",
+ "\0\15",
+ "\0\15",
+ "\1\16\4\uffff\1\17",
"",
"",
+ "\1\21",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\22",
"\1\23",
- "",
"\1\24",
- "",
- "",
- "",
- "",
- "",
- "\1\25",
- "\1\26",
- "\1\27",
- "\1\30",
- "\1\31",
- "\1\32",
- "\1\33",
- "\12\14\7\uffff\32\14\4\uffff\1\14\1\uffff\32\14",
- "\12\14\7\uffff\32\14\4\uffff\1\14\1\uffff\32\14",
- "",
+ "\12\13\7\uffff\32\13\4\uffff\1\13\1\uffff\32\13",
""
};
@@ -749,19 +710,19 @@
this.transition = DFA12_transition;
}
public String getDescription() {
- return "1:1: Tokens : ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ return "1:1: Tokens : ( T__11 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
}
public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
IntStream input = _input;
int _s = s;
switch ( s ) {
case 0 :
- int LA12_7 = input.LA(1);
+ int LA12_6 = input.LA(1);
s = -1;
- if ( ((LA12_7>='\u0000' && LA12_7<='\uFFFF')) ) {s = 15;}
+ if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFF')) ) {s = 13;}
- else s = 10;
+ else s = 9;
if ( s>=0 ) return s;
break;
@@ -769,35 +730,33 @@
int LA12_0 = input.LA(1);
s = -1;
- if ( (LA12_0=='p') ) {s = 1;}
+ if ( (LA12_0=='i') ) {s = 1;}
- else if ( (LA12_0=='i') ) {s = 2;}
+ else if ( (LA12_0=='^') ) {s = 2;}
- else if ( (LA12_0=='^') ) {s = 3;}
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='h')||(LA12_0>='j' && LA12_0<='z')) ) {s = 3;}
- else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='h')||(LA12_0>='j' && LA12_0<='o')||(LA12_0>='q' && LA12_0<='z')) ) {s = 4;}
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 4;}
- else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 5;}
+ else if ( (LA12_0=='\"') ) {s = 5;}
- else if ( (LA12_0=='\"') ) {s = 6;}
+ else if ( (LA12_0=='\'') ) {s = 6;}
- else if ( (LA12_0=='\'') ) {s = 7;}
+ else if ( (LA12_0=='/') ) {s = 7;}
- else if ( (LA12_0=='/') ) {s = 8;}
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 8;}
- else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 9;}
-
- else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 10;}
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 9;}
if ( s>=0 ) return s;
break;
case 2 :
- int LA12_6 = input.LA(1);
+ int LA12_5 = input.LA(1);
s = -1;
- if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFF')) ) {s = 15;}
+ if ( ((LA12_5>='\u0000' && LA12_5<='\uFFFF')) ) {s = 13;}
- else s = 10;
+ else s = 9;
if ( s>=0 ) return s;
break;
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangParser.java b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangParser.java
index 762810c..58de62e 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangParser.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolangParser.java
@@ -21,11 +21,10 @@
@SuppressWarnings("all")
public class InternalGolangParser extends AbstractInternalAntlrParser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package'", "'import'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'import'"
};
public static final int RULE_ID=4;
public static final int RULE_STRING=5;
- public static final int T__12=12;
public static final int T__11=11;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_INT=6;
@@ -109,48 +108,42 @@
// $ANTLR start "ruleGoModel"
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:76:1: ruleGoModel returns [EObject current=null] : ( ( (lv_package_0_0= rulePackage ) ) ( (lv_imports_1_0= ruleImport ) )* ) ;
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:76:1: ruleGoModel returns [EObject current=null] : ( ( (lv_package_0_0= RULE_ID ) ) ( (lv_imports_1_0= ruleImport ) )* ) ;
public final EObject ruleGoModel() throws RecognitionException {
EObject current = null;
- EObject lv_package_0_0 = null;
-
+ Token lv_package_0_0=null;
EObject lv_imports_1_0 = null;
enterRule();
try {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:79:28: ( ( ( (lv_package_0_0= rulePackage ) ) ( (lv_imports_1_0= ruleImport ) )* ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:1: ( ( (lv_package_0_0= rulePackage ) ) ( (lv_imports_1_0= ruleImport ) )* )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:79:28: ( ( ( (lv_package_0_0= RULE_ID ) ) ( (lv_imports_1_0= ruleImport ) )* ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:1: ( ( (lv_package_0_0= RULE_ID ) ) ( (lv_imports_1_0= ruleImport ) )* )
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:1: ( ( (lv_package_0_0= rulePackage ) ) ( (lv_imports_1_0= ruleImport ) )* )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:2: ( (lv_package_0_0= rulePackage ) ) ( (lv_imports_1_0= ruleImport ) )*
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:1: ( ( (lv_package_0_0= RULE_ID ) ) ( (lv_imports_1_0= ruleImport ) )* )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:2: ( (lv_package_0_0= RULE_ID ) ) ( (lv_imports_1_0= ruleImport ) )*
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:2: ( (lv_package_0_0= rulePackage ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:81:1: (lv_package_0_0= rulePackage )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:80:2: ( (lv_package_0_0= RULE_ID ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:81:1: (lv_package_0_0= RULE_ID )
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:81:1: (lv_package_0_0= rulePackage )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:82:3: lv_package_0_0= rulePackage
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:81:1: (lv_package_0_0= RULE_ID )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:82:3: lv_package_0_0= RULE_ID
{
-
- newCompositeNode(grammarAccess.getGoModelAccess().getPackagePackageParserRuleCall_0_0());
-
- pushFollow(FOLLOW_rulePackage_in_ruleGoModel131);
- lv_package_0_0=rulePackage();
+ lv_package_0_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleGoModel127);
- state._fsp--;
-
+ newLeafNode(lv_package_0_0, grammarAccess.getGoModelAccess().getPackageIDTerminalRuleCall_0_0());
+
if (current==null) {
- current = createModelElementForParent(grammarAccess.getGoModelRule());
+ current = createModelElement(grammarAccess.getGoModelRule());
}
- add(
+ setWithLastConsumed(
current,
"package",
lv_package_0_0,
- "Package");
- afterParserOrEnumRuleCall();
+ "ID");
}
@@ -164,7 +157,7 @@
int alt1=2;
int LA1_0 = input.LA(1);
- if ( (LA1_0==12) ) {
+ if ( (LA1_0==11) ) {
alt1=1;
}
@@ -179,7 +172,7 @@
newCompositeNode(grammarAccess.getGoModelAccess().getImportsImportParserRuleCall_1_0());
- pushFollow(FOLLOW_ruleImport_in_ruleGoModel152);
+ pushFollow(FOLLOW_ruleImport_in_ruleGoModel153);
lv_imports_1_0=ruleImport();
state._fsp--;
@@ -227,111 +220,8 @@
// $ANTLR end "ruleGoModel"
- // $ANTLR start "entryRulePackage"
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:124:1: entryRulePackage returns [EObject current=null] : iv_rulePackage= rulePackage EOF ;
- public final EObject entryRulePackage() throws RecognitionException {
- EObject current = null;
-
- EObject iv_rulePackage = null;
-
-
- try {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:125:2: (iv_rulePackage= rulePackage EOF )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:126:2: iv_rulePackage= rulePackage EOF
- {
- newCompositeNode(grammarAccess.getPackageRule());
- pushFollow(FOLLOW_rulePackage_in_entryRulePackage189);
- iv_rulePackage=rulePackage();
-
- state._fsp--;
-
- current =iv_rulePackage;
- match(input,EOF,FOLLOW_EOF_in_entryRulePackage199);
-
- }
-
- }
-
- catch (RecognitionException re) {
- recover(input,re);
- appendSkippedTokens();
- }
- finally {
- }
- return current;
- }
- // $ANTLR end "entryRulePackage"
-
-
- // $ANTLR start "rulePackage"
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:133:1: rulePackage returns [EObject current=null] : (otherlv_0= 'package' ( (lv_name_1_0= RULE_ID ) ) ) ;
- public final EObject rulePackage() throws RecognitionException {
- EObject current = null;
-
- Token otherlv_0=null;
- Token lv_name_1_0=null;
-
- enterRule();
-
- try {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:136:28: ( (otherlv_0= 'package' ( (lv_name_1_0= RULE_ID ) ) ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:137:1: (otherlv_0= 'package' ( (lv_name_1_0= RULE_ID ) ) )
- {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:137:1: (otherlv_0= 'package' ( (lv_name_1_0= RULE_ID ) ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:137:3: otherlv_0= 'package' ( (lv_name_1_0= RULE_ID ) )
- {
- otherlv_0=(Token)match(input,11,FOLLOW_11_in_rulePackage236);
-
- newLeafNode(otherlv_0, grammarAccess.getPackageAccess().getPackageKeyword_0());
-
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:141:1: ( (lv_name_1_0= RULE_ID ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:142:1: (lv_name_1_0= RULE_ID )
- {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:142:1: (lv_name_1_0= RULE_ID )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:143:3: lv_name_1_0= RULE_ID
- {
- lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_rulePackage253);
-
- newLeafNode(lv_name_1_0, grammarAccess.getPackageAccess().getNameIDTerminalRuleCall_1_0());
-
-
- if (current==null) {
- current = createModelElement(grammarAccess.getPackageRule());
- }
- setWithLastConsumed(
- current,
- "name",
- lv_name_1_0,
- "ID");
-
-
- }
-
-
- }
-
-
- }
-
-
- }
-
- leaveRule();
- }
-
- catch (RecognitionException re) {
- recover(input,re);
- appendSkippedTokens();
- }
- finally {
- }
- return current;
- }
- // $ANTLR end "rulePackage"
-
-
// $ANTLR start "entryRuleImport"
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:167:1: entryRuleImport returns [EObject current=null] : iv_ruleImport= ruleImport EOF ;
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:126:1: entryRuleImport returns [EObject current=null] : iv_ruleImport= ruleImport EOF ;
public final EObject entryRuleImport() throws RecognitionException {
EObject current = null;
@@ -339,17 +229,17 @@
try {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:168:2: (iv_ruleImport= ruleImport EOF )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:169:2: iv_ruleImport= ruleImport EOF
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:127:2: (iv_ruleImport= ruleImport EOF )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:128:2: iv_ruleImport= ruleImport EOF
{
newCompositeNode(grammarAccess.getImportRule());
- pushFollow(FOLLOW_ruleImport_in_entryRuleImport294);
+ pushFollow(FOLLOW_ruleImport_in_entryRuleImport192);
iv_ruleImport=ruleImport();
state._fsp--;
current =iv_ruleImport;
- match(input,EOF,FOLLOW_EOF_in_entryRuleImport304);
+ match(input,EOF,FOLLOW_EOF_in_entryRuleImport202);
}
@@ -367,35 +257,35 @@
// $ANTLR start "ruleImport"
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:176:1: ruleImport returns [EObject current=null] : (otherlv_0= 'import' ( (lv_path_1_0= RULE_STRING ) ) ) ;
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:135:1: ruleImport returns [EObject current=null] : (otherlv_0= 'import' ( (lv_package_1_0= RULE_STRING ) ) ) ;
public final EObject ruleImport() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
- Token lv_path_1_0=null;
+ Token lv_package_1_0=null;
enterRule();
try {
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:179:28: ( (otherlv_0= 'import' ( (lv_path_1_0= RULE_STRING ) ) ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:180:1: (otherlv_0= 'import' ( (lv_path_1_0= RULE_STRING ) ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:138:28: ( (otherlv_0= 'import' ( (lv_package_1_0= RULE_STRING ) ) ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:139:1: (otherlv_0= 'import' ( (lv_package_1_0= RULE_STRING ) ) )
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:180:1: (otherlv_0= 'import' ( (lv_path_1_0= RULE_STRING ) ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:180:3: otherlv_0= 'import' ( (lv_path_1_0= RULE_STRING ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:139:1: (otherlv_0= 'import' ( (lv_package_1_0= RULE_STRING ) ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:139:3: otherlv_0= 'import' ( (lv_package_1_0= RULE_STRING ) )
{
- otherlv_0=(Token)match(input,12,FOLLOW_12_in_ruleImport341);
+ otherlv_0=(Token)match(input,11,FOLLOW_11_in_ruleImport239);
newLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:184:1: ( (lv_path_1_0= RULE_STRING ) )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:185:1: (lv_path_1_0= RULE_STRING )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:143:1: ( (lv_package_1_0= RULE_STRING ) )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:144:1: (lv_package_1_0= RULE_STRING )
{
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:185:1: (lv_path_1_0= RULE_STRING )
- // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:186:3: lv_path_1_0= RULE_STRING
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:144:1: (lv_package_1_0= RULE_STRING )
+ // ../me.dollyn.goide/src-gen/me/dollyn/goide/parser/antlr/internal/InternalGolang.g:145:3: lv_package_1_0= RULE_STRING
{
- lv_path_1_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleImport358);
+ lv_package_1_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleImport256);
- newLeafNode(lv_path_1_0, grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0());
+ newLeafNode(lv_package_1_0, grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0());
if (current==null) {
@@ -403,8 +293,8 @@
}
setWithLastConsumed(
current,
- "path",
- lv_path_1_0,
+ "package",
+ lv_package_1_0,
"STRING");
@@ -439,15 +329,11 @@
public static final BitSet FOLLOW_ruleGoModel_in_entryRuleGoModel75 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleGoModel85 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_rulePackage_in_ruleGoModel131 = new BitSet(new long[]{0x0000000000001002L});
- public static final BitSet FOLLOW_ruleImport_in_ruleGoModel152 = new BitSet(new long[]{0x0000000000001002L});
- public static final BitSet FOLLOW_rulePackage_in_entryRulePackage189 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRulePackage199 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_11_in_rulePackage236 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_RULE_ID_in_rulePackage253 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleImport_in_entryRuleImport294 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRuleImport304 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_12_in_ruleImport341 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_RULE_STRING_in_ruleImport358 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleGoModel127 = new BitSet(new long[]{0x0000000000000802L});
+ public static final BitSet FOLLOW_ruleImport_in_ruleGoModel153 = new BitSet(new long[]{0x0000000000000802L});
+ public static final BitSet FOLLOW_ruleImport_in_entryRuleImport192 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleImport202 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleImport239 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_RULE_STRING_in_ruleImport256 = new BitSet(new long[]{0x0000000000000002L});
}
\ No newline at end of file
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/serializer/GolangSemanticSequencer.java b/me.dollyn.goide/src-gen/me/dollyn/goide/serializer/GolangSemanticSequencer.java
index 8571e03..d536075 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/serializer/GolangSemanticSequencer.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/serializer/GolangSemanticSequencer.java
@@ -50,7 +50,7 @@
/**
* Constraint:
- * (package+=Package imports+=Import*)
+ * (package=ID imports+=Import*)
*/
protected void sequence_GoModel(EObject context, GoModel semanticObject) {
genericSequencer.createSequence(context, semanticObject);
@@ -59,16 +59,16 @@
/**
* Constraint:
- * path=STRING
+ * package=STRING
*/
protected void sequence_Import(EObject context, Import semanticObject) {
if(errorAcceptor != null) {
- if(transientValues.isValueTransient(semanticObject, GolangPackage.Literals.IMPORT__PATH) == ValueTransient.YES)
- errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GolangPackage.Literals.IMPORT__PATH));
+ if(transientValues.isValueTransient(semanticObject, GolangPackage.Literals.IMPORT__PACKAGE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GolangPackage.Literals.IMPORT__PACKAGE));
}
INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
- feeder.accept(grammarAccess.getImportAccess().getPathSTRINGTerminalRuleCall_1_0(), semanticObject.getPath());
+ feeder.accept(grammarAccess.getImportAccess().getPackageSTRINGTerminalRuleCall_1_0(), semanticObject.getPackage());
feeder.finish();
}
diff --git a/me.dollyn.goide/src-gen/me/dollyn/goide/services/GolangGrammarAccess.java b/me.dollyn.goide/src-gen/me/dollyn/goide/services/GolangGrammarAccess.java
index 9a4f8dc..3738492 100644
--- a/me.dollyn.goide/src-gen/me/dollyn/goide/services/GolangGrammarAccess.java
+++ b/me.dollyn.goide/src-gen/me/dollyn/goide/services/GolangGrammarAccess.java
@@ -22,23 +22,23 @@
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "GoModel");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Assignment cPackageAssignment_0 = (Assignment)cGroup.eContents().get(0);
- private final RuleCall cPackagePackageParserRuleCall_0_0 = (RuleCall)cPackageAssignment_0.eContents().get(0);
+ private final RuleCall cPackageIDTerminalRuleCall_0_0 = (RuleCall)cPackageAssignment_0.eContents().get(0);
private final Assignment cImportsAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cImportsImportParserRuleCall_1_0 = (RuleCall)cImportsAssignment_1.eContents().get(0);
//GoModel:
//
- // package+=Package imports+=Import*;
+ // package=ID imports+=Import*;
public ParserRule getRule() { return rule; }
- //package+=Package imports+=Import*
+ //package=ID imports+=Import*
public Group getGroup() { return cGroup; }
- //package+=Package
+ //package=ID
public Assignment getPackageAssignment_0() { return cPackageAssignment_0; }
- //Package
- public RuleCall getPackagePackageParserRuleCall_0_0() { return cPackagePackageParserRuleCall_0_0; }
+ //ID
+ public RuleCall getPackageIDTerminalRuleCall_0_0() { return cPackageIDTerminalRuleCall_0_0; }
//imports+=Import*
public Assignment getImportsAssignment_1() { return cImportsAssignment_1; }
@@ -76,25 +76,25 @@
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Import");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cPathAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final RuleCall cPathSTRINGTerminalRuleCall_1_0 = (RuleCall)cPathAssignment_1.eContents().get(0);
+ private final Assignment cPackageAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cPackageSTRINGTerminalRuleCall_1_0 = (RuleCall)cPackageAssignment_1.eContents().get(0);
//Import:
//
- // "import" path=STRING;
+ // "import" package=STRING;
public ParserRule getRule() { return rule; }
- //"import" path=STRING
+ //"import" package=STRING
public Group getGroup() { return cGroup; }
//"import"
public Keyword getImportKeyword_0() { return cImportKeyword_0; }
- //path=STRING
- public Assignment getPathAssignment_1() { return cPathAssignment_1; }
+ //package=STRING
+ public Assignment getPackageAssignment_1() { return cPackageAssignment_1; }
//STRING
- public RuleCall getPathSTRINGTerminalRuleCall_1_0() { return cPathSTRINGTerminalRuleCall_1_0; }
+ public RuleCall getPackageSTRINGTerminalRuleCall_1_0() { return cPackageSTRINGTerminalRuleCall_1_0; }
}
@@ -142,7 +142,7 @@
//GoModel:
//
- // package+=Package imports+=Import*;
+ // package=ID imports+=Import*;
public GoModelElements getGoModelAccess() {
return (pGoModel != null) ? pGoModel : (pGoModel = new GoModelElements());
}
@@ -164,7 +164,7 @@
//Import:
//
- // "import" path=STRING;
+ // "import" package=STRING;
public ImportElements getImportAccess() {
return (pImport != null) ? pImport : (pImport = new ImportElements());
}
diff --git a/me.dollyn.goide/src/me/dollyn/goide/GenerateGolang.mwe2 b/me.dollyn.goide/src/me/dollyn/goide/GenerateGolang.mwe2
index fa2ed36..d6a7841 100644
--- a/me.dollyn.goide/src/me/dollyn/goide/GenerateGolang.mwe2
+++ b/me.dollyn.goide/src/me/dollyn/goide/GenerateGolang.mwe2
@@ -30,7 +30,7 @@
component = Generator {
pathRtProject = runtimeProject
pathUiProject = "${runtimeProject}.ui"
- pathTestProject = "${runtimeProject}.tests"
+ //pathTestProject = "${runtimeProject}.tests"
projectNameRt = projectName
projectNameUi = "${projectName}.ui"
language = auto-inject {
@@ -103,7 +103,7 @@
fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {}
// generates junit test support classes into Generator#pathTestProject
- fragment = junit.Junit4Fragment auto-inject {}
+ //fragment = junit.Junit4Fragment auto-inject {}
// project wizard (optional)
// fragment = projectWizard.SimpleProjectWizardFragment auto-inject {
diff --git a/me.dollyn.goide/src/me/dollyn/goide/GoProjectNature.java b/me.dollyn.goide/src/me/dollyn/goide/GoProjectNature.java
new file mode 100644
index 0000000..f5e247b
--- /dev/null
+++ b/me.dollyn.goide/src/me/dollyn/goide/GoProjectNature.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 dollyn(dollyn.sun@gmail.com).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * dollyn(dollyn.sun@gmail.com) - initial API and implementation
+ *******************************************************************************/
+package me.dollyn.goide;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+
+public class GoProjectNature implements IProjectNature {
+
+ private IProject project;
+
+ @Override
+ public IProject getProject() {
+ return project;
+ }
+
+ @Override
+ public void setProject(IProject project) {
+ this.project = project;
+ }
+
+ @Override
+ public void configure() throws CoreException {
+
+ }
+
+ @Override
+ public void deconfigure() throws CoreException {
+
+ }
+
+}
diff --git a/me.dollyn.goide/src/me/dollyn/goide/Golang.xtext b/me.dollyn.goide/src/me/dollyn/goide/Golang.xtext
index a899136..7aee298 100644
--- a/me.dollyn.goide/src/me/dollyn/goide/Golang.xtext
+++ b/me.dollyn.goide/src/me/dollyn/goide/Golang.xtext
@@ -1,16 +1,16 @@
-grammar me.dollyn.goide.Golang with org.eclipse.xtext.common.Terminals
+grammar me.dollyn.goide.Golang with org.eclipse.xtext.xbase.Xbase
generate golang "http://www.dollyn.me/goide/Golang"
GoModel:
- package += Package
+ package = ID
imports += Import*
;
-Package:
- 'package' name=ID
-;
-
Import:
'import' package=STRING
-;
\ No newline at end of file
+;
+
+terminal decimal_digit : "0" .. "9" .;
+terminal octal_digit : "0" .. "7" .;
+terminal hex_digit : "0" .. "9" | "A".. "F" | "a" .. "f" .;
\ No newline at end of file
diff --git a/notice.html b/notice.html
new file mode 100644
index 0000000..f19c483
--- /dev/null
+++ b/notice.html
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/resources/icon.png b/resources/icon.png
new file mode 100644
index 0000000..211d347
--- /dev/null
+++ b/resources/icon.png
Binary files differ
diff --git a/resources/icon.psd b/resources/icon.psd
new file mode 100644
index 0000000..8f6b033
--- /dev/null
+++ b/resources/icon.psd
Binary files differ