jface

jface.preference.FileFieldEditor can't specify a new file

无人久伴 提交于 2019-12-31 05:10:50
问题 I'm setting up a series of preferences in my Eclipse (3.5.2) application and I'm having a problem with the FileFieldEditor. I want to allow the user to specify a log file to print output to. Often, this will be a new file. But when I use the file select dialog with FileFieldEditor, it complains that the file doesn't exists ("Value must be an existing file"). Is there a way, without extending the FileFieldEditor class, to suppress this error and have Java create that file if it doesn't exist?

JFace DialogCellEditor: how to make buttons always appear?

痴心易碎 提交于 2019-12-31 03:31:07
问题 I use JFace DialogCellEditor to show a button in a cell of a row of my JFace TableViewer which triggers a dialog when activated. This behaviour works well with the following code but the button only appears when the cell of the table hosting the button is explicitly selected. public class CompareDialogCellEditor extends DialogCellEditor { public CompareDialogCellEditor(Composite parent) { super(parent); } @Override protected Button createButton(Composite parent) { Button button = super

Eclipse JFace's Wizards

▼魔方 西西 提交于 2019-12-29 05:20:29
问题 I need a wizard which second page content depends on the first page's selection. The first page asks the user the "kind" of filter he wants to create and the second one asks the user to create one filter instance of the selected "kind". JFace's wizards pages contents (createControl(...) method) are all created when the wizard is open and not when a given page is displayed (this allow JFace to know the wizard size I guess ??). Because of this, I have to create my second page content BEFORE the

CheckboxTreeviewer previously set checked elements after reload

时光怂恿深爱的人放手 提交于 2019-12-25 08:13:39
问题 I have used JFace CheckboxTreeviewer and added ICheckStateListener to get result of checked elements. Code is as follows private HashSet<Object> checkElement=new HashSet<Object>(); checkboxTreeViewer.addCheckStateListener(new ICheckStateListener() { @Override public void checkStateChanged(CheckStateChangedEvent event) { String childNode=null; String rootNode=null; Object changed = event.getElement(); if(changed instanceof ChildFacetNodeVo){ checkElement.add(changed); ChildFacetNodeVo

combobox jface showing end of string by default. How to show start of long string

妖精的绣舞 提交于 2019-12-25 06:36:52
问题 It's an extension to this question. The combobox is resized but it is showing the last characters of the long string. How would I always force the combobox to show the string from the start? I checked all the provided methods by ComboBox in jface, but none could qualify to do the task. So I am assuming I would have to write a function for it. But how to go about writing it and attaching that value to combobox. Problem : How it is now How I would like it to be. Just upon selection 回答1: Usually

Layout setting for a jface Table

大城市里の小女人 提交于 2019-12-25 05:31:58
问题 I created a CheckboxTableViewer to show a list of stuff as shown in figure below. The problem are the scrollbars of the table are not working as it should. May be I am missing some layout parameters for the table? And here is the code: public class TableViewerClass { CheckboxTableViewer tableViewer; private GridData gridData; private List<String> checkListNames = new ArrayList<String>(); public TableViewerClass(Shell parent){ checkListNames.add("Function Trace 1"); checkListNames.add(

Eclipse Project Explorer filter for XML files

混江龙づ霸主 提交于 2019-12-25 04:47:12
问题 I have many XML files in the workbench Project Explorer, each one an instance of one of ten different ecore models. For each ecore model I would like to contribute a commonFilter to the navigator's navigatorContent extension point to enable the user to show or hide the corresponding XML files. These are external tool files so there is not a way to identify the content merely by observing the file name or the xml extension, and renaming is not feasible. Using perhaps a class deriving from org

How to change file/folder resource icons from existing eclipse views

淺唱寂寞╮ 提交于 2019-12-25 04:24:30
问题 I want to change the appearance of project explorer view in eclipse by changing the default file/folder icons for my custom plugin resources. I am aware of Decorators - https://eclipse.org/articles/Article-Decorators/decorators.html , But how can I change the existing icons itself inspite of just putting an overlay or underlay image? Also I don't want to create a new view , just want to reuse the project explorer with my icons. 回答1: The main icon used is taken from the default editor used for

Native tooltips on JFace TableViewer not working flawlessly

旧时模样 提交于 2019-12-25 03:55:30
问题 I have a TableViewer with multiple columns where some columns have tooltips and some don't. Tooltip support is enabled through ColumnViewerToolTipSupport.enableFor( tableViewer ); Each column has a CellLabelProvider assigned whose getToolTipText() method either returns null (no tooltip) or a tooltip text. All columns use native toolstips , i.e. the respective useNativeToolTip() implementations return true . While all this works at first sight, there is a flaw when moving the mouse pointer

how can I change buttons's text in org.eclipse.jface.wizard.Wizard

*爱你&永不变心* 提交于 2019-12-25 03:55:24
问题 I want to change text of button in org.eclipse.jface.wizard.Wizard to arabic in button bar? I mean I wanna change label "Next" button to "بعدی". 回答1: The language of the Wizard 's labels is handled by JFace and uses your OS's region settings. That means if you're machine is set to "English (UK)" you will see the labels in English, if it's set to "Germany" you'll see them in German, etc. There are related questions here: JFace dialog button translation How to set custom text on buttons in