Git Product home page Git Product logo

godev's Introduction

Welcome to godev!

The aim of this project is to develop a premier Go language IDE hosted in a web interface. This was inspired by the way that the godoc tool uses a web UI instead of a traditional GUI.

There are certain advantages of a web UI in this case

  • Remote access through your web browser (no extra install required)
  • OS independent GUI (Go has no standard cross-platform library)
  • Hosted Go development environments

Where possible godev aims to reuse existing tools to provide an integrated experience. Not every tool needs to be installed in order to get a basic editing, navigation and execution environment. This helps to keep the IDE bloat to a minimum as well as promote existing standalone tools. Third party extensions to GoDev can be created and installed easily (more details below).

The Plan

The initial sprint and prototype is complete. Future sprints will focus on improving breadth and depth of functionality.

Areas explored:

  • Edit and Code Navigation
    • Use the Eclipse Orion project as a base
    • http://www.eclipse.org/orion
    • Syntax highlighting
    • File outline
    • Simple content assists
    • Markers for compile errors, todo comments, fixme comments
  • Documentation
    • Go doc integration
  • Build and Compile
    • Use the go build/go install commands to compile the code
    • Create console and markers for specific compile errors
  • Run
    • Run and manage running Go process (output buffer, input, stop)
  • Go test
    • Run a package's go test suite and report back results in a table/tree
  • Contextual content assist
    • Content assists based on the return value of a function call
    • Content assists based on the other functions in the current file and local GOPATH packages

New areas to explore:

  • Git Integration
    • Manage push/pull/commit/add
  • RTC SCM Integration
    • Manage pending changes, check-ins, deliveries

Screenshots

Markers Save your Go file to see markers for compile errors and warnings.

Content Assistance Content assistance when you type '.' or Ctrl+Space

Quick Run Run your program quickly by pressing F8

GoDoc Bring up GoDocs quickly using Ctrl+Shift+G

Tools Menu Bring up extra tools in the tools menu. Plugins can contribute more tools.

Rich Godocs The GoDocs page provides full godocs. Quickly navigate to packages using the search at the top.

Rich Debug The Debug page provides advanced execution, race condition detection and debug (provided by godbg plugin).

Videos

October 2014 Overview

Youtube

Quick Start

Sprint 4 Summary

Sprint 6 Summary

Getting Started

The godev tool requires the Go SDK, which is freely available for download on golang.org

To begin working with Go you first need to set up your GOPATH. This is a directory where all of your source code and binaries live. Pick an empty directory somewhere on your system and set the GOPATH environment variable with the path to this directory. For more details you can read the "How to Write Go Code" guide on golang.org.

Get the source code from the latest release by running go get: "go get github.com/sirnewton01/godev"

Compile and install godev in your GOPATH by running go install: "go install github.com/sirnewton01/godev"

Make sure that $GOPATH/bin is on your system path and type "godev"

Open up your web browser and navigate to http://127.0.0.1:2022 Note that godev is only accessible from your local machine using the "127.0.0.1" address unless you set up Remote Access (more details below). You can begin a new godev project using the "New -> Folder" menu near the top of the screen.

If you have ideas for enhancements or find defects please Raise a Task on JazzHub (account required): https://hub.jazz.net/ccm01/web/projects/sirnewton%20%7C%20godev#action=com.ibm.team.workitem.newWorkItem&type=task&ts=13725284879510

Happy Go hacking!

Remote Access

Godev has remote access capabilities using your web browser and https. Access is controlled using a magic url known only to the person who launches the godev session. First, some setup is required to specify the fully qualified domain name of your system and establish a secure connection.

Generating SSL/TLS keys

Godev uses HTTP over SSL/TLS, otherwise known as https, to encrypt information sent from the remote system and your local web browser. In order to set up the encryption both a certificate and encryption key is needed to establish the encrypted connection. You can use a tool like openssl or use a Go script included in every Go install to generate it.

To run the Go script to generate your certificates you can run the following command (replace / with \ on Windows, myhost.example.com with your fully qualified domain name):

$ go run /path/to/go/install/src/pkg/crypto/tls/generate _ cert.go -ca=true -duration=8760h0m0s -host=myhost.example.com

It is important to secure the certificates and keys with filesystem permissions so that others canot use them to intercept your communications.

$ chmod go-rwx cert.pem key.pem

Setting Environment Variables

