Java Code Examples for org.eclipse.ui.dialogs.IOverwriteQuery#ALL
The following examples show how to use
org.eclipse.ui.dialogs.IOverwriteQuery#ALL .
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: ExampleImporter.java From statecharts with Eclipse Public License 1.0 | 6 votes |
@SuppressWarnings("deprecation") public IProject importExample(ExampleData edata, IProgressMonitor monitor) { try { IProjectDescription original = ResourcesPlugin.getWorkspace() .loadProjectDescription(new Path(edata.getProjectDir().getAbsolutePath()).append("/.project")); IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(edata.getProjectDir().getName()); IProjectDescription clone = ResourcesPlugin.getWorkspace().newProjectDescription(original.getName()); clone.setBuildSpec(original.getBuildSpec()); clone.setComment(original.getComment()); clone.setDynamicReferences(original.getDynamicReferences()); clone.setNatureIds(original.getNatureIds()); clone.setReferencedProjects(original.getReferencedProjects()); if (project.exists()) { return project; } project.create(clone, monitor); project.open(monitor); @SuppressWarnings("unchecked") List<IFile> filesToImport = FileSystemStructureProvider.INSTANCE.getChildren(edata.getProjectDir()); ImportOperation io = new ImportOperation(project.getFullPath(), edata.getProjectDir(), FileSystemStructureProvider.INSTANCE, new IOverwriteQuery() { @Override public String queryOverwrite(String pathString) { return IOverwriteQuery.ALL; } }, filesToImport); io.setOverwriteResources(true); io.setCreateContainerStructure(false); io.run(monitor); project.refreshLocal(IProject.DEPTH_INFINITE, monitor); return project; } catch (Exception e) { e.printStackTrace(); } return null; }
Example 2
Source File: TracePackageImportOperation.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
@Override public String queryOverwrite(String pathString) { // We always overwrite once we reach this point return IOverwriteQuery.ALL; }
Example 3
Source File: HybridProjectImportPage.java From thym with Eclipse Public License 1.0 | 4 votes |
@Override public String queryOverwrite(String pathString) { return IOverwriteQuery.ALL; }