• R/O
  • SSH
  • HTTPS

eclipse-aws: Commit


Commit MetaInfo

Révision103 (tree)
l'heure2010-09-26 23:36:46
Auteurtanakatmf

Message de Log

リファクタリング. インスタンス起動ウィザードの画面レイアウト変更.

Change Summary

Modification

--- plugins/trunk/jp.co.intellilink.aws.ui/src/jp/co/intellilink/aws/ui/wizard/ImageSettingPage.java (revision 102)
+++ plugins/trunk/jp.co.intellilink.aws.ui/src/jp/co/intellilink/aws/ui/wizard/ImageSettingPage.java (revision 103)
@@ -19,7 +19,7 @@
1919
2020 /**
2121 * @author shida
22- *
22+ *
2323 */
2424 public class ImageSettingPage extends WizardPage {
2525
@@ -43,8 +43,10 @@
4343 i++;
4444 }
4545 }
46-
47- /* (non-Javadoc)
46+
47+ /*
48+ * (non-Javadoc)
49+ *
4850 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
4951 */
5052 @Override
@@ -51,43 +53,39 @@
5153 public void createControl(Composite parent) {
5254 Composite container = new Composite(parent, SWT.NONE);
5355 container.setLayout(new GridLayout());
54- Composite imagePanel = new Composite(container, SWT.NONE);
55- StringFieldEditor imageEditor = new StringFieldEditor("imageId", Messages.getString("ImageSettingPage.4"), imagePanel); //$NON-NLS-1$ //$NON-NLS-2$
56+ container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
57+
58+ StringFieldEditor imageEditor = new StringFieldEditor("imageId", Messages.getString("ImageSettingPage.4"), container); //$NON-NLS-1$ //$NON-NLS-2$
5659 imageEditor.setPreferenceStore(store);
5760 editors.add(imageEditor);
58- imagePanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
59- Composite kernelPanel = new Composite(container, SWT.NONE);
60- StringFieldEditor kernelEditor = new StringFieldEditor("kernelId", Messages.getString("ImageSettingPage.6"), kernelPanel); //$NON-NLS-1$ //$NON-NLS-2$
61+
62+ StringFieldEditor kernelEditor = new StringFieldEditor("kernelId", Messages.getString("ImageSettingPage.6"), container); //$NON-NLS-1$ //$NON-NLS-2$
6163 kernelEditor.setPreferenceStore(store);
6264 editors.add(kernelEditor);
63- kernelPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
64- Composite ramdiskPanel = new Composite(container, SWT.NONE);
65- StringFieldEditor ramdiskEditor = new StringFieldEditor("ramdiskId", Messages.getString("ImageSettingPage.8"), ramdiskPanel); //$NON-NLS-1$ //$NON-NLS-2$
65+
66+ StringFieldEditor ramdiskEditor = new StringFieldEditor("ramdiskId", Messages.getString("ImageSettingPage.8"), container); //$NON-NLS-1$ //$NON-NLS-2$
6667 ramdiskEditor.setPreferenceStore(store);
6768 editors.add(ramdiskEditor);
68- ramdiskPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
69- Composite typePanel = new Composite(container, SWT.NONE);
70- ComboFieldEditor typeEditor = new ComboFieldEditor("type", Messages.getString("ImageSettingPage.10"), new String[][]{ //$NON-NLS-1$ //$NON-NLS-2$
71- {"m1.small", "m1.small"} //$NON-NLS-1$ //$NON-NLS-2$
72- ,{"m1.large", "m1.large"} //$NON-NLS-1$ //$NON-NLS-2$
73- ,{"m1.xlarge", "m1.xlarge"} //$NON-NLS-1$ //$NON-NLS-2$
74- ,{"c1.mediam", "c1.mediam"} //$NON-NLS-1$ //$NON-NLS-2$
75- ,{"c1.large", "c1.large"} //$NON-NLS-1$ //$NON-NLS-2$
76- }, typePanel);
69+
70+ ComboFieldEditor typeEditor = new ComboFieldEditor("type", Messages.getString("ImageSettingPage.10"), new String[][] { //$NON-NLS-1$ //$NON-NLS-2$
71+ { "m1.small", "m1.small" } //$NON-NLS-1$ //$NON-NLS-2$
72+ , { "m1.large", "m1.large" } //$NON-NLS-1$ //$NON-NLS-2$
73+ , { "m1.xlarge", "m1.xlarge" } //$NON-NLS-1$ //$NON-NLS-2$
74+ , { "c1.mediam", "c1.mediam" } //$NON-NLS-1$ //$NON-NLS-2$
75+ , { "c1.large", "c1.large" } //$NON-NLS-1$ //$NON-NLS-2$
76+ }, container);
7777 typeEditor.setPreferenceStore(store);
7878 editors.add(typeEditor);
79- Composite minPanel = new Composite(container, SWT.NONE);
80- IntegerFieldEditor minEditor = new IntegerFieldEditor("min", Messages.getString("ImageSettingPage.22"), minPanel); //$NON-NLS-1$ //$NON-NLS-2$
79+
80+ IntegerFieldEditor minEditor = new IntegerFieldEditor("min", Messages.getString("ImageSettingPage.22"), container); //$NON-NLS-1$ //$NON-NLS-2$
8181 minEditor.setPreferenceStore(store);
8282 editors.add(minEditor);
83- minPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
84- Composite maxPanel = new Composite(container, SWT.NONE);
85- IntegerFieldEditor maxEditor = new IntegerFieldEditor("max", Messages.getString("ImageSettingPage.24"), maxPanel); //$NON-NLS-1$ //$NON-NLS-2$
83+
84+ IntegerFieldEditor maxEditor = new IntegerFieldEditor("max", Messages.getString("ImageSettingPage.24"), container); //$NON-NLS-1$ //$NON-NLS-2$
8685 maxEditor.setPreferenceStore(store);
8786 editors.add(maxEditor);
88- maxPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
89- Composite keyPanel = new Composite(container, SWT.NONE);
90- ComboFieldEditor keyEditor = new ComboFieldEditor("key", Messages.getString("ImageSettingPage.26"), keypairs, keyPanel); //$NON-NLS-1$ //$NON-NLS-2$
87+
88+ ComboFieldEditor keyEditor = new ComboFieldEditor("key", Messages.getString("ImageSettingPage.26"), keypairs, container); //$NON-NLS-1$ //$NON-NLS-2$
9189 keyEditor.setPreferenceStore(store);
9290 editors.add(keyEditor);
9391
@@ -96,7 +94,6 @@
9694 }
9795 setControl(container);
9896 }
99-
10097
10198 public void onFinished() {
10299 for (FieldEditor editor : editors) {
@@ -103,4 +100,5 @@
103100 editor.store();
104101 }
105102 }
103+
106104 }
--- plugins/trunk/jp.co.intellilink.aws.ui/src/jp/co/intellilink/aws/ui/wizard/InstancePlacementPage.java (revision 102)
+++ plugins/trunk/jp.co.intellilink.aws.ui/src/jp/co/intellilink/aws/ui/wizard/InstancePlacementPage.java (revision 103)
@@ -10,22 +10,25 @@
1010 import org.eclipse.jface.preference.StringFieldEditor;
1111 import org.eclipse.jface.wizard.WizardPage;
1212 import org.eclipse.swt.SWT;
13-import org.eclipse.swt.layout.GridData;
1413 import org.eclipse.swt.layout.GridLayout;
1514 import org.eclipse.swt.widgets.Composite;
1615
1716 /**
1817 * @author shida
19- *
18+ *
2019 */
2120 public class InstancePlacementPage extends WizardPage {
2221
2322 private final IPreferenceStore store;
23+
2424 private String[][] groups;
25+
2526 private String[][] zones;
26- private Composite zonePanel;
27+
2728 private ComboFieldEditor groupEditor;
29+
2830 private StringFieldEditor additionalEditor;
31+
2932 private ComboFieldEditor zoneEditor;
3033
3134 protected InstancePlacementPage(IPreferenceStore store) {
@@ -44,7 +47,7 @@
4447 i++;
4548 }
4649 }
47-
50+
4851 public void setAvailabilityZones(List<String> availabilityZones) {
4952 zones = new String[availabilityZones.size()][2];
5053 int i = 0;
@@ -54,8 +57,10 @@
5457 i++;
5558 }
5659 }
57-
58- /* (non-Javadoc)
60+
61+ /*
62+ * (non-Javadoc)
63+ *
5964 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
6065 */
6166 @Override
@@ -62,22 +67,19 @@
6267 public void createControl(Composite parent) {
6368 Composite container = new Composite(parent, SWT.NONE);
6469 container.setLayout(new GridLayout());
65-
66- zonePanel = new Composite(container, SWT.NONE);
67- zoneEditor = new ComboFieldEditor("availabilityZone", Messages.getString("InstancePlacementPage.4"), zones, zonePanel); //$NON-NLS-1$ //$NON-NLS-2$
70+
71+ zoneEditor = new ComboFieldEditor("availabilityZone", Messages.getString("InstancePlacementPage.4"), zones, container); //$NON-NLS-1$ //$NON-NLS-2$
6872 zoneEditor.setPreferenceStore(store);
6973 zoneEditor.load();
70- Composite groupPanel = new Composite(container, SWT.NONE);
71- groupEditor = new ComboFieldEditor("securityGroup", Messages.getString("InstancePlacementPage.6"), groups, groupPanel); //$NON-NLS-1$ //$NON-NLS-2$
74+
75+ groupEditor = new ComboFieldEditor("securityGroup", Messages.getString("InstancePlacementPage.6"), groups, container); //$NON-NLS-1$ //$NON-NLS-2$
7276 groupEditor.setPreferenceStore(store);
7377 groupEditor.load();
74-
75- Composite additinalPanel = new Composite(container, SWT.NONE);
76- additionalEditor = new StringFieldEditor("additionalInfo", Messages.getString("InstancePlacementPage.8"), additinalPanel); //$NON-NLS-1$ //$NON-NLS-2$
78+
79+ additionalEditor = new StringFieldEditor("additionalInfo", Messages.getString("InstancePlacementPage.8"), container); //$NON-NLS-1$ //$NON-NLS-2$
7780 additionalEditor.setPreferenceStore(store);
7881 additionalEditor.load();
79- additinalPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
80-
82+
8183 setControl(container);
8284 }
8385
@@ -86,4 +88,5 @@
8688 groupEditor.store();
8789 additionalEditor.store();
8890 }
91+
8992 }
--- plugins/trunk/jp.co.intellilink.aws.ui/src/jp/co/intellilink/aws/ui/view/ImageView.java (revision 102)
+++ plugins/trunk/jp.co.intellilink.aws.ui/src/jp/co/intellilink/aws/ui/view/ImageView.java (revision 103)
@@ -29,8 +29,11 @@
2929 public class ImageView extends ViewPart {
3030
3131 private ActionCallbackHandler handler;
32+
3233 private DrillDownAdapter drillDownAdapter;
34+
3335 private DescribeImagesAction action;
36+
3437 private RunInstanceAction runInstanceAction;
3538
3639 @Override
Afficher sur ancien navigateur de dépôt.