Gosu on Eclipse 3.7.2

988 views
Skip to first unread message

Julian Reyes

unread,
Mar 2, 2013, 1:41:45 PM3/2/13
to gosu...@googlegroups.com
Hi!

Recently, I have installed Gosu over Eclipse 3.7.2  but after trying run a helloworld test with Eclipse and Gosu I've got a error:
Whats wrong? I've followed this for installing: https://groups.google.com/forum/?fromgroups=#!msg/gosu-lang/y6A-dUtiiUs/Vd6HkyLTKNMJ
should I install something more?
I have IntelliJ IDEA 12.0.1 installed as well, may Gosu be installed over this Intellij?

Many thanks!

Code:

class Greet {
    var name1: String
    construct(name2: String){
        name1=name2.capitalize()
    }
    function handShake(){
        print("Hello ${name1}")
    }
}
var g=new Greet("World!")
g.handShake()

********************

Errors:

gw.lang.parser.exceptions.ParseResultsException: Errors:

Syntax error. [line:1 col:16] in
line 1: uses java.util.*
line 2: class Greet {
Line Number: 1  Column: 16

Unexpected token: class [line:2 col:1] in
line 1: uses java.util.*
line 2: class Greet {
line 3:     var name1: String
Line Number: 2  Column: 1

Not a statement. [line:2 col:7] in
line 1: uses java.util.*
line 2: class Greet {
line 3:     var name1: String
Line Number: 2  Column: 7

Could not resolve symbol for : Greet [line:2 col:7] in
line 1: uses java.util.*
line 2: class Greet {
line 3:     var name1: String
Line Number: 2  Column: 7

Syntax error. [line:3 col:16] in
line 2: class Greet {
line 3:     var name1: String
line 4:     construct(name2: String){
Line Number: 3  Column: 16

Unexpected token: construct [line:4 col:5] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 5

Could not resolve symbol for : name2 [line:4 col:15] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 15

Expecting ')' to close parenthesized expression. [line:4 col:15] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 15

Unexpected token: '(' [line:4 col:14] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 14

Not a statement. [line:4 col:15] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 15

Could not resolve symbol for : name2 [line:4 col:15] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 15

Unexpected token: ':' [line:4 col:20] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 20

Unexpected token: String [line:4 col:22] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 22

Syntax error. [line:4 col:22] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 22

Unexpected token: ')' [line:4 col:28] in
line 3:     var name1: String
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
Line Number: 4  Column: 28

Could not resolve symbol for : name2 [line:5 col:15] in
line 4:     construct(name2: String){
line 5:         name1=name2.capitalize()
line 6:     }
 
Expected Type: String
Line Number: 5  Column: 15

"Greet" is not a valid type. [line:11 col:11] in
line 10: }
line 11: var g=new Greet("World!")
line 12: g.handShake()
Line Number: 11  Column: 11


    at gw.internal.gosu.parser.ParserBase.verifyParsedElement(ParserBase.java:250)
    at gw.internal.gosu.parser.GosuParser.parseProgram(GosuParser.java:624)
    at gw.internal.gosu.parser.GosuParser.parseProgram(GosuParser.java:533)
    at gw.lang.shell.Gosu.main(Gosu.java:100)

Luca Boasso

unread,
Mar 2, 2013, 1:51:16 PM3/2/13
to gosu...@googlegroups.com
Hi,

the Eclipse plug-in is not supported anymore.
Please follow the instructions below for the IntelliJ IDEA 11 Plugin
http://gosu-lang.org/intellij.html

Cheers,
Luca
> --
> You received this message because you are subscribed to the Google Groups
> "gosu-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gosu-lang+...@googlegroups.com.
> To post to this group, send email to gosu...@googlegroups.com.
> Visit this group at http://groups.google.com/group/gosu-lang?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Julian Reyes

unread,
Mar 2, 2013, 2:12:48 PM3/2/13
to gosu...@googlegroups.com
Hi,

Thanks Luke.

So, I can only use the plugin with Intellij IDEA 11, doesn't it work with 12.0.1?

regards,

J. Reyes.

Luca Boasso

unread,
Mar 2, 2013, 2:37:59 PM3/2/13
to gosu...@googlegroups.com
The current plugin works only with Intellij IDEA 11.
We are planning to release a new version that supports Intellij IDEA
12 and adds several features.

Stay tuned :)

Luca

Julian Reyes

unread,
Mar 6, 2013, 12:59:06 PM3/6/13
to gosu...@googlegroups.com
Hi !

I've installed gosu's plugin on Intellij IDEA 11.1.4 but I cannot create a new project. This is the error:

Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(45,65),absolute(37,57),button=1,modifiers=Button1,clickCount=1] on frame0
java.lang.NullPointerException
    at gw.plugin.ij.sdk.GosuSdkUtils.isApplicableJdk(GosuSdkUtils.java:214)
    at gw.plugin.ij.sdk.GosuSdkAdditionalData.getJavaSdk(GosuSdkAdditionalData.java:57)
    at gw.plugin.ij.sdk.GosuSdkConfigurable.reset(GosuSdkConfigurable.java:72)
    at com.intellij.openapi.projectRoots.ui.SdkEditor.reset(SdkEditor.java:239)
    at com.intellij.openapi.projectRoots.ui.SdkEditor.a(SdkEditor.java:108)
    at com.intellij.openapi.projectRoots.ui.SdkEditor.<init>(SdkEditor.java:91)
    at com.intellij.openapi.roots.ui.configuration.projectRoot.JdkConfigurable.createSdkEditor(JdkConfigurable.java:56)
    at com.intellij.openapi.roots.ui.configuration.projectRoot.JdkConfigurable.<init>(JdkConfigurable.java:50)
    at com.intellij.openapi.roots.ui.configuration.ProjectJdksConfigurable.reset(ProjectJdksConfigurable.java:102)
    at com.intellij.ide.util.projectWizard.ProjectJdkStep.<init>(ProjectJdkStep.java:52)
    at com.intellij.ide.util.projectWizard.ProjectWizardStepFactoryImpl$2.<init>(ProjectWizardStepFactoryImpl.java:104)
    at com.intellij.ide.util.projectWizard.ProjectWizardStepFactoryImpl.createProjectJdkStep(ProjectWizardStepFactoryImpl.java:104)
    at org.jetbrains.plugins.groovy.mvc.MvcModuleBuilder.createWizardSteps(MvcModuleBuilder.java:23)
    at com.intellij.ide.util.newProjectWizard.modes.CreateFromScratchMode.a(CreateFromScratchMode.java:68)
    at com.intellij.ide.util.newProjectWizard.modes.CreateFromScratchMode.createSteps(CreateFromScratchMode.java:59)
    at com.intellij.ide.util.newProjectWizard.modes.WizardMode.getSteps(WizardMode.java:51)
    at com.intellij.ide.util.newProjectWizard.AddModuleWizard.a(AddModuleWizard.java:104)
    at com.intellij.ide.util.newProjectWizard.AddModuleWizard.<init>(AddModuleWizard.java:69)
    at com.intellij.ide.impl.NewProjectUtil.createNewProject(NewProjectUtil.java:70)
    at com.intellij.ide.actions.NewProjectAction.actionPerformed(NewProjectAction.java:26)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:260)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:892)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:226)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:100)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:512)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
    at java.awt.Component.processMouseEvent(Component.java:6290)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6055)
    at java.awt.Container.processEvent(Container.java:2039)
    at java.awt.Component.dispatchEventImpl(Component.java:4653)
    at java.awt.Container.dispatchEventImpl(Container.java:2097)
    at java.awt.Component.dispatchEvent(Component.java:4481)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
    at java.awt.Container.dispatchEventImpl(Container.java:2083)
    at java.awt.Window.dispatchEventImpl(Window.java:2482)
    at java.awt.Component.dispatchEvent(Component.java:4481)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
    at java.awt.EventQueue.access$000(EventQueue.java:84)
    at java.awt.EventQueue$1.run(EventQueue.java:607)
    at java.awt.EventQueue$1.run(EventQueue.java:605)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
    at java.awt.EventQueue$2.run(EventQueue.java:621)
    at java.awt.EventQueue$2.run(EventQueue.java:619)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:699)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:534)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:420)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I cannot use the keyboard shortcut Ctrl-Alt-Shift-S to change the SDK...

