jface

Can't put content behind SWT Wizard Help Button

懵懂的女人 提交于 2019-11-28 01:11:32
问题 I created a SWT based Wizard which has an own help Button by custom. Now i want to put some content behind that, so maybe a SWT browser will be openend and a predifined HTML Doc will be shown. But I don't have any clue where to access the Actions of the Help Button within my Wizard. Any idea? 回答1: I am assuming that you are using the standard JFace interfaces and classes for the wizard implementation. So, in your wizard page ( extending org.eclipse.jface.wizard.WizardPage ) you just have to

Using ProgressMonitorDialog in Eclipse 4 properly

戏子无情 提交于 2019-11-28 01:09:47
问题 I have a set of APIs that do file operations e.g. saveToFile(CustomObject objectToSave); Since a file operation could be lengthy I decided that some indication should be shown to the user e.g. progress bar. I read about a ProgressMonitorDialog and so I tried it, but it doesn't exactly work as I need (or better I don't know how to use it properly). Currently I do: ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(theShell); try { progressDialog.run(false, true, new

How to get cursor position in an eclipse TextEditor

半世苍凉 提交于 2019-11-28 00:04:43
I have been trying to get the line number and column number of the cursor position in a jface TextEditor. I tried the function getCursorPosition(). But on printing this it shows just a "?". Please note that I need the line number and column number within an editor and not with respect to the screen. I saw that there is a function JTextArea.getCaretPosition. But I dont know how to convert a text editor to JTextArea. Also, is it possible to read the word where the cursor is placed? Thanks From a TextEditor, you can get the document, document provider, and selection. That will give you access to

Adding a remove button to a column in a table

岁酱吖の 提交于 2019-11-27 14:29:25
Is it possible to add a Remove button to a cell in a table? I have a table with 5 columns, I would like to add a 6th column. I want the 6th column to have a remove button in each row. Example Row: | 10002 | part | Metal | 001 | Yes | Remove | That way the user can remove any unwanted rows by just clicking the button. I have a markup column in the table and it is ComboBox . I created a class that extends EditingSupport . Would I need to make a another class extending EditingSupport , but creating a button instead of ComboBox ? EDIT public class AplotDataTableViewer extends TableViewer { public

How would one use IDecorationContext api from Eclipse JFace

为君一笑 提交于 2019-11-26 23:35:54
问题 Is there an example out there for using IDecorationContext for label decorations? By the looks of it, IDecorationContext class seems to provide some sort of contextual decoration support, but for the life of me, I can not find any sample code using this feature... Has anybody actually used decoration context feature and if so, what use cases did it solve? PS: I am looking for a way to apply image decorations to object labels and depending on where the object is displayed, the base icon size

Adding a remove button to a column in a table

拈花ヽ惹草 提交于 2019-11-26 16:45:40
问题 Is it possible to add a Remove button to a cell in a table? I have a table with 5 columns, I would like to add a 6th column. I want the 6th column to have a remove button in each row. Example Row: | 10002 | part | Metal | 001 | Yes | Remove | That way the user can remove any unwanted rows by just clicking the button. I have a markup column in the table and it is ComboBox . I created a class that extends EditingSupport . Would I need to make a another class extending EditingSupport , but