[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

drag-n-drop into SVN History view

From: Eugene Kuleshov <eu_at_javatx.com>
Date: 2005-07-22 07:35:04 CEST

Hi,

   I've noticed that drag-n-drop to SVN History view does not work for
projects and folders.

   The fix is very simple. In a HistoryDropAdapter class the following
method should not check the instance of IResource, so I've commented one
line, which was probably copied from similar class from CVS plugin.

        public boolean performDrop(Object data) {
                if (data == null) return false;
         if(data instanceof IResource[]) {
            IResource[] sources = (IResource[])data;
            if (sources.length == 0) return false;
            IResource resource = sources[0];
// ---> if (!(resource instanceof IFile)) return false;
            view.showHistory(resource, true /* fetch */);
            return true;
         } else if( data instanceof ISVNRemoteResource) {
             view.showHistory((ISVNRemoteResource) data, null); // true
/* fetch */);
             return true;
         }
         return false;
        }

   regards,
   Eugene
Received on Fri Jul 22 15:35:04 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.