- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider.<init>()
方法的一些代码示例,展示了ZipFileStructureProvider.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFileStructureProvider.<init>()
方法的具体详情如下:
包路径:org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider
类名称:ZipFileStructureProvider
方法名:<init>
[英]Creates a ZipFileStructureProvider
, which will operate on the passed zip file.
[中]创建一个ZipFileStructureProvider
,它将对传递的zip文件进行操作。
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui
/**
* Returns a structure provider for the specified zip file.
*/
protected ZipFileStructureProvider getStructureProvider(ZipFile targetZip) {
if (providerCache == null)
providerCache = new ZipFileStructureProvider(targetZip);
else if (!providerCache.getZipFile().getName().equals(targetZip.getName())) {
clearProviderCache(); // ie.- new value, so finalize&remove old value
providerCache = new ZipFileStructureProvider(targetZip);
} else if (!providerCache.getZipFile().equals(targetZip))
closeZipFile(targetZip); // ie.- duplicate handle to same .zip
return providerCache;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui
/**
* Returns a structure provider for the specified zip file.
*/
private ZipFileStructureProvider getStructureProvider(ZipFile targetZip) {
if (providerCache == null) {
providerCache = new ZipFileStructureProvider(targetZip);
} else if (!providerCache.getZipFile().getName().equals(targetZip.getName())) {
clearProviderCache();
// ie.- new value, so finalize & remove old value
providerCache = new ZipFileStructureProvider(targetZip);
} else if (!providerCache.getZipFile().equals(targetZip)) {
closeZipFile(targetZip); // ie.- duplicate handle to same .zip
}
return providerCache;
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void importJar(File jar, IResource destination, IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
try (ZipFile input = new ZipFile(jar);) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(input);
ImportOperation op = new ImportOperation(destination.getFullPath(), provider.getRoot(), provider,
pathString -> IOverwriteQuery.ALL);
op.run(monitor);
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, IStatus.OK,
NLS.bind(PDEUIMessages.NewProjectCreationOperation_errorImportingJar, jar), e));
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
public static String[] getTopLevelResources(File file) {
ArrayList<String> result = new ArrayList<>();
try (ZipFile zipFile = new ZipFile(file)) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
List<?> children = provider.getChildren(provider.getRoot());
if (children != null && !children.isEmpty()) {
for (int i = 0; i < children.size(); i++) {
Object curr = children.get(i);
if (provider.isFolder(curr)) {
if (!isClassFolder(provider, curr))
result.add(provider.getLabel(curr) + "/"); //$NON-NLS-1$
else {
if (!result.contains(".")) //$NON-NLS-1$
result.add("."); //$NON-NLS-1$
}
} else {
result.add(provider.getLabel(curr));
}
}
}
} catch (IOException e) {
}
return result.toArray(new String[result.size()]);
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xml.ui
private void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(srcZipFile);
ImportOperation op = new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, overwriteQuery);
op.run(monitor);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(srcZipFile);
ImportOperation op = new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, query);
op.run(monitor);
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
/**
* Searches the given archive file for java source folders. Imports the files in the
* source folders to the specified destination unless the folder is in the list of
* folders to exclude.
* @param file archive file to search for source in
* @param excludeFolders list of IPaths describing folders to ignore while searching
* @param dstPath full path to destination to put the extracted source
* @param collectedPackages will be updated with the set of packages the extracted source belongs to, if <code>null</code> this step will be skipped
* @param monitor progress monitor
* @throws CoreException if there is a problem extracting source from the zip
*/
public static void extractJavaSourceFromArchive(File file, List<IPath> excludeFolders, IPath dstPath, Set<IPath> collectedPackages, IProgressMonitor monitor) throws CoreException {
try (ZipFile zipFile = new ZipFile(file);) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
ArrayList<Object> collected = new ArrayList<>();
collectJavaSourceFromRoot(provider, excludeFolders, collected);
if (collectedPackages != null) {
collectJavaPackages(provider, collected, null, collectedPackages);
}
importContent(provider.getRoot(), dstPath, provider, collected, monitor);
} catch (IOException e) {
IStatus status = new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.ERROR, e.getMessage(), e);
throw new CoreException(status);
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
/**
* Extracts all of the files and subfolders from a single folder within an archive file.
* @param file archive file to search for files
* @param folderPath path to the folder to extract from
* @param dstPath destination to import content to
* @param collectedPackages will be updated with the set of packages the extracted source belongs to, if <code>null</code> this step will be skipped
* @param monitor progress monitor
* @throws CoreException if a problem occurs while extracting
* @since 3.4
*/
public static void extractFolderFromArchive(File file, IPath folderPath, IPath dstPath, Set<IPath> collectedPackages, IProgressMonitor monitor) throws CoreException {
try (ZipFile zipFile = new ZipFile(file)) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
ArrayList<Object> collected = new ArrayList<>();
collectResourcesFromFolder(provider, provider.getRoot(), folderPath, collected);
if (collectedPackages != null) {
collectJavaPackages(provider, collected, folderPath, collectedPackages);
}
importContent(provider.getRoot(), dstPath, provider, collected, monitor);
} catch (IOException e) {
IStatus status = new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.ERROR, e.getMessage(), e);
throw new CoreException(status);
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
/**
* Extracts the contents of the specified zip file to the specified destination
* @param file
* @param dstPath
* @param collectedPackages will be updated with the set of packages the extracted source belongs to, if <code>null</code> this step will be skipped
* @param monitor
* @throws CoreException
*/
public static void extractArchive(File file, IPath dstPath, Set<IPath> collectedPackages, IProgressMonitor monitor) throws CoreException {
try (ZipFile zipFile = new ZipFile(file)) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
// If the caller wants to have package names collected, scan the zip file for package structures
if (collectedPackages != null) {
ArrayList<Object> collected = new ArrayList<>();
collectResources(provider, provider.getRoot(), collected);
collectJavaPackages(provider, collected, null, collectedPackages);
}
importContent(provider.getRoot(), dstPath, provider, null, monitor);
} catch (IOException e) {
IStatus status = new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.ERROR, e.getMessage(), e);
throw new CoreException(status);
}
}
代码示例来源:origin: wala/WALA
public static void importZipfile(String projectName, ZipFile zipFile, IProgressMonitor monitor) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
importProject(provider, monitor, projectName, provider.getRoot());
try {
zipFile.close();
} catch (IOException e) {
e.printStackTrace();
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
if (isJARd(model)) {
zip = new ZipFile(new File(model.getInstallLocation()));
provider = new ZipFileStructureProvider(zip);
root = ((ZipFileStructureProvider) provider).getRoot();
prefixPath = defaultSourcePath;
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
if (isJARd(model)) {
zip = new ZipFile(new File(model.getInstallLocation()));
provider = new ZipFileStructureProvider(zip);
root = ((ZipFileStructureProvider) provider).getRoot();
} else {
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
try {
zip = new ZipFile(new File(model.getInstallLocation()));
ZipFileStructureProvider provider = new ZipFileStructureProvider(zip);
ArrayList<Object> collected = new ArrayList<>();
PluginImportHelper.collectRequiredBundleFiles(provider, provider.getRoot(), collected);
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
try {
zip = new ZipFile(sourceLocation);
ZipFileStructureProvider provider = new ZipFileStructureProvider(zip);
ArrayList<Object> collected = new ArrayList<>();
PluginImportHelper.collectNonJavaNonBuildFiles(provider, provider.getRoot(), collected);
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
SubMonitor iterationMonitor = subMonitor.split(1);
try (ZipFile zip = new ZipFile(new File(model.getInstallLocation()))) {
ZipFileStructureProvider provider = new ZipFileStructureProvider(zip);
Map<IPath, List<Object>> collected = new HashMap<>();
PluginImportHelper.collectBinaryFiles(provider, provider.getRoot(), packageLocations, collected);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
ZipFileStructureProvider provider= new ZipFileStructureProvider(zipFile);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
ZipFileStructureProvider provider= new ZipFileStructureProvider(zipFile);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
ZipFileStructureProvider provider= new ZipFileStructureProvider(zipFile);
我想将按钮栏中的 org.eclipse.jface.wizard.Wizard 中的按钮文本更改为阿拉伯语?我的意思是我想将标签“下一步”按钮更改为“?????”。 最佳答案 向导标签的语言由 JF
我想在 ASP.NET MVC 中创建一个向导,类似于 ASP.NET webforms 中的向导控制功能。 做这个的最好方式是什么? 最佳答案 使用 ASP.NET MVC 我建议使用 javasc
今晚我正在和我的非技术妻子聊天。她在谈论自己是如何培训员工使用一些新软件的。该软件大量使用向导来完成任务。她对我的问题是“为什么巫师被称为“向导”?他们是由对《龙与地下城》感兴趣的 Nerd 制作的吗
我正在使用 https://github.com/mgonto/angular-wizard创建一个 Angular 向导,其步骤可以从路由参数中调用: .../step/1 .../step/2 等
我正在评估 ASP.NET 向导控件。我们需要从不同步骤收集数据、验证数据,最后我应该能够显示数据摘要。 我想知道小组中是否有人使用过此控件以及他们遇到了什么问题。该控件有使用限制吗? 最佳答案 如果
我在人们提交一些数据的表单上使用了 FuelUX 向导,我们希望将其分解为逻辑步骤。效果非常好。 现在我正在处理相同表单的编辑版本,它工作正常,但由于步骤已经加载了数据,我希望用户能够直接跳到步骤 X
我正在编写一个 Eclipse 插件,它利用 Wizard 和 WizardPage 类。 目前,每当我添加页面时,都会执行与该页面相关的代码。这不是我需要的,因为某些页面依赖于前面页面上提供的输入。
我已经实现了以下向导:
我需要构建一个小向导 looks like this您可以引导用户完成向导,并根据每个选择更新图像。由于 iPad 兼容性等一些原因,我无法像此网站上那样使用 Flash。仅使用 javascript
我有一个带有 Twitter Bootstrap 向导 的表单,我有几个图像,当我选择一个时,我必须在本地存储值并转到下一个选项卡 (o._nextTab). 当我单击图像时,它应该转到下一个选项卡,
我有一个向导控件,用户可以一步输入他的姓名、电子邮件地址、电话号码等。 当用户按向导的“下一步”按钮时,我将检查数据库以查看是否存在具有指定电话号码的现有帐户。 如果是这种情况,系统应该询问用户是否会
在 Django Wizard 的文档中我找到了这样的代码: {{ wizard.management_form }} {% if wizard.form.forms %} {{ wizard
先来看看官方介绍 使用表单收集用户输入是 Web 开发中要反复执行的一项任务。用来完成某项任务的一组表单通常称为“向导”。ASP.NET Wizard 控件简化了许多与生成多个表单和收集用户输入相
本文整理了Java中org.eclipse.jface.wizard.WizardSelectionPage类的一些代码示例,展示了WizardSelectionPage类的具体用法。这些代码示例主要
是否可以在 中编程设置当前显示的选项卡? 例如,我希望针对包含向导的同一页面的两个不同请求,选择不同的选项卡。 我目前正在尝试做的是拥有一个包含许多选项卡的向导,在第二个选项卡中我有一个重定向到另一
我的老板相信向导让用户的事情变得简单。 我认为他们有自己的位置,但我无法真正定义那个地方是什么。 我觉得把一些东西变成不需要它们的步骤是有危险的。 有谁知道我在哪里可以找到这些规则,或者甚至是一个指导
我有这个表单,我想在触发 onchange 事件时隐藏其中一个字段集。我在第一个字段集中有一个选择标签。当我从下拉列表中选择字段集 2 时,必须删除第二个字段集。
我使用 Visual Studio 2010 SP1 和包向导为扩展生成单元测试。单元测试通过但集成测试(未修改)在 UIThreadInvoker.Invoke 调用上失败并出现 NullRefer
我有一个 jFace 向导,我正在使用它来创建一个新的项目类型的 eclipse 插件。如下图所示,我在左侧有一个树查看器,在右侧有一个 SWT 组。我想要的是,当用户从 treeviewer 选择其
我必须做一个像这样的向导 THIS,我很容易地实现了它,它几乎可以工作,但是一个奇怪的错误阻止了我继续。事实上,当你在第一步时,“First”有点活跃/突出显示,但对我来说,当我滚动时,它从 Firs
我是一名优秀的程序员,十分优秀!