Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-07 10:21:10 +0000
committerEike Stepper2012-09-07 10:21:10 +0000
commitfc6d8023730d0f4d7d690a850154a292648ca87c (patch)
treeb106ab046fb8b18c188b20bbab7071abc331f170 /plugins
parentfe7a6fef988fb0c56b164c98aa46a7a41b9d1913 (diff)
downloadcdo-fc6d8023730d0f4d7d690a850154a292648ca87c.tar.gz
cdo-fc6d8023730d0f4d7d690a850154a292648ca87c.tar.xz
cdo-fc6d8023730d0f4d7d690a850154a292648ca87c.zip
[388928] Develop a resource transfer framework
https://bugs.eclipse.org/bugs/show_bug.cgi?id=388928
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferDetailsComposite.java54
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferTreeComposite.java2
2 files changed, 35 insertions, 21 deletions
diff --git a/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferDetailsComposite.java b/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferDetailsComposite.java
index 88a86ddfb1..b95c8c3258 100644
--- a/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferDetailsComposite.java
+++ b/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferDetailsComposite.java
@@ -26,8 +26,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -39,8 +38,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import java.util.ArrayList;
@@ -75,7 +72,7 @@ public class TransferDetailsComposite extends Composite implements IListener
private Combo resolution;
- private TableViewer unmappedModels;
+ private ListViewer unmappedModels;
public TransferDetailsComposite(Composite parent, int style, final CDOTransfer transfer)
{
@@ -255,21 +252,25 @@ public class TransferDetailsComposite extends Composite implements IListener
unmappedModelsLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
unmappedModelsLabel.setText("Unmapped Models:");
- unmappedModels = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
- Table table = unmappedModels.getTable();
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
- table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
-
- TableViewerColumn uriViewerColumn = new TableViewerColumn(unmappedModels, SWT.NONE);
- TableColumn uriColumn = uriViewerColumn.getColumn();
- uriColumn.setWidth(373);
- uriColumn.setText("URI");
-
- TableViewerColumn transformationViewerColumn = new TableViewerColumn(unmappedModels, SWT.NONE);
- TableColumn transformationColumn = transformationViewerColumn.getColumn();
- transformationColumn.setWidth(341);
- transformationColumn.setText("Transformation");
+ unmappedModels = new ListViewer(this, SWT.BORDER);
+ org.eclipse.swt.widgets.List list = unmappedModels.getList();
+ list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+
+ // unmappedModels = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
+ // Table table = unmappedModels.getTable();
+ // table.setLinesVisible(true);
+ // table.setHeaderVisible(true);
+ // table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ //
+ // TableViewerColumn uriViewerColumn = new TableViewerColumn(unmappedModels, SWT.NONE);
+ // TableColumn uriColumn = uriViewerColumn.getColumn();
+ // uriColumn.setWidth(373);
+ // uriColumn.setText("URI");
+ //
+ // TableViewerColumn transformationViewerColumn = new TableViewerColumn(unmappedModels, SWT.NONE);
+ // TableColumn transformationColumn = transformationViewerColumn.getColumn();
+ // transformationColumn.setWidth(341);
+ // transformationColumn.setText("Transformation");
unmappedModels.setContentProvider(new StructuredContentProvider<CDOTransfer>()
{
@@ -307,6 +308,14 @@ public class TransferDetailsComposite extends Composite implements IListener
mapSource.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
mapSource.setBounds(0, 0, 75, 25);
mapSource.setText("Map From Source");
+ mapSource.addSelectionListener(new SelectionAdapter()
+ {
+ @Override
+ public void widgetSelected(SelectionEvent e)
+ {
+
+ }
+ });
Button replaceTarget = new Button(transformationButtonsPane, SWT.NONE);
replaceTarget.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
@@ -392,6 +401,11 @@ public class TransferDetailsComposite extends Composite implements IListener
return resolution;
}
+ public ListViewer getUnmappedModels()
+ {
+ return unmappedModels;
+ }
+
@Override
public boolean setFocus()
{
diff --git a/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferTreeComposite.java b/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferTreeComposite.java
index f47cc15f7f..4ba0bd9fec 100644
--- a/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferTreeComposite.java
+++ b/plugins/org.eclipse.emf.cdo.transfer.ui/src/org/eclipse/emf/cdo/transfer/ui/widgets/TransferTreeComposite.java
@@ -40,7 +40,7 @@ public class TransferTreeComposite extends Composite
this.transfer = transfer;
setLayout(new FillLayout(SWT.VERTICAL));
- viewer = new TreeViewer(this, SWT.NONE);
+ viewer = new TreeViewer(this, SWT.FULL_SELECTION);
Tree tree = viewer.getTree();
tree.setLinesVisible(true);

Back to the top