mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Refactoring of LocalSelectionTransfer to CLocalSelectionTransfer.
This commit is contained in:
parent
1a59094cd1
commit
4695acb1d8
4 changed files with 25 additions and 11 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2003-09-23 Alain Magloire
|
||||||
|
|
||||||
|
Remove some warnings in the ErrorParser blocks.
|
||||||
|
Refactor LocalSelectionTransfer vs CLocalSelectionTransfer to minimise
|
||||||
|
clashes.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/internal/ui/CLocalSelectionTransfer
|
||||||
|
* src/org/eclipse/cdt/internal/ui/cview/CView.java
|
||||||
|
* src/org/eclipse/cdt/internal/ui/cview/LocalSelectionTransferDragAdapter.java
|
||||||
|
* src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java
|
||||||
|
* src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java
|
||||||
|
|
||||||
2003-09-22 Bogdan Gheorghe
|
2003-09-22 Bogdan Gheorghe
|
||||||
Got rid of the C/C++ Project property page (only the indexer tab
|
Got rid of the C/C++ Project property page (only the indexer tab
|
||||||
was left). Here are the changes:
|
was left). Here are the changes:
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
||||||
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
||||||
import org.eclipse.cdt.internal.ui.drag.DelegatingDragAdapter;
|
import org.eclipse.cdt.internal.ui.drag.DelegatingDragAdapter;
|
||||||
import org.eclipse.cdt.internal.ui.drag.FileTransferDragAdapter;
|
import org.eclipse.cdt.internal.ui.drag.FileTransferDragAdapter;
|
||||||
|
import org.eclipse.cdt.internal.ui.drag.LocalSelectionTransferDragAdapter;
|
||||||
import org.eclipse.cdt.internal.ui.drag.ResourceTransferDragAdapter;
|
import org.eclipse.cdt.internal.ui.drag.ResourceTransferDragAdapter;
|
||||||
import org.eclipse.cdt.internal.ui.drag.TransferDragSourceListener;
|
import org.eclipse.cdt.internal.ui.drag.TransferDragSourceListener;
|
||||||
import org.eclipse.cdt.internal.ui.editor.FileSearchAction;
|
import org.eclipse.cdt.internal.ui.editor.FileSearchAction;
|
||||||
|
@ -37,7 +38,7 @@ import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
||||||
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
|
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
|
||||||
import org.eclipse.cdt.ui.CElementContentProvider;
|
import org.eclipse.cdt.ui.CElementContentProvider;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.LocalSelectionTransfer;
|
import org.eclipse.cdt.ui.CLocalSelectionTransfer;
|
||||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.core.resources.ICommand;
|
import org.eclipse.core.resources.ICommand;
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
|
@ -128,6 +129,7 @@ import org.eclipse.ui.views.framelist.ForwardAction;
|
||||||
import org.eclipse.ui.views.framelist.FrameList;
|
import org.eclipse.ui.views.framelist.FrameList;
|
||||||
import org.eclipse.ui.views.framelist.GoIntoAction;
|
import org.eclipse.ui.views.framelist.GoIntoAction;
|
||||||
import org.eclipse.ui.views.framelist.UpAction;
|
import org.eclipse.ui.views.framelist.UpAction;
|
||||||
|
import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -374,13 +376,13 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
new Transfer[] {
|
new Transfer[] {
|
||||||
ResourceTransfer.getInstance(),
|
ResourceTransfer.getInstance(),
|
||||||
FileTransfer.getInstance(),
|
FileTransfer.getInstance(),
|
||||||
LocalSelectionTransfer.getInstance(),
|
CLocalSelectionTransfer.getInstance(),
|
||||||
PluginTransfer.getInstance()};
|
PluginTransfer.getInstance()};
|
||||||
|
|
||||||
TransferDragSourceListener[] dragListeners =
|
TransferDragSourceListener[] dragListeners =
|
||||||
new TransferDragSourceListener[] {
|
new TransferDragSourceListener[] {
|
||||||
new ResourceTransferDragAdapter(viewer),
|
new ResourceTransferDragAdapter(viewer),
|
||||||
new org.eclipse.cdt.internal.ui.drag.LocalSelectionTransferDragAdapter(viewer),
|
new LocalSelectionTransferDragAdapter(viewer),
|
||||||
new FileTransferDragAdapter(viewer)};
|
new FileTransferDragAdapter(viewer)};
|
||||||
|
|
||||||
viewer.addDragSupport(ops, dragTransfers, new DelegatingDragAdapter(viewer, dragListeners));
|
viewer.addDragSupport(ops, dragTransfers, new DelegatingDragAdapter(viewer, dragListeners));
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.ui.drag;
|
package org.eclipse.cdt.internal.ui.drag;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.LocalSelectionTransfer;
|
import org.eclipse.cdt.ui.CLocalSelectionTransfer;
|
||||||
import org.eclipse.jface.util.Assert;
|
import org.eclipse.jface.util.Assert;
|
||||||
import org.eclipse.jface.viewers.ISelectionProvider;
|
import org.eclipse.jface.viewers.ISelectionProvider;
|
||||||
import org.eclipse.swt.dnd.DragSourceEvent;
|
import org.eclipse.swt.dnd.DragSourceEvent;
|
||||||
|
@ -18,12 +18,12 @@ import org.eclipse.swt.dnd.Transfer;
|
||||||
|
|
||||||
public class LocalSelectionTransferDragAdapter implements TransferDragSourceListener {
|
public class LocalSelectionTransferDragAdapter implements TransferDragSourceListener {
|
||||||
private final ISelectionProvider provider;
|
private final ISelectionProvider provider;
|
||||||
private final LocalSelectionTransfer transfer;
|
private final CLocalSelectionTransfer transfer;
|
||||||
|
|
||||||
public LocalSelectionTransferDragAdapter(ISelectionProvider provider) {
|
public LocalSelectionTransferDragAdapter(ISelectionProvider provider) {
|
||||||
super();
|
super();
|
||||||
this.provider = provider;
|
this.provider = provider;
|
||||||
this.transfer = LocalSelectionTransfer.getInstance();
|
this.transfer = CLocalSelectionTransfer.getInstance();
|
||||||
Assert.isNotNull(provider);
|
Assert.isNotNull(provider);
|
||||||
Assert.isNotNull(transfer);
|
Assert.isNotNull(transfer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,16 +10,16 @@ import org.eclipse.swt.dnd.TransferData;
|
||||||
/**
|
/**
|
||||||
* @author kcampbell
|
* @author kcampbell
|
||||||
*/
|
*/
|
||||||
public class LocalSelectionTransfer extends ByteArrayTransfer {
|
public class CLocalSelectionTransfer extends ByteArrayTransfer {
|
||||||
private static final LocalSelectionTransfer INSTANCE = new LocalSelectionTransfer();
|
private static final CLocalSelectionTransfer INSTANCE = new CLocalSelectionTransfer();
|
||||||
|
|
||||||
private final String typeName;
|
private final String typeName;
|
||||||
private final int typeId;
|
private final int typeId;
|
||||||
private ISelection selection;
|
private ISelection selection;
|
||||||
|
|
||||||
private LocalSelectionTransfer() {
|
private CLocalSelectionTransfer() {
|
||||||
super();
|
super();
|
||||||
// Try to ensure that different Eclipse applications use different "types" of <code>LocalSelectionTransfer</code>
|
// Try to ensure that different Eclipse applications use different "types" of <code>CLocalSelectionTransfer</code>
|
||||||
typeName = "cdt-local-selection-transfer-format" + System.currentTimeMillis(); //$NON-NLS-1$;
|
typeName = "cdt-local-selection-transfer-format" + System.currentTimeMillis(); //$NON-NLS-1$;
|
||||||
typeId = registerType(typeName);
|
typeId = registerType(typeName);
|
||||||
selection = null;
|
selection = null;
|
||||||
|
@ -28,7 +28,7 @@ public class LocalSelectionTransfer extends ByteArrayTransfer {
|
||||||
/**
|
/**
|
||||||
* Returns the singleton.
|
* Returns the singleton.
|
||||||
*/
|
*/
|
||||||
public static LocalSelectionTransfer getInstance() {
|
public static CLocalSelectionTransfer getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue