Greg Sheremeta has uploaded a new change for review.

Change subject: userportal: refactor - reorganize code
......................................................................

userportal: refactor - reorganize code

(Patch 4ae of 12)

Moved some interfaces and static classes to the tops of files. No actual
code changes -- just file organization.

No functional changes -- just a refactor.

Change-Id: I22e2fa3c64cc8a7d0387ab8366849535d60ff96d
Signed-off-by: Greg Sheremeta <[email protected]>
---
M 
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedResourceView.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedTemplateView.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedVirtualMachineView.java
3 files changed, 48 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/27/38727/1

diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedResourceView.java
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedResourceView.java
index 481b85b..79133a3 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedResourceView.java
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedResourceView.java
@@ -63,6 +63,10 @@
 
     private static final ApplicationConstants constants = 
GWT.create(ApplicationConstants.class);
 
+    interface Style extends CssResource {
+        String quotaNameText();
+    }
+
     @UiField
     Style style;
 
@@ -317,10 +321,6 @@
     @Override
     public ResourcesModel flush() {
         return driver.flush();
-    }
-
-    interface Style extends CssResource {
-        String quotaNameText();
     }
 
 }
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedTemplateView.java
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedTemplateView.java
index e842889..a18d2c6 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedTemplateView.java
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedTemplateView.java
@@ -38,6 +38,31 @@
         ViewIdHandler idHandler = GWT.create(ViewIdHandler.class);
     }
 
+    public interface TemplateTableResources extends CellTable.Resources {
+        interface TableStyle extends CellTable.Style {
+        }
+
+        @Override
+        @Source({ CellTable.Style.DEFAULT_CSS, 
"org/ovirt/engine/ui/userportal/css/ExtendedTemplateListTable.css" })
+        TableStyle cellTableStyle();
+    }
+
+    public interface TemplateTableHeaderResources extends CellTable.Resources {
+
+        @Source({ CellTable.Style.DEFAULT_CSS,
+                
"org/ovirt/engine/ui/userportal/css/ExtendedTemplateListTable.css",
+                
"org/ovirt/engine/ui/userportal/css/ExtendedTemplateListTableHeader.css"})
+        @Override
+        CellTable.Style cellTableStyle();
+    }
+
+    public interface TemplateSideTabWithDetailsViewStyle extends ClientBundle {
+
+        
@Source({"org/ovirt/engine/ui/userportal/css/SideTabWithDetailsViewStyle.css",
+                 
"org/ovirt/engine/ui/userportal/css/SideTabExtendedTemplateViewStyle.css"})
+        SideTabWithDetailsViewStyle templateSideTab();
+    }
+
     private static final TemplateTableResources templateTableResources = 
GWT.create(TemplateTableResources.class);
 
     private static final TemplateTableHeaderResources 
TEMPLATE_TABLE_HEADER_RESOURCES =
@@ -130,7 +155,7 @@
             public String getValue(VmTemplate template) {
                 return template.getTemplateVersionName() != null && 
!template.getTemplateVersionName().isEmpty()
                         ? template.getTemplateVersionName()
-                        : "";
+                        : ""; //$NON-NLS-1$
             }
         };
         table.addColumn(subversionNameColumn, 
commonConstants.templateVersionName(), "350px"); //$NON-NLS-1$
@@ -143,7 +168,7 @@
             public String getValue(VmTemplate template) {
                 return template.getDescription() != null && 
!template.getDescription().isEmpty()
                         ? template.getDescription()
-                        : "";
+                        : ""; //$NON-NLS-1$
             }
         };
         table.addColumn(descriptionColumn, 
commonConstants.templateDescription());
@@ -163,29 +188,6 @@
         });
     }
 
-    public interface TemplateTableResources extends CellTable.Resources {
-        interface TableStyle extends CellTable.Style {
-        }
 
-        @Override
-        @Source({ CellTable.Style.DEFAULT_CSS, 
"org/ovirt/engine/ui/userportal/css/ExtendedTemplateListTable.css" })
-        TableStyle cellTableStyle();
-    }
-
-    public interface TemplateTableHeaderResources extends CellTable.Resources {
-
-        @Source({ CellTable.Style.DEFAULT_CSS,
-                
"org/ovirt/engine/ui/userportal/css/ExtendedTemplateListTable.css",
-                
"org/ovirt/engine/ui/userportal/css/ExtendedTemplateListTableHeader.css"})
-        @Override
-        CellTable.Style cellTableStyle();
-    }
-
-    public interface TemplateSideTabWithDetailsViewStyle extends ClientBundle {
-
-        
@Source({"org/ovirt/engine/ui/userportal/css/SideTabWithDetailsViewStyle.css",
-                 
"org/ovirt/engine/ui/userportal/css/SideTabExtendedTemplateViewStyle.css"})
-        SideTabWithDetailsViewStyle templateSideTab();
-    }
 
 }
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedVirtualMachineView.java
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedVirtualMachineView.java
index 7c456dd..f488aae 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedVirtualMachineView.java
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/tab/extended/SideTabExtendedVirtualMachineView.java
@@ -59,6 +59,23 @@
         ViewIdHandler idHandler = GWT.create(ViewIdHandler.class);
     }
 
+    protected abstract class AbstractVmButtonsImageButtonCell extends 
ImageButtonCell<UserPortalItemModel> {
+
+        public AbstractVmButtonsImageButtonCell(ImageResource enabledImage, 
ImageResource disabledImage) {
+            super(enabledImage, 
applicationResources.sideTabExtendedVmStyle().vmButtonEnabled(),
+                    disabledImage, 
applicationResources.sideTabExtendedVmStyle().vmButtonDisabled());
+        }
+    }
+
+    public interface VmTableResources extends CellTable.Resources {
+        interface TableStyle extends CellTable.Style {
+        }
+
+        @Override
+        @Source({ CellTable.Style.DEFAULT_CSS, 
"org/ovirt/engine/ui/userportal/css/ExtendedVmListTable.css" })
+        TableStyle cellTableStyle();
+    }
+
     private static final VmTableResources vmTableResources = 
GWT.create(VmTableResources.class);
 
     private final ApplicationResources applicationResources;
@@ -388,23 +405,6 @@
                         new UserPortalItemSimpleColumn(rebootCell))));
 
         return compositeCell;
-    }
-
-    public interface VmTableResources extends CellTable.Resources {
-        interface TableStyle extends CellTable.Style {
-        }
-
-        @Override
-        @Source({ CellTable.Style.DEFAULT_CSS, 
"org/ovirt/engine/ui/userportal/css/ExtendedVmListTable.css" })
-        TableStyle cellTableStyle();
-    }
-
-    protected abstract class AbstractVmButtonsImageButtonCell extends 
ImageButtonCell<UserPortalItemModel> {
-
-        public AbstractVmButtonsImageButtonCell(ImageResource enabledImage, 
ImageResource disabledImage) {
-            super(enabledImage, 
applicationResources.sideTabExtendedVmStyle().vmButtonEnabled(),
-                    disabledImage, 
applicationResources.sideTabExtendedVmStyle().vmButtonDisabled());
-        }
     }
 
 }


-- 
To view, visit https://gerrit.ovirt.org/38727
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22e2fa3c64cc8a7d0387ab8366849535d60ff96d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to