mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Fix for 178029, Include Browser doesn't accept inital drop on linux.
This commit is contained in:
parent
57b8ea2af5
commit
9961b8c3ff
3 changed files with 16 additions and 35 deletions
|
@ -42,8 +42,8 @@ import org.eclipse.swt.layout.GridData;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.swt.widgets.TreeItem;
|
||||
import org.eclipse.ui.IActionBars;
|
||||
import org.eclipse.ui.IMemento;
|
||||
|
@ -100,8 +100,7 @@ public class CHViewPart extends ViewPart {
|
|||
// widgets
|
||||
private PageBook fPagebook;
|
||||
private Composite fViewerPage;
|
||||
private Composite fInfoPage;
|
||||
private Text fInfoText;
|
||||
private Label fInfoText;
|
||||
|
||||
// treeviewer
|
||||
private CHContentProvider fContentProvider;
|
||||
|
@ -141,7 +140,7 @@ public class CHViewPart extends ViewPart {
|
|||
|
||||
public void setMessage(String msg) {
|
||||
fInfoText.setText(msg);
|
||||
fPagebook.showPage(fInfoPage);
|
||||
fPagebook.showPage(fInfoText);
|
||||
fShowsMessage= true;
|
||||
updateDescription();
|
||||
updateActionEnablement();
|
||||
|
@ -304,12 +303,7 @@ public class CHViewPart extends ViewPart {
|
|||
}
|
||||
|
||||
private void createInfoPage() {
|
||||
fInfoPage = new Composite(fPagebook, SWT.NULL);
|
||||
fInfoPage.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fInfoPage.setSize(100, 100);
|
||||
fInfoPage.setLayout(new FillLayout());
|
||||
|
||||
fInfoText= new Text(fInfoPage, SWT.WRAP | SWT.READ_ONLY);
|
||||
fInfoText = new Label(fPagebook, SWT.TOP | SWT.LEFT | SWT.WRAP);
|
||||
}
|
||||
|
||||
private void initDragAndDrop() {
|
||||
|
@ -317,7 +311,7 @@ public class CHViewPart extends ViewPart {
|
|||
Transfer[] localSelectionTransfer= new Transfer[] {
|
||||
LocalSelectionTransfer.getTransfer()
|
||||
};
|
||||
DropTarget dropTarget = new DropTarget(fPagebook, DND.DROP_COPY);
|
||||
DropTarget dropTarget = new DropTarget(fPagebook, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK | DND.DROP_DEFAULT);
|
||||
dropTarget.setTransfer(localSelectionTransfer);
|
||||
dropTarget.addDropListener(dropListener);
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ import org.eclipse.swt.layout.FillLayout;
|
|||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.swt.widgets.TreeItem;
|
||||
import org.eclipse.ui.IActionBars;
|
||||
import org.eclipse.ui.IMemento;
|
||||
|
@ -110,8 +110,7 @@ public class IBViewPart extends ViewPart
|
|||
// widgets
|
||||
private PageBook fPagebook;
|
||||
private Composite fViewerPage;
|
||||
private Composite fInfoPage;
|
||||
private Text fInfoText;
|
||||
private Label fInfoText;
|
||||
|
||||
// treeviewer
|
||||
private IBContentProvider fContentProvider;
|
||||
|
@ -146,7 +145,7 @@ public class IBViewPart extends ViewPart
|
|||
|
||||
public void setMessage(String msg) {
|
||||
fInfoText.setText(msg);
|
||||
fPagebook.showPage(fInfoPage);
|
||||
fPagebook.showPage(fInfoText);
|
||||
fShowsMessage= true;
|
||||
updateActionEnablement();
|
||||
updateDescription();
|
||||
|
@ -344,12 +343,7 @@ public class IBViewPart extends ViewPart
|
|||
}
|
||||
|
||||
private void createInfoPage() {
|
||||
fInfoPage = new Composite(fPagebook, SWT.NULL);
|
||||
fInfoPage.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fInfoPage.setSize(100, 100);
|
||||
fInfoPage.setLayout(new FillLayout());
|
||||
|
||||
fInfoText= new Text(fInfoPage, SWT.WRAP | SWT.READ_ONLY);
|
||||
fInfoText = new Label(fPagebook, SWT.TOP | SWT.LEFT | SWT.WRAP);
|
||||
}
|
||||
|
||||
private void initDragAndDrop() {
|
||||
|
@ -358,7 +352,7 @@ public class IBViewPart extends ViewPart
|
|||
LocalSelectionTransfer.getTransfer(),
|
||||
ResourceTransfer.getInstance(),
|
||||
FileTransfer.getInstance()};
|
||||
DropTarget dropTarget = new DropTarget(fPagebook, DND.DROP_COPY);
|
||||
DropTarget dropTarget = new DropTarget(fPagebook, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK | DND.DROP_DEFAULT);
|
||||
dropTarget.setTransfer(dropTransfers);
|
||||
dropTarget.addDropListener(dropListener);
|
||||
|
||||
|
@ -378,7 +372,7 @@ public class IBViewPart extends ViewPart
|
|||
protected void onWorkingSetNameChange() {
|
||||
updateDescription();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
fIncludedByAction=
|
||||
new Action(IBMessages.IBViewPart_showIncludedBy_label, IAction.AS_RADIO_BUTTON) {
|
||||
|
|
|
@ -49,13 +49,12 @@ import org.eclipse.swt.events.ControlEvent;
|
|||
import org.eclipse.swt.events.ControlListener;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.layout.FillLayout;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.swt.widgets.ToolBar;
|
||||
import org.eclipse.ui.IActionBars;
|
||||
import org.eclipse.ui.IMemento;
|
||||
|
@ -132,8 +131,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
|
|||
|
||||
// widgets
|
||||
private PageBook fPagebook;
|
||||
private Composite fInfoPage;
|
||||
private Text fInfoText;
|
||||
private Label fInfoText;
|
||||
private SashForm fSplitter;
|
||||
private ViewForm fHierarchyViewForm;
|
||||
private ViewForm fMemberViewForm;
|
||||
|
@ -187,7 +185,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
|
|||
|
||||
public void setMessage(String msg) {
|
||||
fInfoText.setText(msg);
|
||||
fPagebook.showPage(fInfoPage);
|
||||
fPagebook.showPage(fInfoText);
|
||||
fShowsMessage= true;
|
||||
updateDescription();
|
||||
updateActionEnablement();
|
||||
|
@ -512,12 +510,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
|
|||
}
|
||||
|
||||
private void createInfoPage() {
|
||||
fInfoPage = new Composite(fPagebook, SWT.NULL);
|
||||
fInfoPage.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fInfoPage.setSize(100, 100);
|
||||
fInfoPage.setLayout(new FillLayout());
|
||||
|
||||
fInfoText= new Text(fInfoPage, SWT.WRAP | SWT.READ_ONLY);
|
||||
fInfoText = new Label(fPagebook, SWT.TOP | SWT.LEFT | SWT.WRAP);
|
||||
}
|
||||
|
||||
private void initDragAndDrop() {
|
||||
|
@ -525,7 +518,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
|
|||
Transfer[] localSelectionTransfer= new Transfer[] {
|
||||
LocalSelectionTransfer.getTransfer()
|
||||
};
|
||||
DropTarget dropTarget = new DropTarget(fPagebook, DND.DROP_COPY);
|
||||
DropTarget dropTarget = new DropTarget(fPagebook, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK | DND.DROP_DEFAULT);
|
||||
dropTarget.setTransfer(localSelectionTransfer);
|
||||
dropTarget.addDropListener(dropListener);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue