use of org.eclipse.wst.xsl.internal.debug.ui.tabs.main.InputFileBlock in project webtools.sourceediting by eclipse.
the class XSLLaunchShortcut method promptForInput.
private void promptForInput() {
// prompt for input xml file
StatusDialog dialog = new StatusDialog(getShell()) {
private InputFileBlock inputFileBlock = new InputFileBlock(null);
@Override
protected Control createDialogArea(Composite parent) {
Composite comp = (Composite) super.createDialogArea(parent);
comp.setFont(parent.getFont());
GridLayout layout = new GridLayout(1, false);
comp.setLayout(layout);
Label label = new Label(comp, SWT.NONE);
label.setFont(comp.getFont());
GridData gd = new GridData();
gd.horizontalIndent = 5;
gd.verticalIndent = 5;
gd.widthHint = 380;
label.setLayoutData(gd);
label.setText(Messages.XSLLaunchShortcut_0);
inputFileBlock.createControl(comp);
return comp;
}
@Override
protected void okPressed() {
saveSelectedXmlFile();
super.okPressed();
}
private void saveSelectedXmlFile() {
IResource res = inputFileBlock.getResource();
if (res == null)
xmlFilePath = new Path(inputFileBlock.getText());
else if (ResourcesPlugin.getWorkspace().getRoot().exists(res.getFullPath()) && res.getType() == IResource.FILE)
xmlFile = (IFile) res;
}
};
dialog.setHelpAvailable(false);
dialog.setStatusLineAboveButtons(true);
dialog.setTitle(Messages.XSLLaunchShortcut_1);
dialog.open();
}
Aggregations