Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 22:47
Yong cheng is currently offline Yong chengFriend
Messages: 46
Registered: July 2009
Member
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: Thu Dec 12 20:24:50 GMT 2024

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

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

Back to the top