summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunQiu Ji2011-09-22 20:09:57 (EDT)
committer Brian Payton2011-09-22 20:14:04 (EDT)
commitb7f4c655a6cc95f69017d6e873f9a4dfef5616fc (patch)
treeef837cddd55044d0eed550e89d6e544c41359f78
parent271740743236871edfb2e4d9491aa2fffcfa44fc (diff)
downloadorg.eclipse.datatools.connectivity-b7f4c655a6cc95f69017d6e873f9a4dfef5616fc.zip
org.eclipse.datatools.connectivity-b7f4c655a6cc95f69017d6e873f9a4dfef5616fc.tar.gz
org.eclipse.datatools.connectivity-b7f4c655a6cc95f69017d6e873f9a4dfef5616fc.tar.bz2
Checked in patch for bug 349889v201109230830
-rw-r--r--plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnCellModifier.java10
-rw-r--r--plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnTable.java14
2 files changed, 22 insertions, 2 deletions
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnCellModifier.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnCellModifier.java
index ae8e8f9..2604f2a 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnCellModifier.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnCellModifier.java
@@ -11,6 +11,8 @@
package org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter;
+import java.text.Collator;
+
import org.eclipse.datatools.connectivity.sqm.internal.core.connection.Predicate;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.swt.widgets.TableItem;
@@ -33,7 +35,9 @@ public class ColumnCellModifier implements ICellModifier {
public Object getValue(Object element, String property) {
predicate = (Predicate) element;
- if (property.equalsIgnoreCase("predicate"))
+ Collator collator =Collator.getInstance();
+ collator.setStrength(Collator.PRIMARY);
+ if (collator.compare(property,m_columnTable.getFirstColumnName()) == 0)
return new Integer(predicate.getOperator() - 1);
else
return predicate.getValue();
@@ -43,7 +47,9 @@ public class ColumnCellModifier implements ICellModifier {
item = (TableItem) element;
predicate = (Predicate) item.getData();
- if (property.equalsIgnoreCase("predicate")) {
+ Collator collator =Collator.getInstance();
+ collator.setStrength(Collator.PRIMARY);
+ if (collator.compare(property,m_columnTable.getFirstColumnName()) == 0){
index = ((Integer) value).intValue();
predicate.setOperator(index + 1);
} else {
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnTable.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnTable.java
index df2a162..eb29271 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnTable.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/ColumnTable.java
@@ -122,6 +122,9 @@ public class ColumnTable {
private CommonTableCursor cursor;
+ //Used for Translated Column Name String
+ private String firstColumnName;
+
public ColumnTable(Composite composite,
ConnectionFilterPropertyPage filterWizardPage,
ConnectionFilter connectionFilter) {
@@ -260,6 +263,7 @@ public class ColumnTable {
tableColumn = new TableColumn(m_columnTable, SWT.LEFT);
tableColumn.setText(resource.queryString("_UI_COMBO_PREDICATE"));
columnNames.add(resource.queryString("_UI_COMBO_PREDICATE"));
+ setFirstColumnName(resource.queryString("_UI_COMBO_PREDICATE"));
tableColumn.setWidth(200);
tableColumn.setResizable(true);
@@ -303,6 +307,16 @@ public class ColumnTable {
protected String getValue() {
return getValues()[0];
}
+
+ //Use for Translated Column Name String
+ public String getFirstColumnName() {
+ return firstColumnName;
+ }
+
+ //Use for Translated Column Name String
+ public void setFirstColumnName(String firstColumnName) {
+ this.firstColumnName = firstColumnName;
+ }
protected boolean hasEmptyExpression() {
boolean isEmptyExpression = false;