summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-19 05:41:01 (EST)
committerEike Stepper2007-12-19 05:41:01 (EST)
commit01a934109234355e656dde2e6133b1b182373392 (patch)
tree644d9a306e3247630b6a7599004b01a951389f43
parent848122ec627d1c0e36484821ce2d56495b08fabc (diff)
downloadcdo-01a934109234355e656dde2e6133b1b182373392.zip
cdo-01a934109234355e656dde2e6133b1b182373392.tar.gz
cdo-01a934109234355e656dde2e6133b1b182373392.tar.bz2
[213417] Provide action to import resources
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213417
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java30
1 files changed, 10 insertions, 20 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java
index a7c1c3b..6fada30 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java
@@ -10,6 +10,8 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Composite;
@@ -134,6 +136,14 @@ public class ImportResourceAction extends ViewAction
data.left = new FormAttachment(0, CONTROL_OFFSET);
data.right = new FormAttachment(100, -CONTROL_OFFSET);
targetText.setLayoutData(data);
+ targetText.setText(targetPath);
+ targetText.addModifyListener(new ModifyListener()
+ {
+ public void modifyText(ModifyEvent e)
+ {
+ targetPath = targetText.getText();
+ }
+ });
}
Label separatorLabel2 = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
@@ -146,26 +156,6 @@ public class ImportResourceAction extends ViewAction
}
return composite;
-
- // Composite composite = UIUtil.createGridComposite(parent, 1);
- // Control source = super.createDialogArea(composite);
- // source.setLayoutData(UIUtil.createGridData(true, false));
- //
- // Composite line = UIUtil.createGridComposite(composite, 2);
- // new Label(line, SWT.NONE).setText("Enter target path:");
- //
- // targetText = new Text(line, SWT.BORDER);
- // targetText.setLayoutData(UIUtil.createGridData(true, false));
- // targetText.setText(targetPath);
- // targetText.addModifyListener(new ModifyListener()
- // {
- // public void modifyText(ModifyEvent e)
- // {
- // targetPath = targetText.getText();
- // }
- // });
- //
- // return source;
}
}
} \ No newline at end of file