当前位置: 首页>>代码示例>>Java>>正文


Java IFolder.members方法代码示例

本文整理汇总了Java中org.eclipse.core.resources.IFolder.members方法的典型用法代码示例。如果您正苦于以下问题:Java IFolder.members方法的具体用法?Java IFolder.members怎么用?Java IFolder.members使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.core.resources.IFolder的用法示例。


在下文中一共展示了IFolder.members方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTemplates

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
/**
 * 
 * @param modelingProject the name of the selected modeling project
 * @return the list of all the report templates name that are available in the selected modeling project
 */
public static List<String> getTemplates(String modelingProject) { // For the SimulationManagementWindow (names)
	List<String> templatesName = new ArrayList<String>();
	IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(modelingProject);
	IFolder templatesFolder = project.getFolder("Report Templates");
	try {
		IResource[] folderContent = templatesFolder.members();
		for(IResource resource : folderContent) {
			if(resource.getType() == IFile.FILE && resource.getFileExtension().equals("rptdesign")) {
				templatesName.add(resource.getName());
			}
		}
	} catch (CoreException e) {
		e.printStackTrace();
		JOptionPane.showMessageDialog(null, "Error: " + e.getMessage() + "", "Error", JOptionPane.ERROR_MESSAGE);
	}
	return templatesName;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:23,代码来源:WorkspaceManager.java

示例2: setJobFileAndXmlFile

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private void setJobFileAndXmlFile(IFolder jobsFolder) {
	try {
		IResource[] members = jobsFolder.members();
		if (members != null) {
			for (IResource jobFolderMember : members) {
				if ((IFolder.class).isAssignableFrom(jobFolderMember.getClass())) {
					setJobFileAndXmlFile((IFolder) jobFolderMember);
				} else if ((IFile.class).isAssignableFrom(jobFolderMember.getClass())) {
					String file = jobFolderMember.getFullPath().lastSegment();
					if (StringUtils.equalsIgnoreCase(modifiedResource.getName().replace(Constants.PROPERTIES_EXTENSION,
							Constants.JOB_EXTENSION), file)) {
						jobIFile = jobsFolder.getFile(modifiedResource.getName()
								.replace(Constants.PROPERTIES_EXTENSION, Constants.JOB_EXTENSION));
					} else if (StringUtils.equalsIgnoreCase(modifiedResource.getName().replace(Constants.PROPERTIES_EXTENSION,
							Constants.XML_EXTENSION), file)) {
						xmlIFile = jobsFolder.getFile(modifiedResource.getName()
								.replace(Constants.PROPERTIES_EXTENSION, Constants.XML_EXTENSION));
					}
				}
			}
		}
	} catch (CoreException coreException) {
		LOGGER.error("Error while setting job file and xml file for dependent deletion", coreException);
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:26,代码来源:JobDeleteParticipant.java

示例3: createChange

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
@Override
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
	
	copyToPath=getArguments().getDestination().toString();
	IWorkspaceRoot workSpaceRoot = ResourcesPlugin.getWorkspace().getRoot();
	IProject project = workSpaceRoot.getProject(copyToPath.split("/")[1]);
	IFolder jobFolder = project.getFolder(copyToPath.substring(copyToPath.indexOf('/', 2)));
	previousJobFiles=new ArrayList<>();
	for (IResource iResource : jobFolder.members()) {
		if (!(iResource instanceof IFolder)) {
			IFile iFile = (IFile) iResource;
			 if (iFile.getFileExtension().equalsIgnoreCase(Messages.JOB_EXT)) {
				 previousJobFiles.add(iFile);
			 }
		}
	}
	copiedFileList.add(modifiedResource);
	return null;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:20,代码来源:JobCopyParticipant.java

示例4: deleteEmptyDirectories

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private void deleteEmptyDirectories(IFolder folder, IProgressMonitor progressMonitor) throws CoreException {
	for (IResource member : folder.members()) {
		if (member instanceof IFolder) {
			deleteEmptyDirectories((IFolder) member, progressMonitor);
		}
	}
	if (folder.members().length == 0) {
		folder.delete(true, progressMonitor);
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:BuildInstruction.java

示例5: getResources

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private Object[] getResources(IFolder folder) {
	try {
		IResource[] members = folder.members();
		return members;
	} catch(CoreException e) {
		return NO_CHILDREN;
	}
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:9,代码来源:ViewContentProvider.java

示例6: loadSubdir

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private static void loadSubdir(IFolder folder, PgDatabase db, IProgressMonitor monitor,
        List<FunctionBodyContainer> funcBodies, Map<String, List<AntlrError>> errors)
                throws InterruptedException, IOException, CoreException {
    for (IResource resource : folder.members()) {
        if (resource.getType() == IResource.FILE && "sql".equals(resource.getFileExtension())) { //$NON-NLS-1$
            loadFile((IFile) resource, monitor, db, funcBodies, errors);
        }
    }
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:10,代码来源:PgUIDumpLoader.java

示例7: createCurrentJobFileList

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
private void createCurrentJobFileList(IFolder jobFolder, List<IFile> jobFiles)
		throws CoreException {
	for (IResource iResource : jobFolder.members()) {
		if (!(iResource instanceof IFolder)) {
			IFile iFile = (IFile) iResource;
			if (iFile.getFileExtension().equalsIgnoreCase(JOB)) {
				jobFiles.add(iFile);
			} 
		}
	}
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:PasteHandler.java

示例8: addMembersToList

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
public static void addMembersToList(List<IResource> memberList, IFolder folder) {
	try {
		for(IResource resource: folder.members()) {
			if(resource instanceof IFile) {
				memberList.add(resource);
			}
			else {
				addMembersToList(memberList, (IFolder)resource);
			}
		}
	} catch (CoreException e) {
		logger.debug("Unable to add members to list " , e);
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:15,代码来源:ResourceChangeUtil.java

示例9: fullBuild

import org.eclipse.core.resources.IFolder; //导入方法依赖的package包/类
protected void fullBuild(IProgressMonitor monitor) throws CoreException{
	Visuflow.getDefault().getLogger().info("Build Start");
	String targetFolder = "sootOutput";
	IJavaProject project = JavaCore.create(getProject());
	IResourceDelta delta = getDelta(project.getProject());
	if (delta == null || !delta.getAffectedChildren()[0].getProjectRelativePath().toString().equals(targetFolder)) {
		classpath = getSootCP(project);
		String location = GlobalSettings.get("Target_Path");
		IFolder folder = project.getProject().getFolder(targetFolder);

		// at this point, no resources have been created
		if (!folder.exists()) {
			// Changed to force because of bug id vis-119
			folder.create(IResource.FORCE, true, monitor);

		} else {
			for (IResource resource : folder.members()) {
				resource.delete(IResource.FORCE, monitor);
			}
		}
		classpath = location + classpath;
		String[] sootString = new String[] { "-cp", classpath, "-exclude", "javax", "-allow-phantom-refs", "-no-bodies-for-excluded", "-process-dir",
				location, "-src-prec", "only-class", "-w", "-output-format", "J", "-keep-line-number", "-output-dir",
				folder.getLocation().toOSString()/* , "tag.ln","on" */ };
		ICFGStructure icfg = new ICFGStructure();
		JimpleModelAnalysis analysis = new JimpleModelAnalysis();
		analysis.setSootString(sootString);
		List<VFClass> jimpleClasses = new ArrayList<>();
		try {
			analysis.createICFG(icfg, jimpleClasses);
			fillDataModel(icfg, jimpleClasses);
		} catch(Exception e) {
			logger.error("Couldn't execute analysis", e);
		}

		folder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
	}
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:39,代码来源:JimpleBuilder.java


注:本文中的org.eclipse.core.resources.IFolder.members方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。