{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1240","labels_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1240/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1240/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1240/events","html_url":"https://github.com/ceylon/ceylon-ide-eclipse/issues/1240","id":56596213,"number":1240,"title":"ModelResolutionException when a jar lib is imported + IDE and CLI do not see the same methods","user":{"login":"sgalles","id":153065,"avatar_url":"https://avatars.githubusercontent.com/u/153065?v=3","gravatar_id":"","url":"https://api.github.com/users/sgalles","html_url":"https://github.com/sgalles","followers_url":"https://api.github.com/users/sgalles/followers","following_url":"https://api.github.com/users/sgalles/following{/other_user}","gists_url":"https://api.github.com/users/sgalles/gists{/gist_id}","starred_url":"https://api.github.com/users/sgalles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgalles/subscriptions","organizations_url":"https://api.github.com/users/sgalles/orgs","repos_url":"https://api.github.com/users/sgalles/repos","events_url":"https://api.github.com/users/sgalles/events{/privacy}","received_events_url":"https://api.github.com/users/sgalles/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/labels/bug","name":"bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"login":"davidfestal","id":686586,"avatar_url":"https://avatars.githubusercontent.com/u/686586?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfestal","html_url":"https://github.com/davidfestal","followers_url":"https://api.github.com/users/davidfestal/followers","following_url":"https://api.github.com/users/davidfestal/following{/other_user}","gists_url":"https://api.github.com/users/davidfestal/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfestal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfestal/subscriptions","organizations_url":"https://api.github.com/users/davidfestal/orgs","repos_url":"https://api.github.com/users/davidfestal/repos","events_url":"https://api.github.com/users/davidfestal/events{/privacy}","received_events_url":"https://api.github.com/users/davidfestal/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/milestones/11","labels_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/milestones/11/labels","id":822285,"number":11,"title":"Ceylon 1.2","description":"","creator":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":39,"state":"open","created_at":"2014-10-11T14:48:54Z","updated_at":"2015-02-05T16:26:46Z","due_on":"2014-11-23T23:00:00Z","closed_at":null},"comments":8,"created_at":"2015-02-04T22:15:38Z","updated_at":"2015-02-06T09:01:40Z","closed_at":null,"body":"The symptom is this error in the IDE :\r\n```\r\nUnitDependencyVisitor caused an exception visiting ImportMember node: com.redhat.ceylon.compiler.loader.ModelResolutionException:\r\nJDT reference binding without a JDT IType element ! at com.redhat.ceylon.eclipse.core.model.JDTModelLoader.toType(JDTModelLoader.java:932)\r\n```\r\nTo reproduce, start with this Ceylon code (JVM backend)\r\n```ceylon\r\nimport org.gradle.api {\r\n    Project\r\n}\r\nshared class Foo(shared Project project){\r\n}  \r\n```\r\nThe `Project` Java class comes from a gradle jar (the jar was imported in my Ceylon repos : it is **gradle-core-2.2.1.jar** in the Gradle distrib).So the module descriptor looks like this :\r\n```ceylon\r\nmodule com.sgalles \"1.0.0\" {\r\n     shared import gradlecore \"2.2.1\";\r\n} \r\n```\r\nThen perform a **clean** of the project, you get the error :\r\n```\r\nUnitDependencyVisitor caused an exception visiting ImportMember node: com.redhat.ceylon.compiler.loader.ModelResolutionException:\r\nJDT reference binding without a JDT IType element ! at com.redhat.ceylon.eclipse.core.model.JDTModelLoader.toType(JDTModelLoader.java:932)\r\n```\r\nThen, I had to force a save on the ceylon source of the class to make this error goes away.\r\n"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/comments/73205986","html_url":"https://github.com/ceylon/ceylon-ide-eclipse/issues/1240#issuecomment-73205986","issue_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1240","id":73205986,"user":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T09:01:40Z","updated_at":"2015-02-06T09:01:40Z","body":"Yes please."}}