use of org.apache.sling.ide.eclipse.ui.wizards.ImportWizard in project sling by apache.
the class ImportContentAction method run.
private void run(ISelection currentSelection) {
if (!(currentSelection instanceof IStructuredSelection)) {
return;
}
IStructuredSelection structuredSelection = (IStructuredSelection) currentSelection;
for (Iterator<?> it = structuredSelection.iterator(); it.hasNext(); ) {
Object selected = it.next();
if (selected instanceof IResource) {
IProject project = (IProject) (((IResource) selected).getProject());
if (!ProjectHelper.isContentProject(project)) {
continue;
}
IModule module = ServerUtil.getModule(project);
if (module == null) {
continue;
}
ImportWizard wiz = new ImportWizard();
wiz.init(PlatformUI.getWorkbench(), structuredSelection);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wiz);
dialog.open();
}
}
}
use of org.apache.sling.ide.eclipse.ui.wizards.ImportWizard in project sling by apache.
the class JcrNodeImportContentHandler method createWizard.
protected ImportWizard createWizard(IResource resource) {
ImportWizard wiz = new ImportWizard();
wiz.init(PlatformUI.getWorkbench(), new StructuredSelection(resource));
return wiz;
}
Aggregations