jface

Jface's CheckboxTreeViewer how to set initial selection

Hello. This question may sounds trivial, but i am struggling with the issue, so, please help if u can. So, here it is : i am using a CheckboxTreeViewer for some good reasons. I've google-it for some class usages, and i am currently able to check/uncheck all the childrens of a selected node, and to preserve the selection after a live sear...

Eclipse JFace TreeViewer level auto expansion doesn't work

According to the Eclipse documentation TreeViewer.setAutoExpandLevel(3) means that top-level elements are expanded, and their children, but not grandchildren. I used that in my code, but after setting the input the tree is not auto-expanded, neither on OS X nor on Linux. Expanding the tree manually (via mouse) works flawlessly. Am I mis...

Jface tableviewer multi sort columns

dear all, i am implementing a tableviewer that is able to sort values depengin on their column order. e.g. column1-column2-columnX sorts the rows first on the values of column 1, then column 2, column.... Therefore i want to use a ColumnViewerSorter, especially the method "int doCompare(Viewer viewer, Object e1, Object e2);" inside t...

why do we get AssertionFailedError?

I have the following piece of code: TableViewer tv = new TableViewer(attributeTable); tv.setContentProvider(new BOAttributeTableContentProvider()); tv.setLabelProvider(new BOAttributeTableLabelProvider()); where while setting the label provider i am getting AssertionFailedError. can anybody tell me what wrong i...

SWT or JFACE Sliders

Does anyone know if there are any "out of the box" (e.g. open source library, in SWT or JFACE directly) ways to create date sliders or sliders with more than one thumb in SWT or JFACE? TIA ...

Changing labels in a JFace TreeViewer on node expansion/collapse

I have a TreeViewer where some nodes represent folders, so I wanted to show the icon of an open folder when the node is expanded and a closed folder when it is collapsed. Sounds easy, I just need to add a tree listener (the code is in Scala, but Java equivalent should be easy to imagine): val tree = new TreeViewer(contents) tree.addTree...

jface wizard passing variables

Hi I'm a Java novice but am trying to produce a wizard using the Wizard class (org.eclipse.jface.wizard.Wizard) Basically where I extend the Wizard in the constructor I addPage the two pages I want. On my first page I take some credentials. On the second page I want to run a query against the database using the credentials from the ...

oracle jdbc jface wizardpage

I want to create a jface wizard and collect credentials as I go along - password and username on page 1 and then on page 2 I want to display a list I get from an oracle database. I am using eclipse, and have all the controls in the places I want. On page 2 I put the oracle connection details and sql statement in the createControl method...

SWT table: auto resize all columns

Qt solution is a single call to resizeColumnsToContent(), in .NET one can use TextRenderer.MeasureText(), JTable could use AUTO_RESIZE_ALL_COLUMNS. In SWT, is there a way to programmaticaly resize columns after populating them? Calling computeSize(SWT.DEFAULT, SWT.DEFAULT) returns the same value thus disregarding character left over...

MenuContribution to Editor toolbar?

Hello! In my recent project, i contributed various commands to viewpart toolbars: Example: I want to do this for editors also. Is this possible and if it is, could some please point me in the right direction, on how this can be achieved? Thanks! :-) Patrick ...

Problem managing GraphViewer with RCP views and command

Hi, I have some problem managing the RCP Views and commands. In my application, I have a view (GraphView, its a ViewPart) which displays graphs using GraphViewer (ZEST graph viewer). Now different instance of the view(GraphView) displays different graphs. Graph contents are provided by the content providers. Then in a command (TreeLayo...

TableViewer inital sorting

Hi everybody, I have a problem with JFace TableViewer in RCP. Basically I have a table with 4 rows, and as input I give an already sorted list of elements. So I expect that first element in my input list is first row in a table. However, the TableViewer reorders the elements, and shows them sorted in DESC order for first column. Since t...

SWTBot: How to select value in table with ComboBoxCellEditor?

Hi, i have editable JFace TableViewer with ComboBoxCellEditor. How can i select some value in the combo by the SWTBot? With SWT Spy i found that combo in ComboBoxCellEditor is not actually swt Combo, but Text field with button and after expansion it creates list with values on the fly. I tried clicking, doubleclicking but it did't work...

JFace - How to correctly bind a TableViewer ?

Hello all, I use the org.eclipse.core.databinding.* framework to bind some Text fields in an SWT application. I add an update strategy to validate the data and to set the value on the model only when the user click on the save button : UpdateValueStrategy toModel = new UpdateValueStrategy(UpdateValueStrategy.POLICY_CONVERT); if...

Set Size of JFace Wizard

Hi, I am building an Eclipse RCP application and am having trouble on settings the size of a JFace Wizard. ...

Eclipse DataBinding: Delay model updates until dialog confirmation

I have a TitleAreaDialog with default buttons where I use data binding to synchronize the model and the widgets. How do I delay model updates until the user clicks the 'OK' button? Thanks! ...

JFace/SWT: Change the labels for buttons in InputDialog

I want to create an InputDialog with custom labels for the OK/Cancel buttons. I'm using org.eclipse.jface.dialogs.InputDialog. I tried to override the button creation method: @Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); getButton(IDialogConstants.OK_ID).se...

JFace ApplicationWindow white line at top of Window

I've created the most basic JFace ApplicationWindow I can think of and I get this 1 pixel white border at the top of the screen: And the code to create it: import org.eclipse.jface.window.ApplicationWindow; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import...

How to determine that a JFace or SWT Dialog is currently open?

In our RCP application, we need to resort to using a global key event handler (via Display.addFilter()) for more advanced key event handling/routing irrespective of current focus. We need to be able to determine if a dialog box is currently open for some of the routing logic. Seems like a fairly trivial question but I keep hitting dead ...

how to create control dynamically in jface wizrd

I am developing eclipse plugin and I want to create jface Text boxes in loop dynamically. is there a way of doing it in eclipse plugin developement? do I need to redraw or something after I add Text boxes dynamically ...