[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [hibachi-dev] How do you manage your Ada projects in Hibachi?
|
Luke,
First, to address your problem:
Firstly, Hibachi won't create the project in sub directory and I have to
move it to the place I want it. I've also had to hand mangle some other
stuff.
When you create a project, the first page of the wizard allows you to
specify the name of the project and the location of the project. Initially,
the "Use default location" button is checked, which causes the project to be
created in the workspace directory. If you uncheck this button, you can
specify any directory you choose.
Now a little more background:
Regardless of where you create your project in the local file system, the
project will appear at the top level in Eclipse views, such as Ada
Navigator, Navigator, etc. Eclipse resources (handles to files and folders)
are logically organized like this:
<workspace>
<project>
<files and folders>
Projects are specialized folders that contain files configuring the project,
such as what type of project this is (Ada, Java, C++, etc). A project is
only recognized by Eclipse if you created the project in your current
workspace, or if you have imported the project into your workspace. Eclipse
then makes that project the root of a resource tree. This means that if you
have nested projects, depending on how you import the projects you will
either have multiple copies of the same file (which may be edited
independently), or there will be multiple Eclipse resources which refer to
the same file.
Using your example, if you import both the "katal" project and the "tests"
project, the Ada Navigator view would look like this:
katal/ -- project1
lib/
build/
gnat/
linux/
debug/
lib/
release/
lib/
katal_common.gpr
katal_build.gpr
katal.gpr
src/
linux/
debug/
release/
tests/ -- not recognized as a project.
handles/
build/
gnat/
linux/
debug/
release/
src/
tests/ -- project 2
handles/
build/
gnat/
linux/
debug/
release/
src/
Notice that the folder "handles" is contained in both the "katal" project
and in the "tests" project.
Simply importing the "katal" project will only allow you to build the
project "katal". Even though the tests directory is included in the "katal"
project, you will not be able to build the "tests" project until you
specifically import that project as well (using
File->Import->General->Existing Projects into Workspace).
Ideally, I'd like to have 1 directory for the project and then inside
this have sub-directories for the sub-projects, possibly a bit more like
this:
You can nest projects like you describe, but as I've shown that will either
result in the same file being displayed in multiple places in the resource
tree, or in multiple independent copies of the same file, which can be
confusing and difficult to manage. Alternatively, I'd suggest having all
projects contained in a single root directory.
As an example, the Hibachi code is organized like this in the cvs source
repository:
Hibachi/
org.eclipse.hibachi.core/
org.eclipse.hibachi.ui/
...
The cvs module is named Hibachi, and each of our projects (named
org.eclipse.hibachi.*) are directly beneath that module. When we check out
the code to Eclipse, rather than checking out the Hibachi module itself, we
check out each individual project.
In your example, you could set up a source repository this way:
KatalModule/
Katal/
lib/
build/
src/
...
Katal_Tests/
handles/
build/
...
Does that make sense? Did I create more questions than I answered?
Adam
----- Original Message -----
From: "Luke A. Guest" <laguest@xxxxxxxxxxx>
To: "Hibachi-Dev ML" <hibachi-dev@xxxxxxxxxxx>
Sent: Saturday, May 03, 2008 12:08 PM
Subject: [hibachi-dev] How do you manage your Ada projects in Hibachi?
Hi,
I've been trying to use Hibachi to organise a simple project. This is a
library, a collection of unit tests and some example programs. I've set
up a custom project for the lib and another for a sample unit test
program.
Firstly, Hibachi won't create the project in sub directory and I have to
move it to the place I want it. I've also had to hand mangle some other
stuff.
My current directory structure is like this:
katal/
lib/ -- First Hibachi project
build/
gnat/
linux/
debug/
lib/ -- Lib installed to here when compiled
release/
lib/ -- Lib installed to here when compiled
katal_common.gpr
katal_build.gpr
katal.gpr
src/
linux/ -- Platform specific source
debug/ -- Build specific source
release/ -- Build specific source
tests/
handles/ -- Second Hibachi project
build/
gnat/
linux/
debug/
release/
src/
I'm sure there is a better way but I'm interested in how others handle
this sort of project?
Ideally, I'd like to have 1 directory for the project and then inside
this have sub-directories for the sub-projects, possibly a bit more like
this:
katal/
build/
...
src/ -- First Hibachi project (this is the library source)
...
tests/
handles/ -- Second Hibachi project
examples/
...
Thanks,
Luke.
_______________________________________________
hibachi-dev mailing list
hibachi-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/hibachi-dev