Actions in jQuery for windowsbuilder in swt designer

I am writing a standalone JFace application using eclipse / windowbuilder pro. Windowbuilder is a great tool to work with, but I'm having trouble finding information about the organizational structure of such an application.

I am currently extending the standard ApplicationWindow class (as standard in the windowsbuilder examples) for the main window of my application and a subclass of SWT composites for my "substrates" in the application. The problem I am facing is that I lose the ability to use JFace actions / data bindings when I graphically create SWT Composite subclasses in windowbuilder. The palette for adding JFace actions is not available when using the SWT constructor when subclassing standard SWT components. I searched for a long time how to add this palette to no avail (the standard method does not work, since this is not the "normal" palette that appears in the palette manager). I also tried to add a JFace action component to my existing palette, but cannot find documentation on how to add an abstract class (action) to the palette. I know that I can write all the code I want by hand, but it defeats the purpose of using windowbuilder.

I would really like to adhere to the standard JFace view / action model, but I cannot figure out which components I need to subclass for my "helper windows" in my application. I tried a subclass of the Window class directly, but this does not give access to the JFace Actionsbuilder palette. I'm not sure under what conditions this palette is available (I iteratively remove and add components to ApplicationWindow, I am desperate). I have some custom widgets that I would love to write JFace Viewers if I could understand this.

Any fans of octurists? Will SWT Composite classify a reasonable / standard way to make components of this application? What is the standard for writing applications that are more complex than one ApplicationWindow? I searched high and low, but I can only find tutorials and examples that represent a single application window - nothing complicated. I feel like I am missing some key information about the structure of more complex JFace applications. I believe that my holy grail will be the JFace version of SWT Composite, which will allow me to access the generation of JFace action code through windowbuilder.

Any tips and / or reading materials explaining the standard JFace design for larger applications will be appreciated!

+4
source share
1 answer

I have been working with WBPro for about 6-7 years ... I think we can talk about your problem. I may not be able to fully answer your question, but I will do my best. So, firstly, for your submarines you should use JFace Dialogs. You can create a template from New> Other> WbPro> JFace> Dialog or just subclass it yourself. You can also use TitleAreaDialog, which is cooler and has a title bar at the top, like all Eclipse dialogs. These two classes are in JFace and are available in WBPro.

You have JFace widgets and viewers available on the Design tab, but not actions. But the reason is that in Dialogs and sub-Windows there are no toolbars or menu panels, I think that they are not in the palette, but if you have a context menu for one of your internal widgets, I think you should implement this yourself . I can dig a little deeper for you, if you want, tell me if there is anything else to address.

0
source

Source: https://habr.com/ru/post/1400348/


All Articles