Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface members don't have references linked to implementers #6510

Closed
bjarkihall opened this issue Mar 4, 2021 · 3 comments
Closed

Interface members don't have references linked to implementers #6510

bjarkihall opened this issue Mar 4, 2021 · 3 comments
Labels
bug Product bug codelens

Comments

@bjarkihall
Copy link

bjarkihall commented Mar 4, 2021

Describe the bug
When looking up references to interface members, you don't have a way of finding references by implementers.

In other words:

  • It's hard to look up the implementations of methods if you're looking at the consumers.
  • It's hard to look up the consumers of methods if you're looking at the implementations.
  • It's hard to see which methods in an implementer belong to which interface and which ones don't.

To Reproduce

interface IMyInterface
{
    procedure Foo(); // only used by MyConsumer.Consume, but this should also show MyImplementer.Foo
}

codeunit 50000 MyImplementer implements IMyInterface
{
    procedure Foo() // Foo doesn't have any references ??
    begin
    end;
    
    procedure Bar() // you have no way of knowing quickly if this method belongs to the interface or not...
    begin
    end;
}

codeunit 50001 MyConsumer
{
    procedure Consume(i: Interface IMyInterface)
    begin
      i.Foo(); // links to IMyInterface.Foo (1 reference), but not to MyImplementer.Foo
    end;
}

As the interface gains more members and implementers, it gets more and more difficult to navigate around and maintain.

Expected behavior
It should be possible to clearly know which members of an implementer are part of an interface (and which interface).
I'd also expect to be able to see references to these methods in the consumers.

Versions:

  • AL Language: v6.6.425415
@bjarkihall
Copy link
Author

This is the case where two interfaces define the same member:

interface A
{
    procedure Foo(); // should show reference to ImplementerMulti.Foo (and ConsumerMulti.Consume, which it does today)
}

interface B
{
    procedure Foo(); // should show reference to ImplementerMulti.Foo (and ConsumerMulti.Consume, which it does today)
}

codeunit 50003 ImplementerMulti implements A, B
{
    // should show references to A.Foo, B.Foo and ConsumerMulti.Consume
    procedure Foo() // hover should show: procedure Foo() implements A, B
    begin
    end;
}

codeunit 50004 ConsumerMulti
{
    procedure Consume()
    var
      a: Interface A;
      b: Interface B;
    begin
      a.Foo(); // should show references to A.Foo and ImplementerMulti.Foo
      b.Foo(); // should show references to B.Foo and ImplementerMulti.Foo
    end;
}

@qutreson qutreson added bug Product bug codelens labels Mar 7, 2021
@tinestaric
Copy link

What's the status of this bug?
It's been open for quite a while, and it is increasingly difficult to manage interfaces with a large number of implementations, as each implementer needs to be inspected to find the right implementation.

@EmilDamsbo
Copy link
Member

This was included in version 11.0 of the extension, so I am closing this old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Product bug codelens
Projects
None yet
Development

No branches or pull requests

4 participants