jface

How to make my dialog to hide when i open any other window

I am using a jface dialog, and now i am facing a problem where no matter which window you open this dialog will appear on top of that. So i need to hide or show it such that it should come only on its parent window, not on all the windows. need help urgently. thanks ...

JFace label provider overview

Is there any good overview of the JFace label provider framework? The JFace snippets doesn't really explain the relationship between the different generations (pre-3.2, 3.3, 3.4, etc.) ...

How to embed a SWT TableViewer in a TabFolder?

I am trying to embed a JFace TableViewer in a SWT TabFolder, but when I do so, the table does not show up. The current (working code) in my GitToDo code looks like (see this Git repos): final Display display = new Display(); final Shell shell = new Shell(display); shell.setText("Git ToDo"); FillLayout layout = new FillLa...

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

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 mus...

How to make a listviewer scrollable

Hi everyone, Can someone share how to make items in a ListViewer scrollable? Source code will be more helpful. Thanks. ...

JFace ApplicationWindow: createContents isn't working

I'm attempting to create a window that is divided into three parts. A non-resizable header and footer and then a content area that expands to fill the remaining area in the window. To get started, I created the following class: public class MyWindow extends ApplicationWindow { Color white; Font mainFont; Font headerFont; ...

How do I use an SWT Control to render the content of an SWT/JFace table?

I have a JFace TableViewer with an SWT Table, and I would like to custom render the content of some cells. I would like to use an SWT Control to render the cell content. I would prefer to have only one instance of the Control doing the rendering, but if I have to instantiate one for each row, that would be acceptable. Next, the soluti...

How to LIMIT the text box length?

I am working on eclipse java using swt jface with rcp. How can i limit the characters in my text box. Like if i want only 4 characters in my text box then what should i do? and what if i want alphanumeric combination . again in certain limit? ...

JFace FontRegistry Font Disposal

I have an application which will have many windows, so it makes sense to me to create a singleton that holds a FontRegistry instance and have that singleton manage the FontRegistry's contents. My code looks something like this: import org.eclipse.jface.resource.FontRegistry; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.w...

JFace: difference between ITreeContentProvider and ILazyTreeContentProvider

After reading JavaDoc for ILazyTreeContentProvider and Virtual Tables and Trees I am a bit confused. Do they really mean that with a simple ITreeContentProvider all elements have to be loaded when the tree is created? I expected that getChildren() would only be called when expanding an element (and hasChildren() to be called to determine...

ContainerCheckedTreeViewer - how to get tree of checked elements

Hello I'm using ContainerCheckedTreeViewer. Method getCheckedElements() returns array of checked elements. But since i am inside a tree i want to get a Tree of checked elements :) This is so logical, but it seems is not possible. Probably i'm missing something? One workaround is to store a parent for each element in the tree, then i ca...

How do you update a JFace Viewer from inside a Job?

Caveat: I'm still struggling with proper MVC in Eclipse plugin development, so if you see anything here that is most likely causing me more pain that I should be enduring, please let me know. The question: I have a View with a JFace Tree Viewer and a Table (not a table viewer... that will be changed down the road). I have an action th...

JFace Providers and MVC/MVP/etc.

Where do the JFace providers belong in an MVP or MVC architecture? Or should Provider pattern be treated as a different way of View-Model separation? If so, is it the same as the ASP.NET Provider pattern? Is there an article on a proper design of JFace applications using Providers? ...

Make JFace Window blink in taskbar or get users attention?

Hi folks I wonder someone has any idea how to solve this: In my Java Eclipse plugin there are some processes which take some time. Therefore the user might minimize the window and let the process run in the background. Now, when the process is finished, I can force the window to come to the top again, but that is a no-no in usability. I'...

JFace ErrorDialog: how do I show something in the details portion?

ErrorDialog.openError takes arguments for dialog title, message, and status (which has a message itself). I want to show the exception's message in the main area, and the call stack in the details area. However, both of these variations show the call stack in the main area: void showException(Throwable e) { Status status = ...

how to hide "help" image from wizard?

Hi Do someone know how to hide such help image from my custom wizard? setHelpAvailable(false) doesn't work, it hides "rectangular help button", not this image. Thanks ...

How to dynamicly build up a gui

Hi there, currently im building an application which is supposed for some sound processing. I'm doing this in java/eclipse with swt/jface. The processing itself need some options/properties for the algorithem inside. At this time, i have a .properties file which holds all options like: trimLeadingSilence=20 trimtrailingSilence=20...

File Explorer using Java - how to go about it?

Hi, I am set to create a file explorer using Java. The aim is to emulate the behavior of the default explorer as closely as possible, whatever may be the underlying OS. I have done NO GUI programming in Java. I have looked-up Swing, SWT and JFace, and I am beginning my project with this tutorial: http://www.ibm.com/developerworks/ope...

How to set initial size of a TreeViewer?

Hello, I'm using a TreeViewer within a jface WizardPage and the initial input into the tree causes the WizardPage to grow vertically so that it can show all of the tree's values. When expanding one of the tree's values, then the vertical scrollbar works as expected. I'd like to be able to set the tree's size initially so that it is fixe...

Any workarounds to lack of PreSelection events in SWT/JFace?

In my application I want the user to save any changes before he leaves a tab (implemented as CTabFolder). I tried to handle SelectionEvent, but it fires after the tab has been changed (so why does it even have a doit field? Does it fire before change for some other controls?) Looking on Bugzilla, I've found https://bugs.eclipse.org/bu...