Julian Reyes

unread,
Mar 6, 2013, 1:00:36 PM3/6/13
to gosu...@googlegroups.com

When the keyboard shortcut Ctrl-Alt-Shift-S is pressed:

Error during dispatching of java.awt.event.KeyEvent[KEY_PRESSED,keyCode=83,keyText=S,keyChar=Undefined keyChar,modifiers=Ctrl+Alt+Mayúsculas,extModifiers=Ctrl+Alt+Mayúsculas,keyLocation=KEY_LOCATION_STANDARD,rawCode=83,primaryLevelUnicode=115,scancode=31] on frame0
java.lang.NullPointerException
    at gw.plugin.ij.sdk.GosuSdkAdditionalData.getVersion(GosuSdkAdditionalData.java:87)
    at gw.plugin.ij.sdk.GosuSdkType.getVersionString(GosuSdkType.java:101)
    at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl.getVersionString(ProjectJdkImpl.java:100)
    at com.intellij.openapi.roots.ui.OrderEntryAppearanceServiceImpl.forJdk(OrderEntryAppearanceServiceImpl.java:130)
    at com.intellij.ide.util.projectWizard.ProjectJdkListRenderer.doCustomize(ProjectJdkListRenderer.java:37)
    at com.intellij.openapi.roots.ui.configuration.JdkComboBox$1.doCustomize(JdkComboBox.java:86)
    at com.intellij.ui.HtmlListCellRenderer.customize(HtmlListCellRenderer.java:54)
    at com.intellij.ide.ui.ListCellRendererWrapper.getListCellRendererComponent(ListCellRendererWrapper.java:63)
    at com.intellij.openapi.ui.ComboBoxWithWidePopup$AdjustingListCellRenderer.getListCellRendererComponent(ComboBoxWithWidePopup.java:120)
    at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1344)
    at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1294)
    at javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2611)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:147)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:194)
    at javax.swing.DefaultListSelectionModel.insertIndexInterval(DefaultListSelectionModel.java:615)
    at javax.swing.plaf.basic.BasicListUI$Handler.intervalAdded(BasicListUI.java:2569)
    at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
    at javax.swing.DefaultComboBoxModel.insertElementAt(DefaultComboBoxModel.java:133)
    at javax.swing.JComboBox.insertItemAt(JComboBox.java:711)
    at com.intellij.openapi.roots.ui.configuration.ProjectJdkConfigurable.createComponent(ProjectJdkConfigurable.java:84)
    at com.intellij.openapi.roots.ui.configuration.ProjectConfigurable.a(ProjectConfigurable.java:148)
    at com.intellij.openapi.roots.ui.configuration.ProjectConfigurable.<init>(ProjectConfigurable.java:98)
    at com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.e(ProjectStructureConfigurable.java:250)
    at com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.a(ProjectStructureConfigurable.java:212)
    at com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.createComponent(ProjectStructureConfigurable.java:177)
    at com.intellij.openapi.options.ex.SingleConfigurableEditor.createCenterPanel(SingleConfigurableEditor.java:225)
    at com.intellij.openapi.ui.DialogWrapper.init(DialogWrapper.java:1084)
    at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:62)
    at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:82)
    at com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:228)
    at com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:206)
    at com.intellij.ide.actions.ShowStructureSettingsAction.actionPerformed(ShowStructureSettingsAction.java:35)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:542)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:590)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:458)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:206)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)

    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:420)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Luca Boasso

