[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] how to get editPart from model/diagram filename

Hi

I want to perform some operation on all the elements in each of the diagram files for all the project in the workspace. I am able to get the diagram and the model filename as a IResource object.How could i get the editPart from the filename


for now i have pasted the code by which i can get the diagram/model fileName



IProject[] projects = null;
IProject p = null;
IFolder file = null;
IResource[] members = null; IResource[] newFile = null;


   IWorkspace workspace = ResourcesPlugin.getWorkspace();

// gets all the projects in the workspace
projects = workspace.getRoot().getProjects();
for (int i = 0; i < projects.length; i++) {
p = projects[i]; }
try {
// gets all the folders in the project
members = p.members();
}catch (Exception e){

}

file = (IFolder) p.findMember("<myrequiredfolder>");

try {
newFile = file.members();
}catch(Exception e){