cloudfoundry-attic / eclipse-integration-cloudfoundry

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

Support replacing unbound cloud application by local project #23

Closed liuhewei closed 9 years ago

liuhewei commented 10 years ago

This PR follows PR#22. In this time, a dialog box is added to local project's drag-and-drop operation, and a new item "Replace" is added to the unbound cloud apps' context menu.

issue4_processchoicewizard

If the user chooses 'Publish...', the existing application publishing process follows; Otherwise, if the user chooses 'Choose an existing ....', a replacement confirmation dialog is presented.

issue4_confirmationdialog

If the user clicks 'Cancel' button, nothing happens; Otherwise, the replacing process is executed in background: The local corresponding CloudFoundryApplicationModule is deleted, and a new Module related to the dropped project is created. Then, the java project is packed into a '.war' and will replace the cloud application through CloudFoundryClient.uploadApplication(appName, warFile) .

  • In another way, if user right-clicks a cloud application which is not bound with any local project yet, a 'Replace' item will be shown in the context menu:

issue4_rightmenu

If user clicks the 'Replace' menu item, a drop-list box for choosing one local unbound project is shown.

issue4_rightmenuselectiondialog

Then press 'OK' button a confirmation dialog is presented for ensuring this operation:

issue4_rightmenuconfirmdialog

If choosing 'OK', the background will do the same replacing thing as the drag-and-drop operation.

  • In both above scenes, the new war file is pushed to remote CF and replaces the contents of the cloud application, and the relation between the local project and the cloud application is established. So the code modification in the future can be done through the 'Update and Restart' button.

issue4_relationestablished

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.

nierajsingh commented 10 years ago

Thanks for submitting this fix. We've decided to postpone merging this PR until version 1.7.3 as this feature requires additional work from our end. There are several items we'd like changed to better align with our feature requirements. I'll follow-up with our proposed changed soon. Thanks for your patience.

liuhewei commented 10 years ago

@nierajsingh Understood. I see lots of works you guys are doing :-)

nierajsingh commented 10 years ago

Thanks for your patience regarding your PRs. We have now started working on 1.7.3 and we'll be addressing your PRs for the upcoming release.

nierajsingh commented 9 years ago

We have released a new feature in CF 1.8.1 that may address this PR. It's a different implementation, using only context menus on both Servers view and editor to take into account accessibility requirements instead of drag/drop, but it should allow for similar functionality, except generalised for more than just Java projects like Node.js.

The new feature adds two context menus on application selections in both the Servers view and the Cloud Foundry editor (Application list):

However, we did reuse some of your Project Selection code and gave HuaweiTech credit as initial contributors:

https://github.com/cloudfoundry/eclipse-integration-cloudfoundry/blob/5b85a860efffe62426dc12235a0d60e586f1fdb2/org.cloudfoundry.ide.eclipse.server.ui/src/org/cloudfoundry/ide/eclipse/server/ui/internal/actions/MapToProjectOperation.java

We will close this PR since the code base has changed substantially since this was first submitted.

Thanks for submitting the original implementation.