unread,
Mar 6, 2013, 1:38:36 PM3/6/13
to gosu...@googlegroups.com
Have you followed all the steps in
http://gosu-lang.org/doc/wwhelp/wwhimpl/api.htm?&context=gosu&src=getting-started-gosu-opensource&topic=Getting_Started_With_IntelliJ_IDEA_Gosu_Plugin?

Have you checked previous post with similar symptoms?

Luca

Julian Reyes

unread,
Mar 6, 2013, 2:54:18 PM3/6/13
to gosu...@googlegroups.com
Yes, I have followed all the steps and I looked for any similar issue and I found out some but it has not been solved yet I guess.

I've just installed Intellij 11.1.3 and I have the same problem. What Java JDK should I use? I have installed Java 1.7 on my laptop

Alan Keefer

unread,
Mar 6, 2013, 3:00:49 PM3/6/13
to gosu...@googlegroups.com
Try using JDK6 instead; I believe there are some issues in the current plugin version when JDK7 is used as the basis for the SDK.

-Alan

Luke

unread,
Mar 6, 2013, 3:14:36 PM3/6/13
to gosu...@googlegroups.com
I was able to make it work with JDK7.
Have a look at this screenshots:
https://groups.google.com/d/msg/gosu-lang/8gjYHq93oQY/5-8xhtn1o3YJ

