Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 165620 Details for
Bug 309985
[CommonNavigator] Drop feedback is copy (+) instead of none on an empty Project Explorer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Patch that makes the operation change appropriately given the target.
patch_309985.txt (text/plain), 3.98 KB, created by
Serge Beauchamp
on 2010-04-21 14:41:40 EDT
(
hide
)
Description:
Patch that makes the operation change appropriately given the target.
Filename:
MIME Type:
Creator:
Serge Beauchamp
Created:
2010-04-21 14:41:40 EDT
Size:
3.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.navigator >Index: src/org/eclipse/ui/navigator/CommonDropAdapterAssistant.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapterAssistant.java,v >retrieving revision 1.10 >diff -u -r1.10 CommonDropAdapterAssistant.java >--- src/org/eclipse/ui/navigator/CommonDropAdapterAssistant.java 25 May 2009 20:52:48 -0000 1.10 >+++ src/org/eclipse/ui/navigator/CommonDropAdapterAssistant.java 21 Apr 2010 18:39:39 -0000 >@@ -287,4 +287,26 @@ > return _dropAdapter; > } > >+ >+ /* >+ * Overrides the current operation for a drop that happens immediately >+ * after the current validateDrop. >+ * >+ * This maybe called only from within a >+ * {@link #validateDrop(Object, int, TransferData)} method >+ * >+ * >+ * @param operation >+ * the operation to be used for the drop. >+ * >+ * @see DND#DROP_COPY >+ * @see DND#DROP_MOVE >+ * @see DND#DROP_LINK >+ * @see DND#DROP_NONE >+ * >+ * @since 3.5 >+ */ >+ protected void overrideOperation(int operation) { >+ _dropAdapter.overrideOperation(operation); >+ } > } >#P org.eclipse.ui.navigator.resources >Index: src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java,v >retrieving revision 1.13 >diff -u -r1.13 ResourceDropAdapterAssistant.java >--- src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java 1 Mar 2010 11:34:45 -0000 1.13 >+++ src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java 21 Apr 2010 18:39:41 -0000 >@@ -23,6 +23,7 @@ > import org.eclipse.core.runtime.MultiStatus; > import org.eclipse.core.runtime.Status; > import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.util.LocalSelectionTransfer; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; >@@ -38,6 +39,8 @@ > import org.eclipse.ui.actions.MoveFilesAndFoldersOperation; > import org.eclipse.ui.actions.ReadOnlyStateChecker; > import org.eclipse.ui.ide.dialogs.ImportTypeDialog; >+import org.eclipse.ui.internal.ide.IDEInternalPreferences; >+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; > import org.eclipse.ui.internal.navigator.Policy; > import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorMessages; > import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin; >@@ -62,6 +65,7 @@ > > private static final IResource[] NO_RESOURCES = new IResource[0]; > >+ > /* > * (non-Javadoc) > * >@@ -72,6 +76,21 @@ > || FileTransfer.getInstance().isSupportedType(aTransferType); > } > >+ private int getDragOperation(IContainer target) { >+ IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore(); >+ >+ String mode = store.getString(target.isVirtual() ? IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE:IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE); >+ if (mode.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_MOVE_COPY)) >+ return DND.DROP_COPY; >+ if (mode.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK)) >+ return DND.DROP_LINK; >+ if (mode.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK_AND_VIRTUAL_FOLDER)) >+ return DND.DROP_LINK; >+ if (target.isVirtual()) >+ return DND.DROP_LINK; >+ return DND.DROP_COPY; >+ } >+ > /* > * (non-Javadoc) > * >@@ -156,6 +175,7 @@ > // Fixes bug 29778 > sourceNames = new String[0]; > } >+ overrideOperation(getDragOperation(destination)); > CopyFilesAndFoldersOperation copyOperation = new CopyFilesAndFoldersOperation( > getShell()); > message = copyOperation.validateImportDestination(destination,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 309985
: 165620