Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AWS Toolkit for Eclipse 2.0

This release of the AWS Toolkit for Eclipse adds several new features such as support for multiple AWS accounts, remote debugging, and the ability to view and edit AWS resources from inside the Eclipse environment.

For more details see the full release notes:
http://aws.amazon.com/releasenotes/Eclipse
  • Loading branch information...
commit 759bc5189dff860ea9cc0247355ee944ff023da8 1 parent 36cf92c
amazonwebservices authored
Showing with 16,070 additions and 6,327 deletions.
  1. +1 −1  com.amazonaws.eclipse.core.feature/feature.xml
  2. +18 −13 com.amazonaws.eclipse.core/.classpath
  3. +26 −7 com.amazonaws.eclipse.core/META-INF/MANIFEST.MF
  4. +10 −4 com.amazonaws.eclipse.core/build.properties
  5. +90 −0 com.amazonaws.eclipse.core/etc/regions.xml
  6. BIN  com.amazonaws.eclipse.core/icons/add.png
  7. BIN  com.amazonaws.eclipse.core/icons/bucket.png
  8. BIN  com.amazonaws.eclipse.core/icons/database.png
  9. BIN  com.amazonaws.eclipse.core/icons/document_into.png
  10. BIN  com.amazonaws.eclipse.core/icons/flags/eu.png
  11. BIN  com.amazonaws.eclipse.core/icons/flags/japan.png
  12. BIN  com.amazonaws.eclipse.core/icons/flags/singapore.png
  13. BIN  com.amazonaws.eclipse.core/icons/flags/us.png
  14. BIN  com.amazonaws.eclipse.core/icons/index.png
  15. BIN  com.amazonaws.eclipse.core/icons/refresh.png
  16. BIN  com.amazonaws.eclipse.core/icons/remove.gif
  17. BIN  com.amazonaws.eclipse.core/icons/sns_topic.png
  18. BIN  com.amazonaws.eclipse.core/icons/start.png
  19. BIN  com.amazonaws.eclipse.core/icons/table.gif
  20. BIN  com.amazonaws.eclipse.core/icons/wizards/configure_database.png
  21. BIN  com.amazonaws.eclipse.core/lib/aws-java-sdk-1.1.1.jar
  22. BIN  com.amazonaws.eclipse.core/lib/{aws-java-sdk-1.1.2.jar → aws-java-sdk-1.2.1.jar}
  23. BIN  com.amazonaws.eclipse.core/lib/commons-httpclient-3.0.1.jar
  24. 0  ...naws.eclipse.ec2/lib/commons-logging-1.1.1 → com.amazonaws.eclipse.core/lib}/commons-logging-1.1.1.jar
  25. BIN  com.amazonaws.eclipse.core/lib/commons-logging-1.1.jar
  26. BIN  com.amazonaws.eclipse.core/lib/httpclient-4.1.1.jar
  27. BIN  com.amazonaws.eclipse.core/lib/httpcore-4.1.jar
  28. BIN  ...ent/WEB-INF/lib/jackson-core-asl-1.4.5.jar → com.amazonaws.eclipse.core/lib/jackson-core-asl-1.4.3.jar
  29. 0  {com.amazonaws.eclipse.ec2/lib/stax-ri-1.2.0 → com.amazonaws.eclipse.core/lib}/stax-1.2.0.jar
  30. 0  ...cbeanstalk/templates/TravelLog/WebContent/WEB-INF → com.amazonaws.eclipse.core}/lib/stax-api-1.0.1.jar
  31. +285 −9 com.amazonaws.eclipse.core/plugin.xml
  32. +143 −153 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AWSClientFactory.java
  33. +4 −4 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AccountInfo.java
  34. +25 −5 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AccountInfoMonitor.java
  35. +168 −36 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AwsToolkitCore.java
  36. +1 −1  com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AwsUrls.java
  37. +71 −58 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/PluginPreferenceStoreAccountInfo.java
  38. +29 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/preferences/PreferenceConstants.java
  39. +3 −0  com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/preferences/PreferenceInitializer.java
  40. +44 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/DefaultRegionChangeRefreshListener.java
  41. +76 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/Region.java
  42. +105 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/RegionMetadataParser.java
  43. +117 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/RegionUtils.java
  44. +33 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/ServiceAbbreviations.java
  45. +247 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/AccountSelectionComposite.java
  46. +50 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/ManagementPerspectiveFactory.java
  47. +34 −38 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/Startup.java
  48. +30 −25 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/overview/FormsOverviewComposite.java
  49. +783 −214 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/preferences/AwsAccountPreferencePage.java
  50. +5 −2 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/preferences/AwsToolkitPreferencePage.java
  51. +3 −7 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/preferences/ObfuscatingStringFieldEditor.java
  52. +126 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/ui/preferences/RegionsPreferencePage.java
  53. +20 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/AWSResourcesRootElement.java
  54. +49 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/AbstractAwsResourceEditorInput.java
  55. +269 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/AbstractContentProvider.java
  56. +42 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/ContentProviderRegistry.java
  57. +97 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/DragAdapterAssistant.java
  58. +86 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/ExplorerNode.java
  59. +57 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/ExplorerNodeLabelProvider.java
  60. +32 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/Loading.java
  61. +35 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/RefreshRunnable.java
  62. +91 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/ResourcesView.java
  63. +26 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/S3FileSystemDropAction.java
  64. +260 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/actions/ConfigurationActionProvider.java
  65. +208 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/BucketEditor.java
  66. +53 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/BucketEditorInput.java
  67. +59 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/BucketLinkHelper.java
  68. +61 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/OpenBucketEditorAction.java
  69. +100 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/S3ContentProvider.java
  70. +47 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/S3LabelProvider.java
  71. +607 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/S3ObjectSummaryTable.java
  72. +33 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/S3RootElement.java
  73. +56 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/acls/EditBucketPermissionsDialog.java
  74. +59 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/acls/EditObjectPermissionsDialog.java
  75. +367 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/acls/EditPermissionsDialog.java
  76. +47 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/acls/GranteeComparator.java
  77. +35 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/CreateBucketAction.java
  78. +55 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/CreateBucketWizard.java
  79. +251 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/CreateBucketWizardPage.java
  80. +92 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/DeleteBucketAction.java
  81. +107 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/DeleteObjectAction.java
  82. +81 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/EditObjectPermissionsAction.java
  83. +52 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/actions/S3ActionProvider.java
  84. +208 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/dnd/DownloadDropAssistant.java
  85. +66 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/dnd/KeySelectionDialog.java
  86. +192 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/dnd/S3ObjectSummaryDropAction.java
  87. +123 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/dnd/UploadDropAssistant.java
  88. +99 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/dnd/UploadFileJob.java
  89. +69 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/s3/util/ObjectUtils.java
  90. +160 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/NewSubscriptionAction.java
  91. +60 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/OpenTopicEditorAction.java
  92. +135 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/PublishMessageAction.java
  93. +186 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/SNSActionProvider.java
  94. +104 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/SNSContentProvider.java
  95. +36 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/SNSLabelProvider.java
  96. +409 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/TopicEditor.java
  97. +47 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sns/TopicEditorInput.java
  98. +94 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/AddMessageAction.java
  99. +59 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/OpenQueueEditorAction.java
  100. +33 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/QueueAttributes.java
  101. +408 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/QueueEditor.java
  102. +49 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/QueueEditorInput.java
  103. +184 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/SQSActionProvider.java
  104. +91 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/SQSContentProvider.java
  105. +36 −0 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/SQSLabelProvider.java
  106. +1 −0  com.amazonaws.eclipse.datatools.enablement.simpledb.dbdefinition/META-INF/MANIFEST.MF
  107. +0 −5 com.amazonaws.eclipse.datatools.enablement.simpledb.driver/.classpath
  108. BIN  com.amazonaws.eclipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/aws-java-sdk-1.0.003.jar
  109. +0 −177 ...aws.eclipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-codec-1.3/LICENSE.txt
  110. BIN  ...e.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-codec-1.3/commons-codec-1.3.jar
  111. +0 −176 ...ipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-httpclient-3.0.1/LICENSE.txt
  112. BIN  ...ablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-httpclient-3.0.1/commons-httpclient-3.0.1.jar
  113. +0 −202 ...eclipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-logging-1.1.1/LICENSE.txt
  114. +0 −6 ....eclipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-logging-1.1.1/NOTICE.txt
  115. BIN  ...ols.enablement.simpledb.driver/aws-java-sdk/lib/third-party/commons-logging-1.1.1/commons-logging-1.1.1.jar
  116. +0 −15 ...zonaws.eclipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/saxonhe-9.0.2j/LICENSE.txt
  117. BIN  ...onaws.eclipse.datatools.enablement.simpledb.driver/aws-java-sdk/lib/third-party/saxonhe-9.0.2j/saxon9he.jar
  118. +1 −8 com.amazonaws.eclipse.datatools.enablement.simpledb.driver/build.properties
  119. +0 −28 com.amazonaws.eclipse.datatools.enablement.simpledb.driver/plugin.xml
  120. +2 −1  com.amazonaws.eclipse.datatools.enablement.simpledb.editor.ui/META-INF/MANIFEST.MF
  121. +1 −1  com.amazonaws.eclipse.datatools.enablement.simpledb.feature/feature.xml
  122. +7 −2 com.amazonaws.eclipse.datatools.enablement.simpledb.ui/META-INF/MANIFEST.MF
  123. BIN  com.amazonaws.eclipse.datatools.enablement.simpledb.ui/icons/table.gif
  124. +156 −114 com.amazonaws.eclipse.datatools.enablement.simpledb.ui/plugin.xml
  125. +0 −9 ...ls.enablement.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/internal/ui/Messages.java
  126. +40 −233 ...onaws/eclipse/datatools/enablement/simpledb/internal/ui/connection/drivers/SimpleDBDriverUIContributor.java
  127. +8 −16 ...blement.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/internal/ui/messages.properties
  128. +38 −0 ...ledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/AbstractTableContentProvider.java
  129. +48 −0 ...mpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/AbstractTableLabelProvider.java
  130. +71 −0 ...lement.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/DomainEditorInput.java
  131. +198 −0 ...t.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/MultiValueEditorDialog.java
  132. +52 −0 ...nt.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/OpenQueryEditorAction.java
  133. +729 −0 ...s.enablement.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/QueryEditor.java
  134. +54 −0 ....enablement.simpledb.ui/src/com/amazonaws/eclipse/datatools/enablement/simpledb/ui/editor/SimpleDBItem.java
  135. +98 −0 ...datatools.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/OpenDataTableEditorAction.java
  136. +96 −0 ...se.datatools.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/OpenSQLScrapbookAction.java
  137. +80 −0 ...ls.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/SimpleDBConnectionProfileManager.java
  138. +77 −0 ...e.datatools.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/SimpleDBContentProvider.java
  139. +35 −0 ...pse.datatools.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/SimpleDBExplorerNodes.java
  140. +41 −0 ...pse.datatools.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/SimpleDBLabelProvider.java
  141. +189 −0 ...ols.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/SimpleDBNavigatorActionProvider.java
  142. +29 −0 ...lipse.datatools.enablement.simpledb.ui/src/com/amazonaws/eclipse/explorer/simpledb/SimpleDBRootElement.java
  143. +2 −1  com.amazonaws.eclipse.datatools.enablement.simpledb/META-INF/MANIFEST.MF
  144. +105 −102 com.amazonaws.eclipse.datatools.enablement.simpledb/plugin.xml
  145. +7 −3 ...src/com/amazonaws/eclipse/datatools/enablement/simpledb/connection/ISimpleDBConnectionProfileConstants.java
  146. +7 −0 ...nt.simpledb/src/com/amazonaws/eclipse/datatools/enablement/simpledb/connection/SimpleDBConnectionUtils.java
  147. +135 −126 ...impledb/src/com/amazonaws/eclipse/datatools/enablement/simpledb/internal/connection/SimpleDBConnection.java
  148. +32 −22 .../amazonaws/eclipse/datatools/enablement/simpledb/internal/connection/SimpleDBPropertiesPersistenceHook.java
  149. +94 −83 ...mpledb/src/com/amazonaws/eclipse/datatools/enablement/simpledb/internal/driver/ListAttributesStatement.java
  150. +1 −1  com.amazonaws.eclipse.ec2.feature/feature.xml
  151. +10 −15 com.amazonaws.eclipse.ec2/.classpath
  152. +4 −12 com.amazonaws.eclipse.ec2/META-INF/MANIFEST.MF
  153. BIN  com.amazonaws.eclipse.ec2/bin/PemToPPKConverter.exe
  154. +2 −1  com.amazonaws.eclipse.ec2/build.properties
  155. BIN  com.amazonaws.eclipse.ec2/icons/refresh.png
  156. BIN  com.amazonaws.eclipse.ec2/lib/aws-java-sdk-1.0.11.jar
  157. +0 −177 com.amazonaws.eclipse.ec2/lib/commons-codec-1.3/LICENSE.txt
  158. BIN  com.amazonaws.eclipse.ec2/lib/commons-codec-1.3/commons-codec-1.3.jar
  159. +0 −176 com.amazonaws.eclipse.ec2/lib/commons-httpclient-3.0.1/LICENSE.txt
  160. BIN  com.amazonaws.eclipse.ec2/lib/commons-httpclient-3.0.1/commons-httpclient-3.0.1.jar
  161. +0 −202 com.amazonaws.eclipse.ec2/lib/commons-logging-1.1.1/LICENSE.txt
  162. +0 −6 com.amazonaws.eclipse.ec2/lib/commons-logging-1.1.1/NOTICE.txt
  163. 0  com.amazonaws.eclipse.ec2/lib/jsch-0.1.40/LICENSE
  164. 0  com.amazonaws.eclipse.ec2/lib/jsch-0.1.40/jsch-0.1.40.jar
  165. BIN  com.amazonaws.eclipse.ec2/lib/stax-api-1.0.1/stax-api-1.0.1.jar
  166. +0 −201 com.amazonaws.eclipse.ec2/lib/stax-ri-1.2.0/LICENSE.txt
  167. +43 −27 com.amazonaws.eclipse.ec2/plugin.xml
  168. +6 −17 com.amazonaws.eclipse.ec2/src/com/amazonaws/ec2/cluster/Cluster.java
  169. +0 −89 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/CheckIpUtils.java
  170. +0 −192 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/Ec2ClientFactory.java
  171. +265 −262 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/Ec2InstanceLauncher.java
  172. +138 −107 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/Ec2Plugin.java
  173. +60 −45 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/PlatformUtils.java
  174. +2 −22 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/RemoteCommandUtils.java
  175. +232 −201 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/keypairs/KeyPairManager.java
  176. +0 −49 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/preferences/Ec2PreferenceChangeRefreshListener.java
  177. +2 −6 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/preferences/ExternalToolsPreferencePage.java
  178. +0 −9 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/preferences/PreferenceConstants.java
  179. +0 −15 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/preferences/PreferenceInitializer.java
  180. +0 −195 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/preferences/RegionsPreferencePage.java
  181. +0 −2  com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/Ec2OverviewSection.java
  182. +0 −93 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/PuTTYgenTranslationDialog.java
  183. +43 −15 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/SelectionTable.java
  184. +1 −1  com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/SetupAwsAccountAction.java
  185. +5 −3 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/StatusBar.java
  186. +2 −2 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/amis/FilteredAmiSelectionTable.java
  187. +299 −302 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/ebs/CreateNewVolumeDialog.java
  188. +2 −2 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/ebs/ElasticBlockStorageView.java
  189. +5 −2 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/keypair/CreateKeyPairDialog.java
  190. +16 −1 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/keypair/KeyPairComposite.java
  191. +14 −15 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/keypair/KeyPairSelectionTable.java
  192. +6 −3 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/launchwizard/LaunchWizardPage.java
  193. +2 −2 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/securitygroups/SecurityGroupView.java
  194. +58 −55 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/AttachNewVolumeThread.java
  195. +89 −86 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/AttachVolumeAction.java
  196. +317 −322 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/BundleJob.java
  197. +2 −1  com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/CreateAmiAction.java
  198. +81 −77 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/DetachVolumeAction.java
  199. +519 −506 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/InstanceSelectionTable.java
  200. +2 −2 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/InstanceView.java
  201. +17 −20 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/OpenShellAction.java
  202. +74 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/OpenShellDialog.java
  203. +38 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/OpenShellDialogAction.java
  204. +52 −49 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/PopulateEbsMenuThread.java
  205. +38 −34 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/RebootInstancesThread.java
  206. +13 −10 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/StartInstancesAction.java
  207. +12 −9 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/StopInstancesAction.java
  208. +38 −35 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/TerminateInstancesThread.java
  209. +2 −1  com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/ec2/ui/views/instances/ViewContentAndLabelProvider.java
  210. +49 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/explorer/ec2/EC2ContentProvider.java
  211. +51 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/explorer/ec2/EC2ExplorerNodes.java
  212. +39 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/explorer/ec2/EC2LabelProvider.java
  213. +24 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/explorer/ec2/EC2RootElement.java
  214. +22 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/explorer/ec2/ExplorerSorter.java
  215. +43 −0 com.amazonaws.eclipse.ec2/src/com/amazonaws/eclipse/explorer/ec2/OpenViewAction.java
  216. +0 −43 com.amazonaws.eclipse.ec2/test/com/amazonaws/eclipse/ec2/CheckIpUtilsIntegrationTest.java
  217. +2 −2 com.amazonaws.eclipse.elasticbeanstalk.feature/feature.xml
  218. +7 −12 com.amazonaws.eclipse.elasticbeanstalk/.classpath
  219. +4 −7 com.amazonaws.eclipse.elasticbeanstalk/META-INF/MANIFEST.MF
  220. +1 −2  com.amazonaws.eclipse.elasticbeanstalk/build.properties
  221. BIN  com.amazonaws.eclipse.elasticbeanstalk/icons/application.png
  222. BIN  com.amazonaws.eclipse.elasticbeanstalk/icons/application_new.png
  223. BIN  com.amazonaws.eclipse.elasticbeanstalk/icons/environment.png
  224. BIN  com.amazonaws.eclipse.elasticbeanstalk/lib/aws-java-sdk-1.1.2.jar
  225. BIN  com.amazonaws.eclipse.elasticbeanstalk/lib/commons-codec-1.3.jar
  226. BIN  com.amazonaws.eclipse.elasticbeanstalk/lib/commons-httpclient-3.0.1.jar
  227. BIN  com.amazonaws.eclipse.elasticbeanstalk/lib/commons-logging-1.1.jar
  228. BIN  com.amazonaws.eclipse.elasticbeanstalk/lib/log4j-1.2.15.jar
  229. +94 −18 com.amazonaws.eclipse.elasticbeanstalk/plugin.xml
  230. +205 −0 ...zonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/DeploymentInformationDialog.java
  231. +138 −0 ...aws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/ElasticBeanstalkHttpLaunchable.java
  232. +8 −10 ...lasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/ElasticBeanstalkLaunchConfigurationDelegate.java
  233. +25 −91 ....eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/ElasticBeanstalkLaunchableAdapter.java
  234. +1 −1  ...ws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/ElasticBeanstalkOverviewSection.java
  235. +149 −204 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/ElasticBeanstalkPlugin.java
  236. +5 −1 ...ws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/ElasticBeanstalkPublishingUtils.java
  237. +238 −21 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/Environment.java
  238. +176 −45 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/EnvironmentBehavior.java
  239. +279 −0 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/LegacyConversionUtils.java
  240. +0 −94 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/PublishDialog.java
  241. +44 −0 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/SolutionStacks.java
  242. +123 −0 ...se.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/explorer/ElasticBeanstalkActionProvider.java
  243. +114 −0 ...e.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/explorer/ElasticBeanstalkContentProvider.java
  244. +61 −0 ...pse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/explorer/ElasticBeanstalkLabelProvider.java
  245. +13 −0 ...lipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/explorer/ElasticBeanstalkRootElement.java
  246. +60 −0 ...lipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/explorer/OpenEnvironmentEditorAction.java
  247. +2 −1  ...zonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/jobs/ExportConfigurationJob.java
  248. +1 −1  ...azonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/jobs/RestartEnvironmentJob.java
  249. +7 −4 ...amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/jobs/SyncEnvironmentsJob.java
  250. +22 −2 ...onaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/jobs/TerminateEnvironmentJob.java
  251. +1 −1  ...pse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/jobs/UpdateEnvironmentConfigurationJob.java
  252. +188 −5 ...mazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/jobs/UpdateEnvironmentJob.java
  253. +5 −0 com.amazonaws.eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/DeployWizard.java
  254. +1 −1  ...lasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/DeployWizardEnvironmentConfigPage.java
  255. +7 −100 ...eclipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/ImportEnvironmentsWizard.java
  256. +1 −1  ...ipse.elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/LaunchConfigurationTabGroup.java
  257. +16 −4 ...elasticbeanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/configEditor/ConfigEditorSection.java
  258. +17 −15 ...beanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/configEditor/EnvironmentConfigDataModel.java
  259. +7 −4 ...eanstalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/configEditor/EnvironmentConfigEditorPart.java
  260. +66 −53 ...stalk/src/com/amazonaws/eclipse/elasticbeanstalk/server/ui/configEditor/EnvironmentConfigEditorSection.java
