In the IDE, a Force.com Project can be created against a package. Just go to File > New Force.com Project, and on page 2 of the wizard select the option to connect to a specific package and choose which package from the picklist control. With a project created against a package like this, any new components you create in the project from the IDE will be added to the package, and any components you add to the package via the web UI will appear in your IDE project the next time you Refresh from Server.
Note that in the Force.com platform, components that have been added to a locally created package are not "in" that package in a strong way. For instance, you can add the same component to multiple packages. And in the IDE, you can download a component outside of any particular package, regardless what package it's in.
The behaviors change for installed packages. Components installed into your org as part of a managed package are not available in the Force.com IDE at all. Components installed as part of an unmanaged package are fully editable and can be downloaded into the IDE, and can even be added to your locally created packages, but they cannot be removed from the package which installed them. And if you uninstall that package, those components will be removed from your organization, even if you've changed them.
Hopefully this answers your question. If not, please say more about what specifically you are trying to do.
In the IDE, a Force.com Project can be created against a package. Just go to File > New Force.com Project, and on page 2 of the wizard select the option to connect to a specific package and choose which package from the picklist control. With a project created against a package like this, any new components you create in the project from the IDE will be added to the package, and any components you add to the package via the web UI will appear in your IDE project the next time you Refresh from Server.
Note that in the Force.com platform, components that have been added to a locally created package are not "in" that package in a strong way. For instance, you can add the same component to multiple packages. And in the IDE, you can download a component outside of any particular package, regardless what package it's in.
The behaviors change for installed packages. Components installed into your org as part of a managed package are not available in the Force.com IDE at all. Components installed as part of an unmanaged package are fully editable and can be downloaded into the IDE, and can even be added to your locally created packages, but they cannot be removed from the package which installed them. And if you uninstall that package, those components will be removed from your organization, even if you've changed them.
Hopefully this answers your question. If not, please say more about what specifically you are trying to do.
May be I was not clear first time. In other words how can I add a package to the existing eclipse project? I know when I create a new project in eclipse it always ask me to select the package.
I think packages, and the IDE, work a little differently in Force.com than you might be thinking. Tell me more about what you're trying to do, at a high level.
Also, specifically, what do you mean by "add a package to the existing eclipse project"? In what way(s) would you expect your project change?
In the IDE, a Force.com Project can be created against a package. Just go to File > New Force.com Project, and on page 2 of the wizard select the option to connect to a specific package and choose which package from the picklist control. With a project created against a package like this, any new components you create in the project from the IDE will be added to the package, and any components you add to the package via the web UI will appear in your IDE project the next time you Refresh from Server.
Note that in the Force.com platform, components that have been added to a locally created package are not "in" that package in a strong way. For instance, you can add the same component to multiple packages. And in the IDE, you can download a component outside of any particular package, regardless what package it's in.
The behaviors change for installed packages. Components installed into your org as part of a managed package are not available in the Force.com IDE at all. Components installed as part of an unmanaged package are fully editable and can be downloaded into the IDE, and can even be added to your locally created packages, but they cannot be removed from the package which installed them. And if you uninstall that package, those components will be removed from your organization, even if you've changed them.
Hopefully this answers your question. If not, please say more about what specifically you are trying to do.
All Answers
In the IDE, a Force.com Project can be created against a package. Just go to File > New Force.com Project, and on page 2 of the wizard select the option to connect to a specific package and choose which package from the picklist control. With a project created against a package like this, any new components you create in the project from the IDE will be added to the package, and any components you add to the package via the web UI will appear in your IDE project the next time you Refresh from Server.
Note that in the Force.com platform, components that have been added to a locally created package are not "in" that package in a strong way. For instance, you can add the same component to multiple packages. And in the IDE, you can download a component outside of any particular package, regardless what package it's in.
The behaviors change for installed packages. Components installed into your org as part of a managed package are not available in the Force.com IDE at all. Components installed as part of an unmanaged package are fully editable and can be downloaded into the IDE, and can even be added to your locally created packages, but they cannot be removed from the package which installed them. And if you uninstall that package, those components will be removed from your organization, even if you've changed them.
Hopefully this answers your question. If not, please say more about what specifically you are trying to do.
Jon,
What if I have already created the project without the package and would like to add the package after wards?
Thanks
Sorry Jon,
May be I was not clear first time. In other words how can I add a package to the existing eclipse project? I know when I create a new project in eclipse it always ask me to select the package.
Thanks
I think packages, and the IDE, work a little differently in Force.com than you might be thinking. Tell me more about what you're trying to do, at a high level.
Also, specifically, what do you mean by "add a package to the existing eclipse project"? In what way(s) would you expect your project change?
Thanks,
Jon