Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Type Hierarchy across source folders
Type Hierarchy across source folders [message #209356] Sat, 09 July 2005 00:06 Go to next message
Eclipse UserFriend
Originally posted by: bbgdl-2003-.yahoo.com

I have a project with the source in several directories, e.g.
project/src/dao/com/community and project/test/dao/com/community
I'd like to open a Type Hierarchy on the package com.community and see
the classes that are in both project/src/dao/com/community and
project/test/dao/com/community.

Can I do this? Is there some limitation in the Hierarchy that prevents
this?

Thanks, Bruce
Re: Type Hierarchy across source folders [message #209402 is a reply to message #209356] Sat, 09 July 2005 12:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Bruce Gordon wrote:
> I have a project with the source in several directories, e.g.
> project/src/dao/com/community and project/test/dao/com/community
> I'd like to open a Type Hierarchy on the package com.community and see
> the classes that are in both project/src/dao/com/community and
> project/test/dao/com/community.
>
> Can I do this? Is there some limitation in the Hierarchy that prevents
> this?
>
> Thanks, Bruce

Your question is a little confusing. You say that you want to open a
package in the Type Hierarchy. However, the Type Hierarchy if for
displaying types not packages.

My guess is you are talking about the Types view in the Java Browsing
Perspective. If this is the case, selecting the project instead of a
source folder in the Projects view will list all instances of packages
in the Packages view. Selecting the com.community package will then
show all classes in both source folders.
Re: Type Hierarchy across source folders [message #209418 is a reply to message #209402] Sat, 09 July 2005 23:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: BruceBGordon.xxx.org

Communication is so hard (LOL). Let me try to be clearer. I want to see
all the types in (for example) project/src/dao/com/community and
project/test/dao/com/community in the Hierarchy view. I like viewing the
types hierarchically. So if there were 3 types in the first path, and 1 in
the second, then I'd like to see all 4 in the Hierarchy view. In my case
both paths have the same package, but what I really want is to be able to
arbitrarily choose the unit to display in the Hieararchy-be it Project,
one or more packages, or 1 or more types. Thanks, Bruce

Bruce Gordon wrote:

I have a project with the source in several directories, e.g.
project/src/dao/com/community and project/test/dao/com/community
I'd like to open a Type Hierarchy on the package com.community and see
the classes that are in both project/src/dao/com/community and
project/test/dao/com/community.

Can I do this? Is there some limitation in the Hierarchy that prevents
this?

Thanks, Bruce


Your question is a little confusing. You say that you want to open a
package in the Type Hierarchy. However, the Type Hierarchy if for
displaying types not packages.

My guess is you are talking about the Types view in the Java Browsing
Perspective. If this is the case, selecting the project instead of a
source folder in the Projects view will list all instances of packages in
the Packages view. Selecting the com.community package will then show all
classes in both source folders.
Re: Type Hierarchy across source folders [message #209464 is a reply to message #209418] Sun, 10 July 2005 12:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

You question still doesn't make sense. The Hierarchy view displays a
Type and all of its super/sub classes. It doesn't display all Types in
a package, so you can't be talking about the hierarchy view. You are
going to use more detail to explain what you are doing/seeing and what
you want to see.

Bruce Gordon wrote:
> Communication is so hard (LOL). Let me try to be clearer. I want to see
> all the types in (for example) project/src/dao/com/community and
> project/test/dao/com/community in the Hierarchy view. I like viewing the
> types hierarchically. So if there were 3 types in the first path, and 1
> in the second, then I'd like to see all 4 in the Hierarchy view. In my
> case both paths have the same package, but what I really want is to be
> able to arbitrarily choose the unit to display in the Hieararchy-be it
> Project, one or more packages, or 1 or more types. Thanks, Bruce
>
> Bruce Gordon wrote:
>
> I have a project with the source in several directories, e.g.
> project/src/dao/com/community and project/test/dao/com/community
> I'd like to open a Type Hierarchy on the package com.community and
> see the classes that are in both project/src/dao/com/community and
> project/test/dao/com/community.
>
> Can I do this? Is there some limitation in the Hierarchy that
> prevents this?
>
> Thanks, Bruce
>
>
> Your question is a little confusing. You say that you want to open a
> package in the Type Hierarchy. However, the Type Hierarchy if for
> displaying types not packages.
>
> My guess is you are talking about the Types view in the Java Browsing
> Perspective. If this is the case, selecting the project instead of a
> source folder in the Projects view will list all instances of packages
> in the Packages view. Selecting the com.community package will then
> show all classes in both source folders.
>
Re: Type Hierarchy across source folders [message #209528 is a reply to message #209356] Mon, 11 July 2005 06:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Bruce Gordon wrote:

>I have a project with the source in several directories, e.g.
>project/src/dao/com/community and project/test/dao/com/community
>I'd like to open a Type Hierarchy on the package com.community and see
>the classes that are in both project/src/dao/com/community and
>project/test/dao/com/community.
>
>Can I do this? Is there some limitation in the Hierarchy that prevents
>this?
>
>
This is currently not possible. You can only feed the project, source
folder or package (from a given source folder) to the Hierarchy view. If
you want to see the combined list of types for a given package you can
use the Java Browsing perspective's Packages view - no hierarchy though.

Dani

>Thanks, Bruce
>
>
Re: Type Hierarchy across source folders [message #209557 is a reply to message #209528] Mon, 11 July 2005 07:06 Go to previous messageGo to next message
Eclipse UserFriend
Daniel Megert wrote:

> Bruce Gordon wrote:
>
>> I have a project with the source in several directories, e.g.
>> project/src/dao/com/community and project/test/dao/com/community
>> I'd like to open a Type Hierarchy on the package com.community and see
>> the classes that are in both project/src/dao/com/community and
>> project/test/dao/com/community.
>>
>> Can I do this? Is there some limitation in the Hierarchy that prevents
>> this?
>>
>>
> This is currently not possible. You can only feed the project, source
> folder or package (from a given source folder) to the Hierarchy view. If
> you want to see the combined list of types for a given package you can
> use the Java Browsing perspective's Packages view - no hierarchy though.
>
> Dani
>
>> Thanks, Bruce
>>
>>

Works for me in 3.1 with this setup:

src
+ pack
+ A.java
src2
+ pack
+ B.java

Selecting either of the packages 'pack' in the Package Explorer and then
pressing F4 yields a combined type hierarchy of all types in package
fragments 'pack' from all source folders of the enclosing project.

Markus
Re: Type Hierarchy across source folders [message #209634 is a reply to message #209464] Mon, 11 July 2005 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: BruceBGordon.xxx.org

David, you can indeed see the type hierarchy for an entire package if that
package resides in a single source directory. I'm viewing it as we speak
with multiple types displayed in the type hierarchy. E.g Object/a/b *and*
Object/x/y where x and a are peers-unrelated except for the common parent.
To do this simply select a package, open the context menuand and select
hierarchy. My problem is that this doesn't work if the package contains
types from multiple source paths. Regards, -Bruce
David Wegener wrote:

> You question still doesn't make sense. The Hierarchy view displays a
> Type and all of its super/sub classes. It doesn't display all Types in
> a package, so you can't be talking about the hierarchy view. You are
> going to use more detail to explain what you are doing/seeing and what
> you want to see.

> Bruce Gordon wrote:
>> Communication is so hard (LOL). Let me try to be clearer. I want to see
>> all the types in (for example) project/src/dao/com/community and
>> project/test/dao/com/community in the Hierarchy view. I like viewing the
>> types hierarchically. So if there were 3 types in the first path, and 1
>> in the second, then I'd like to see all 4 in the Hierarchy view. In my
>> case both paths have the same package, but what I really want is to be
>> able to arbitrarily choose the unit to display in the Hieararchy-be it
>> Project, one or more packages, or 1 or more types. Thanks, Bruce
>>
>> Bruce Gordon wrote:
>>
>> I have a project with the source in several directories, e.g.
>> project/src/dao/com/community and project/test/dao/com/community
>> I'd like to open a Type Hierarchy on the package com.community and
>> see the classes that are in both project/src/dao/com/community and
>> project/test/dao/com/community.
>>
>> Can I do this? Is there some limitation in the Hierarchy that
>> prevents this?
>>
>> Thanks, Bruce
>>
>>
>> Your question is a little confusing. You say that you want to open a
>> package in the Type Hierarchy. However, the Type Hierarchy if for
>> displaying types not packages.
>>
>> My guess is you are talking about the Types view in the Java Browsing
>> Perspective. If this is the case, selecting the project instead of a
>> source folder in the Projects view will list all instances of packages
>> in the Packages view. Selecting the com.community package will then
>> show all classes in both source folders.
>>
Re: Type Hierarchy across source folders [message #209641 is a reply to message #209634] Mon, 11 July 2005 20:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Bruce Gordon wrote:
> David, you can indeed see the type hierarchy for an entire package if
> that package resides in a single source directory. I'm viewing it as we
> speak with multiple types displayed in the type hierarchy. E.g
> Object/a/b *and* Object/x/y where x and a are peers-unrelated except for
> the common parent. To do this simply select a package, open the context
> menuand and select hierarchy. My problem is that this doesn't work if
> the package contains types from multiple source paths. Regards, -Bruce
> David Wegener wrote:
>
>> You question still doesn't make sense. The Hierarchy view displays a
>> Type and all of its super/sub classes. It doesn't display all Types
>> in a package, so you can't be talking about the hierarchy view. You
>> are going to use more detail to explain what you are doing/seeing and
>> what you want to see.
>
>
snip

My appologies. You can in fact do this. Thanks for asking the
question. Without it I wouldn't have found this usefull feature.

I hope that you get an answer for your problem.
Re: Type Hierarchy across source folders [message #209753 is a reply to message #209557] Tue, 12 July 2005 11:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: BruceBGordon.xxx.org

Thanks Markus. This is news to me since I rarely used the PackageExplorer.
From the JavaBrowsing perspective the hierarchy option is disabled for a
package with source in 2 folders. Your technique worked. Thanks again,
-Bruce.

(BTW, Do you think this is a bug that should be reported?)

Markus Keller wrote:

> Daniel Megert wrote:

>> Bruce Gordon wrote:
>>
>>> I have a project with the source in several directories, e.g.
>>> project/src/dao/com/community and project/test/dao/com/community
>>> I'd like to open a Type Hierarchy on the package com.community and see
>>> the classes that are in both project/src/dao/com/community and
>>> project/test/dao/com/community.
>>>
>>> Can I do this? Is there some limitation in the Hierarchy that prevents
>>> this?
>>>
>>>
>> This is currently not possible. You can only feed the project, source
>> folder or package (from a given source folder) to the Hierarchy view. If
>> you want to see the combined list of types for a given package you can
>> use the Java Browsing perspective's Packages view - no hierarchy though.
>>
>> Dani
>>
>>> Thanks, Bruce
>>>
>>>

> Works for me in 3.1 with this setup:

> src
> + pack
> + A.java
> src2
> + pack
> + B.java

> Selecting either of the packages 'pack' in the Package Explorer and then
> pressing F4 yields a combined type hierarchy of all types in package
> fragments 'pack' from all source folders of the enclosing project.

> Markus
Re: Type Hierarchy across source folders [message #209760 is a reply to message #209753] Tue, 12 July 2005 15:21 Go to previous message
Eclipse UserFriend
Bruce Gordon wrote:

> Thanks Markus. This is news to me since I rarely used the
> PackageExplorer. From the JavaBrowsing perspective the hierarchy option
> is disabled for a package with source in 2 folders. Your technique
> worked. Thanks again, -Bruce.
> (BTW, Do you think this is a bug that should be reported?)

If you would like to see this fixed, please file a bug report. There's no
guarantee that it will be implemented, but it should not be too difficult.

Markus

BTW: another workaround is to select only one source folder in the Projects
view and then open the type hierarchy on the (non-combined) package from the
Packages view.
Previous Topic:Terminating application in eclipse console
Next Topic:External Tools: Variable references non-existent resource ${build_project}
Goto Forum:
  


Current Time: Mon Jun 09 06:54:21 EDT 2025

Powered by FUDForum. Page generated in 0.16511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top