cloudfoundry-attic / eclipse-integration-cloudfoundry

Cloud Foundry Integration for Eclipse
Apache License 2.0
41 stars 47 forks source link

Let user choose to delete bound cloud application or not when deleting l... #27

Closed liuhewei closed 9 years ago

liuhewei commented 10 years ago

...ocal bound project

Currently:

Effect of the Modifications:

cfdreddbot commented 10 years ago

Hey liuhewei!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you've already signed the CLA.

elsony commented 10 years ago

Minor suggestions on the new dialog:

  1. The message can be changed to something like: Do you want to remove the application from the server XXX?
  2. Change that dialog to a Yes No dialog instead of ok and cancel.
liuhewei commented 10 years ago

@elsony Thans for your suggestion. I agree that a Question dialog is better in this scenario. We'll modified the code. update: the new message dialog is just like this: pr27_qdialog

nierajsingh commented 9 years ago

We introduced an "Unmap Project" feature in 1.8.1. It's a reverse case, but it is still a workaround to handle the case where a user wants to delete a project but not the deployed application.

Steps for this are:

See comments here:

https://github.com/cloudfoundry/eclipse-integration-cloudfoundry/pull/23

This workaround does not replace the issue raised by this PR, but we also want to make sure we have a clean way to distinguish deleting a module when a Project is deleted vs other deleting cases aside from checking the module type to not be CloudFoundryApplicationModule and there is a bound project for that module.

We already have mechanism to delete modules without deleting the actual deployed application as used in the "Unmap Project" feature via a replace method in the CloudFoundryServer. See:

https://github.com/cloudfoundry/eclipse-integration-cloudfoundry/blob/5b85a860efffe62426dc12235a0d60e586f1fdb2/org.cloudfoundry.ide.eclipse.server.core/src/org/cloudfoundry/ide/eclipse/server/core/internal/CloudFoundryServer.java#L583

So it would now just be a question of cleanly determining that CloudFoundryServer.modifyModules(...) is being invoked on Project deletion only.

I've raised a separate issue to track this as the code base changed substantially to be able to merge this, and we already have another way of deleting modules without deleting the application that replaces the implementation in this PR

https://github.com/cloudfoundry/eclipse-integration-cloudfoundry/issues/37

Therefore I will close this PR, but still keep the issue open.