Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Add icon next to a constructor used in a query mapping #5

Open
egaga opened this issue May 7, 2015 · 1 comment
Open

Add icon next to a constructor used in a query mapping #5

egaga opened this issue May 7, 2015 · 1 comment

Comments

@egaga
Copy link
Member

egaga commented May 7, 2015

Add Dalesbred icon next to constructors that are used in Dalesbred queries, similar to autowired bean dependency icons in the Spring IDEA-plugin.

Benefits:

  • quick navigation from the icon to the queries that match the constructor (possibly multiple queries)
  • the presence of an icon communicates that it is used
    • no need to annotate constructor separately with @Reflective to avoid warning for unused constructor

Example:

Assuming the only query in the project is
db.findUnique(Foo.class, "select id from foo limit 1");

We have the following class for mapping the id property to a class:

class Foo {

This constructor is used for the query result

  Foo(int id) { // an icon is present in the toolbar
  }

The following constructor has no matching query, so no icon would be next to it

  Foo(int dum, int dam) { // no icon in the toolbar
  }
}
@komu
Copy link
Member

komu commented May 7, 2015

I think for starters just making the constructor resolvable with Find Usages would be a good improvement. This probably takes care of unused warnings as well.

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

No branches or pull requests

2 participants