Sorry, we could not display the entire diff because too many files (455) changed.
View
2  com.amazonaws.eclipse.core.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="com.amazonaws.eclipse.core.feature"
label="AWS Toolkit for Eclipse Core"
- version="1.0.5.qualifier"
+ version="2.0.0.qualifier"
provider-name="Amazon Web Services">
<description url="http://aws.amazon.com/eclipse">
View
31 com.amazonaws.eclipse.core/.classpath
@@ -1,13 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="lib" path="lib/commons-httpclient-3.0.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-io-1.4/commons-io-1.4.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.3/commons-codec-1.3.jar"/>
- <classpathentry kind="lib" path="lib/log4j-1.2.15.jar"/>
- <classpathentry kind="lib" path="lib/aws-java-sdk-1.1.2.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="lib/aws-java-sdk-1.2.1.jar" sourcepath="C:/Users/zachmu/.m2/repository/com/amazonaws/aws-java-sdk/1.2.1/aws-java-sdk-1.2.1-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/httpclient-4.1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/httpcore-4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.4.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="etc/"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-io-1.4/commons-io-1.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.3/commons-codec-1.3.jar"/>
+ <classpathentry kind="lib" path="lib/log4j-1.2.15.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
33 com.amazonaws.eclipse.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: AWS Toolkit Core
Bundle-SymbolicName: com.amazonaws.eclipse.core;singleton:=true
-Bundle-Version: 1.0.5.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: Amazon Web Services
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: com.amazonaws,
@@ -14,10 +14,12 @@ Export-Package: com.amazonaws,
com.amazonaws.auth.policy.resources,
com.amazonaws.eclipse.core,
com.amazonaws.eclipse.core.preferences,
+ com.amazonaws.eclipse.core.regions,
com.amazonaws.eclipse.core.ui,
com.amazonaws.eclipse.core.ui.menu,
com.amazonaws.eclipse.core.ui.overview,
com.amazonaws.eclipse.core.ui.preferences,
+ com.amazonaws.eclipse.explorer,
com.amazonaws.handlers,
com.amazonaws.http,
com.amazonaws.services.autoscaling,
@@ -73,20 +75,37 @@ Export-Package: com.amazonaws,
com.amazonaws.util,
com.amazonaws.util.json,
org.apache.commons.codec.binary,
- org.apache.commons.io
+ org.apache.commons.io,
+ org.apache.http,
+ org.apache.http.client,
+ org.apache.http.impl.client,
+ org.apache.http.client.params,
+ org.apache.http.client.methods
Require-Bundle: org.eclipse.swt,
org.eclipse.jface,
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.net,
- org.eclipse.help;bundle-version="3.3.0",
- org.eclipse.ui.forms;bundle-version="3.3.0"
+ org.eclipse.help,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.navigator,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.ui,
+ org.eclipse.core.expressions,
+ org.eclipse.core.databinding,
+ org.eclipse.jface.databinding,
+ org.eclipse.jdt.core
Bundle-ActivationPolicy: lazy
Bundle-Activator: com.amazonaws.eclipse.core.AwsToolkitCore
Bundle-ClassPath: .,
- lib/aws-java-sdk-1.1.2.jar,
lib/commons-codec-1.3/commons-codec-1.3.jar,
lib/commons-io-1.4/commons-io-1.4.jar,
lib/log4j-1.2.15.jar,
- lib/commons-logging-1.1.jar,
- lib/commons-httpclient-3.0.1.jar
+ etc/,
+ lib/aws-java-sdk-1.2.1.jar,
+ lib/commons-logging-1.1.1.jar,
+ lib/httpclient-4.1.1.jar,
+ lib/httpcore-4.1.jar,
+ lib/jackson-core-asl-1.4.3.jar,
+ lib/stax-1.2.0.jar,
+ lib/stax-api-1.0.1.jar
View
14 com.amazonaws.eclipse.core/build.properties
@@ -9,9 +9,14 @@ bin.includes = META-INF/,\
html/,\
lib/commons-io-1.4/commons-io-1.4.jar,\
lib/log4j-1.2.15.jar,\
- lib/commons-logging-1.1.jar,\
- lib/commons-httpclient-3.0.1.jar,\
- lib/aws-java-sdk-1.1.2.jar
+ etc/,\
+ lib/aws-java-sdk-1.2.1.jar,\
+ lib/commons-logging-1.1.1.jar,\
+ lib/httpclient-4.1.1.jar,\
+ lib/httpcore-4.1.jar,\
+ lib/jackson-core-asl-1.4.3.jar,\
+ lib/stax-1.2.0.jar,\
+ lib/stax-api-1.0.1.jar
src.includes = src/,\
plugin.xml,\
META-INF/,\
@@ -19,4 +24,5 @@ src.includes = src/,\
.project,\
.classpath,\
schema/,\
- icons/
+ icons/,\
+ etc/
View
90 com.amazonaws.eclipse.core/etc/regions.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<regions>
+
+ <region>
+ <displayname>US East (Virginia)</displayname>
+ <systemname>us-east-1</systemname>
+ <services>
+ <service name="S3">https://s3.amazonaws.com/</service>
+ <service name="CloudFront">https://cloudfront.amazonaws.com/</service>
+ <service name="IAM">https://iam.amazonaws.com/</service>
+ <service name="SNS">https://sns.us-east-1.amazonaws.com/</service>
+ <service name="SQS">https://queue.amazonaws.com/</service>
+ <service name="SimpleDB">https://sdb.amazonaws.com/</service>
+ <service name="EC2">https://ec2.us-east-1.amazonaws.com/</service>
+ <service name="RDS">https://rds.us-east-1.amazonaws.com/</service>
+ <service name="ElasticBeanstalk">https://elasticbeanstalk.us-east-1.amazonaws.com/</service>
+ <service name="AutoScaling">https://autoscaling.us-east-1.amazonaws.com</service>
+ <service name="ELB">https://elasticloadbalancing.us-east-1.amazonaws.com</service>
+ </services>
+ </region>
+
+ <region>
+ <displayname>US West (N. California)</displayname>
+ <systemname>us-west-1</systemname>
+ <services>
+ <service name="S3">https://s3.amazonaws.com/</service>
+ <service name="CloudFront">https://cloudfront.amazonaws.com/</service>
+ <service name="IAM">https://iam.amazonaws.com/</service>
+ <service name="SNS">https://sns.us-west-1.amazonaws.com/</service>
+ <service name="SQS">https://sqs.us-west-1.amazonaws.com/</service>
+ <service name="SimpleDB">https://sdb.us-west-1.amazonaws.com/</service>
+ <service name="EC2">https://ec2.us-west-1.amazonaws.com/</service>
+ <service name="RDS">https://rds.us-west-1.amazonaws.com/</service>
+ <service name="AutoScaling">https://autoscaling.us-west-1.amazonaws.com</service>
+ <service name="ELB">https://elasticloadbalancing.us-west-1.amazonaws.com</service>
+ </services>
+ </region>
+
+ <region>
+ <displayname>EU West (Ireland)</displayname>
+ <systemname>eu-west-1</systemname>
+ <services>
+ <service name="S3">https://s3.amazonaws.com/</service>
+ <service name="CloudFront">https://cloudfront.amazonaws.com/</service>
+ <service name="IAM">https://iam.amazonaws.com/</service>
+ <service name="SNS">https://sns.eu-west-1.amazonaws.com/</service>
+ <service name="SQS">https://sqs.eu-west-1.amazonaws.com/</service>
+ <service name="SimpleDB">https://sdb.eu-west-1.amazonaws.com/</service>
+ <service name="EC2">https://ec2.eu-west-1.amazonaws.com/</service>
+ <service name="RDS">https://rds.eu-west-1.amazonaws.com/</service>
+ <service name="AutoScaling">https://autoscaling.eu-west-1.amazonaws.com</service>
+ <service name="ELB">https://elasticloadbalancing.eu-west-1.amazonaws.com</service>
+ </services>
+ </region>
+
+ <region>
+ <displayname>Asia Pacific (Singapore)</displayname>
+ <systemname>ap-southeast-1</systemname>
+ <services>
+ <service name="S3">https://s3.amazonaws.com/</service>
+ <service name="CloudFront">https://cloudfront.amazonaws.com/</service>
+ <service name="IAM">https://iam.amazonaws.com/</service>
+ <service name="SNS">https://sns.ap-southeast-1.amazonaws.com/</service>
+ <service name="SQS">https://sqs.ap-southeast-1.amazonaws.com/</service>
+ <service name="SimpleDB">https://sdb.ap-southeast-1.amazonaws.com/</service>
+ <service name="EC2">https://ec2.ap-southeast-1.amazonaws.com/</service>
+ <service name="RDS">https://rds.ap-southeast-1.amazonaws.com/</service>
+ <service name="AutoScaling">https://autoscaling.ap-southeast-1.amazonaws.com</service>
+ <service name="ELB">https://elasticloadbalancing.ap-southeast-1.amazonaws.com</service>
+ </services>
+ </region>
+
+ <region>
+ <displayname>Asia Pacific (Tokyo)</displayname>
+ <systemname>ap-northeast-1</systemname>
+ <services>
+ <service name="S3">https://s3.amazonaws.com/</service>
+ <service name="CloudFront">https://cloudfront.amazonaws.com/</service>
+ <service name="IAM">https://iam.amazonaws.com/</service>
+ <service name="SNS">http://sns.ap-northeast-1.amazonaws.com/</service>
+ <service name="SQS">http://sqs.ap-northeast-1.amazonaws.com/</service>
+ <service name="SimpleDB">https://sdb.ap-northeast-1.amazonaws.com/</service>
+ <service name="EC2">https://ec2.ap-northeast-1.amazonaws.com/</service>
+ <service name="RDS">https://rds.ap-northeast-1.amazonaws.com/</service>
+ <service name="AutoScaling">https://autoscaling.ap-northeast-1.amazonaws.com</service>
+ <service name="ELB">https://elasticloadbalancing.ap-northeast-1.amazonaws.com</service>
+ </services>
+ </region>
+
+</regions>
View
BIN  com.amazonaws.eclipse.core/icons/add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/bucket.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/database.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/document_into.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/flags/eu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/flags/japan.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/flags/singapore.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/flags/us.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/index.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/refresh.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/remove.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/sns_topic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/start.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/table.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/icons/wizards/configure_database.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  com.amazonaws.eclipse.core/lib/aws-java-sdk-1.1.1.jar
Binary file not shown
View
BIN  ...amazonaws.eclipse.core/lib/aws-java-sdk-1.1.2.jar → ...amazonaws.eclipse.core/lib/aws-java-sdk-1.2.1.jar
Binary file not shown
View
BIN  com.amazonaws.eclipse.core/lib/commons-httpclient-3.0.1.jar
Binary file not shown
View
0  ...b/commons-logging-1.1.1/commons-logging-1.1.1.jar → ...zonaws.eclipse.core/lib/commons-logging-1.1.1.jar
File renamed without changes
View
BIN  com.amazonaws.eclipse.core/lib/commons-logging-1.1.jar
Binary file not shown
View
BIN  com.amazonaws.eclipse.core/lib/httpclient-4.1.1.jar
Binary file not shown
View
BIN  com.amazonaws.eclipse.core/lib/httpcore-4.1.jar
Binary file not shown
View
BIN  ...WebContent/WEB-INF/lib/jackson-core-asl-1.4.5.jar → ...onaws.eclipse.core/lib/jackson-core-asl-1.4.3.jar
Binary file not shown
View
0  ...naws.eclipse.ec2/lib/stax-ri-1.2.0/stax-1.2.0.jar → com.amazonaws.eclipse.core/lib/stax-1.2.0.jar
File renamed without changes
View
0  ...avelLog/WebContent/WEB-INF/lib/stax-api-1.0.1.jar → com.amazonaws.eclipse.core/lib/stax-api-1.0.1.jar
File renamed without changes
View
294 com.amazonaws.eclipse.core/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
- <extension-point id="overview" name="AWS Toolkit Overview" schema="schema/overview.exsd"/>
+ <extension-point id="overview" name="AWS Toolkit Overview" schema="schema/overview.exsd"/>
<extension point="org.eclipse.ui.preferencePages">
<page
@@ -9,6 +9,13 @@
id="com.amazonaws.eclipse.core.ui.preferences.AwsAccountPreferencePage"
name="AWS Toolkit">
</page>
+ <page
+ category="com.amazonaws.eclipse.core.ui.preferences.AwsAccountPreferencePage"
+ class="com.amazonaws.eclipse.core.ui.preferences.RegionsPreferencePage"
+ id="com.amazonaws.eclipse.core.ui.preferences.RegionsPreferencePage"
+ name="Regions">
+ </page>
+
</extension>
<extension point="org.eclipse.core.runtime.preferences">
@@ -34,12 +41,52 @@
id="com.amazonaws.eclipse.core.ui.overview"
name="AWS Toolkit Overview">
</editor>
+ <editor
+ class="com.amazonaws.eclipse.explorer.s3.BucketEditor"
+ default="false"
+ icon="icons/bucket.png"
+ id="com.amazonaws.eclipse.explorer.s3.bucketEditor"
+ name="Amazon S3 Bucket">
+ </editor>
+ <editor
+ class="com.amazonaws.eclipse.explorer.sqs.QueueEditor"
+ default="false"
+ icon="icons/index.png"
+ id="com.amazonaws.eclipse.explorer.sqs.queueEditor"
+ name="Amazon SQS Queue">
+ </editor>
+ <editor
+ class="com.amazonaws.eclipse.explorer.sns.TopicEditor"
+ default="false"
+ icon="icons/sns_topic.png"
+ id="com.amazonaws.eclipse.explorer.sns.topicEditor"
+ name="Amazon SNS Topic">
+ </editor>
+ </extension>
+
+
+ <!-- -->
+ <!-- AWS Management Perspective Extensions -->
+ <!-- -->
+
+ <extension point="org.eclipse.ui.perspectives">
+ <perspective
+ class="com.amazonaws.eclipse.core.ui.ManagementPerspectiveFactory"
+ icon="icons/aws-box.gif"
+ id="com.amazonaws.eclipse.managementPerspective"
+ name="AWS Management">
+ </perspective>
+ </extension>
+
+ <extension point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension targetID="*">
+ <perspectiveShortcut id="com.amazonaws.eclipse.managementPerspective"/>
+ </perspectiveExtension>
</extension>
+
<!--
- |
- | Adds AWS specififc commands
- |
+ | Adds AWS specific commands
-->
<extension point="org.eclipse.ui.commands">
<category id="com.amazonaws.commands.category"
@@ -67,9 +114,7 @@
<!--
- |
| Inserts toolbar button handlers to perform the commands
- |
-->
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions">
@@ -96,18 +141,38 @@
<separator name="javaWeb" visible="false"/>
<separator name="separator1" visible="true"/>
- <separator name="simpleDB" visible="false"/>
+ <command commandId="org.eclipse.ui.views.showView"
+ id="com.amazonaws.eclipse.core.ui.showExplorerViewMenuItem"
+ icon="icons/aws-box.gif"
+ label="Show AWS Explorer View">
+ <parameter name="org.eclipse.ui.views.showView.viewId"
+ value="com.amazonaws.eclipse.explorer.view"/>
+ </command>
+
<separator name="separator2" visible="true"/>
- <separator name="EC2" visible="false"/>
+ <separator name="simpleDB" visible="false"/>
<separator name="separator3" visible="true"/>
+ <separator name="EC2" visible="false"/>
+ <separator name="separator4" visible="true"/>
+
+ <command commandId="org.eclipse.ui.perspectives.showPerspective"
+ id="com.amazonaws.eclipse.core.ui.showManagementPerspectiveMenuItem"
+ label="Open AWS Management Perspective">
+ <parameter
+ name="org.eclipse.ui.perspectives.showPerspective.perspectiveId"
+ value="com.amazonaws.eclipse.managementPerspective"/>
+ </command>
+
+ <separator name="separator5" visible="true"/>
+
<command commandId="com.amazonaws.eclipse.command.openWebConsole"
id="com.amazonaws.eclipse.toolbar.openWebConsole"
label="Go to AWS Management Console">
</command>
- <separator name="separator4" visible="true"/>
+ <separator name="separator6" visible="true"/>
<command commandId="com.amazonaws.eclipse.command.openPreferences"
id="com.amazonaws.toolbar.openPreferences"
@@ -115,4 +180,215 @@
</command>
</menuContribution>
</extension>
+
+ <extension point="org.eclipse.ui.views">
+ <view
+ category="com.amazonaws.eclipse.core.category"
+ class="com.amazonaws.eclipse.explorer.ResourcesView"
+ id="com.amazonaws.eclipse.explorer.view"
+ name="AWS Explorer"
+ icon="icons/aws-box.gif"
+ restorable="true">
+ <description>
+ A tree of Amazon Web Services resources.
+ </description>
+ </view>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.viewer">
+ <viewer viewerId="com.amazonaws.eclipse.explorer.view" >
+ <options>
+ <property
+ name="org.eclipse.ui.navigator.hideAvailableExtensionsTab"
+ value="false"/>
+ <property
+ name="org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"
+ value="true"/>
+ <property
+ name="org.eclipse.ui.navigator.hideLinkWithEditorAction"
+ value="false"/>
+ <property
+ name="org.eclipse.ui.navigator.hideCollapseAllAction"
+ value="false"/>
+ </options>
+ </viewer>
+ <viewerContentBinding
+ viewerId="com.amazonaws.eclipse.explorer.view">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="com\.amazonaws\.eclipse\.explorer\..*">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding
+ viewerId="com.amazonaws.eclipse.explorer.view">
+ <includes>
+ <actionExtension
+ pattern="com\.amazonaws\.eclipse\.explorer\..*">
+ </actionExtension>
+ </includes>
+ </viewerActionBinding>
+ <dragAssistant
+ class="com.amazonaws.eclipse.explorer.DragAdapterAssistant"
+ viewerId="com.amazonaws.eclipse.explorer.view">
+ </dragAssistant>
+ </extension>
+
+ <!-- S3 content and labels -->
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="com.amazonaws.eclipse.explorer.s3.S3ContentProvider"
+ id="com.amazonaws.eclipse.explorer.S3Content"
+ labelProvider="com.amazonaws.eclipse.explorer.s3.S3LabelProvider"
+ name="Amazon S3 Resources"
+ priority="normal">
+ <triggerPoints>
+ <instanceof value="com.amazonaws.eclipse.explorer.AWSResourcesRootElement" />
+ </triggerPoints>
+ <!--
+ The set of possible children is the elements that will
+ trigger the right-click popup menu, as well as our drag and drop
+ sources / targets.
+ -->
+ <possibleChildren>
+ <or>
+ <instanceof value="com.amazonaws.eclipse.explorer.s3.S3RootElement" />
+ <instanceof value="com.amazonaws.services.s3.model.Bucket" />
+ <instanceof value="com.amazonaws.services.s3.model.S3ObjectSummary" />
+ <!-- These aren't in the tree, but need to be here for drag and drop to work -->
+ <instanceof value="org.eclipse.core.resources.IFolder" />
+ <instanceof value="org.eclipse.core.resources.IProject" />
+ <instanceof value="org.eclipse.core.resources.IFile" />
+ </or>
+ </possibleChildren>
+ <dropAssistant
+ class="com.amazonaws.eclipse.explorer.s3.dnd.UploadDropAssistant"
+ id="com.amazonaws.eclipse.explorer.s3.uploadDropAssistant">
+ <possibleDropTargets>
+ <or>
+ <instanceof value="com.amazonaws.services.s3.model.Bucket" />
+ </or>
+ </possibleDropTargets>
+ </dropAssistant>
+ <dropAssistant
+ class="com.amazonaws.eclipse.explorer.s3.dnd.DownloadDropAssistant"
+ id="com.amazonaws.eclipse.explorer.s3.downloadDropAssistant">
+ <possibleDropTargets>
+ <or>
+ <instanceof value="org.eclipse.core.resources.IFolder" />
+ <instanceof value="org.eclipse.core.resources.IProject" />
+ <instanceof value="org.eclipse.core.resources.IFile" />
+ <!-- TODO: this doesn't work for many objects in the Package Explorer view,
+ such as java projects, source folders, etc. -->
+ </or>
+ </possibleDropTargets>
+ </dropAssistant>
+ <actionProvider class="com.amazonaws.eclipse.explorer.s3.actions.S3ActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="com.amazonaws.eclipse.explorer.s3.S3RootElement" />
+ <instanceof value="com.amazonaws.services.s3.model.Bucket" />
+ </or>
+ </enablement>
+ </actionProvider>
+ </navigatorContent>
+
+ <actionProvider
+ class="com.amazonaws.eclipse.explorer.actions.ConfigurationActionProvider"
+ id="com.amazonaws.eclipse.explorer.actions.ConfigurationActionProvider">
+ <enablement>
+ <!-- Empty enablement needs to be here for the action provider to show up. -->
+ </enablement>
+ </actionProvider>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.linkHelper">
+ <linkHelper
+ class="com.amazonaws.eclipse.explorer.s3.BucketLinkHelper"
+ id="com.amazonaws.eclipse.explorer.s3.bucketEditorLinkHelper">
+ <selectionEnablement>
+ <instanceof value="com.amazonaws.services.s3.model.Bucket"/>
+ </selectionEnablement>
+ <editorInputEnablement>
+ <instanceof value="com.amazonaws.eclipse.explorer.s3.BucketEditorInput"/>
+ </editorInputEnablement>
+ </linkHelper>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.dropActions">
+ <action
+ class="com.amazonaws.eclipse.explorer.s3.dnd.S3ObjectSummaryDropAction"
+ id="com.amazonaws.eclipse.explorer.s3.objectSummaryDropAction">
+ </action>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="com.amazonaws.eclipse.explorer.sqs.SQSContentProvider"
+ id="com.amazonaws.eclipse.explorer.SQSContent"
+ labelProvider="com.amazonaws.eclipse.explorer.sqs.SQSLabelProvider"
+ name="Amazon SQS"
+ priority="normal">
+ <triggerPoints>
+ <instanceof value="com.amazonaws.eclipse.explorer.AWSResourcesRootElement" />
+ </triggerPoints>
+ <!--
+ The set of possible children is the elements that will
+ trigger the right-click popup menu, as well as our drag and drop
+ sources / targets.
+ -->
+ <possibleChildren>
+ <or>
+ <!-- TODO -->
+ <instanceof value="com.amazonaws.eclipse.explorer.sqs.SQSRootElement" />
+ </or>
+ </possibleChildren>
+ <actionProvider class="com.amazonaws.eclipse.explorer.sqs.SQSActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="com.amazonaws.eclipse.explorer.sqs.SQSContentProvider$SQSRootElement"/>
+ <instanceof value="com.amazonaws.eclipse.explorer.sqs.SQSContentProvider$QueueNode"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </navigatorContent>
+
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="com.amazonaws.eclipse.explorer.sns.SNSContentProvider"
+ id="com.amazonaws.eclipse.explorer.SNSContent"
+ labelProvider="com.amazonaws.eclipse.explorer.sns.SNSLabelProvider"
+ name="Amazon SNS"
+ priority="normal">
+ <triggerPoints>
+ <instanceof value="com.amazonaws.eclipse.explorer.AWSResourcesRootElement" />
+ </triggerPoints>
+ <!--
+ The set of possible children is the elements that will
+ trigger the right-click popup menu, as well as our drag and drop
+ sources / targets.
+ -->
+ <possibleChildren>
+ <or>
+ <!-- TODO -->
+ <instanceof value="com.amazonaws.eclipse.explorer.sns.SNSRootElement" />
+ </or>
+ </possibleChildren>
+ <actionProvider class="com.amazonaws.eclipse.explorer.sns.SNSActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="com.amazonaws.eclipse.explorer.sns.SNSContentProvider$SNSRootElement"/>
+ <instanceof value="com.amazonaws.eclipse.explorer.sns.SNSContentProvider$TopicNode"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </navigatorContent>
+
+ </extension>
+
</plugin>
View
296 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AWSClientFactory.java
@@ -14,9 +14,12 @@
*/
package com.amazonaws.eclipse.core;
+import java.lang.reflect.Constructor;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.Map;
import org.eclipse.core.net.proxy.IProxyChangeEvent;
import org.eclipse.core.net.proxy.IProxyChangeListener;
@@ -24,208 +27,167 @@
import org.eclipse.core.net.proxy.IProxyService;
import org.eclipse.core.runtime.Status;
+import com.amazonaws.AmazonWebServiceClient;
import com.amazonaws.ClientConfiguration;
+import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
+import com.amazonaws.eclipse.core.regions.RegionUtils;
+import com.amazonaws.eclipse.core.regions.ServiceAbbreviations;
+import com.amazonaws.services.autoscaling.AmazonAutoScaling;
+import com.amazonaws.services.autoscaling.AmazonAutoScalingClient;
+import com.amazonaws.services.ec2.AmazonEC2;
+import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalk;
import com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient;
+import com.amazonaws.services.elasticloadbalancing.AmazonElasticLoadBalancing;
+import com.amazonaws.services.elasticloadbalancing.AmazonElasticLoadBalancingClient;
import com.amazonaws.services.rds.AmazonRDS;
import com.amazonaws.services.rds.AmazonRDSClient;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.simpledb.AmazonSimpleDB;
import com.amazonaws.services.simpledb.AmazonSimpleDBClient;
+import com.amazonaws.services.sns.AmazonSNS;
+import com.amazonaws.services.sns.AmazonSNSClient;
+import com.amazonaws.services.sqs.AmazonSQS;
+import com.amazonaws.services.sqs.AmazonSQSClient;
/**
* Factory for creating AWS clients.
*/
public class AWSClientFactory {
-
- /**
+
+ /**
* This constant is intended only for testing so that unit tests can
* override the Eclipse preference store implementation of AccountInfo.
*/
public static final String ACCOUNT_INFO_OVERRIDE_PROPERTY = "com.amazonaws.eclipse.test.AccountInfoOverride";
- /**
- * A shared account info object for accessing the user's account
- * preferences.
- */
- private static final AccountInfo accountInfo;
-
- /** clients organized by the name of the region they work with. */
- private static final HashMap<String, AmazonS3> s3ClientsByEndpoint = new HashMap<String, AmazonS3>();
- private static final HashMap<String, AmazonRDS> rdsClientsByEndpoint = new HashMap<String, AmazonRDS>();
- private static final HashMap<String, AmazonSimpleDB> sdbClientsByEndpoint = new HashMap<String, AmazonSimpleDB>();
- private static HashMap<String, AWSElasticBeanstalk> elasticBeanstalkClientsByEndpoint = new HashMap<String, AWSElasticBeanstalk>();
+ /** Manages the cached client objects. */
+ private CachedClients cachedClients = new CachedClients();
- /**
- * Adds a listener for the user's account info so that we can update the
- * client when the account info changes.
- */
- static {
- // Allow account info to be easily overridden for tests
- String accountInfoOverride = System.getProperty(ACCOUNT_INFO_OVERRIDE_PROPERTY);
- if ( accountInfoOverride == null ) {
- accountInfo = AwsToolkitCore.getDefault().getAccountInfo();
- } else {
- try {
- Class<?> accountInfoOverrideClass = Class.forName(accountInfoOverride);
- accountInfo = (AccountInfo) accountInfoOverrideClass.newInstance();
- } catch ( Exception e ) {
- throw new RuntimeException("Unable to load and instantiate account info override class "
- + accountInfoOverride);
- }
- }
-
- AwsToolkitCore plugin = AwsToolkitCore.getDefault();
- if ( plugin != null ) {
- plugin.getProxyService().addProxyChangeListener(new IProxyChangeListener() {
- public void proxyInfoChanged(IProxyChangeEvent event) {
- invalidateClients();
- }
- });
-
- plugin.addAccountInfoChangeListener(new AccountInfoChangeListener() {
- public void currentAccountChanged() {
- invalidateClients();
- }
- });
- }
- }
-
- /**
- * Invalidates the current set of clients. This method is intended to be
- * used after configuration changes are made so that the next time a
- * client is needed, a fresh instance will be created using the most recent
- * configuration.
- */
- private static void invalidateClients() {
- // Invalidate any region specific clients
- synchronized (s3ClientsByEndpoint) {s3ClientsByEndpoint.clear();}
- synchronized (rdsClientsByEndpoint) {rdsClientsByEndpoint.clear();}
- synchronized (sdbClientsByEndpoint) {sdbClientsByEndpoint.clear();}
- synchronized (elasticBeanstalkClientsByEndpoint) {elasticBeanstalkClientsByEndpoint.clear();}
- }
-
- /**
- * Returns an S3 client configured with the user's preferences, including
- * the currently selected endpoint.
+ /**
+ * A shared account info object for accessing the user's credentials.
*/
- public AmazonS3 getS3Client() {
- return getS3ClientByEndpoint("s3.amazonaws.com");
- }
+ private final AccountInfo accountInfo;
/**
- * Returns an S3 client configured with the user's preferences, including
- * the currently selected endpoint.
+ * Constructs a client factory that uses the given AWS account
+ * for its credentials.
+ */
+ public AWSClientFactory(AccountInfo accountInfo) {
+ this.accountInfo = accountInfo;
+
+ AwsToolkitCore plugin = AwsToolkitCore.getDefault();
+ if ( plugin != null ) {
+ plugin.getProxyService().addProxyChangeListener(new IProxyChangeListener() {
+ public void proxyInfoChanged(IProxyChangeEvent event) {
+ cachedClients.invalidateClients();
+ }
+ });
+
+ plugin.addAccountInfoChangeListener(new AccountInfoChangeListener() {
+ public void currentAccountChanged() {
+ cachedClients.invalidateClients();
+ }
+ });
+ }
+ }
+
+ /*
+ * Simple getters return a client configured with the default endpoint for
+ * the currently selected region.
*/
+
+ public AmazonS3 getS3Client() {
+ return getS3ClientByEndpoint(RegionUtils.getCurrentRegion().getServiceEndpoints().get(ServiceAbbreviations.S3));
+ }
+
public AmazonSimpleDB getSimpleDBClient() {
- return getSimpleDBClientByEndpoints("sdb.amazonaws.com");
- }
-
- /**
- * Returns an S3 client for the specified region endpoint
- *
- * @param endpoint
- * The endpoint that the returned client should work with.
- */
- public AmazonS3 getS3ClientByEndpoint(String endpoint) {
- synchronized (s3ClientsByEndpoint) {
- if ( s3ClientsByEndpoint.get(endpoint) == null ) {
- s3ClientsByEndpoint.put(endpoint, createNewS3Client(endpoint));
- }
+ return getSimpleDBClientByEndpoint(RegionUtils.getCurrentRegion().getServiceEndpoints()
+ .get(ServiceAbbreviations.SIMPLEDB));
+ }
+
+ public AmazonRDS getRDSClient() {
+ return getRDSClientByEndpoint(RegionUtils.getCurrentRegion().getServiceEndpoints()
+ .get(ServiceAbbreviations.RDS));
+ }
+
+ public AmazonSQS getSQSClient() {
+ return getSQSClientByEndpoint(RegionUtils.getCurrentRegion().getServiceEndpoints()
+ .get(ServiceAbbreviations.SQS));
+ }
+
+ public AmazonSNS getSNSClient() {
+ return getSNSClientByEndpoint(RegionUtils.getCurrentRegion().getServiceEndpoints()
+ .get(ServiceAbbreviations.SNS));
+ }
+
+ /*
+ * Endpoint-specific getters return clients that use the endpoint given.
+ */
- return s3ClientsByEndpoint.get(endpoint);
- }
+ public AmazonS3 getS3ClientByEndpoint(String endpoint) {
+ return getOrCreateClient(endpoint, AmazonS3Client.class);
}
- public AmazonSimpleDB getSimpleDBClientByEndpoints(final String endpoint) {
- synchronized (sdbClientsByEndpoint) {
- if ( sdbClientsByEndpoint.get(endpoint) == null ) {
- sdbClientsByEndpoint.put(endpoint, createNewSDBClient(endpoint));
- }
+ public AmazonEC2 getEC2ClientByEndpoint(String endpoint) {
+ return getOrCreateClient(endpoint, AmazonEC2Client.class);
+ }
- return sdbClientsByEndpoint.get(endpoint);
- }
+ public AmazonSimpleDB getSimpleDBClientByEndpoint(final String endpoint) {
+ return getOrCreateClient(endpoint, AmazonSimpleDBClient.class);
}
public AmazonRDS getRDSClientByEndpoint(final String endpoint) {
- synchronized (rdsClientsByEndpoint) {
- if ( rdsClientsByEndpoint.get(endpoint) == null) {
- rdsClientsByEndpoint.put(endpoint, createNewRDSClient(endpoint));
- }
-
- return rdsClientsByEndpoint.get(endpoint);
- }
+ return getOrCreateClient(endpoint, AmazonRDSClient.class);
}
-
- /**
- * Returns a new SimpleDB client configured to communicate with the specified endpoint.
- */
- private AmazonSimpleDB createNewSDBClient(String endpoint) {
- ClientConfiguration config = createClientConfiguration(endpoint);
- AmazonSimpleDB client = new AmazonSimpleDBClient(new BasicAWSCredentials(accountInfo.getAccessKey(),
- accountInfo.getSecretKey()), config);
- client.setEndpoint(endpoint);
+ public AmazonSQS getSQSClientByEndpoint(final String endpoint) {
+ return getOrCreateClient(endpoint, AmazonSQSClient.class);
+ }
- return client;
+ public AmazonSNS getSNSClientByEndpoint(final String endpoint) {
+ return getOrCreateClient(endpoint, AmazonSNSClient.class);
}
- /**
- * Returns an AWS Elastic Beanstalk client for the specified region endpoint
- *
- * @param endpoint
- * The endpoint that the returned client should work with.
- */
public AWSElasticBeanstalk getElasticBeanstalkClientByEndpoint(String endpoint) {
- synchronized (elasticBeanstalkClientsByEndpoint) {
- if ( elasticBeanstalkClientsByEndpoint.get(endpoint) == null ) {
- elasticBeanstalkClientsByEndpoint.put(endpoint, createNewElasticBeanstalkClient(endpoint));
- }
-
- return elasticBeanstalkClientsByEndpoint.get(endpoint);
- }
+ return getOrCreateClient(endpoint, AWSElasticBeanstalkClient.class);
}
- /**
- * Returns a new S3 client configured to communicate with the specified
- * endpoint.
- */
- private AmazonS3 createNewS3Client(String endpoint) {
- ClientConfiguration config = createClientConfiguration(endpoint);
-
- AmazonS3 client = new AmazonS3Client(new BasicAWSCredentials(accountInfo.getAccessKey(),
- accountInfo.getSecretKey()), config);
- client.setEndpoint(endpoint);
-
- return client;
+ public AmazonElasticLoadBalancing getElasticLoadBalancingClientByEndpoint(String endpoint) {
+ return getOrCreateClient(endpoint, AmazonElasticLoadBalancingClient.class);
}
- private AmazonRDS createNewRDSClient(String endpoint) {
- ClientConfiguration config = createClientConfiguration(endpoint);
+ public AmazonAutoScaling getAutoScalingClientByEndpoint(String endpoint) {
+ return getOrCreateClient(endpoint, AmazonAutoScalingClient.class);
+ }
- AmazonRDS client = new AmazonRDSClient(new BasicAWSCredentials(
- accountInfo.getAccessKey(), accountInfo.getSecretKey()), config);
- client.setEndpoint(endpoint);
+ private <T extends AmazonWebServiceClient> T getOrCreateClient(String endpoint, Class<T> clientClass) {
+ synchronized (clientClass) {
+ if ( cachedClients.getClient(endpoint, clientClass) == null ) {
+ cachedClients.cacheClient(endpoint, createClient(endpoint, clientClass));
+ }
+ }
- return client;
+ return cachedClients.getClient(endpoint, clientClass);
}
- /**
- * Returns a new AWS Elastic Beanstalk client configured to communicate with the
- * specified endpoint.
- */
- private static AWSElasticBeanstalk createNewElasticBeanstalkClient(String endpoint) {
- ClientConfiguration config = createClientConfiguration(endpoint);
+ private <T extends AmazonWebServiceClient> T createClient(String endpoint, Class<T> clientClass) {
+ try {
+ Constructor<T> constructor = clientClass.getConstructor(AWSCredentials.class, ClientConfiguration.class);
+ AWSCredentials credentials = new BasicAWSCredentials(accountInfo.getAccessKey(),
+ accountInfo.getSecretKey());
+ ClientConfiguration config = createClientConfiguration(endpoint);
- AWSElasticBeanstalk client = new AWSElasticBeanstalkClient(new BasicAWSCredentials(
- accountInfo.getAccessKey(),
- accountInfo.getSecretKey()), config);
- client.setEndpoint(endpoint);
+ T client = constructor.newInstance(credentials, config);
+ client.setEndpoint(endpoint);
- return client;
- }
+ return client;
+ } catch (Exception e) {
+ throw new RuntimeException("Unable to create client: " + e.getMessage(), e);
+ }
+ }
private static ClientConfiguration createClientConfiguration(String secureEndpoint) {
ClientConfiguration config = new ClientConfiguration();
@@ -256,5 +218,33 @@ private static ClientConfiguration createClientConfiguration(String secureEndpoi
}
return config;
}
+
+ /**
+ * Responsible for managing the various AWS client objects needed for each service/region combination.
+ */
+ private static class CachedClients {
+
+ private final Map<Class<?>, Map<String, Object>> cachedClientsByEndpoint = Collections
+ .synchronizedMap(new HashMap<Class<?>, Map<String, Object>>());
+
+ @SuppressWarnings("unchecked")
+ public <T> T getClient(String endpoint, Class<T> clientClass) {
+ if (cachedClientsByEndpoint.get(clientClass) == null) return null;
+ return (T)cachedClientsByEndpoint.get(clientClass).get(endpoint);
+ }
+
+ public <T> void cacheClient(String endpoint, T client) {
+ if (cachedClientsByEndpoint.get(client.getClass()) == null) {
+ cachedClientsByEndpoint.put(client.getClass(), new HashMap<String, Object>());
+ }
+
+ Map<String, Object> map = cachedClientsByEndpoint.get(client.getClass());
+ map.put(endpoint, client);
+ }
+
+ public synchronized void invalidateClients() {
+ cachedClientsByEndpoint.clear();
+ }
+ }
}
View
8 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AccountInfo.java
@@ -23,10 +23,10 @@
*/
public abstract class AccountInfo {
- /**
- * Returns the currently configured AWS user account ID.
- *
- * @return The currently configured AWS user account ID.
+ /**
+ * Returns the currently configured AWS user account ID.
+ *
+ * @return The currently configured AWS user account ID.
*/
public abstract String getUserId();
View
30 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AccountInfoMonitor.java
@@ -15,7 +15,9 @@
package com.amazonaws.eclipse.core;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -43,12 +45,25 @@ public void addAccountInfoChangeListener(AccountInfoChangeListener listener) {
public void removeAccountInfoChangeListener(AccountInfoChangeListener listener) {
listeners.remove(listener);
}
+
+ private static final Set<String> watchedProperties = new HashSet<String>();
+ static {
+ watchedProperties.add(PreferenceConstants.P_ACCESS_KEY);
+ watchedProperties.add(PreferenceConstants.P_ACCOUNT_IDS);
+ watchedProperties.add(PreferenceConstants.P_CERTIFICATE_FILE);
+ watchedProperties.add(PreferenceConstants.P_CURRENT_ACCOUNT);
+ watchedProperties.add(PreferenceConstants.P_PRIVATE_KEY_FILE);
+ watchedProperties.add(PreferenceConstants.P_SECRET_KEY);
+ watchedProperties.add(PreferenceConstants.P_USER_ID);
+ }
public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(PreferenceConstants.P_ACCESS_KEY) ||
- event.getProperty().equals(PreferenceConstants.P_SECRET_KEY)) {
+ String property = event.getProperty();
+ String bareProperty = property.substring(property.indexOf(":") + 1);
+
+ if ( watchedProperties.contains(bareProperty) ) {
// We delay the job running so that any other preferences being
- // updated can complete. We don't want to fire immediately when
+ // updated can complete. We don't want to fire immediately when
// only the access key has changed and the secret key hasn't
// been updated yet.
notifyCredentialListenersJob.schedule(1000);
@@ -62,8 +77,13 @@ private NotifyCredentialListenersJob() {
}
protected IStatus run(IProgressMonitor monitor) {
- for (AccountInfoChangeListener listener : listeners) {
- listener.currentAccountChanged();
+ for ( AccountInfoChangeListener listener : listeners ) {
+ try {
+ listener.currentAccountChanged();
+ } catch ( Exception e ) {
+ AwsToolkitCore.getDefault().logException(
+ "Couldn't notify listener of account change: " + listener.getClass(), e);
+ }
}
return Status.OK_STATUS;
}
View
204 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AwsToolkitCore.java
@@ -14,13 +14,23 @@
*/
package com.amazonaws.eclipse.core;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.UUID;
+
import org.eclipse.core.net.proxy.IProxyService;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
+import com.amazonaws.eclipse.core.preferences.PreferenceConstants;
+import com.amazonaws.eclipse.core.ui.preferences.AwsAccountPreferencePage;
+
/**
* Entry point for functionality provided by the AWS Toolkit Core plugin,
* including access to AWS account information.
@@ -29,8 +39,11 @@
/** The singleton instance of this plugin */
private static AwsToolkitCore plugin;
-
- private static AWSClientFactory clientFactory;
+
+ /**
+ * Client factories for each individual account in use by the customer.
+ */
+ private static final Map<String, AWSClientFactory> clientsFactoryByAccountId = new HashMap<String, AWSClientFactory>();
/** The ID of this plugin */
public static final String PLUGIN_ID = "com.amazonaws.eclipse.core";
@@ -45,32 +58,32 @@
/** The ID of the AWS Toolkit Overview editor */
public static final String OVERVIEW_EDITOR_ID = "com.amazonaws.eclipse.core.ui.overview";
- /** ImageRegistry ID for the AWS Toolkit title */
+ public static final String IMAGE_REMOVE = "remove";
+ public static final String IMAGE_ADD = "add";
public static final String IMAGE_AWS_TOOLKIT_TITLE = "aws-toolkit-title";
-
- /** ImageRegistry ID for the external link icon */
public static final String IMAGE_EXTERNAL_LINK = "external-link";
-
- /** ImageRegistry ID for the wrench image */
public static final String IMAGE_WRENCH = "wrench";
-
- /** ImageRegistry ID for the scroll image */
public static final String IMAGE_SCROLL = "scroll";
-
- /** ImageRegistry ID for the gears image */
public static final String IMAGE_GEARS = "gears";
-
- /** ImageRegistry ID for the gear image */
public static final String IMAGE_GEAR = "gear";
-
- /** ImageRegistry ID for the HTML document image */
public static final String IMAGE_HTML_DOC = "html";
-
- /** ImageRegistry ID for the AWS logo image */
public static final String IMAGE_AWS_LOGO = "logo";
-
- /** ImageRegistry ID for the AWS logo icon */
public static final String IMAGE_AWS_ICON = "icon";
+ public static final String IMAGE_TABLE = "table";
+ public static final String IMAGE_BUCKET = "bucket";
+ public static final String IMAGE_REFRESH = "refresh";
+ public static final String IMAGE_DATABASE = "database";
+ public static final String IMAGE_QUEUE = "queue";
+ public static final String IMAGE_TOPIC = "topic";
+ public static final String IMAGE_START = "start";
+ public static final String IMAGE_PUBLISH = "publish";
+
+ public static final String IMAGE_FLAG_EU = "eu-flag";
+ public static final String IMAGE_FLAG_JAPAN = "japan-flag";
+ public static final String IMAGE_FLAG_SINGAPORE = "singapore-flag";
+ public static final String IMAGE_FLAG_US = "us-flag";
+
+ public static final String IMAGE_WIZARD_CONFIGURE_DATABASE = "configure-database-wizard";
/** OSGI ServiceTracker object for querying details of proxy configuration */
@@ -88,7 +101,7 @@
public static AwsToolkitCore getDefault() {
return plugin;
}
-
+
/**
* Returns the IProxyService that allows callers to
* access information on how the proxy is currently
@@ -100,14 +113,32 @@ public static AwsToolkitCore getDefault() {
public IProxyService getProxyService() {
return (IProxyService)proxyServiceTracker.getService();
}
-
+
/**
* Returns the client factory.
*/
public static synchronized AWSClientFactory getClientFactory() {
- if (clientFactory == null)
- clientFactory = new AWSClientFactory();
- return clientFactory;
+ return getClientFactory(null);
+ }
+
+ /**
+ * Returns the client factory for the given account id. The client is
+ * responsible for ensuring that the given account Id is valid and properly
+ * configured.
+ *
+ * @param accountId
+ * The account to use for credentials, or null for the currently
+ * selected account.
+ * @see AwsToolkitCore#getAccountInfo(String)
+ */
+ public static synchronized AWSClientFactory getClientFactory(String accountId) {
+ if ( accountId == null )
+ accountId = getDefault().getCurrentAccountId();
+ if ( !clientsFactoryByAccountId.containsKey(accountId) ) {
+ clientsFactoryByAccountId.put(accountId, new AWSClientFactory(new PluginPreferenceStoreAccountInfo(getDefault()
+ .getPreferenceStore(), accountId)));
+ }
+ return clientsFactoryByAccountId.get(accountId);
}
/* (non-Javadoc)
@@ -123,9 +154,38 @@ public void start(BundleContext context) throws Exception {
// Start listening for account changes...
accountInfoMonitor = new AccountInfoMonitor();
+ bootstrapAccountPreferences();
getPreferenceStore().addPropertyChangeListener(accountInfoMonitor);
}
+ /**
+ * Bootstraps the current account preferences for new customers or customers
+ * migrating from the legacy single-account preference
+ */
+ private void bootstrapAccountPreferences() {
+ String currentAccount = getPreferenceStore().getString(PreferenceConstants.P_CURRENT_ACCOUNT);
+
+ // Bootstrap new customers
+ if ( currentAccount == null || currentAccount.length() == 0 ) {
+ String accountId = UUID.randomUUID().toString();
+ getPreferenceStore().putValue(PreferenceConstants.P_CURRENT_ACCOUNT, accountId);
+ getPreferenceStore().putValue(PreferenceConstants.P_ACCOUNT_IDS, accountId);
+ getPreferenceStore().putValue(accountId + ":" + PreferenceConstants.P_ACCOUNT_NAME,
+ PreferenceConstants.DEFAULT_ACCOUNT_NAME_BASE_64);
+
+ for ( String prefName : new String[] { PreferenceConstants.P_ACCESS_KEY,
+ PreferenceConstants.P_CERTIFICATE_FILE, PreferenceConstants.P_PRIVATE_KEY_FILE,
+ PreferenceConstants.P_SECRET_KEY, PreferenceConstants.P_USER_ID, } ) {
+ convertExistingPreference(accountId, prefName);
+ }
+ }
+ }
+
+ protected void convertExistingPreference(String accountId, String preferenceName) {
+ getPreferenceStore().putValue(accountId + ":" + preferenceName,
+ getPreferenceStore().getString(preferenceName));
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@@ -138,12 +198,53 @@ public void stop(BundleContext context) throws Exception {
}
/**
- * Returns the user's AWS account info.
+ * Returns the currently selected account info.
*
* @return The user's AWS account info.
*/
public AccountInfo getAccountInfo() {
- return new PluginPreferenceStoreAccountInfo(getPreferenceStore());
+ return getAccountInfo(null);
+ }
+
+ /**
+ * Gets account info for the given account name. No error checking is
+ * performed on the account name, so clients must be careful to ensure its
+ * validity.
+ *
+ * @param accountId
+ * The id of the account for which to get info, or null for the
+ * currently selected account.
+ */
+ public AccountInfo getAccountInfo(String accountId) {
+ if (accountId == null)
+ accountId = getCurrentAccountId();
+ return new PluginPreferenceStoreAccountInfo(getPreferenceStore(), accountId);
+ }
+
+ /**
+ * Returns the current account Id
+ */
+ public String getCurrentAccountId() {
+ return getPreferenceStore().getString(PreferenceConstants.P_CURRENT_ACCOUNT);
+ }
+
+ /**
+ * Sets the current account id. No error checking is performed, so ensure
+ * the given account Id is valid.
+ */
+ public void setCurrentAccountId(String accountId) {
+ getPreferenceStore().setValue(PreferenceConstants.P_CURRENT_ACCOUNT, accountId);
+ }
+
+ /**
+ * Returns a map of all currently registered account names keyed by their
+ * ID, which can then be fetched with
+ * {@link AwsToolkitCore#getAccountInfo(String)}
+ *
+ * @see AwsAccountPreferencePage#getAccounts(org.eclipse.jface.preference.IPreferenceStore)
+ */
+ public Map<String, String> getAccounts() {
+ return AwsAccountPreferencePage.getAccounts(getPreferenceStore());
}
/**
@@ -173,18 +274,49 @@ public void removeAccountInfoChangeListener(AccountInfoChangeListener listener)
*/
@Override
protected ImageRegistry createImageRegistry() {
- ImageRegistry imageRegistry = super.createImageRegistry();
+ String[] images = new String[] {
+ IMAGE_WIZARD_CONFIGURE_DATABASE, "/icons/wizards/configure_database.png",
+
+ IMAGE_FLAG_EU, "/icons/flags/eu.png",
+ IMAGE_FLAG_JAPAN, "/icons/flags/japan.png",
+ IMAGE_FLAG_SINGAPORE, "/icons/flags/singapore.png",
+ IMAGE_FLAG_US, "/icons/flags/us.png",
+ IMAGE_ADD, "/icons/add.png",
+ IMAGE_REMOVE, "/icons/remove.gif",
+ IMAGE_REFRESH, "/icons/refresh.png",
+ IMAGE_BUCKET, "/icons/bucket.png",
+ IMAGE_AWS_LOGO, "/icons/logo_aws.png",
+ IMAGE_HTML_DOC, "/icons/document_text.png",
+ IMAGE_GEAR, "/icons/gear.png",
+ IMAGE_GEARS, "/icons/gears.png",
+ IMAGE_SCROLL, "/icons/scroll.png",
+ IMAGE_WRENCH, "/icons/wrench.png",
+ IMAGE_AWS_TOOLKIT_TITLE, "/icons/aws-toolkit-title.png",
+ IMAGE_EXTERNAL_LINK, "/icons/icon_offsite.gif",
+ IMAGE_AWS_ICON, "/icons/aws-box.gif",
+ IMAGE_PUBLISH, "/icons/document_into.png",
+ IMAGE_TABLE, "/icons/table.gif",
+ IMAGE_DATABASE, "/icons/database.png",
+ IMAGE_QUEUE, "/icons/index.png",
+ IMAGE_TOPIC, "/icons/sns_topic.png",
+ IMAGE_START, "/icons/start.png",
+ };
- imageRegistry.put(IMAGE_AWS_LOGO, ImageDescriptor.createFromURL(getBundle().getEntry("icons/logo_aws.png")));
- imageRegistry.put(IMAGE_HTML_DOC, ImageDescriptor.createFromURL(getBundle().getEntry("icons/document_text.png")));
- imageRegistry.put(IMAGE_GEAR, ImageDescriptor.createFromURL(getBundle().getEntry("icons/gear.png")));
- imageRegistry.put(IMAGE_GEARS, ImageDescriptor.createFromURL(getBundle().getEntry("icons/gears.png")));
- imageRegistry.put(IMAGE_SCROLL, ImageDescriptor.createFromURL(getBundle().getEntry("icons/scroll.png")));
- imageRegistry.put(IMAGE_WRENCH, ImageDescriptor.createFromURL(getBundle().getEntry("icons/wrench.png")));
- imageRegistry.put(IMAGE_AWS_TOOLKIT_TITLE, ImageDescriptor.createFromURL(getBundle().getEntry("icons/aws-toolkit-title.png")));
- imageRegistry.put(IMAGE_EXTERNAL_LINK, ImageDescriptor.createFromURL(getBundle().getEntry("icons/icon_offsite.gif")));
- imageRegistry.put(IMAGE_AWS_ICON, ImageDescriptor.createFromURL(getBundle().getEntry("icons/aws-box.gif")));
+ ImageRegistry imageRegistry = super.createImageRegistry();
+ Iterator<String> i = Arrays.asList(images).iterator();
+ while (i.hasNext()) {
+ String id = i.next();
+ String imagePath = i.next();
+ imageRegistry.put(id, ImageDescriptor.createFromFile(getClass(), imagePath));
+ }
return imageRegistry;
}
+
+ /**
+ * Convenience method for exception logging.
+ */
+ public void logException(String errorMessage, Throwable e) {
+ getLog().log(new Status(Status.ERROR, PLUGIN_ID, errorMessage, e));
+ }
}
View
2  com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/AwsUrls.java
@@ -27,7 +27,7 @@
public static final String AWS_TOOLKIT_FOR_ECLIPSE_HOMEPAGE_URL = "http://aws.amazon.com/eclipse" + "?" + TRACKING_PARAMS;
public static final String AWS_TOOLKIT_FOR_ECLIPSE_FAQ_URL = "http://aws.amazon.com/eclipse/faqs/" + "?" + TRACKING_PARAMS;
- public static final String AWS_TOOLKIT_FOR_ECLIPSE_SOURCEFORGE_URL = "http://sourceforge.net/projects/aws-eclipse/";
+ public static final String AWS_TOOLKIT_FOR_ECLIPSE_GITHUB_URL = "https://github.com/amazonwebservices/aws-toolkit-for-eclipse/";
public static final String AWS_MANAGEMENT_CONSOLE_URL = "http://aws.amazon.com/console" + "?" + TRACKING_PARAMS;
}
View
129 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/PluginPreferenceStoreAccountInfo.java
@@ -21,76 +21,89 @@
import com.amazonaws.eclipse.core.preferences.PreferenceConstants;
/**
- * Implementation of the AccountInfo abstract class that provides AWS account information through
- * Eclipse's preference system.
+ * Implementation of the AccountInfo abstract class that provides AWS account
+ * information through Eclipse's preference system.
*/
public class PluginPreferenceStoreAccountInfo extends AccountInfo {
- /** The preference store containing the account information */
- private final IPreferenceStore preferenceStore;
-
- /**
- * Constructs a new object configured to pull account info from the
- * specified preference store.
- *
- * @param preferenceStore
- * The preference store to pull AWS account information.
- */
- public PluginPreferenceStoreAccountInfo(IPreferenceStore preferenceStore) {
- this.preferenceStore = preferenceStore;
- }
-
-
- /*
- * AccountInfo Interface
- */
-
- @Override
- public String getUserId() {
- return decodeString(preferenceStore.getString(PreferenceConstants.P_USER_ID));
- }
-
- @Override
- public String getAccessKey() {
- return decodeString(preferenceStore.getString(PreferenceConstants.P_ACCESS_KEY));
- }
-
- @Override
- public String getSecretKey() {
- return decodeString(preferenceStore.getString(PreferenceConstants.P_SECRET_KEY));
- }
-
- @Override
- public String getEc2PrivateKeyFile() {
- return preferenceStore.getString(PreferenceConstants.P_PRIVATE_KEY_FILE);
- }
-
- @Override
- public String getEc2CertificateFile() {
- return preferenceStore.getString(PreferenceConstants.P_CERTIFICATE_FILE);
- }
+ /** The preference store containing the account information */
+ private final IPreferenceStore preferenceStore;
+ private final String accountId;
+
+ /**
+ * Constructs a new object configured to pull account info from the
+ * specified preference store. The account information is tied to the
+ * account name given, but the user could still change the credentials for
+ * that account, so successive calls to accessors can return different
+ * results. Clients wishing to be notified of such changes should register a
+ * change listener with {@link AwsToolkitCore}.
+ *
+ * @see AwsToolkitCore#addAccountInfoChangeListener(AccountInfoChangeListener)
+ * @param preferenceStore
+ * The preference store to pull AWS account information.
+ * @param accountName
+ * The account name to use when looking up the account
+ * information.
+ */
+ public PluginPreferenceStoreAccountInfo(IPreferenceStore preferenceStore, String accountId) {
+ this.preferenceStore = preferenceStore;
+ this.accountId = accountId;
+ }
+
+ /**
+ * Gets the key used to obtain the preference name, based on the current
+ * account. Fall-back behavior for legacy customers supports bare preference
+ * keys.
+ */
+ private String getAccountPreferenceName(String preferenceName) {
+ return accountId + ":" + preferenceName;
+ }
+
+ /*
+ * AccountInfo Interface
+ */
@Override
- public void setAccessKey(String accessKey) {
- preferenceStore.setValue(PreferenceConstants.P_ACCESS_KEY, encodeString(accessKey));
+ public String getUserId() {
+ return decodeString(preferenceStore.getString(getAccountPreferenceName(PreferenceConstants.P_USER_ID)));
}
@Override
- public void setSecretKey(String secretKey) {
- preferenceStore.setValue(PreferenceConstants.P_SECRET_KEY, encodeString(secretKey));
+ public String getAccessKey() {
+ return decodeString(preferenceStore.getString(getAccountPreferenceName(PreferenceConstants.P_ACCESS_KEY)));
+ }
+
+ @Override
+ public String getSecretKey() {
+ return decodeString(preferenceStore.getString(getAccountPreferenceName(PreferenceConstants.P_SECRET_KEY)));
+ }
+
+ @Override
+ public String getEc2PrivateKeyFile() {
+ return preferenceStore.getString(getAccountPreferenceName(PreferenceConstants.P_PRIVATE_KEY_FILE));
}
+ @Override
+ public String getEc2CertificateFile() {
+ return preferenceStore.getString(getAccountPreferenceName(PreferenceConstants.P_CERTIFICATE_FILE));
+ }
- /*
- * Private Interface
- */
+ @Override
+ public void setAccessKey(String accessKey) {
+ throw new RuntimeException(this.getClass().getName() + " is a read-only interface");
+ }
- private String decodeString(String s) {
- return new String(Base64.decodeBase64(s.getBytes()));
- }
+ @Override
+ public void setSecretKey(String secretKey) {
+ throw new RuntimeException(this.getClass().getName() + " is a read-only interface");
+ }
- private String encodeString(String s) {
- return new String(Base64.encodeBase64(s.getBytes()));
- }
+ /*
+ * Private Interface
+ */
+
+ private String decodeString(String s) {
+ return new String(Base64.decodeBase64(s.getBytes()));
+ }
}
View
29 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/preferences/PreferenceConstants.java
@@ -14,6 +14,8 @@
*/
package com.amazonaws.eclipse.core.preferences;
+import com.amazonaws.eclipse.core.ui.preferences.ObfuscatingStringFieldEditor;
+
/**
* Preference constants for the AWS Toolkit Core plugin.
*/
@@ -34,10 +36,37 @@
/** Preference key for a user's EC2 certificate file. */
public static final String P_CERTIFICATE_FILE = "certificateFile";
+ /**
+ * Preference key for the ID of the default region.
+ */
+ public static final String P_DEFAULT_REGION = "defaultRegion";
+
/**
* Preference key indicating whether the preferences from the EC2 plugin
* preference store have been imported yet.
*/
public static final String P_EC2_PREFERENCES_IMPORTED = "ec2PreferencesImported";
+ /**
+ * Preference key for the set of all account ids stored
+ */
+ public static final String P_ACCOUNT_IDS = "accountIds";
+
+ /**
+ * Preference key for the currently selected account id. Used to fetch all
+ * other account details.
+ */
+ public static final String P_CURRENT_ACCOUNT = "currentAccount";
+
+ /**
+ * Preference key for the user-visible name for an account; just a memento.
+ */
+ public static final String P_ACCOUNT_NAME = "accountName";
+
+ public static final String ACCOUNT_ID_SEPARATOR = "|";
+ public static final String ACCOUNT_ID_SEPARATOR_REGEX = "\\|";
+ public static final String DEFAULT_ACCOUNT_NAME = "default";
+ public static final String DEFAULT_ACCOUNT_NAME_BASE_64 = ObfuscatingStringFieldEditor
+ .encodeString(DEFAULT_ACCOUNT_NAME);
+
}
View
3  com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/preferences/PreferenceInitializer.java
@@ -50,7 +50,10 @@
*/
@Override
public void initializeDefaultPreferences() {
+ IPreferenceStore store = getAwsToolkitCorePreferenceStore();
+
importEc2AccountPreferences();
+ store.setDefault(PreferenceConstants.P_DEFAULT_REGION, "us-east-1");
}
/**
View
44 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/DefaultRegionChangeRefreshListener.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2009-2011 Amazon Technologies, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.amazonaws.eclipse.core.regions;
+
+import com.amazonaws.eclipse.core.AwsToolkitCore;
+import com.amazonaws.eclipse.core.preferences.PreferenceChangeRefreshListener;
+
+import com.amazonaws.eclipse.core.ui.IRefreshable;
+
+/**
+ * Preference change refresh listener implementation that detects changes to the
+ * default region preference, which requires objects to refresh their data.
+ */
+public class DefaultRegionChangeRefreshListener extends PreferenceChangeRefreshListener {
+
+ /**
+ * Constructs a new preference change refresh listener ready to refresh the
+ * specified refreshable object when the default region preference is
+ * changed.
+ *
+ * @param refreshable
+ * The object to refresh when the default region preference is
+ * changed.
+ */
+ public DefaultRegionChangeRefreshListener(IRefreshable refreshable) {
+ super(refreshable,
+ AwsToolkitCore.getDefault().getPreferenceStore(),
+ new String[] {
+ com.amazonaws.eclipse.core.preferences.PreferenceConstants.P_DEFAULT_REGION,
+ });
+ }
+}
View
76 com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/regions/Region.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2011 Amazon Technologies, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.amazonaws.eclipse.core.regions;
+
+import java.util.HashMap;
+import java.util.Map;