use of com.twinsoft.convertigo.eclipse.swt.ProjectReferenceComposite in project convertigo by convertigo.
the class ImportWizardPage method createControl.
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
Composite page = new Composite(parent, SWT.NONE);
page.setLayout(new GridLayout(2, false));
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
Composite fileSelectionArea = new Composite(page, SWT.NONE);
fileSelectionArea.setLayoutData(gd);
editor = new ProjectFileFieldEditor("fileSelect", "Select File: ", fileSelectionArea);
editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
filePath = path.toString();
updateStatus();
}
});
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
new Label(page, SWT.HORIZONTAL | SWT.SEPARATOR).setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
Label label = new Label(page, SWT.NONE);
label.setLayoutData(gd);
label.setText("Project can also be imported by a \"Project remote URL\":");
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
projectReferenceComposite = new ProjectReferenceComposite(page, SWT.NONE, new ProjectUrlParser(""), () -> updateStatus());
projectReferenceComposite.setLayoutData(gd);
updateStatus();
setControl(page);
}
Aggregations