org.eclipse.ui.dialogs.NewFolderDialog Java Examples

The following examples show how to use org.eclipse.ui.dialogs.NewFolderDialog. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FolderSelectionDialog.java    From typescript.java with MIT License 5 votes vote down vote up
protected void newFolderButtonPressed() {
	NewFolderDialog dialog = new NewFolderDialog(getShell(),
			fSelectedContainer);
	if (dialog.open() == Window.OK) {
		TreeViewer treeViewer = getTreeViewer();
		treeViewer.refresh(fSelectedContainer);
		Object createdFolder = dialog.getResult()[0];
		treeViewer.reveal(createdFolder);
		treeViewer.setSelection(new StructuredSelection(createdFolder));
	}
}
 
Example #2
Source File: MultipleFolderSelectionDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
protected Object createFolder(IContainer container) {
	NewFolderDialog dialog= new NewFolderDialog(getShell(), container);
	if (dialog.open() == Window.OK) {
		return dialog.getResult()[0];
	}
	return null;
}
 
Example #3
Source File: FolderSelectionDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
protected void newFolderButtonPressed() {
	NewFolderDialog dialog= new NewFolderDialog(getShell(), fSelectedContainer);
	if (dialog.open() == Window.OK) {
		TreeViewer treeViewer= getTreeViewer();
		treeViewer.refresh(fSelectedContainer);
		Object createdFolder= dialog.getResult()[0];
		treeViewer.reveal(createdFolder);
		treeViewer.setSelection(new StructuredSelection(createdFolder));
	}
}