當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。