Your fully qualified domain name, certificate file and key file are provided to gdbg using the following environment variables:

$ export GOHOST=myhost.example.com $ export GOCERTFILE=/path/to/my/cert.pem $ export GOKEYFILE=/path/to/my/key.pem

These variables can be set in the same place you set your GOPATH and PATH variables so that they are set automatically every time you run the tool.

Mozilla Persona Authentication

Deprecated: Unfortunately, the persona system has been deprecated by Mozilla and has been removed from Orion.

Debugging

You can debug your applications within godev with the godbg application. Go get it so that you can debug inside your godev session.

$ go get github.com/sirnewton01/godbg

Debugging is accessed via the "Debug" section of godev. Pick your package, set the command-line arguments and click on the "Debug" button. Click on the URL to switch to the debugging session.

Content Assist

Godev has an optional integration with the gocode tool to bring rich content assistance to the editor. Go get the latest go code source to activate the integration.

$ go get github.com/nsf/gocode

To activate content assistance you press Ctrl+Space in the editor to bring up a list of suggestions.

Import Management

You can manage your imports with the goimports tool inside the godev editor. Install the tool with the following command:

$ go get code.google.com/p/go.tools/cmd/goimports

In the godev editor type Ctrl-I to add the imports you need and/or remove the unnecessary ones.

Blame

The godev editor has the ability to show blame for each line of source code managed by Git, Mercurial and Jazz SCM. Godev works with the command-line for each type of VCS to present the blame. If you are able to "go get" it then you should have the command-line tool installed on your system.

Extensions

Godev has a number of third party extensions to further enhance the environment. To install an extension you simply "go get" it like any other Go command or library. Run the following command to add the Go Oracle extension to find references, implementers, callers and channel peers of selections in the editor:

$ go get github.com/sirnewton01/godev-oracle

For more information about writing extension check out the design document (https://github.com/sirnewton01/godev/wiki/GoDev-Extensions). The godev-oracle project is itself a relatively simple demonstration of a GoDev extension.

Troubleshooting

Having problems with godev? Try these couple of steps before raising an issue or defect:

  • Try again using a new Firefox or Chrome
  • Clear your browser cache
  • In Firefox: History -> Clear Recent History (pick "Everything", "Cache" and "Offline Website Data")
  • In Chrome: Tools -> Clear Browsing Data (pick "the beginning of time", "Empty the cache")
  • Clear out old godev plugins
  • In the godev top-right menu -> Settings -> Plugins
  • Look for any plugins that have an 'x' action to the right of them
  • Click 'x' to delete each of the the unnecessary plugins
  • Click "Reload all" at the top-right of the page
  • Clear the browser's local storage
  • In Chrome, Ctrl+Shift+J , type localStorage.clear() and press Enter
  • In Firefox, Ctrl+Shift+K , type localStorage.clear() and press Enter
  • Reload your godev browser pages

If you are still having problems after running these steps then please raise either an issue on github or a defect on jazzhub.

godev's People

Contributors

sirnewton01 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

godev's Issues

Debug issue

I had the debugger working yesterday. Not sure what changed but now I am getting this pop up when running execute in the debug window on a working helloworld.go project:

POST:{"Severity":"Error","HttpCode":400,"Message":"Error installing command.","DetailedMessage":"exit status 2"}

github.com cannot be opened !

Within $GOPATH/src all packages that have sub-directories open just fine.
Only github.com seems to have a problem that it brings up below message:

Use the [+] to create new files and folders. Click a file to start coding.

I renamed github.com to github_com and tried again. Now github_com opens properly just like any other folder without problem.

std packages

why is this necessary?
go get -u github.com/sirnewton01/godev
go install unicode/utf8: open /usr/local/go/pkg/linux_386/unicode/utf8.a: permission denied
go install hash: open /usr/local/go/pkg/linux_386/hash.a: permission denied
go install crypto/cipher: open /usr/local/go/pkg/linux_386/crypto/cipher.a: permission denied
go install crypto/subtle: open /usr/local/go/pkg/linux_386/crypto/subtle.a: permission denied
go install unicode/utf16: open /usr/local/go/pkg/linux_386/unicode/utf16.a: permission denied
go install unicode: open /usr/local/go/pkg/linux_386/unicode.a: permission denied

Run external tools without PATH?

I usually dont setup my PATH to include the $GOPATH/bin folder. This caused some confusion when I tried to run some of the external tools like godef, because godev only said in the error that I should go get godef. However that did not make it work because it expect that the godef binary is on my PATH but its not.

The easiest for me would be if it could check for the tools in $GOPATH/bin if not found in PATH. But if that not possible please at least mention it in the in the readme :)

