Giter Site home page Giter Site logo

goclipse / goclipse Goto Github PK

View Code? Open in Web Editor NEW
840.0 840.0 289.0 145.58 MB

Eclipse IDE for the Go programming language:

Home Page: http://goclipse.github.io/

License: Eclipse Public License 1.0

Java 99.20% Go 0.72% CSS 0.02% HTML 0.06%
eclipse golang ide

goclipse's Introduction

Project website: http://goclipse.github.io/

As of 2017, Goclipse is no longer actively maintained, see this blog post for more information. If you are interested in contributing, you can for now fork the project - and there should be enough information here detailing how to build, test, release, etc.

--

Build Status Gitter

Developers Guide

Building the IDE:

You will need Maven for building Goclipse.

  • To build, run mvn clean verify at the root of the repository. This will run the test suite, and afterwards produce a p2 repository (an Eclipse Software Site) at bin-maven/features.repository/repository.
  • To just build without running tests, invoke mvn clean package.

Setting up a development environment:

  • You need Eclipse PDE to develop Eclipse plugins. Download and start it.
  • Clone the Git repository.
  • In Eclipse, click "File / Import... ", and then "General / Existing projects into workspace". Select the Git repository folder as the "root directory", enable "Search for nested projects", and select all the Eclipse projects that show up. Click finish to import those projects.

