Author: adietish
Date: 2010-12-03 13:46:15 -0500 (Fri, 03 Dec 2010)
New Revision: 27157
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilter.java
Log:
[JBIDE-7688] renamed InstanceFilter to InstanceFilterWizard since it is a wizard (and
shall not be mixed up with the filter IntanceFilter)
Deleted:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilter.java 2010-12-03
18:44:17 UTC (rev 27156)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilter.java 2010-12-03
18:46:15 UTC (rev 27157)
@@ -1,59 +0,0 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Display;
-import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudManager;
-import org.jboss.tools.deltacloud.ui.ErrorUtils;
-
-public class InstanceFilter extends Wizard {
-
- private DeltaCloud cloud;
- private InstanceFilterPage mainPage;
-
- public InstanceFilter(DeltaCloud cloud) {
- this.cloud = cloud;
- }
-
- @Override
- public void addPages() {
- // TODO Auto-generated method stub
- mainPage = new InstanceFilterPage(cloud);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- String nameRule = mainPage.getNameRule();
- String idRule = mainPage.getIdRule();
- String imageIdRule = mainPage.getImageIdRule();
- String ownerIdRule = mainPage.getOwnerIdRule();
- String keyNameRule = mainPage.getKeyNameRule();
- String realmRule = mainPage.getRealmRule();
- String profileRule = mainPage.getProfileRule();
-
- try {
- cloud.updateInstanceFilter(nameRule + ";" + //$NON-NLS-1$
- idRule + ";" + //$NON-NLS-1$
- imageIdRule + ";" + //$NON-NLS-1$
- ownerIdRule + ";" + //$NON-NLS-1$
- keyNameRule + ";" + //$NON-NLS-1$
- realmRule + ";" + //$NON-NLS-1$
- profileRule);
- DeltaCloudManager.getDefault().saveClouds();
- } catch (Exception e) {
- // TODO: internationalize strings
- ErrorUtils.handleError(
- "Error",
- "Could not update filters", e, Display.getDefault().getActiveShell());
- }
-
- return true;
- }
-
-}
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
(from rev 27061,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilter.java)
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2010-12-03
18:46:15 UTC (rev 27157)
@@ -0,0 +1,58 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.ui.ErrorUtils;
+
+public class InstanceFilterWizard extends Wizard {
+
+ private DeltaCloud cloud;
+ private InstanceFilterPage mainPage;
+
+ public InstanceFilterWizard(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new InstanceFilterPage(cloud);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ String nameRule = mainPage.getNameRule();
+ String idRule = mainPage.getIdRule();
+ String imageIdRule = mainPage.getImageIdRule();
+ String ownerIdRule = mainPage.getOwnerIdRule();
+ String keyNameRule = mainPage.getKeyNameRule();
+ String realmRule = mainPage.getRealmRule();
+ String profileRule = mainPage.getProfileRule();
+
+ try {
+ cloud.updateInstanceFilter(nameRule + ";" + //$NON-NLS-1$
+ idRule + ";" + //$NON-NLS-1$
+ imageIdRule + ";" + //$NON-NLS-1$
+ ownerIdRule + ";" + //$NON-NLS-1$
+ keyNameRule + ";" + //$NON-NLS-1$
+ realmRule + ";" + //$NON-NLS-1$
+ profileRule);
+ DeltaCloudManager.getDefault().saveClouds();
+ } catch (Exception e) {
+ // TODO: internationalize strings
+ ErrorUtils.handleError(
+ "Error",
+ "Could not update filters", e, Display.getDefault().getActiveShell());
+ }
+
+ return true;
+ }
+
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Show replies by date