This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269956 - Does not show interface implementation icon/hint in Traits
Summary: Does not show interface implementation icon/hint in Traits
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 12:56 UTC by AnmSaiful
Modified: 2017-03-27 22:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AnmSaiful 2017-03-01 12:56:20 UTC
If a Trait implements an abstract function defined in an interface, it does not show the implementation icon/hint (i.e. "(I)") in the Trait. Please note that the class uses the trait implements the interface.
Comment 1 Tomas Mysik 2017-03-24 14:30:39 UTC
Not a P2, sorry. Please, attach a sample file(s) so we are sure what you mean exactly.

Thanks for reporting.
Comment 2 AnmSaiful 2017-03-24 14:51:13 UTC
Well, let me explain with some code. Let's consider the following simple code.

---

interface.php
    interface I {
        public function netbeans();
    }

---

trait.php
    trait T {
        public function netbeans() {
            return;
        }
    }

---

class.php
    include 'interface.php';
    include 'trait.php';
    class C implements I {
        use T;
    }

---

Well, now in the IDE, an implementation icon/hit (i.e. (I)) should be shown in the second line of the trait, right? But it does not show as expected. It only works if I write the function body inside the class, not the trait. Make sense?

Please let me know if you need more clarification. Thanks in advance. :-)
Comment 3 Tomas Mysik 2017-03-24 15:15:37 UTC
Thanks for the sample codes.
Comment 4 junichi11 2017-03-25 23:51:44 UTC
Perhaps, many classes have to be checked if it is implemented because a trait does not know where itself is used. I think that it would have a performance problem.

Thanks.
Comment 5 AnmSaiful 2017-03-26 00:11:00 UTC
Yep, valid point. I think you can close the issue now. Thanks anyway. :-)
Comment 6 junichi11 2017-03-27 22:29:05 UTC
(In reply to AnmSaiful from comment #5)
> Yep, valid point. I think you can close the issue now. Thanks anyway. :-)

Sure :) I'll mark as RESOLVED. Thanks!