[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.epf] Re: Problem using EMF and EPF library

Quentin,

Have you run it under debug control? Unless you run eclipse with -consolelog, I don't think you'll see what's being printed to System.out. An common newbie mistake when building plugins is to fiddle directly with the project's properties to fix compilation problems only to have those same problems come back at runtime. So be sure to edit the MANIFEST.MF's dependencies to fix any compilation problems caused by things missing from the classpath. (I doubt it will make a difference, but Throwable is a more general thing to catch.)


Quentin DEME wrote:
Hello,

I have to make a plugin for Eclipse. I must be able to read EPF Composer xmi files in order to display some information about tasks, roles, work products etc.

The problem is that when I use "ResourceSet resourceSet = new ResourceSetImpl();", the function in which it's contained immediately stops, and no exception can be caught. I tried with try/catch, and I can't catch anything.

That's quite a problem because nothing happens when I call the function that uses ResourceSetImpl().

I'm trying first to make a little class with basic features, a sort of hello world equivalent.

--------------------
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;

public class TestEPFXMIParser {
 public TestEPFXMIParser() { }
 public String getString() {
   // Create a ResourceSet
   try {
     ResourceSet resourceSet = new ResourceSetImpl();
     return "ok";
   }
   catch (Exception e) {
     System.out.println("Exception : " + e.toString());
     return "failed";
   }
 }
}
--------------------

And I use it this way :

TestEPFXMIParser t = new TestEPFXMIParser();
System.out.println("Result = " + t.getString());

And nothing happens... no text is displayed, not even "failed". The getString() function stops just after new ResourceSetImpl().

Could you help me solve this problem ? And is there some example code or snippet about what I'm trying to do ? Because I can't find any documentation on the Internet, except the JavaDoc for EPF API.

Thanks in advance,

Quentin