If you update the readme please also add that you need to go install the tools as well, not just go get them. It is not totally obvious that you need that now (at first I assumed that godev itself would install them after I go getted them)

Add gorename tool

This is a suggestion to provide access to the new gorename tool. See announcement here:

https://groups.google.com/d/msg/golang-nuts/96hGPXYfqsM/WreOUy9qOT4J

Gorename is a tool for type-safe renaming of identifiers in Go source code.

Keep opened files along the top as tabs

One thing I miss from standard IDEs is how opened files are still available in a tabbed view, so I can flit among the tabs as needed. It would be nice to have a similar functionality added to godev.

Creating a new project does not succeed nor returns an error

When I attempt to create a project it seems like creation fails silently. Nothing suggests either success or failure. Watching the debug output on stdout does not hint at anything going wrong either. This is on OSX Mavericks, built with go 1.3.

Remote Access

Hey there,

This is a really awesome tool, especially it has intellisense. I also notice it supports remotes access, but I do quite understand how to use it, could you give more details?

BTW, it has account panel in the setting page, does that mean anything?

Cheers,
Joe.

Integrate kill into debug

Would it be possible to add ability to kill a process that was started from the debug panel? I just started developing a web app and have to manually kill the process from command line.

Mozilla Persona Authentication

How to setup domain?

When I use GOHOST=XX godev force me to have certificate file and key file.

Did you miss anything in README to config this?

Thanks!

Symlink support in directory pane

I have a bitbucket repo cloned in one location, while my workspace has a symlink to the clone.

If I browse to the symlink in GoDev, the left pane shows the symlink as if it's a file. If I click on the symlink, I see a browsable directory in the right pane.

I'd like to see the left pane act as if the symlink is a folder directly (at least for a symlink that points to a folder). Doable?

lost position when jumping between files

One trouble which bugged me most when using godev, was that when I jumped from file to file (e.g. "jump to definition", or searching for some function name, etc), especially just for a moment, which I do quite much, then after coming back to the original file, each time I had to scroll again from the beginning and hunt for the position where I was last editing.

In this workflow, there's also trouble with having to save the file each time, even if the changes are just "in progress" and not worth saving; but IIRC, I worked around this by enabling autosave feature.

  • One possible solution I imagine to fix annoyances in my workflow would be if there was a "Navigate Back/Navigate Forward" feature like in the desktop Eclipse IDE.
  • Other one that could mostly solve my problem would be if there was "bookmarks" feature and keyboard shortcut, for marking lines in files and quickly jumping between them ("next"/"previous"-style); disadvantages here are: that it requires interaction and thus can be accidentally forgotten; also that it is often some line near editing place which is marked (since previous jumps - I know that from using such feature in other editors), and thus requires some movement keystrokes after jumping back to reposition on correct line. There's however an advantage too, that it is more permanent than "Navigate back/forward" and allows for marking more important navigation points.
  • One more partial solution which would often mitigate the problem would be if multiple files could be opened at once (with position remembered), or even if it was that just the position in each filename was remembered. This would help when jumping between files, but would not when jumping inside a single big file, or when jumping to other file later led back to jumping to other function in original file.

I'd be very grateful if some feature to mitigate my problems was implemented in godev, it would much improve my workflow with it! It's been my main pain point when I last tried. That said, the tool is very impressive already, and balancing near the edge of becoming my favourite for Go development. Big thanks!

Error Install Godev

go get -u github.com/sirnewton01/godbg

warning: code.google.com is shutting down; import path code.google.com/p/go.net/websocket will stop working

go get code.google.com/p/go.tools/cmd/goimports
warning: code.google.com is shutting down; import path code.google.com/p/go.tools/cmd/goimports will stop working

missing plugin handler after update