Do you have  similar settings for the SDKs?

Julian Reyes

unread,
Mar 6, 2013, 4:30:39 PM3/6/13
to gosu...@googlegroups.com
I was only trying to install the Gosu plugin and then when I try to press Ctrl-Alt-Shift-S in order to create a new file test using Gosu the error is showed, so I cannot access to the Project Structure...

Julian Reyes

unread,
Mar 6, 2013, 5:10:35 PM3/6/13
to gosu...@googlegroups.com

Hi!

The problem has been solved. I don't know if the problem was the JDK version, but I've installed the JDK 1.6 and after two or three attemps I could run my first Hello World using Gosu!

Regards and thanks a millions!


Michael Wright

unread,
Mar 6, 2013, 5:36:38 PM3/6/13
to gosu...@googlegroups.com
I've found that installing the gosu plugin in an intellij that has no previous java projects doesn't work.   To recover from this I've had to disable the plugin, create a dummy java project and during a wizard step "create the sdk" (using either jdk6 or 7).  Then I re-enable (or re-install if that doesn't work) the gosu plug-in and restart intellij.  At that point I can create a working gosu project.  
--
Regards,
Mike

Carlos Quintanilla

unread,
Mar 8, 2013, 4:43:20 AM3/8/13
to gosu...@googlegroups.com
That's right Michael,

I was able to reproduce the error on a fresh installation of IntellijIDEA 11.0.4. After you install it, by default there won't be any java SDK created. You have to create one (JDK 6 or 7) before following the GOSU plugin installation steps. 

I believe this is just a matter of updating the documentation to reflect that prerequisite (at least 1 JDK should be setup before installing the plugin), otherwise you get the infamous:

"Error during dispatching of java.awt.event.KeyEvent[KEY_PRESSED,keyCode=83,keyText=S,keyChar=Undefined keyChar,modifiers=Ctrl+Alt+Mayúsculas,extModifiers=Ctrl+Alt+Mayúsculas,keyLocation=KEY_LOCATION_STANDARD,rawCode=83,primaryLevelUnicode=115,scancode=31] on frame0 java.lang.NullPointerException"


Or, another possibility is to add a "If you see this error, you may need to create a SDK for JDK 6 or 7 before"


Carlos




2013/3/6 Michael Wright <wrigh...@gmail.com>

Lukasz Czekaj

unread,
Jun 14, 2013, 11:35:08 AM6/14/13
to gosu...@googlegroups.com
If you're still getting the error:
- uninstall Gosu plugin
- remove all JDKs from Project Structure window
- create a new Java project and add SDK based on Java 6
- install Gosu plugin

Regards,
Lucas.
Reply all
Reply to author
Forward
0 new messages