Bug 227304 - Fix uses: Classes from same namespace should be preferred
Fix uses: Classes from same namespace should be preferred
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Editor
7.3
All All
: P3 (vote)
: 7.3.1
Assigned To: Ondrej Brejla
issues@php
73patch2-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-11 16:55 UTC by Tomas Mysik
Modified: 2013-05-09 14:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2013-03-11 16:55:34 UTC
Fix uses should prefer classes from the same namespace.

Sample:
---------------------------
file MyClass.php:
namespace One;

class MyClass {
}
---------------------------
file MyClass2.php:
namespace Two;

class MyClass {
}
---------------------------
file YourClass.php:
namespace One;

class YourClass extends MyClass {
}
---------------------------

Now, fix uses in YourClass.php - dialog suggests to use Two\MyClass but it is more likely that we don't want to insert any class use (since One\MyClass is from the same namespace as YourClass).

Láďo, I guess it is too late for a patch, right? :/

Thanks.

Product Version: NetBeans IDE Dev (Build 20130308-5461914c033f)
Java: 1.6.0_43; Java HotSpot(TM) 64-Bit Server VM 20.14-b01
Runtime: Java(TM) SE Runtime Environment 1.6.0_43-b01
System: Linux version 3.5.0-25-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Vladimir Riha 2013-03-11 20:52:15 UTC
I'm afraid so, at least for patch1
Comment 2 Tomas Mysik 2013-03-20 08:14:54 UTC
Sorry, returning back the proper SW.
Comment 3 Ondrej Brejla 2013-03-20 08:17:14 UTC
Fixed in web-main #f89f798de3e4
Comment 4 Quality Engineering 2013-03-23 01:56:33 UTC
Integrated into 'main-golden', will be available in build *201303222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f89f798de3e4
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #227304 - Fix uses: Classes from same namespace should be preferred
Comment 5 Vladimir Riha 2013-04-08 11:11:40 UTC
verified

Product Version: NetBeans IDE Dev (Build web-main-10256-on-20130406)
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b32
System: Linux version 3.2.0-39-generic-pae running on i386; UTF-8; en_US (nb)
Comment 6 Marian Mirilovic 2013-05-07 07:43:38 UTC
Ondra, 
please proceed with integration into release73 (if it hasn't been integrated yet) and change SW to '73patch2-fixed'. Thanks in advance.
Comment 7 Tomas Mysik 2013-05-07 08:07:08 UTC
Transplanted to release73 branch of releases repo [1]. Ondro, please verify the changeset.

Thanks.
[1] http://hg.netbeans.org/releases/rev/0b73c74eaca0
Comment 8 Ondrej Brejla 2013-05-07 08:09:39 UTC
Seems to be ok, thanks a lot.
Comment 9 Tomas Mysik 2013-05-07 08:14:50 UTC
Spec version increased as well.

http://hg.netbeans.org/releases/rev/49a05361200c
Comment 10 Ondrej Brejla 2013-05-07 08:15:59 UTC
Great, thanks!
Comment 11 Quality Engineering 2013-05-08 02:01:11 UTC
Integrated into 'releases', will be available in build *201305072358* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/0b73c74eaca0
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #227304 - Fix uses: Classes from same namespace should be preferred
Comment 12 Vladimir Riha 2013-05-09 14:16:17 UTC
patch2 verified

Product Version: NetBeans IDE 7.3.1 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-41-generic-pae running on i386; UTF-8; en_US (nb)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo