1
0
Fork 0
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:
Alain Magloire 2003-09-23 19:50:48 +00:00
parent 1a59094cd1
commit 4695acb1d8
4 changed files with 25 additions and 11 deletions

View file

@ -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
Got rid of the C/C++ Project property page (only the indexer tab
was left). Here are the changes:

View file

@ -26,6 +26,7 @@ import org.eclipse.cdt.internal.ui.IContextMenuConstants;
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
import org.eclipse.cdt.internal.ui.drag.DelegatingDragAdapter;
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.TransferDragSourceListener;
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.ui.CElementContentProvider;
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.core.resources.ICommand;
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.GoIntoAction;
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[] {
ResourceTransfer.getInstance(),
FileTransfer.getInstance(),
LocalSelectionTransfer.getInstance(),
CLocalSelectionTransfer.getInstance(),
PluginTransfer.getInstance()};
TransferDragSourceListener[] dragListeners =
new TransferDragSourceListener[] {
new ResourceTransferDragAdapter(viewer),
new org.eclipse.cdt.internal.ui.drag.LocalSelectionTransferDragAdapter(viewer),
new LocalSelectionTransferDragAdapter(viewer),
new FileTransferDragAdapter(viewer)};
viewer.addDragSupport(ops, dragTransfers, new DelegatingDragAdapter(viewer, dragListeners));

View file

@ -10,7 +10,7 @@
*******************************************************************************/
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.viewers.ISelectionProvider;
import org.eclipse.swt.dnd.DragSourceEvent;
@ -18,12 +18,12 @@ import org.eclipse.swt.dnd.Transfer;
public class LocalSelectionTransferDragAdapter implements TransferDragSourceListener {
private final ISelectionProvider provider;
private final LocalSelectionTransfer transfer;
private final CLocalSelectionTransfer transfer;
public LocalSelectionTransferDragAdapter(ISelectionProvider provider) {
super();
this.provider = provider;
this.transfer = LocalSelectionTransfer.getInstance();
this.transfer = CLocalSelectionTransfer.getInstance();
Assert.isNotNull(provider);
Assert.isNotNull(transfer);
}

View file

@ -10,16 +10,16 @@ import org.eclipse.swt.dnd.TransferData;
/**
* @author kcampbell
*/
public class LocalSelectionTransfer extends ByteArrayTransfer {
private static final LocalSelectionTransfer INSTANCE = new LocalSelectionTransfer();
public class CLocalSelectionTransfer extends ByteArrayTransfer {
private static final CLocalSelectionTransfer INSTANCE = new CLocalSelectionTransfer();
private final String typeName;
private final int typeId;
private ISelection selection;
private LocalSelectionTransfer() {
private CLocalSelectionTransfer() {
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$;
typeId = registerType(typeName);
selection = null;
@ -28,7 +28,7 @@ public class LocalSelectionTransfer extends ByteArrayTransfer {
/**
* Returns the singleton.
*/
public static LocalSelectionTransfer getInstance() {
public static CLocalSelectionTransfer getInstance() {
return INSTANCE;
}