本文整理汇总了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;
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
}
示例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);
}
}
}
}
示例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);
}
}
示例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);
}
}