* Note: The actual project names will be different from those in the screenshot above. * Note: Java compiler settings will be automatically configured, since Eclipse compiler settings are stored in source version control. * Setup the target platform. Unfortunately due to limitations in Tycho/PDE tooling ([more info](https://github.com/tesla/m2eclipse-tycho/issues/29)) some manual steps are required: 1. Open a shell on `target-platform/` and run `mvn package`. This should create a `deps-repository/repository` directory. 1. Copy the target platform file: `target-platform/IDE-base.target` to `target-platform/IDE-gen.target`. (this last filename is already git-ignored). 1. Open `target-platform/IDE-gen.target` in Eclipse, so that it opens under the PDE editor. 1. Click "Add", then select "Software Site". 1. On the "Add Software Site" dialog, click "Add...", then "Local...", navigate to Git repo directory, then choose the `target-platform/deps-repository/repository` directory. 1. On the "Add Software Site" dialog, the new repository should be selected. Click "Select All" to select all deps, then click "Finish". It should look more or less like this:
1. Then finally click "Set as Target Platform". * Build the workspace ( "Project / Build All"). Everything should build fine now, there should be no errors. * To start the IDE from your workspace: Open "Run / Run Configurations ...". Click on "Eclipse Application" to create a new launch for the plugins in your workspace. The default new configuration that is created should already be ready to be launched. * **Additional tip:** Locate the `bin-maven` folder in the top-level project, open its Properties from the Project Explorer context menu, and mark that directory as "Derived" in the "Resources" property page. This will prevent those folder resources to appear in UI operations such as "Open Resource" for example.

Running the tests in Eclipse:

  • In releng/launches there is one or several Eclipse launch files for running the tests, so if this project is added to your Eclipse workspace, the launches will show up automatically in Run Configurations..., as "JUnit Plug-in Tests".

Creating and deploying a new release:

A release is a web site with an Eclipse p2 update site. The website may contain no web pages at all, rather it can be just the p2 site. To create and deploy a new release:

  1. Ensure the version numbers of all plugins/features/etc. are properly updated, if they haven't been already.
  2. Run mvn clean verify to perform the Tycho build (see section above). Ensure all tests pass.
  • To create a signed release the sign-build Maven profile must be activated, and the required properties set.
  1. Create and push a new release tag for the current release commit.
  2. Go to the Github releases page and edit the newly present release. Add the corresponding (ChangeLog.md) entries to the release notes.
  3. Locally, run ant -f releng/ CreateProjectSite. This last step will prepare the project web site under bin-maven/ProjectSite.
  4. To actually publish the project site, run ant -f releng/ PublishProjectSite -DreleaseTag=<tagName>. What happens here is that the whole project site will be pushed into a Git repository, to then be served in some way (for example Github Pages). If projectSiteGitURL is not specified, the default value in releng-build.properties will be used.
  • For more info on the Release Engineering script, run ant -f releng/, this will print the help.
  1. A branch or tag named latest should also be created in Github, pointing to the latest release commit. The previous latest tag can be deleted/overwritten. The documentation pages use this tag/branch in their links.

Project design info and notes

LangEclipseIDE

This project uses the LangEclipseIDE framework, which is designed to have its source embedded in the host IDE. See this section for more info on how this should be managed.

Extensive Compile-Time type and contract checking

See https://github.com/bruno-medeiros/MelnormeEclipse/wiki/Extensive-Compile-Time-Checking for more info on this principle.

Code style:

  • Indent with tabs (tab size is 4 spaces)
  • Max line width: 120
  • Block style:
    if(foo.blah()) {
        doThis();
    }
  • Indentation for function arguments: 1 indent unit (= 1 tab):
    foo(one, two, three,
        four, five, six);

There is also an Eclipse formatter profile settings file you can use, although you are not obliged to format with all rules of that formatter settings. If you make a minor source change, don't format the whole file, but only around the changes you are contributing.

Unit tests double-method wrapper:

This code idiom is often used in this project's JUnit tests:

@Test
public void testXXX() throws Exception { testXXX$(); }
public void testXXX$() throws Exception {

This is donely solely as an aid when debugging code, so that the "Drop to frame" functionality can be used on the unit-test method. It seems the Eclipse debugger (or the JVM) cannot drop-to-frame to a method that is invoked dynamically (such as the unit-test method). So we wrap the unit-test method on another one. So while we now cannot drop-to-frame in testXXX, we can do it in testXXX$, which basically allows us to restart the unit-test.

TODO: investigate if there is an alternate way to achieve the same. I haven't actually checked that.

goclipse's People

Contributors

acleone avatar bitdeli-chef avatar bruno-medeiros avatar fakeb0b0b0b avatar mlocati avatar mykelalvis avatar osechet avatar pieterpenninckx avatar sesteel avatar yongseoklee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goclipse's Issues

Gocode Content Assist fails in source that imports certain packages ('io/ioutil', etc)

Reported by lionghostshop, Oct 9, 2013
What steps will reproduce the problem?

  1. I create a project with around 1,000 SLOCs with multiple files.
  2. Try to use content assist like using hot key or this.

What is the expected output? What do you see instead?
The content assist works.
Instead, content assist works in some files but not all .go files.

What version of the product are you using? On what operating system?
0.7.6.v450

Please provide any additional information below.
Since it's a private project, I can't provide source code. Any way to dump some log file for you to debug?


Oct 17, 2013 comment lionghostshop
I find a test case.
package main

import (
"os"
"fmt"
"io/ioutil"
)

func main() {
if len(os.Args) < 2 {
fmt.Println("Please specify input file")
return
}
byteBuf,err:=ioutil.ReadFile(os.Args[1])
if err!=nil{
fmt.Println(err)
return
}
str:=string(byteBuf)
fmt.Println(str)
}

Gocode Plugin failed to kill gocode process on Windows XP home Edition

What steps will reproduce the problem?

  1. Startup goeclipse with gocode enabled
  2. In the error log, it will show "Cannot run program "TASKKILL": Create Process erro=2, ϵͳÕҲ»µ½ָ¶

What is the expected output? What do you see instead?
Cannot run program "TASKKILL": Create Process erro=2, ϵͳÕҲ»µ½ָ¶

What version of the product are you using? On what operating system?
Windows XP home edition service pack 3.
GoClipse 0.7.6.v439 with Juno Service Release 2

Please provide any additional information below.
This problem is due to the fact that Windows XP home edition does not come with Taskkill.exe on default (though the professional edition has it). But it does have an alternative: tskill.exe.

I am thinking of modifying
package com.googlecode.goclipse.gocode
GocodePlugin.winGocodeKill() method, if attempt to use taskkill.exe failed, try to use tskill.exe gocode before throwing the error status.

Conform to naming standards

Currently the primary plugin is called goclipse. To conform to eclipse community naming standards, it should be something like com.googlecode.goclipse

Additionally, the feature currently displays "goclipse_feature" as its name during installation. It should probably display something more human-friendly like "Goclipse Feature"
#1 devoncarew

"I changed the feature label to "GoClipse" (from "goclipse_feature"). I also added a category for the update site so that the feature wouldn't appear in the uncategorized group.

I agree re: renaming the plugin id. Maybe something like org.goclipse.ui or org.goclipse.ide? Anyway, something a bit longer then just goclipse. Renaming a plugin in Eclipse is problematic however. I suspect users will have to uninstall the old version of the feature before they install the new one. Not something that we should do without general agreement and some planning around the timing of it."

Unchecking "Start Gocode server automatically" has no effect

Reported by james.pirruccello, May 2, 2013
What steps will reproduce the problem?

  1. Open Eclipse > Preferences > Go > Gocode
  2. Uncheck "Start Gocode server automatically", apply and hit "OK".
  3. Exit Eclipse
  4. Kill gocode instances. In Terminal, try "ps aux | grep gocode" and kill any gocode instances.
  5. Start Eclipse
  6. Start typing in text that would get auto-completed.

What is the expected output? What do you see instead?
The expectation is that no autocompletion happens.

What happens is that autocompletion occurs. "ps aux | grep gocode" shows that gocode was started with GoClipse's settings. This is supported by the fact that any changes that you might have made to "~/.config/gocode/config.json" gets overwritten with the GoClipse settings. (The latter part is a different bug related to Issue 52.)

What version of the product are you using? On what operating system?
On OS X Eclipse Juno SR2 with GoClipse v0.7.6

Please provide any additional information below.

Linked folders cause project name to be prepended to file paths, causing Resource Not Found stack traces.

Reported by ttomsu, Aug 30, 2013
What steps will reproduce the problem?

  1. Create an empty Go Project. Name it "abc"
  2. Create a directory, "def" outside of the project directory (your home directory is fine)
  3. Add "def" as a linked folder to the project. (Right click project name --> New --> Folder --> Advanced --> Link to Alternative Location (linked folder) --> /path/to/def)
  4. Add "def" as a src folder and remove auto-created "src" (Right click project name --> Properties --> Go Project Configuration --> click "src" --> Remove Folder --> Add Folder --> select "def")
  5. Create "itworks.go" file within "def" linked folder. (Right click "def" --> New --> Go File --> Command Source File --> Empty Main function --> Finish)
  6. In source file: import "fmt", and in main() function, type "fmt.Println(it works)". The syntax error is intentional. Save.
  7. Change package name from main to "def". Save.
  8. Notice the workspace-name/.metadata/.log file now contains a stack trace:

!ENTRY goclipse 4 0 2013-08-30 13:28:56.003
!MESSAGE Resource '/abc/path/to/def' does not exist.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource '/abc/path/to/def' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
at org.eclipse.core.internal.resources.Container.members(Container.java:266)
at org.eclipse.core.internal.resources.Container.members(Container.java:249)
at com.googlecode.goclipse.builder.GoCompiler.clearPackageErrorMessages(GoCompiler.java:483)
at com.googlecode.goclipse.builder.GoCompiler.compilePkg(GoCompiler.java:397)
at com.googlecode.goclipse.builder.GoBuilder.incrementalBuild(GoBuilder.java:286)
at com.googlecode.goclipse.builder.GoBuilder.build(GoBuilder.java:81)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SUBENTRY 1 org.eclipse.core.resources 4 368 2013-08-30 13:28:56.003
!MESSAGE Resource '/abc/path/to/def' does not exist.

What is the expected output? What do you see instead?
The file should contain the red Xs indicating a syntax error in the file. No errors are found, no pop up indicating an error happens.
Instead, this stack trace shows the project name be prepended to the absolute path of the linked directory.

What version of the product are you using? On what operating system?
0.7.6v450 using Eclipse 3.8.0 on Ubuntu Precise (64bit)

Please provide any additional information below.

gocode doesn't get killed after Eclipse shutdown

I realized gocode didn't get killed after Eclipse shutdown with Goclipse 0.8.0, it might be due to my environment or OS user permission issue. But before confirming the problem, I will create this issue here, please make a comment if you have the same problem.

Environment
Ubuntu 14.04
Eclipse Standard 4.3.2 (Kepler)
Goclipse 0.8.0
Go 1.2.2
gocode (commit: https://github.com/nsf/gocode/tree/9b760fdb16f18eafbe0cd274527efd2bd89dfa78)

Installation
I installed Goclipse 0.8.0 yesterday based on suggestions from the following thread:
https://groups.google.com/forum/#!topic/goclipse/_kKFyQ2OVcg

gocode processes
henry 14978 0.0 0.0 108728 6148 ? Sl 11:31 0:00 /home/henry/project.go/bin/gocode -s -sock unix -addr localhost:37373
henry 15012 0.0 0.0 112040 6004 ? Sl 11:32 0:00 /home/henry/project.go/bin/gocode -s -sock tcp -addr localhost:37373

Eclipse configuration screenshots
goclipse config env

goclipse config gocode

Debugger Should not Stop in Runtime Files by Default

Platform: Linux (Ubuntu 13.10)
Arch: amd64
Go: go version devel +e5646e0df5a5 Thu Feb 13 19:59:09 2014 -0500 linux/amd64

By default, the CDT debugger used by GoClipse will pause in runtime files compiled into the application. For example, before hitting main on an application it will stop in rt0_linux_amd64.s.

It would be desirable for this to be optional and configurable.

Error with documentation popup

Reported by neclepsio, Jun 13, 2013
I'm not sure this is a goclipse or gocode bug.

I wrote a simple package:

// Package vec3 defines the type Vector3, representing a 3-dimensional vector.
package vec3

type Vector3 struct {
X, Y, Z float64
}

// Sum takes two vectors and returns the sum
func Sum (a, b Vector3) Vector3 {
return Vector3{
a.X + b.X,
a.Y + b.Y,
a.Z + b.Z}
}

// Sum sums the argument to the receiver in place.
func (v *Vector3) Sum (b Vector3) {
v.X += b.X
v.Y += b.Y
v.Z += b.Z
}

Now, when I use it, no matter if I write a.Sum(b) or vec3.Sum(a, b): the documentation shown in the tooltip is always: "Sum sums the argument to the receiver in place."

Improve Tokenizer (Ragel?)

What steps will reproduce the problem?

Have import parser parse a source file containing lines like:

fmt.Printf(" <import path=")
fmt.Printf(" ")

What is the expected output? What do you see instead?

Should not create an import entry, but does:

)fmt.Printf(

Curly braces in strings break parsing

A { or } character in a string literal, character literal, or raw string literal breaks parsing, at least for outlines. Putting the following function definition in source will suppress outline output for any definitions below:

func nop() {
    '{'
}

Build hangs when go reports 'too many errors

I am new to Go and I am porting some java code to Go.
My Go code has a ton of errors in it :-).
Most often Goclipse will hang when I do Project/Build - the build simply runs forever - I have to kill the go.exe process to make the build terminate - and I never get any results.

My builds work successfully when I use the go command from the command line.
I have found that goclipse hangs up when the go command reports 'too many errors'. Once I have reduced the number of errors to the point where the go command no longer reports 'too many errors' then the Goclipse builds will work.

UTF-8 chinese character GoCode

What steps will reproduce the problem?

  1. see this discussion : nsf/gocode#159 (comment)
  2. the code:
    package main

import (
"fmt"
)

func main() {
fmt.Printf("") // work
//世界
fmt.Printf("") // work
//體
fmt. // need one more english character to trigger the right list
//體體體體
fmt. // broken, if the chinese character above display more than one time
}

What is the expected output? What do you see instead?
Expected: the member function
Instead: all the problem situation is above.

What version of the product are you using? On what operating system?
Eclipse: Build id: 20130225-0426 (Juno)
Golipse: 0.7.6v439
Gocode: Newest Version ( Today )
Go: go1.1

Please provide any additional information below.
As the discussion in GoCode's GitHub issue,
some chinese character is decoded in wrong way.
Can it be fixed ?

Error with documentation popup

Reported by neclepsio, Jun 13, 2013
I'm not sure this is a goclipse or gocode bug.

I wrote a simple package:

// Package vec3 defines the type Vector3, representing a 3-dimensional vector.
package vec3

type Vector3 struct {
X, Y, Z float64
}

// Sum takes two vectors and returns the sum
func Sum (a, b Vector3) Vector3 {
return Vector3{
a.X + b.X,
a.Y + b.Y,
a.Z + b.Z}
}

// Sum sums the argument to the receiver in place.
func (v *Vector3) Sum (b Vector3) {
v.X += b.X
v.Y += b.Y
v.Z += b.Z
}

Now, when I use it, no matter if I write a.Sum(b) or vec3.Sum(a, b): the documentation shown in the tooltip is always: "Sum sums the argument to the receiver in place."

Using type-specific code-completion autocompletes improperly

What steps will reproduce the problem?

  1. start with eg:
    package main
    import "os"
  2. add: var foo = os.const<alt+space> and select O_APPEND:

What is the expected output? What do you see instead?

expected output: var foo = os.O_APPEND
actual output: var foo = os.constEND

What version of the product are you using? On what operating system?
goclipse 0.0.18
Autocomplete with gocode 0.0.17
Windows XP X64

Please provide any additional information below.

may be a gocode issue? nsf said something about csv output not having the same information as other output types..

Apr 7, 2012 no.smile.face
Oh, hai, I'm the gocode author and just was looking though this bug tracker. Will just leave a note regarding this one:

The problem here is that you can make two kinds of assumptions about autocompleter:

  1. It cannot change everything before the cursor.
  2. It can.

Gocode can do that. If you take a look at gocode's code (formatters.go), the main method of the interface has this "num" thing. It's the number of characters to replace before the cursor. Frankly, it's used in vim and isn't used anywhere else.

Gocode has a special way to propose things of certain classes (const, var, func, type). So.. when you type x.const<|> it will propose all consts, but you have to remove the "const" word.

So.. it's an integration bug, maybe I should add a config option to disable this special autocompletion proposals.

ctrl-clic can show to wrong function

If 2 functions share the same signature, but on different objects/packages, ctrl-clic can get the wrong function :

import (
"time"
)

func main() {
time.After
}

Signature of time.After :
func After(d Duration) <-chan Time

If I ctrl-clic, the function shown is (comparison of 2 Time) :
func (t Time) After(u Time) bool

With time.After, we should get the function in the package, not the one associated to the object time.Time.

Question: Cooperate with Nodeclipse?

Hello Stanley

Could you think about good reason to co-operate with other projects like @Nodeclipse?

I myself wonder what could be benefits.

This is not about co-work or not, but first about why, what possibly could be good about it.
I already not by #43 that you don't like any association, but I'd like to ask question and hear answer from other person having similar project.

Not compiling on save

What steps will reproduce the problem?
1.Make changes to source files
2.Save project
3.Run executable in 'bin' directory.

What is the expected output? What do you see instead?
Compiled executables to should reflect changes made to code base. This is not happening. I have to 'clean' the project until I see my changes.

What version of the product are you using? On what operating system?
GoClipse 0.7.6.v450 goclipse_feature.feature.group The GoClipse Development Team

Please provide any additional information below.

CDT Based Debugger Produces GDB Errors During Debugging Sessions

Platform: Linux (Ubuntu 13.10)
Arch: amd64
Go: go version devel +e5646e0df5a5 Thu Feb 13 19:59:09 2014 -0500 linux/amd64

When debugging, the CDT/GDB based debugger sometimes fails to perform certain commands. For example, the following code:

    // NewRGBA returns a new RGBA with the given bounds.
    func NewRGBA(r Rectangle) *RGBA {
        w, h := r.Dx(), r.Dy()
        buf := make([]uint8, 4*w*h)
        return &RGBA{buf, 4 * w, r}
    }

creates this debugger error:

~anon1  Error: Multiple errors reported.\ Failed to execute MI command: -var-create - * ~anon1 Error message from debugger back end: -var-create: unable to create variable object\ Failed to execute MI command: -var-create - * ~anon1 Error message from debugger back end: -var-create: unable to create variable object\ Failed to execute MI command: -data-evaluate-expression ~anon1 Error message from debugger back end: A syntax error in expression, near `~anon1'.\ Failed to execute MI command: -var-create - * ~anon1 Error message from debugger back end: -var-create: unable to create variable object\ Unable to create variable object 

Handle Go line directives correctly

Reported by [email protected], May 12, 2013
The Go compiler understands line directives (aka line comments), like "//line path/file.y:123", and prints both source locations when reporting errors:

e.g.:
path/file.y:123[/path/to/actual/file.go:321]: here comes the error message.

See https://code.google.com/p/go/source/browse/src/pkg/go/scanner/scanner.go?r=30444b809a9e15ff76ca49afe155fac2b0e5e979#146

Please make GoClipse support these error messages. It currently lists all errors in /path/to/actual/file.go, but does not know how to set the correct line number.

GoCode Lib Path

What steps will reproduce the problem?
1.Editing any go source file with gocode daemon running.

I use gocode autocompletion for both the standard go libraries and the appengine's go libraries with the aid of the lib-path option of gocode.

But I noticed goclipse sets it to the project directory. This works well for standard go libraries, but it prevents autocompletion of appengine's libraries.

I will suggest if goclipse can append the project directory to gocode's lib-path instead of replacing it.

What version of the product are you using? On what operating system?
Ubuntu 11.04 32 bit goclipse 0.0.26
Jun 30, 2011 Delete comment #1 emerson.steel
The problem is known. That solution won't work for multiple projects. The correct solution is to add the ability to add external libraries/projects to the project properties. This is larger, however, because it affects the build system as well.

The work around I used is copying the appengine package into my Go/pkg directory. This is not ideal, but gets past the problem until a proper solution is worked.
Status: Accepted

Jun 30, 2011 comment abiola89
I tried that already by putting a symlink of appengine package in $GOROOT/pkg/$GOOS_GOARCH but i forgot the appengine package itself is not in the folder which is why I created this issue in the first place. But now I've copied it too and it works for the main time.

Thanks.
Jul 2, 2011 comment emerson.steel
Also remember that App Engine comes with the proper Go environment prebuilt for your platform. So, the compiler is the same as the version used when you upload to the cloud. You can point goclipse at the appengine go root directory and you'll avoid library mismatches.

Sep 23, 2011 comment Marek.Zawirski
This is also an issue for projects using custom build system. In my setup both sources and output files are out of Eclipse project directory, so I cannot configure auto-completion accordingly other than by using symlink hack. External library support would probably solve the problem.
Other than that, how about binary setting "Append project's directory to gocode lib-path" vs "Overwrite gocode lib-path with project's directory" ?

May 2, 2013 comment james.pirruccello
On OS X Eclipse Juno SR2 with GoClypse v0.7.6, this continues to be a problem. I think commenter #4, Marek, has a good summary. GoClypse rewrites ~/.config/gocode/config.json's lib-path rather than appending, and it does not permit the specification by the user of out-of-project paths to use as the lib-path.

Let Go projects be created in arbitrary directories

Reported by kyrieuon, May 11, 2013
Currently one can create a new Go project only in the current workspace, or from an already existing project.

As a workaround one has to create a new project in the current workspace, delete it, move the created directory structure to the desired location, and re-create the project from the moved directory.

See the "New Java Project" dialog as an example of a more functional project creation dialog.

Can't use imported packages

Reported by milak.mlk, Apr 16, 2013
What steps will reproduce the problem?

  1. type go get (here github.com/robertkrimen/otto)
  2. create a project which imports this newly imported package
  3. can't compile in eclipse : 'import "github.com/robertkrimen/otto": cannot find package'
  4. compile in command line 'go build <myprog.go>' : success...

What is the expected output? What do you see instead?
My program should compile

What version of the product are you using? On what operating system?

  • Having latest goclipse release
  • Eclipse-juno
  • Running on windows 7 with go 1.0.3

Please provide any additional information below.

  • maybe i missed something but i tried to restart many times, change gopath, etc.
  • i can see my newly imported package in my project gopath link (you know the link in the project)

Thanks

Project Properties -> Go Build Path : No Options Working

Reported by davidpfarrell, Oct 24, 2011
What steps will reproduce the problem?

  1. Right Click on a GoClipse project
  2. Select "Properties"
  3. Select "Go Build Path"

What is the expected output? What do you see instead?

None of the "add" options are working in any of the Source, Projects, or Libraries tabs.

Clicking "Add Folder" in source tab brings up an empty window saying "No entries available"

Clicking "Add" in Projects or Libraries tab does nothing.

What version of the product are you using? On what operating system?

Using GoClipse 0.2.1 on Helios Service Release 2 on Mac OSX Lion.

memory consumption in debug maybe variable view screen

Reported by notzippy, Aug 6, 2012
What steps will reproduce the problem?

  1. Place breakpoint in application
  2. Run app in debug mode
  3. When eclipse switches to debug perspective GDB consumes all available memory

What is the expected output? What do you see instead?
To be able to debug

What version of the product are you using? On what operating system?
0.7.2.v418, linux

Please provide any additional information below.
This was working the prior release, the application runs fine if I do not switch to debug perspective so I suspect it has to do with the "variable view" screen.

Installing in Eclipse fails with 403 Forbidden

In Eclipse 4.3, when adding URL http://releases.goclipse.googlecode.com/git/ the installation starts, it pulls down the needed dependencies but then fails with error:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.standard, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: https://releases.goclipse.googlecode.com/git/plugins/com.googlecode.goclipse.gocode_0.8.0.v201406031731.jar.
https://releases.goclipse.googlecode.com/git/plugins/com.googlecode.goclipse.gocode_0.8.0.v201406031731.jar

Additionally, there seems to be an SSL certificate issue in addition the jar file is returning 403?

wget https://releases.goclipse.googlecode.com/git/plugins/com.googlecode.goclipse.gocode_0.8.0.v201406031731.jar --no-check-certificate

Should attempt to terminate currently running program before running program again?

Reported by kardianos, Aug 7, 2011
What steps will reproduce the problem?

  1. main() { http.ListenAndServe(...) }
  2. Start Program
  3. Make changes
  4. Forget to hit the stop button
    4 Start Program

What is the expected output? What do you see instead?
I would like either the run to be disabled or for the program to terminate the existing program. Rather the first program is forgotten and can no longer be controlled in eclipse (sh# killall main)

What version of the product are you using? On what operating system?

Please provide any additional information below.

Aug 9, 2011 comment emerson.steel
This should be an option in the run configuration.

Aug 13, 2011 comment emerson.steel
This should also happen on Windows before a build because it locks the file and causes the build to fail.

IF ON WINDOWS AND BUILDING
DISPLAY USER WARNING "Building requires the currently running process to shutdown. Are you sure you want to do this?" [YES|NO]

Debugger showing strange values/errors

Hey everyone!

I somehow can not get the debugger to work with go 1.3. For example I get the following errors for some variables

019,121 115^error,msg="-var-create: unable to create variable object"

And others are just plain wrong, for example a int that's just been initialized to 0 has the value

p cleanCount 
$1 = 4630277

in gdb. I did set the go environment settings according to my installation (in /opt/go) and added a run configuration in 'DEBUG' mode for debugging. Do I need to take any additional steps to make it work?

thanks in advance!

unexpected char: }

Reported by skurtsev, Dec 28, 2013
Tried to debug the app but breakpoints in the source don't work. IDE does not stop at any of them at all. Besides there are tens of error messages reported by IDE. Error reports are all the same - example of error report is added below in the end of the issue.

What steps will reproduce the problem?
Don't know exactly.
I've looked throughout the GdbProperties source and it seems like it fails while parsing list of objects and unexpectedly bumping into the structure instead of an object or a value.

What version of the product are you using? On what operating system?
GNU gdb (GDB) Fedora 7.6.50.20130731-16.fc20
Eclipse - Version: 4.3.1 Build id: 11fc20

Please provide any additional information below.

Eclipse error list has a bunch of errors similar to:

java.io.IOException: unexpected char: }
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseArrayValue(GdbProperties.java:171)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseValue(GdbProperties.java:111)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseKeyValue(GdbProperties.java:73)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseKeyValues(GdbProperties.java:50)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parsePropertiesValue(GdbProperties.java:135)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseValue(GdbProperties.java:109)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseKeyValue(GdbProperties.java:73)
at com.googlecode.goclipse.debug.gdb.GdbProperties.parseKeyValues(GdbProperties.java:50)
at com.googlecode.goclipse.debug.gdb.GdbEvent.parse(GdbEvent.java:88)
at com.googlecode.goclipse.debug.gdb.GdbConnection.handleAsyncResult(GdbConnection.java:196)
at com.googlecode.goclipse.debug.gdb.GdbConnection.handleGdbInput(GdbConnection.java:166)
at com.googlecode.goclipse.debug.gdb.GdbConnection.processBuffer(GdbConnection.java:116)
at com.googlecode.goclipse.debug.gdb.GdbConnection.streamAppended(GdbConnection.java:104)
at org.eclipse.debug.internal.core.OutputStreamMonitor$ContentNotifier.run(OutputStreamMonitor.java:258)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.debug.internal.core.OutputStreamMonitor$ContentNotifier.notifyAppend(OutputStreamMonitor.java:268)
at org.eclipse.debug.internal.core.OutputStreamMonitor.fireStreamAppended(OutputStreamMonitor.java:117)
at org.eclipse.debug.internal.core.OutputStreamMonitor.read(OutputStreamMonitor.java:157)
at org.eclipse.debug.internal.core.OutputStreamMonitor.access$1(OutputStreamMonitor.java:135)
at org.eclipse.debug.internal.core.OutputStreamMonitor$1.run(OutputStreamMonitor.java:208)
at java.lang.Thread.run(Thread.java:744)

Debugger Support

Reported by [email protected], Aug 22, 2011
I've been using goclipse for a few months now and I think it's a great tool, but there is still a big missing functionality which is the possibility to set breakpoints.

Is this something that is planned?

Thanks


Aug 22, 2011 comment emerson.steel
Well, yes. That is what Devon is working on right now. If you download the source you can test it out. He isn't showing the all the variable contents graphically as of yet and it is in a pretty rough state, but you can discern a lot from console output. Also, it isn't accepting command line args in debug mode right now.


Aug 22, 2011 comment Project Member devoncarew
I've been sidetracked for the last few weeks! It's not far away from being reasonably useful (early alpha), I just have to find the time to work on it.
Summary: Debugger support
Owner: devoncarew
Labels: -Priority-Low Priority-Medium


Aug 23, 2011 comment draltan.marin
That's very good news! Thank you


Aug 31, 2012 comment ForMisc
thank you! Cant wait to see it!!!


Sep 25, 2012 comment cperrin88
Any news on this topic?


Feb 28, 2013 comment davyzhang
I wish the debugger is also usable in go test , that will be great


Jan 6, 2014 comment [email protected]
There's an issue in the debugger where the following code will only show def in the local frame, and ignore abc.

func main() {
abc := "Hello"
def := "World"
fmt.Printf("Hello World! %s %s", abc, def)
}

Looking at the gdb output, abc is not showing up in the local frame so this could be a gdb issue, or it could be a result of not compiling the binary with the correct flags, and abc is being compiled away. Has anyone seen this/know how to fix it?


Jan 17 comment bruno.do.medeiros
That last issue (abd/def) is related to this:

"The code generated by the gc compiler includes inlining of function invocations and registerization of variables. These optimizations can sometimes make debugging with gdb harder. To disable them when debugging, pass the flags -gcflags "-N -l" to the go command used to build the code being debugged. "

I don't know if Goclipse is meant to add those flags to the debug build. If it's not doing it, perhaps it should then.

CDT debugger: detailed value not shown in Variables view, for certain types

For variables of certain type (for example strings), the value of the variable in the "Value" column in the Variables view will display {...} even though there is a more meaningful display value available. Opening the details pane for such a variable displays:

Name : aString
    Details:0x4bc900 "Blah"
    Default:{...}
    Decimal:{...}

The value in Details is what should be displayed instead, as this is more meaningful, and also it's what GDB display in the command line.

Cross-Compile GOOS/GOARCH ignored

Reported by dustyisawilson, Apr 26, 2012
GOOS and GOARCH preferences are ignored.

In the Eclipse Go preferences section, the GOOS and GOARCH boxes are set for Windows/386 but the resulting binary is Linux/amd64 (which is the host). At some point before the big switch in GoClipse to go1 this worked. But now it just seems that the wiring from the preferences is disconnected from the actual compilation stage.

"GOOS=windows GOARCH=386 go build" works fine, so it's not a lack of necessary stuff within Go itself.

I followed these instructions to prepare for cross-compiling: http://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling

As an aside (which should probably be an enhancement report), it would be neat if there would be a way to do cross-compiling by clicking a certain button, choosing a setting via a dropdown, or by compiling for all chosen OS/ARCH combos every time.

Locals missing while debugging

Reported by bjsenya, Mar 18, 2013
What steps will reproduce the problem?

  1. Create new Go project
  2. Make breakpoint inside some function
  3. Start debugging

What is the expected output? What do you see instead?
No locals are visible at the variables panel.

What version of the product are you using? On what operating system?
Linux, 0.7.6v439

Please provide any additional information below.
This happens because of optimizations made by compiler. If I compile same project with -N -l flags passed to gc, I get variables available back again.

Interface View

Provide a view that give the user an indication of what interfaces are matching to the types defined within the current display context.

For example, when I open a file that has a type that matches three interfaces:

  • type x
    interface a
    interface b
    interface c
  • type y
    interface a

Debugging: adding a breakpoint results in -break-insert error messages from gdb into the console

Reported by matthew.mcneely, Sep 6, 2013
What steps will reproduce the problem?

  1. Add a Breakpoint to a project
  2. Start debugging

What is the expected output? What do you see instead?
Expecting the debugger to stop on the output. Instead, seeing the following error in the console:

(gdb)
0^error,msg="-break-insert: Garbage following "

What version of the product are you using? On what operating system?
Eclipse Java EE IDE for Web Developers., Version: Helios Service Release 2 Build id: 20110301-1815
Mac OSX 10.8.4
Goclipse v0.7.6
gdb v7.6 (Gnu)

Please provide any additional information below.


Sep 10, 2013 comment matthew.mcneely
I believe this has to do with the target image residing in a project directory with a name containing spaces. I am able to debug images in project directories not containing spaces.

Internationalize Goclipse

Reported by eliteSchaf, Jul 19, 2012
Externalize all of the Strings in Goclipse,
so people can translate Goclipse to other languages

No automatic indentation

Reported by neclepsio, Jun 11, 2013
What steps will reproduce the problem?

  1. Type "for {", than enter

What is the expected output? What do you see instead?
The cursor is directy under "for" and no tab or space is inserted.

What version of the product are you using? On what operating system?
Eclipse 3.8 on WinXP with updated goclipse.

Formatting invalid code causes entire file to be cleared.

Repro steps:

  1. Create an invalid go file
  2. Format it (Shift+Ctrl+F)

Observed behavior:
Everything in the file is deleted. An empty file is left behind. The console window shows the output of gofmt, which evidently terminated with an error code and printed some messages to stderr.

Expected behavior:
The file is unmodified. Perhaps an error dialog appears, showing that editing failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.