swt

Eclipse RCP — Open View in Editor folder

三世轮回 提交于 2020-01-06 13:02:07
问题 Is it possible to add placeholders in the editor folder stack? I can currently move my views (drag-n-drop) next to an editor, but I want them to be opened directly there. 回答1: If you are using eclipse 3.x, it is not possible. With 4.x should be possible (since Eclipse 4 no longer has an editor area, which must be defined for a perspective, so that you can also put editors in a ViewStack.). You may find something useful in Vogella's article. 来源: https://stackoverflow.com/questions/21382848

Error running spoon on Ubuntu 14.04 64 bit

心不动则不痛 提交于 2020-01-06 08:47:25
问题 I am using Spoon tool of Pentaho data integration for long and it was working fine on my system. But since i moved it to /opt I am unable to run again . I have Oracle Java 8 installed on my system and each time try to run it i am end up with following exception Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) at java.lang.Class

Virtual TableViewer sorting causes selection problems

若如初见. 提交于 2020-01-06 07:42:23
问题 Our application is an RCP appliction and needs to display table of several thousands items. For this reason, we're using SWT.VIRTUAL in our TableViewer . That works pretty well except for selection. We're having following issue : Our TableViewer support sorting and filtering. When we use a virtual tableviewer, changing the selection does not preserve the current selected item but the row currently selected.This leads to another item being selected. e.g: If Item 'A' present at the 5th row is

Put scrolled content inside a Group

折月煮酒 提交于 2020-01-06 05:28:08
问题 In the below code, the scroll set outside of the Group , how can I put it inner the Group ? protected Control createDialogArea(Composite parent) { composite = (Composite) super.createDialogArea(parent); ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL); scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); scrolledComposite.setExpandHorizontal(true); scrolledComposite.setExpandVertical(true); Composite innerComposite =

Is it possible to put FormLayout into GridLayout?

梦想的初衷 提交于 2020-01-06 03:27:05
问题 I am trying to put a FormLayout composite into a GridLayout grid, but i get an exception. Am i doing something wrong or is it just not possible? Here is my code: import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org

How to sort glazed TreeList?

China☆狼群 提交于 2020-01-06 03:18:05
问题 I have a pretty weird question - how to sort glazed TreeList? I am using it in SWT NatTable, and when my data provider is set to GlazedListsDataProvider with TreeList inside it, sorting works in a very strange way. It works fine, if I am using GlazedListsDataProvider with SortedList. For instance, my tree looks like that: Root Node1 Child1 Child2 Node2 Child3 I need to sort only children INSIDE Node1 and Node2, separately one of another (so that only child1 and child2 will change their place)

How can I get the relative and absolute cursor position?

不问归期 提交于 2020-01-06 02:48:27
问题 How can I get the current position of the Cursor with SWT? I need: The absolute position (only relative to the current Display ) The position relative to the currently active Control 回答1: This gets the Cursor position relative to the current Display : import org.eclipse.swt.widgets.Display; [...] Point cursorLocation = Display.getCurrent().getCursorLocation(); To get the position relative to the focused Control you have to translate it: import org.eclipse.swt.widgets.Display; [...] Point

image not loading

岁酱吖の 提交于 2020-01-06 02:42:25
问题 trying to run the code // Create a label with an image Image image = new Image(display, "interspatial.gif"); Label imageLabel = new Label(shell, SWT.NONE); imageLabel.setImage(image); is giving me the error message Exception in thread "main" org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: interspatial.gif (O sistema não pode encontrar o arquivo especificado)) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt

SWT How to print contents of a scrolledComposite?

无人久伴 提交于 2020-01-05 12:08:51
问题 Does anyone know how I would print the contents of a scrolled composite? Whenver I print onto a GC it will only copy the currently viewable area of the scrolled composite. What I want is to be able to copy the entire contents of the scrolled composite. For instance, the code below makes a huge button, inside of a little window. Whenver I print the gc below, it only will output the small viewable area of the scrolled composite. Is it possible to print everything in the scrolled composite?

Can't set title of NSStatusItem from SWT in Java

丶灬走出姿态 提交于 2020-01-05 07:51:36
问题 I've already asked a question about this here, and from that question I figured out how to send messages to Objective C objects. So I did it, and I didn't see any errors, but the text of the status bar is still not being set (like it looks here). I'm using Java reflection to get the NSStatusItem : Tray tray = display.getSystemTray(); TrayItem item = new TrayItem(tray, SWT.NONE); Field field = TrayItem.class.getDeclaredField("item"); field.setAccessible(true); NSStatusItem statusItem =