/** * 该构造函数主要是针对项目用的 * @param entry * @param proRecord */ public ProjectResource(Object entry, ProjectRecord proRecord, ILeveledImportStructureProvider structureProvider){ this.element = entry; this.proRecord = proRecord; this.projectName = this.proRecord.getProjectName(); this.structureProvider = structureProvider; // 备注,下面这四个初始化的方法,位置不能更换。 root = ResourcesPlugin.getWorkspace().getRoot(); isProject = true; initIsProjectRepeat(); initData(); initChildren(); }
/** * 该构造函数主要针对项目下的文件夹或者文件 * @param entry * @param parent * @param projectName * @param isProjectRepeat * @param structureProvider */ public ProjectResource(Object entry, ProjectResource parent, String projectName, boolean isProjectRepeat, ILeveledImportStructureProvider structureProvider){ this.element = entry; this.parent = parent; this.projectName = projectName; this.isProjectRepeat = isProjectRepeat; this.structureProvider = structureProvider; // 备注,下面这四个初始化的方法,位置不能更换。 root = ResourcesPlugin.getWorkspace().getRoot(); isProject = false; initIsElementRepeat(); initData(); initChildren(); }