Add or Remove Metadata Components

To add existing components in your home organization to a project:
  1. In the Package Explorer, right-click the project and choose Properties.
  2. In the Project Properties dialog, expand the node for Force.com and click Project Contents.
  3. Click Add/Remove Metadata Components to open the Choose Metadata Components dialog.

Because a Force.com project is connected to its home organization, simply deleting a metadata file from a project does not always permanently remove it. Depending on whether your intention is to delete a component from the home organization as well as your project, or merely to exclude it from your project, the steps you take are different.

If you remove a component from a project without deleting it from the server, you can add it to your project again. The component will also be available in other projects that connect to the same server. If you delete the component on the server, the component will not be accessible from other projects. The only way to retrieve it again is by using the web interface and viewing your Recycle Bin.

Note

To remove a component from the project only:
  1. In the Package Explorer, right-click your project and choose Properties.
  2. In the Project Properties dialog, expand the Force.com node and click Project Contents.
  3. On the Project Contents page, click Add/Remove Metadata Components.
  4. Use the Choose Metadata Components dialog to remove the component.
  5. In the Package Explorer, expand the nodes to find the component you want to remove. The project will no longer download the component from your home organization during synchronization, but you still need to delete your local copy of the file.
  6. In the Package Explorer, right-click the component and choose Delete.
  7. When you’re prompted whether you want to delete the file, click Yes to remove the local copy.
  8. In the Remote Delete Confirmation dialog, you’re prompted whether to also delete the component on the server. Click No to leave the server-side component unaffected.
To remove a component from the project and delete it from the server:
  1. To delete files both locally and on the server, make sure that you’re working online. Right-click your project in the Package Explorer, and then select Force.com | Work Online.
  2. In the Package Explorer, expand the nodes to find the component you want to delete.
  3. Right-click the component and choose Delete.
  4. When you’re prompted whether you want to delete the file, click OK to remove the local copy.
  5. Finally, in the Remote Delete Confirmation dialog, you’re prompted whether to also delete the component on the server. Click Yes to delete the component entirely.