ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # IGNITE-32 WIP: minor.
Date Wed, 14 Jan 2015 11:03:18 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 0b45f2498 -> 1c5932c80


# IGNITE-32 WIP: minor.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1c5932c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1c5932c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1c5932c8

Branch: refs/heads/ignite-32
Commit: 1c5932c80289771f7bff382c16920e953b204cfb
Parents: 0b45f24
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Jan 14 18:03:43 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Jan 14 18:03:43 2015 +0700

----------------------------------------------------------------------
 .../apache/ignite/schema/ui/ModalDialog.java    |  1 -
 .../apache/ignite/schema/ui/PojoDescriptor.java | 10 ++---
 .../apache/ignite/schema/ui/SchemaLoadApp.java  | 47 ++++++++++----------
 3 files changed, 28 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1c5932c8/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
index 3fc6b63..4f04d41 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
@@ -2,7 +2,6 @@
 
 package org.apache.ignite.schema.ui;
 
-import javafx.application.*;
 import javafx.stage.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1c5932c8/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/PojoDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/PojoDescriptor.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/PojoDescriptor.java
index 6a560f1..13bdc20 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/PojoDescriptor.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/PojoDescriptor.java
@@ -52,7 +52,7 @@ public class PojoDescriptor {
 
         fieldsPrev = new ArrayList<>(fields.size());
 
-        for(PojoField field : fields)
+        for (PojoField field : fields)
             fieldsPrev.add(new PojoField(field));
     }
 
@@ -63,7 +63,7 @@ public class PojoDescriptor {
         boolean diff = !keyClsName.equals(keyClsNamePrev) || !valClsName.equals(valClsNamePrev);
 
         if (!diff)
-            for(int i = 0; i < fields.size(); i++) {
+            for (int i = 0; i < fields.size(); i++) {
                 PojoField cur = fields.get(i);
                 PojoField prev = fieldsPrev.get(i);
 
@@ -79,13 +79,13 @@ public class PojoDescriptor {
     }
 
     /**
-     * Reset changes made by user.
+     * Revert changes made by user.
      */
-    public void reset() {
+    public void revert() {
         keyClsName = keyClsNamePrev;
         valClsName = valClsNamePrev;
 
-        for(int i = 0; i < fields.size(); i++) {
+        for (int i = 0; i < fields.size(); i++) {
             PojoField cur = fields.get(i);
             PojoField prev = fieldsPrev.get(i);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1c5932c8/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
index f5cc705..e3bbaa2 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
@@ -23,7 +23,6 @@ import java.io.*;
 import java.net.*;
 import java.sql.*;
 import java.util.*;
-import java.util.List;
 import java.util.concurrent.*;
 import java.util.prefs.*;
 import java.util.regex.*;
@@ -586,7 +585,7 @@ public class SchemaLoadApp extends Application {
 
         jdbcDrvJarTf = connPnl.addLabeled("Driver JAR:", textField("Path to driver jar"));
 
-        connPnl.add(button("...", "",  new EventHandler<ActionEvent>() {
+        connPnl.add(button("...", "", new EventHandler<ActionEvent>() {
             /** {@inheritDoc} */
             @Override public void handle(ActionEvent evt) {
                 FileChooser fc = new FileChooser();
@@ -774,7 +773,7 @@ public class SchemaLoadApp extends Application {
 
         genPnl.add(new Label("Replace Ignite name for selected table:"), 3);
 
-        ptrnTf = genPnl.addLabeled("    Regexp pattern:", textField("Regular expression pattern.
For example: ((\\w+)"), 2);
+        ptrnTf = genPnl.addLabeled("    Regexp pattern:", textField("Regular expression pattern.
For example: (\\w+)"), 2);
         replaceTf = genPnl.addLabeled("    Replace with:", textField("Replace text. For example:
$1_Suffix"), 2);
 
         genPnl.add(buttonsPane(Pos.BOTTOM_RIGHT, false,
@@ -790,39 +789,39 @@ public class SchemaLoadApp extends Application {
                             return;
                         }
 
-                    String ptrn = ptrnTf.getText().trim();
+                        String ptrn = ptrnTf.getText().trim();
 
-                    if (ptrn.isEmpty()) {
-                        MessageBox.warningDialog(owner, "Regular expression pattern should
not be empty!");
+                        if (ptrn.isEmpty()) {
+                            MessageBox.warningDialog(owner, "Regular expression pattern should
not be empty!");
 
-                        ptrnTf.requestFocus();
+                            ptrnTf.requestFocus();
 
-                        return;
-                    }
+                            return;
+                        }
 
-                    String replace = replaceTf.getText().trim();
+                        String replace = replaceTf.getText().trim();
 
-                    if (replace.isEmpty()) {
-                        MessageBox.warningDialog(owner, "Replace expression should not be
empty!");
+                        if (replace.isEmpty()) {
+                            MessageBox.warningDialog(owner, "Replace expression should not
be empty!");
 
-                        replaceTf.requestFocus();
+                            replaceTf.requestFocus();
 
-                        return;
-                    }
+                            return;
+                        }
 
-                    try {
-                        for(PojoField field : fields)
-                            field.javaName(field.javaName().replaceAll(ptrn, replace));
-                    }
-                    catch (PatternSyntaxException e) {
-                        MessageBox.errorDialog(owner, "Failed to apply regexp!", e);
+                        try {
+                            for (PojoField field : fields)
+                                field.javaName(field.javaName().replaceAll(ptrn, replace));
+                        }
+                        catch (PatternSyntaxException e) {
+                            MessageBox.errorDialog(owner, "Failed to apply regexp!", e);
+                        }
                     }
-                }
-            }),
+                }),
             button("Revert", "Revert all changes to Ignite name to default ones", new EventHandler<ActionEvent>()
{
                 /** {@inheritDoc} */
                 @Override public void handle(ActionEvent evt) {
-                    // TODO: CODE: implement.
+                    // TODO pojo.revert();
                 }
             })), 3);
 


Mime
View raw message