Here's a bit of information that will help you. The actual class that's 
implemented by the Nodes
in the Project returned by getProjectObj() is NodeInfo. This class contains all 
kinds of helpful
stuff.

So, as you iterate through your child nodes, just add a cast:

NodeInfo childNodeInfo = (NodeInfo)nextNode;
//Then you can do this:
if(childNodeInfo.getNodeType() == AppConfig.NodeTypes.PROJECT){
  sjInterface.getProjectObj(childNodeInfo.getUniqueID());
  //And whatever else you need.
}

Hopefully this will help you fix the problem.

And by the way, a lot of people will be very excited to hear that you're 
developing an Eclipse
plugin.

Thanks.

--Rob


--- [EMAIL PROTECTED] wrote:

> Hello, I am working on a sourcejammer plugin for eclipse and I am running 
> into some issues. I can iterate through the first two levels with no 
> problems, but when I attempt to get the project object from the third 
> level using getProjObj(long value), I get the following error:
> 
> org.sourcejammer.client.gui.GUICommandException: Error: Unable to access 
> File information. null Error: Unable to access File information. null 
> java.lang.Exception: Error: Unable to access File information. null
>         at 
> org.sourcejammer.client.gui.CommandCentral.retrieveProject(Unknown Source)
>         at 
> org.sourcejammer.client.simpletools.SimpleInterface.getProjectObj(Unknown 
> Source)
>         at 
> sjplugin.views.SourceJammerView$ViewContentProvider.build(SourceJammerView.java:206)
>         at 
> sjplugin.views.SourceJammerView$ViewContentProvider.initialize(SourceJammerView.java:156)
>         at 
> sjplugin.views.SourceJammerView$ViewContentProvider.getElements(SourceJammerView.java:126)
> 
> I believe that one of the objects on the third level may be an actual file 
> and not a folder. Is there a way to drill down the hierarchy without 
> knowing the particular object type of everything that I am attempting to 
> read in?
> 
>  
>                     invisibleRoot = new TreeParent("");
>                     NodeList nodeList = sjProject.childList();
>                      NodeIterator nodeIter = nodeList.getIterator();
>  
>                       while(nodeIter.hasMoreNodes())
>                                        {
>                              // root level
>                               Node node = nodeIter.getNextNode();
>  
>                               rootParent = new 
> TreeParent(node.getNodeName());
>  
>                               //  get child node as Project
>                               childProj = 
> sjInterface.getProjectObj(node.getUniqueID()); 
>  
>                               //get the child's children
>                               childNodeList = childProj.childList();
>  
>                               childNodeIter = childNodeList.getIterator();
>  
>                                       while(childNodeIter.hasMoreNodes())
>                               {
>                                   Node nextNode = 
> childNodeIter.getNextNode();
>  
>                                   treeParentObj = new 
> TreeParent(nextNode.getNodeName());
>  
>                                     // The next line causes an 
> error!!!!!!!!
>                                     //nextChildProj = 
> sjInterface.getProjectObj(nextNode.getUniqueID()); 
> 
>                             //  get next child node as Project
>  System.out.println("id:"+nextNode.getUniqueID());
>  
>                                   rootParent.addChild(treeParentObj); 
>  
>                               }
>  
>                               invisibleRoot.addChild(rootParent); 
>  
>                           }
>  
>                           sjInterface.disconnect();



                
__________________________________ 
Do you Yahoo!? 
Dress up your holiday email, Hollywood style. Learn more. 
http://celebrity.mail.yahoo.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
SourceJammer-users mailing list
SourceJammer-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sourcejammer-users

Reply via email to