Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Oracle Open Definition not working for type references: "selected name does not refer to a source element" #121

Closed
baconalot opened this issue Apr 3, 2015 · 4 comments

Comments

@baconalot
Copy link

From issue #99

When a type is ctrl-clicked we get " selected name does not refer to a source element, rather its a ref to type xyz (size 40, align 8). Is there a compelling reason not to jump to the type?

Given this program:

package main

import "fmt"

type Foo struct {
    A string
    B string
}

func main() {
    foo := Foo{"a", "b"}
    fmt.Println(foo)
}

When I ctrl-lmb click foo in fmt.Println(foo) it jumps to the definition of foo on the previous line -> ok
When I ctrl-lmb click Foo in foo := Foo{"a", "b"} I get the following message:
untitled
Since the position of the type is know anyway why not jump to it?

@baconalot
Copy link
Author

In com.googlecode.goclipse.tooling -> src/com/googlecode/goclipse/tooling/oracle/GoOracleFindDefinitionOperation.java

protected FindDefinitionResult parseJsonResult(String output) throws JSONException, CommonException {
    JSONObject jsonResult = new JSONObject(output);

    JSONObject describe = jsonResult.getJSONObject("describe");

    String desc = describe.getString("desc");

    if(areEqual(desc, "source file")) {
        return new FindDefinitionResult(null, null);
    }
    if(!areEqual(desc, "identifier")) {
        return new FindDefinitionResult(
            "Selected name does not refer to a source element, rather it's a:\n" + desc, null);
    }

@bruno-medeiros bruno-medeiros changed the title Oracle enhancment - selected name does not refer to source element Oracle Open Definition: not working for type references: "selected name does not refer to a source element" Apr 8, 2015
@bruno-medeiros bruno-medeiros changed the title Oracle Open Definition: not working for type references: "selected name does not refer to a source element" Oracle Open Definition not working for type references: "selected name does not refer to a source element" Apr 8, 2015
@dave-leblanc-agora
Copy link

I'm wondering when we can expect this change to be in the releases? I updated my eclipse plugin and checked the manual download file from master and the latest release was compiled several days prior to this patch. I'm not familiar with your release schedule and apologize if this information is available elsewhere however this issue has been plaguing me for a little while now.

@bruno-medeiros
Copy link
Contributor

I don't have a release schedule, as I work in many different projects, and it's hard to plan work for a single IDE. If there is a good amount of features in master, I usually do a release, unless I have short term plans to add more stuff.

You can see the upcoming feature in the changelog file:
https://github.com/GoClipse/goclipse/blob/master/documentation/ChangeLog.md

@dave-leblanc-agora
Copy link

ok thanks for the reply I'll keep an eye on things. Kudos to you for building this project!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants