Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2008-07-22 16:02:02 +0000
committerddunne2008-07-22 16:02:02 +0000
commit58de6f0b9fe64c838fa970962f316206647e2db4 (patch)
treeebae75d47329359dc620e370a37452258e70fff8
parent881d008a67f4e1099ed0c5121e8433e6222db04e (diff)
downloadorg.eclipse.osee-58de6f0b9fe64c838fa970962f316206647e2db4.tar.gz
org.eclipse.osee-58de6f0b9fe64c838fa970962f316206647e2db4.tar.xz
org.eclipse.osee-58de6f0b9fe64c838fa970962f316206647e2db4.zip
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewer.java4
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerColumn.java14
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/ColumnData.java22
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeData.java15
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeManager.java104
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/IXViewerCustomizations.java2
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/SortingData.java30
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/XViewerCustomizations.java2
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/dialog/XViewerCustomizeDialog.java10
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java8
10 files changed, 106 insertions, 105 deletions
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewer.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewer.java
index 6098a4c506b..3d3990619a7 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewer.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewer.java
@@ -92,6 +92,10 @@ public class XViewer extends TreeViewer {
toolbarManager.add(customizeAction);
}
+ public boolean doCustomizeInCurrentThread() {
+ return false;
+ }
+
protected void createSupportWidgets(Composite parent) {
Composite comp = new Composite(parent, SWT.NONE);
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerColumn.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerColumn.java
index b8df89b3487..7d8fb851e83 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerColumn.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/XViewerColumn.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.ui.skynet.widgets.xviewer;
import java.util.ArrayList;
import org.eclipse.osee.framework.jdk.core.util.AXml;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.TreeColumn;
/**
* @author Donald G. Dunne
@@ -29,7 +28,6 @@ public class XViewerColumn {
private int align;
private boolean sortForward = true; // if true, sort alphabetically; else reverse
private boolean show = true;
- private TreeColumn treeColumn;
private SortDataType sortDataType = SortDataType.String;
private static ArrayList<XViewerColumn> registeredColumns = new ArrayList<XViewerColumn>();
private String toolTip = "";
@@ -182,14 +180,6 @@ public class XViewerColumn {
this.show = show;
}
- public TreeColumn getTreeColumn() {
- return treeColumn;
- }
-
- public void setTreeColumn(TreeColumn treeColumn) {
- this.treeColumn = treeColumn;
- }
-
/**
* @return alternateName if exists, otherwise systemName
*/
@@ -260,4 +250,8 @@ public class XViewerColumn {
this.multiColumnEditable = multiColumnEditable;
}
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/ColumnData.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/ColumnData.java
index c7aba85b55f..90c198eb41d 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/ColumnData.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/ColumnData.java
@@ -16,7 +16,6 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IXViewerFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerColumn;
/**
@@ -25,9 +24,9 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerColumn;
public class ColumnData {
List<XViewerColumn> columns = new ArrayList<XViewerColumn>();
- Map<String, XViewerColumn> nameToCol = new HashMap<String, XViewerColumn>();
+ Map<String, XViewerColumn> idToColumn = new HashMap<String, XViewerColumn>();
- public List<XViewerColumn> setFromXml(String xml, IXViewerFactory xViewerFactory) {
+ public List<XViewerColumn> setFromXml(String xml) {
columns.clear();
List<XViewerColumn> xCols = new ArrayList<XViewerColumn>();
Matcher columnMatch =
@@ -35,23 +34,18 @@ public class ColumnData {
xml);
while (columnMatch.find()) {
String colXml = columnMatch.group(1);
- String colName = XViewerColumn.getColumnId(colXml);
- XViewerColumn xCol = xViewerFactory.getDefaultXViewerColumn(colName);
- if (xCol == null)
- xCol = new XViewerColumn(null, colXml);
- else
- xCol.setFromXml(colXml);
+ XViewerColumn xCol = new XViewerColumn(null, colXml);
xCols.add(xCol);
}
for (XViewerColumn xCol : xCols) {
columns.add(xCol);
- nameToCol.put(xCol.getId(), xCol);
+ idToColumn.put(xCol.getId(), xCol);
}
return columns;
}
- public XViewerColumn getXColumn(String name) {
- return nameToCol.get(name);
+ public XViewerColumn getXColumn(String id) {
+ return idToColumn.get(id);
}
/**
@@ -85,6 +79,10 @@ public class ColumnData {
*/
public void setColumns(List<XViewerColumn> columns) {
this.columns = columns;
+ idToColumn.clear();
+ for (XViewerColumn xCol : columns) {
+ idToColumn.put(xCol.getId(), xCol);
+ }
}
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeData.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeData.java
index 2a7dfe00af1..168cb1cf21c 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeData.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeData.java
@@ -19,7 +19,6 @@ import org.eclipse.osee.framework.ui.plugin.util.OverlayImage;
import org.eclipse.osee.framework.ui.plugin.util.OverlayImage.Location;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.util.OSEELog;
-import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IXViewerFactory;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.internal.Workbench;
@@ -32,9 +31,9 @@ public class CustomizeData {
private String name;
private String nameSpace;
private boolean personal = false;
- private SortingData sortingData = new SortingData(this);
- private FilterData filterData = new FilterData();
- private ColumnData columnData = new ColumnData();
+ protected SortingData sortingData = new SortingData(this);
+ protected FilterData filterData = new FilterData();
+ protected ColumnData columnData = new ColumnData();
private Map<String, Image> imageMap = new HashMap<String, Image>();
private boolean isWorkbench = false;
@@ -42,9 +41,9 @@ public class CustomizeData {
isWorkbench = Workbench.getInstance() != null && Workbench.getInstance().isRunning();
}
- public CustomizeData(String xml, IXViewerFactory xViewerFactory) {
+ public CustomizeData(String xml) {
this();
- setFromXml(xml, xViewerFactory);
+ setFromXml(xml);
}
public void resetGuid() {
@@ -84,7 +83,7 @@ public class CustomizeData {
return sb.toString();
}
- public void setFromXml(String xml, IXViewerFactory xViewerFactory) {
+ public void setFromXml(String xml) {
Matcher m = Pattern.compile("name=\"(.*?)\".*?namespace=\"(.*?)\".*?guid=\"(.*?)\"").matcher(xml);
if (m.find()) {
name = m.group(1);
@@ -97,7 +96,7 @@ public class CustomizeData {
}
sortingData.setFromXml(xml);
filterData.setFromXml(xml);
- columnData.setFromXml(xml, xViewerFactory);
+ columnData.setFromXml(xml);
}
/**
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeManager.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeManager.java
index 765bff6b208..7b4e3d772f6 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeManager.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/CustomizeManager.java
@@ -45,19 +45,26 @@ public class CustomizeManager {
public CustomizeManager(XViewer xViewer, IXViewerFactory xViewerFactory) {
this.xViewer = xViewer;
this.xViewerFactory = xViewerFactory;
- currentCustData = xViewerFactory.getDefaultTableCustomizeData(xViewer);
+ // Set customize to be user default, if selected, or table default
+ currentCustData = xViewerFactory.getXViewerCustomizations(xViewer).getUserDefaultCustData();
+ if (currentCustData == null) {
+ currentCustData = getTableDefaultCustData();
+ }
xViewerFactory.getXViewerCustomMenu().init(xViewer);
}
/**
- * Clears out current columns and loads
+ * Clears out current columns, sorting and filtering and loads table customization
*/
public void loadCustomization() {
- loadCustomization(getDefaultCustData());
+ loadCustomization(currentCustData);
}
- public void loadCustomization(final CustomizeData custData) {
- SetCustomizationJob job = new SetCustomizationJob(xViewer, custData);
+ /**
+ * Clears out current columns, sorting and filtering and loads table customization
+ */
+ public void loadCustomization(final CustomizeData newCustData) {
+ SetCustomizationJob job = new SetCustomizationJob(xViewer, newCustData);
if (doCustomizeInCurrentThread()) {
job.run(null);
} else {
@@ -68,24 +75,21 @@ public class CustomizeManager {
}
public void addColumns() {
- for (final XViewerColumn xCol : getCurrentCustData().getColumnData().getColumns()) {
+ for (final XViewerColumn xCol : currentCustData.getColumnData().getColumns()) {
TreeColumn column = new TreeColumn(xViewer.getTree(), xCol.getAlign());
column.setMoveable(true);
- xCol.setTreeColumn(column);
column.setData(xCol);
- if (xCol.getToolTip().equals(""))
+ if (xCol.getToolTip().equals("")) {
column.setToolTipText(xCol.getName());
- else
+ } else {
column.setToolTipText(xCol.getToolTip());
+ }
column.setText(xCol.getName());
- System.err.println("handle displaying name or alt name here");
if (xCol.isShow()) {
- int width = xCol.getWidth();
- System.err.println("handle getting customized width here");
- // if (width == 0) width = xCol.getDefaultWidth();
- column.setWidth(width);
- } else
+ column.setWidth(xCol.getWidth());
+ } else {
column.setWidth(0);
+ }
column.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -95,7 +99,7 @@ public class CustomizeManager {
resetDefaultSorter();
}
if (xViewer.isCtrlKeyDown()) {
- List<XViewerColumn> currSortCols = getCurrentCustData().getSortingData().getSortXCols();
+ List<XViewerColumn> currSortCols = currentCustData.getSortingData().getSortXCols();
if (currSortCols == null) {
currSortCols = new ArrayList<XViewerColumn>();
currSortCols.add(xCol);
@@ -107,16 +111,16 @@ public class CustomizeManager {
} else
currSortCols.add(xCol);
}
- getCurrentCustData().getSortingData().setSortXCols(currSortCols);
+ currentCustData.getSortingData().setSortXCols(currSortCols);
} else {
List<XViewerColumn> cols = new ArrayList<XViewerColumn>();
cols.add(xCol);
// If sorter already has this column sorted, reverse the sort
- List<XViewerColumn> currSortCols = getCurrentCustData().getSortingData().getSortXCols();
+ List<XViewerColumn> currSortCols = currentCustData.getSortingData().getSortXCols();
if (currSortCols != null && currSortCols.size() == 1 && currSortCols.iterator().next().equals(xCol)) xCol.reverseSort();
// Set the newly sorted column
- getCurrentCustData().getSortingData().setSortXCols(cols);
+ currentCustData.getSortingData().setSortXCols(cols);
}
xViewer.refresh();
xViewer.updateStatusLabel();
@@ -152,8 +156,20 @@ public class CustomizeManager {
/**
* @return the currentCustData
*/
- public CustomizeData getCurrentCustData() {
- return currentCustData;
+ public CustomizeData generateCustDataFromTable() {
+ CustomizeData custData = new CustomizeData();
+ List<XViewerColumn> columns = new ArrayList<XViewerColumn>(15);
+ for (Integer index : xViewer.getTree().getColumnOrder()) {
+ TreeColumn treeCol = xViewer.getTree().getColumn(index);
+ XViewerColumn xCol = (XViewerColumn) treeCol.getData();
+ xCol.setWidth(treeCol.getWidth());
+ xCol.setShow(treeCol.getWidth() > 0);
+ columns.add(xCol);
+ }
+ custData.columnData.setColumns(columns);
+ custData.sortingData.setFromXml(currentCustData.sortingData.getXml());
+ custData.filterData.setFromXml(currentCustData.filterData.getXml());
+ return custData;
}
public List<XViewerColumn> getCurrentTableColumns() {
@@ -165,30 +181,20 @@ public class CustomizeManager {
*/
public CustomizeData getTableDefaultCustData() {
CustomizeData custData = xViewer.getXViewerFactory().getDefaultTableCustomizeData(xViewer);
- if (custData.getName() == null || this.currentCustData.getName().equals("")) custData.setName(TABLE_DEFAULT_LABEL);
+ if (custData.getName() == null || this.currentCustData.getName().equals("")) {
+ custData.setName(TABLE_DEFAULT_LABEL);
+ }
custData.setNameSpace(xViewer.getViewerNamespace());
return custData;
}
- /**
- * Return the customize data that will be used to customize the table. First, check for a user selected default.
- * Second, check for a tableDefaultCustData set programatically.
- *
- * @return the CustomizeData
- */
- public CustomizeData getDefaultCustData() {
- if (xViewerFactory.getXViewerCustomizations(xViewer).getUserDefaultCustData() != null) return xViewerFactory.getXViewerCustomizations(
- xViewer).getUserDefaultCustData();
- return this.getTableDefaultCustData();
- }
-
public boolean doCustomizeInCurrentThread() {
- return false;
+ return xViewer.doCustomizeInCurrentThread();
}
public String getSortingStr() {
- if (getCurrentCustData().getSortingData().isSorting()) {
- return getCurrentCustData().getSortingData().toString();
+ if (currentCustData.getSortingData().isSorting()) {
+ return currentCustData.getSortingData().toString();
}
return "";
}
@@ -206,8 +212,8 @@ public class CustomizeManager {
return loading;
}
- public List<CustomizeData> getCustDatas() {
- return xViewerFactory.getXViewerCustomizations(xViewer).getCustDatas();
+ public List<CustomizeData> getSavedCustDatas() {
+ return xViewerFactory.getXViewerCustomizations(xViewer).getSavedCustDatas();
}
public void saveCustomization(CustomizeData custData) throws Exception {
@@ -225,17 +231,18 @@ public class CustomizeManager {
}
public void setUserDefaultCustData(CustomizeData newCustData, boolean set) {
- AWorkbench.popup("ERROR", "Not implemented yet");
+ xViewerFactory.getXViewerCustomizations(xViewer).setUserDefaultCustData(newCustData, set);
}
public void deleteCustomization(CustomizeData custData) throws Exception {
- AWorkbench.popup("ERROR", "Not implemented yet");
+ xViewerFactory.getXViewerCustomizations(xViewer).deleteCustomization(custData);
}
public boolean isSorting() {
return currentCustData.getSortingData().isSorting();
}
+
public class SetCustomizationJob extends Job {
private final CustomizeData newCustData;
@@ -258,16 +265,13 @@ public class CustomizeManager {
public void run() {
loading = true;
if (fXViewer.getTree().isDisposed()) return;
- CustomizeData custData = new CustomizeData(newCustData.getXml(), fXViewer.getXViewerFactory());
- // Add any new columns that were added after this customization was saved
- custData.getColumnData().addMissingColumns(getTableDefaultCustData().getColumnData());
- currentCustData = custData;
- if (getCurrentCustData().getName() == null || getCurrentCustData().getName().equals("")) {
- getCurrentCustData().setName(CURRENT_LABEL);
+ currentCustData = newCustData;
+ if (currentCustData.getName() == null || currentCustData.getName().equals("")) {
+ currentCustData.setName(CURRENT_LABEL);
}
- getCurrentCustData().setNameSpace(fXViewer.getViewerNamespace());
- fXViewer.getTextFilterComp().setCustData(custData);
- if (getCurrentCustData().getSortingData().isSorting())
+ currentCustData.setNameSpace(fXViewer.getViewerNamespace());
+ fXViewer.getTextFilterComp().setCustData(newCustData);
+ if (currentCustData.getSortingData().isSorting())
fXViewer.resetDefaultSorter();
else
fXViewer.setSorter(null);
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/IXViewerCustomizations.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/IXViewerCustomizations.java
index 7341630a969..c6439b1c8d8 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/IXViewerCustomizations.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/IXViewerCustomizations.java
@@ -21,7 +21,7 @@ public interface IXViewerCustomizations {
public void saveCustomization(CustomizeData custData) throws Exception;
- public List<CustomizeData> getCustDatas();
+ public List<CustomizeData> getSavedCustDatas();
public CustomizeData getUserDefaultCustData();
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/SortingData.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/SortingData.java
index 571e8e9ec45..5dbf596180f 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/SortingData.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/SortingData.java
@@ -23,8 +23,8 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.XViewerColumn;
public class SortingData {
private static String XTREESORTER_TAG = "xSorter";
- private static String COL_NAME_TAG = "name";
- private List<String> sortingNames = new ArrayList<String>();
+ private static String COL_NAME_TAG = "id";
+ private List<String> sortingIds = new ArrayList<String>();
private final CustomizeData custData;
public SortingData(CustomizeData custData) {
@@ -32,11 +32,11 @@ public class SortingData {
}
public void clearSorter() {
- sortingNames.clear();
+ sortingIds.clear();
}
public boolean isSorting() {
- return sortingNames.size() > 0;
+ return sortingIds.size() > 0;
}
public String toString() {
@@ -54,32 +54,34 @@ public class SortingData {
public List<XViewerColumn> getSortXCols() {
List<XViewerColumn> cols = new ArrayList<XViewerColumn>();
- for (String name : getSortingNames())
- cols.add(custData.getColumnData().getXColumn(name));
+ for (String id : getSortingNames())
+ cols.add(custData.getColumnData().getXColumn(id));
return cols;
}
public void setSortXCols(List<XViewerColumn> sortXCols) {
- sortingNames.clear();
+ sortingIds.clear();
for (XViewerColumn xCol : sortXCols) {
- sortingNames.add(xCol.getId());
+ sortingIds.add(xCol.getId());
}
}
public String getXml() {
StringBuffer sb = new StringBuffer("<" + XTREESORTER_TAG + ">");
- for (String item : sortingNames)
+ // NOTE: Sorting direction is stored as part of the column data
+ for (String item : sortingIds)
sb.append(AXml.addTagData(COL_NAME_TAG, item));
sb.append("</" + XTREESORTER_TAG + ">");
return sb.toString();
}
public void setFromXml(String xml) {
- sortingNames.clear();
+ // NOTE: Sorting direction is stored as part of the column data
+ sortingIds.clear();
String xmlSortStr = AXml.getTagData(xml, XTREESORTER_TAG);
Matcher m = Pattern.compile("<" + COL_NAME_TAG + ">(.*?)</" + COL_NAME_TAG + ">").matcher(xmlSortStr);
while (m.find()) {
- sortingNames.add(m.group(1));
+ sortingIds.add(m.group(1));
}
}
@@ -87,18 +89,18 @@ public class SortingData {
* @return the sortingNames
*/
public List<String> getSortingNames() {
- return sortingNames;
+ return sortingIds;
}
public void addSortingName(String name) {
- if (!this.sortingNames.contains(name)) this.sortingNames.add(name);
+ if (!this.sortingIds.contains(name)) this.sortingIds.add(name);
}
/**
* @param sortingNames the sortingNames to set
*/
public void setSortingNames(List<String> sortingNames) {
- this.sortingNames = sortingNames;
+ this.sortingIds = sortingNames;
}
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/XViewerCustomizations.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/XViewerCustomizations.java
index 44a587dbcf9..4a8f19613e1 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/XViewerCustomizations.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/XViewerCustomizations.java
@@ -27,7 +27,7 @@ public class XViewerCustomizations implements IXViewerCustomizations {
/* (non-Javadoc)
* @see org.eclipse.osee.framework.ui.skynet.widgets.xviewer.customize.IXViewerCustomizations#getCustDatas()
*/
- public List<CustomizeData> getCustDatas() {
+ public List<CustomizeData> getSavedCustDatas() {
return new ArrayList<CustomizeData>();
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/dialog/XViewerCustomizeDialog.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/dialog/XViewerCustomizeDialog.java
index 39dcac69423..4eb18e4fd44 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/dialog/XViewerCustomizeDialog.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/customize/dialog/XViewerCustomizeDialog.java
@@ -562,7 +562,7 @@ public class XViewerCustomizeDialog extends MessageDialog {
private void handleSaveButton() {
List<CustomizeData> custDatas = new ArrayList<CustomizeData>();
- for (CustomizeData custData : xViewer.getCustomizeMgr().getCustDatas()) {
+ for (CustomizeData custData : xViewer.getCustomizeMgr().getSavedCustDatas()) {
if (custData.isPersonal())
custDatas.add(custData);
else if (OseeAts.isAtsAdmin()) custDatas.add(custData);
@@ -601,7 +601,7 @@ public class XViewerCustomizeDialog extends MessageDialog {
* @return CustomizeData represented by the configuration area
*/
private CustomizeData getConfigCustomizeCustData() {
- CustomizeData custData = new CustomizeData(currentCustomizeData.getXml(), xViewer.getXViewerFactory());
+ CustomizeData custData = new CustomizeData(currentCustomizeData.getXml());
custData.resetGuid();
custData.getColumnData().setColumns(getConfigCustXViewerColumns());
custData.getSortingData().setFromXml(sorterText.getText());
@@ -671,15 +671,15 @@ public class XViewerCustomizeDialog extends MessageDialog {
private void loadCustomizeTable() {
// Add stored customization data
- List<CustomizeData> custDatas = xViewer.getCustomizeMgr().getCustDatas();
+ List<CustomizeData> custDatas = xViewer.getCustomizeMgr().getSavedCustDatas();
// Add table default customization data
defaultTableCustData = xViewer.getCustomizeMgr().getTableDefaultCustData();
defaultTableCustData.setName(CustomizeManager.TABLE_DEFAULT_LABEL);
custDatas.add(defaultTableCustData);
- // Add current customization data
- CustomizeData currentCustData = xViewer.getCustomizeMgr().getCurrentCustData();
+ // Add current customization data generated from actual table
+ CustomizeData currentCustData = xViewer.getCustomizeMgr().generateCustDataFromTable();
currentCustData.setName(CustomizeManager.CURRENT_LABEL);
custDatas.add(currentCustData);
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java
index 41c9d0c2041..92fac6e5162 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java
@@ -59,7 +59,7 @@ public class SkynetCustomizations implements IXViewerCustomizations {
*
* @see org.eclipse.osee.framework.ui.skynet.widgets.xviewer.customize.IXViewerCustomizations#getCustDatas()
*/
- public List<CustomizeData> getCustDatas() {
+ public List<CustomizeData> getSavedCustDatas() {
loadCustomizationData();
return custDatas;
}
@@ -144,7 +144,7 @@ public class SkynetCustomizations implements IXViewerCustomizations {
}
public CustomizeData getUserDefaultCustData() {
- for (CustomizeData custData : getCustDatas()) {
+ for (CustomizeData custData : getSavedCustDatas()) {
if (xViewerDefaults.isDefaultCustomization(custData)) return custData;
}
return null;
@@ -156,7 +156,7 @@ public class SkynetCustomizations implements IXViewerCustomizations {
public void setUserDefaultCustData(CustomizeData newCustData, boolean set) {
// Remove old defaults
- for (CustomizeData custData : getCustDatas()) {
+ for (CustomizeData custData : getSavedCustDatas()) {
if (xViewerDefaults.isDefaultCustomization(custData)) {
xViewerDefaults.removeDefaultCustomization(custData);
}
@@ -179,7 +179,7 @@ public class SkynetCustomizations implements IXViewerCustomizations {
Matcher m =
Pattern.compile("name=\"(.*?)\".*?namespace=\"" + xViewer.getViewerNamespace() + "\"").matcher(str);
if (m.find()) {
- CustomizeData custData = new CustomizeData(str, xViewer.getXViewerFactory());
+ CustomizeData custData = new CustomizeData(str);
custDatas.add(custData);
}
}

Back to the top