I have a project in eclipse workspace.

When I open this project as IJavaProject using the following code, I have the project “not open”.
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject orig = root.getProject(this.projectName);
orig.open(null /* IProgressMonitor */);
orig.refreshLocal(IResource.DEPTH_ZERO, null);
this.javaProject = JavaCore.create(orig);
I opened the IProject with open() method, and refreshed manually using refreshLocal following avoiding "resource is out of sync with the filesystem"

I have other resources not opened.

I tried “F5” to refresh the project, but it doesn’t work.
What might be wrong? How can I open the resources?
ADDED
I tried to open the resource with new NullProgressMonitor(), but it didn’t work.
orig.open(new NullProgressMonitor());
orig.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
ADDED2
With this code that uses javaModel, I got the information that all of the projects in my workspace is closed. Does this mean my workspace is broken? When I opened the workspace using eclipse IDE, I could open and compile the Java code.
IJavaModel javaModel = JavaCore.create(root);
this.javaProject = javaModel.getJavaProject(this.projectName);

Code style :
You should avoid ‘null’ as parameters when possible. This is always better for readability (and maintainability). here, the API designers have provided actual objects to say “no value” :
Issue :
I believe that your problem lies in the second of these lines : you refresh the project, but not any of its members. What if you try with the INFINITE depth so that all contained files are actually refreshed?
UPDATE :
Actually, this “(not open)” in the toString of your resource is not at the workspace level. Your IProject and IFiles are well opened and refreshed (you probably don’t even need that if your project is already opened).
The Java model is not the same as the workspace, and java elements not being “opened” have no meaning at the workspace level, it only means that there is no buffer opened on the contents of the java element. You should not have to worry about opening the java elements, the jdt will do the work if and when needed during your manipulation of its elements.
You might want to create the whole java model instead of only what corresponds to the project though :
This might avoid strange errors later on :).