Search in sources :

Example 1 with ResourceFolderTreeObject

use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ResourceFolderTreeObject in project convertigo by convertigo.

the class ProjectLoadingJob method loadResource.

protected void loadResource(TreeParent parentTreeObject, Object folderObject, IResource[] members) throws CoreException {
    ResourceFolderTreeObject resourceFolderTreeObject;
    if (folderObject instanceof String)
        resourceFolderTreeObject = new ResourceFolderTreeObject(viewer, (String) folderObject);
    else
        resourceFolderTreeObject = new ResourceFolderTreeObject(viewer, (IFolder) folderObject);
    parentTreeObject.addChild(resourceFolderTreeObject);
    ResourceTreeObject resourceTreeObject;
    for (int i = 0; i < members.length; i++) {
        IResource resource = members[i];
        String name = resource.getName();
        if (resource instanceof IFolder) {
            if (name.equals("_data"))
                continue;
            if (name.equals("_lib"))
                continue;
            if (name.equals("_private"))
                continue;
            loadResource(resourceFolderTreeObject, ((IFolder) resource), ((IFolder) resource).members());
        } else {
            if (name.equals(".project"))
                continue;
            if (name.endsWith(".etr"))
                continue;
            resourceTreeObject = new ResourceTreeObject(viewer, (IFile) resource);
            resourceFolderTreeObject.addChild(resourceTreeObject);
        }
    }
}
Also used : IFile(org.eclipse.core.resources.IFile) ResourceFolderTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ResourceFolderTreeObject) ResourceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ResourceTreeObject) IResource(org.eclipse.core.resources.IResource) IFolder(org.eclipse.core.resources.IFolder)

Aggregations

ResourceFolderTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ResourceFolderTreeObject)1 ResourceTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ResourceTreeObject)1 IFile (org.eclipse.core.resources.IFile)1 IFolder (org.eclipse.core.resources.IFolder)1 IResource (org.eclipse.core.resources.IResource)1