Sweet! Great bug fix, Chris. I'll patch it in right away.

I'm happy to know someone's already using this thing. I've started using it 
too, in fact. Just
those three actions are pretty useful, as you said. My plan is to keep the 
functionality minimal,
at least at first. Then I want to make sure I create a very nice, clean, 
easy-to-install
installation package.

Anyway, thanks for testing.

--Rob


--- Chris Duck <[EMAIL PROTECTED]> wrote:

> I was having a problem with the plugin popping up a big (useless) error 
> message when I would try any of the actions.  I figured out it was 
> because I was in the Package Explorer instead of the Resource Navigator. 
>   The error was coming from this line of the connect method of 
> AbstractFileAction and was actually an index out of bounds exception:
> 
> IFile firstFile = (IFile)selectedFiles.get(0);
> 
> It was occuring because selectedFiles was not being populated because 
> the object returned while in Package Explorer is an IJavaElement.  I 
> patched AbstractFileAction (that I downloaded this morning, which you 
> have since updated :)) to check for this and get an IFile from the java 
> element so that the plugin can be used in the Package Explorer.  Here is 
> the selectionChanged method with my changes:
> 
>    public void selectionChanged(IAction action, ISelection selection) {
>      //Let's put together a list of the selected files.
>      selectedFiles = new ArrayList();
>      if (selection instanceof IStructuredSelection) {
>        IStructuredSelection structuredSelection = (IStructuredSelection) 
> selection;
>        Iterator selections = structuredSelection.iterator();
>        while(selections.hasNext()){
>          Object o = selections.next();
>          if (o instanceof IFile){
>            selectedFiles.add(o);
>          } else if(o instanceof IJavaElement) {
>            IJavaElement jo = (IJavaElement)o;
>            System.out.println(jo.getResource().getClass());
>            if(jo.getResource() instanceof IFile) {
>              selectedFiles.add(jo.getResource());
>            }
>          }
>        }
>      }
>    }
> 
> Anyway thanks for the plugin! Even just those 3 basic operations are 
> great to have without having to switch apps.
> 
> Chris
> 



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
SourceJammer-users mailing list
SourceJammer-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sourcejammer-users

Reply via email to