Skip to main content



      Home
Home » Eclipse Projects » GEF » Problem in loading emf model when opening
Problem in loading emf model when opening [message #191344] Tue, 09 August 2005 18:47
Eclipse UserFriend
Hallo, GEF experts,

I've already spent a whole night on looking for the bugs. I could not
understand what is the reason for the java.lang.ClassCastException while
loading the model. Error was caused by following code in setInput:

URI fileURI=URI.createURI(file.getFullPath().toString());
Resource resource = new XMLResourceImpl(fileURI);
try {
resource.load(null);
model = (Model)resource.getContents().get(0);
//java.lang.ClassCastException

} catch (IOException e) {
model = ModelFactory.eINSTANCE.createModel();
resource.getContents().add(model);
}
Previous Topic:drag&drop problem
Next Topic:Building GEF
Goto Forum:
  


Current Time: Mon Jul 07 20:21:42 EDT 2025

Powered by FUDForum. Page generated in 0.03492 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top