Filesystems and classpaths

One problem I am having with mounting directories in the filesystem view in

order to

build up the classpath is not being able to mount a directory and say the

mounted

directory is the toplevel package. Here is an example of what I am talking

about.

I have a ClearCase repository rooted under

/usr/local/src/scott_home_rips/packages/ on

a Windows 2000 machine that contains the following files:

bash-2.02$ ls /usr/local/src/scott_home_rips/packages/

JACE/build.defs make_stable-pkgs.sh*

Makefilebuild.rules make_toplevel-jars.sh*

Makefile.defsbuild.xmlstable.bak

Makefile.rules com/stable.packages

Makefile.templatedepends/t.tar

ant.dtddocs/tools/

build/make_compile-all.sh*tstbuild.BAK

build.bakmake_java_docs.sh*

Now only the com and JACE directories correspond to the toplevel directories

of

classpaths that I want added to Forte's classpath. I have to mount the

/usr/local/src/scott_home_rips/packages/

directory to do this and along with it comes all of these other files and

directories. I would rather

be able to explictly define the classpath rather than implicitly through

subdirectories of mount points

in the filesystem browser. I would not mind the current approach if I could

at least hide files/directories

under the mount points but I can't seem to do that. Are the any alternatives

I am missing?

[1507 byte] By [Stark,ScottM] at [2007-11-25 16:50:17]
# 1

"Scott M Stark" <starksm@attglobal.net> wrote in message

news:ee6dc64.-1@WebX.sykNm9Id...

> One problem I am having with mounting directories in the filesystem view

in

> order to

> build up the classpath is not being able to mount a directory and say the

> mounted

> directory is the toplevel package. Here is an example of what I am talking

> about.

>

> I have a ClearCase repository rooted under

> /usr/local/src/scott_home_rips/packages/ on

> a Windows 2000 machine that contains the following files:

>

> bash-2.02$ ls /usr/local/src/scott_home_rips/packages/

> JACE/build.defs make_stable-pkgs.sh*

> Makefilebuild.rules make_toplevel-jars.sh*

> Makefile.defsbuild.xmlstable.bak

> Makefile.rules com/stable.packages

> Makefile.templatedepends/t.tar

> ant.dtddocs/tools/

> build/make_compile-all.sh*tstbuild.BAK

> build.bakmake_java_docs.sh*

>

> Now only the com and JACE directories correspond to the toplevel

directories

> of

> classpaths that I want added to Forte's classpath. I have to mount the

> /usr/local/src/scott_home_rips/packages/

> directory to do this and along with it comes all of these other files and

> directories. I would rather

> be able to explictly define the classpath rather than implicitly through

> subdirectories of mount points

> in the filesystem browser. I would not mind the current approach if I

could

> at least hide files/directories

> under the mount points but I can't seem to do that. Are the any

alternatives

> I am missing?

>

Scott,

When you say that com/ and JACE/ are "toplevel directories", do you mean

that they are each equivalent to an anonymous Java package (that is, a

package whose classes contain no package statement)? Or do their classes

contain the package statements "package com ;" and "package JACE ;",

respectively?

Regards,

Bob

Newby,Bob at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 2

You can hide the whole ".../packages" tree by going into Project Settings, selecting Filesystems Settings, clicking on the ".../packages" entry, and setting Hidden to true. Your class files will still be visible in the "Project YourProjectName" tab of the Explorer, if you've added each of them to your project. Any files missing from the Project tab would have to be added from within the Filesystems tab (prior to making the ".../packages" tree hidden), or with the File menu's "Open File ..." selection.

Esh,Andrew at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 3

"Bob Newby" <Bob_Newby@mediaone.net> wrote in message

news:ee6dc64.0@WebX.sykNm9Id...

>

> When you say that com/ and JACE/ are "toplevel directories", do you mean

> that they are each equivalent to an anonymous Java package (that is, a

> package whose classes contain no package statement)? Or do their classes

> contain the package statements "package com ;" and "package JACE ;",

> respectively?

>

I mean that they are the prefix of packages that show up in import

statements:

import com.bear.racs.util.RCCommandLine;

import JACE.Timers.ProfileTimer;

Stark,ScottM at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 4

"Scott M Stark" <starksm@attglobal.net> wrote in message