After update the top two menue bars are in an undefined state.
godev -debug=true
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/net.jazz.sirnewton.godev/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.core/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.editor/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.git/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.golang/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.javascript/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.ui/web added
godev2014/03/05 06:46:05 Bundle path /home/nigel/go/src/github.com/sirnewton01/godev/bundles/org.eclipse.orion.client.users/web added
http://127.0.0.1:2022
textproto Readline GET /plugins/esprima/esprimaJsContentAssistPlugin.html HTTP/1.1
godev2014/03/05 06:46:20 Miss: /plugins/esprima/esprimaJsContentAssistPlugin.html
textproto Readline GET /plugins/esprima/esprimaJsContentAssistPlugin.html HTTP/1.1
godev2014/03/05 06:46:20 Miss: /plugins/esprima/esprimaJsContentAssistPlugin.html
textproto Readline GET /images/none.png HTTP/1.1
godev2014/03/05 06:46:20 Miss: /images/none.png
textproto Readline POST /login HTTP/1.1
textproto Readline GET /workspace HTTP/1.1
godev2014/03/05 06:46:21 HANLDER: GET /workspace
It would appear godev is trying to find a "plugins" handler which I can't find in godev.go. Is this something generated at runtime for javacript or is something still missing from the update?

editing binaries...

so yes I got it running, but when I open a binary, it opens in the editor (which is good or bad) but I'm sure the IDE should open a binary...
comments?

missing Tools in menu bar

Sometimes I stop seeing Tools in the menu bar. To get it back, I have to go to godoc and then come back to the workspace.

Allow for declaration of bundles path

Allow for declaration of bundles path so that entire godev source is not required to be in gopath to run. Perhaps also do a check to see if it is in same path as bin?

No output why a test failed

The tests view isn't showing why a test failed.

Now i managed to edit test.go to get the messages send why a particular test failed.
But for the front end files (js) which file is responsible for rendering the test columns?

Remote authentication issue

First, I'm impressed with this project. It's working great on the local machine.

I followed the directions for the remote access, but I'm getting:
"Authentication required for: Orion File Service. Login and re-try the request"

Thanks in advance.
Harris

godoc changed - godev fails to autostart godoc and load js and css files

As I don't know what the expected behaviour in this regard is, I can only describe how things have changed:

A godoc of ca. two weeks ago go get -u code.google.com/p/go.tools/cmd/godoc was auto-started by godev, however some js and css files failed to load.

A godoc as of Jan 20 failes to auto-load and many (all?) css and js files fail to load.

  • If I start godoc manually godoc -http=:6060 and browse to localhost:6060 it seems as godoc is working without issues.
  • If I start godoc manualy and browse within to godev to godoc, the package list get's displayed, but without any js or css files:

07:31:57.374 GET http://127.0.0.1:2022/godoc/pkg/ [HTTP/1.1 200 OK 59ms]
07:31:57.820 GET http://127.0.0.1:2022/lib/godoc/style.css [HTTP/1.1 404 Not Found 1ms]
07:31:57.821 GET http://127.0.0.1:2022/doc/gopher/pkg.png [HTTP/1.1 404 Not Found 1ms]
07:31:57.823 GET http://127.0.0.1:2022/lib/godoc/jquery.js [HTTP/1.1 404 Not Found 2ms]
07:31:57.824 GET http://127.0.0.1:2022/lib/godoc/godocs.js [HTTP/1.1 404 Not Found 1ms]
07:31:58.164 GET http://127.0.0.1:2022/doc/gopher/pkg.png [HTTP/1.1 404 Not Found 1ms]
07:31:58.165 GET http://127.0.0.1:2022/lib/godoc/jquery.js [HTTP/1.1 404 Not Found 1ms]
07:31:58.166 GET http://127.0.0.1:2022/lib/godoc/godocs.js

Clicking Go Doc above the editor area always works, regardless of godoc running in the background or not

Proposal: additional "stupid" word completion

I would like also to suggest, if you could consider, adding a "stupid" word completion, based on all words occurring in a file. I longed for such when writing "top-down" code, i.e. first writing high level function with names of not-yet-existant low-level functions, and then trying to fill them with body. When I then tried to write function prototypes, I could not use completion, and had to either rewrite from memory, or search for the callsite and only then be able to copy&paste.

Thanks!

godoc pulling all resources

godoc seems to be using all the resources it can get. I've found the issue and it's in doc.go:

cmd := exec.Command("godoc", "-http=127.0.0.1:"+godocPortStr, "-index=true", "templates="+godoc_templates_dir)

to:

cmd := exec.Command("godoc", "-http=127.0.0.1:"+godocPortStr, "-index=true", "-maxresu
lts=0","-templates="+godoc_templates_dir)

basically, adding -maxresults=0 makesit play nice.

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.