news:ee6dc64.2@WebX.sykNm9Id...

>

> "Bob Newby" <Bob_Newby@mediaone.net> wrote in message

> news:ee6dc64.0@WebX.sykNm9Id...

> >

> > When you say that com/ and JACE/ are "toplevel directories", do you mean

> > that they are each equivalent to an anonymous Java package (that is, a

> > package whose classes contain no package statement)? Or do their

classes

> > contain the package statements "package com ;" and "package JACE ;",

> > respectively?

> >

> I mean that they are the prefix of packages that show up in import

> statements:

>

> import com.bear.racs.util.RCCommandLine;

> import JACE.Timers.ProfileTimer;

>

Ok. My response is based on the assumption that you only need the parent of

these (package) directories to appear in the project's class path -- but

that you don't need working read/write access to these packages in your

project... With that assumption in mind, select the Forte menu Project |

Settings... to open the Project Settings panel. Expand Filesystem Settings

and highlight /usr/local/src/scott_home_rips/packages/. Now you can modify

its Hidden property to be True. It's still in your project's class path,

but it is now not visible in the project's Explorer panel. I hope this

helps.

Newby,Bob at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 5

Did my suggestion help? Here's another one, just in case:

Mounting a directory in the Filesystem tab has two purposes: To make the files accessible as you devleop the code, and to make them appear on your classpath so the compile environment finds them.

One thing to keep in mind is that you are not limited to one mount per file path. You can mount as many directories up and down the tree as you want.

What this means is that you should mount all the directories and jar files that contain the root directory of the package reference to the packages you want to include. You can make those hidden, as I described in my previous note. Then, go back and mount your working directory, and leave it visible. The hidden and unhidden Filesystem entries are available to the compiler and the "Open Source Code" function, while you only have to view the unhidden ones.

For example, say a package is imported as "import com.foo.bar.Widgets.Flubber.*", and the "com" directory is stored in the "Projects" directory. You must mount the "Projects" directory. You can hide it if you want to. Then mount the "Flubber" directory, and you should see all the class files for the Flubber package. You can work in that directory, and anything below the "Projects" directory, if imported, will be satisfied at compile time.

Esh,AndrewC. at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 6

> Ok. My response is based on the assumption that you only need the parent

of

> these (package) directories to appear in the project's class path -- but

> that you don't need working read/write access to these packages in your

> project... With that assumption in mind, select the Forte menu Project |

> Settings... to open the Project Settings panel. Expand Filesystem

Settings

> and highlight /usr/local/src/scott_home_rips/packages/. Now you can

modify

> its Hidden property to be True. It's still in your project's class path,

> but it is now not visible in the project's Explorer panel. I hope this

> helps.

>

Actually I do need the com directory, but I found that if I first add it to

the

Project tab and then hide the /usr/.../packages directory it I am able to

read/write files in the package heirarchy. This is good enough for me,

thanks.

Stark,ScottM at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 7

Yes, this does give me the views I want.

Thanks.

<Andrew C. Esh> wrote in message news:ee6dc64.4@WebX.sykNm9Id...

> Did my suggestion help? Here's another one, just in case:

>

> Mounting a directory in the Filesystem tab has two purposes: To make the

files accessible as you devleop the code, and to make them appear on your

classpath so the compile environment finds them.

>

> One thing to keep in mind is that you are not limited to one mount per

file path. You can mount as many directories up and down the tree as you

want.

>

> What this means is that you should mount all the directories and jar files

that contain the root directory of the package reference to the packages you

want to include. You can make those hidden, as I described in my previous

note. Then, go back and mount your working directory, and leave it visible.

The hidden and unhidden Filesystem entries are available to the compiler and

the "Open Source Code" function, while you only have to view the unhidden

ones.

>

> For example, say a package is imported as "import

com.foo.bar.Widgets.Flubber.*", and the "com" directory is stored in the

"Projects" directory. You must mount the "Projects" directory. You can hide

it if you want to. Then mount the "Flubber" directory, and you should see

all the class files for the Flubber package. You can work in that directory,

and anything below the "Projects" directory, if imported, will be satisfied

at compile time.

Stark,ScottM at 2007-7-2 23:47:57 > top of Java-index,Archived Forums,Sun ONE Studio 4...