Is there a way to include JavaFX controlsFX in Intellij Scene Builder? - intellij-idea

I was wondering if there is a way to include controlsfx into the Scene Builder inside JetBrains Intellij. I tried to google it but I did not find anything relevant or updated.

just add the controlsfx jar file to the project libraries. then you can use the controls in it in the built-in scene builder
If you create user control in your project intellij will allow you to use it directly in the built-in scene builder just as you use external controls.

Related

JFoenix library does not have JFXTabPane support in scenebuilder?

Why doesn't JFoenix have the JFXTabPane in the imported .jar in scenebuilder?
This means when I try to open my .fxml file with scenebuilder in intellij it gives me the .fxml file is not a FXML document error.
Even after importing the entire JFoenix library in scenebuilder I won't be able to use it because it can't open it without the JFXTabPane.
I downloaded the most recent versions of SceneBuilder (17) and jfoenix (9.0.10) and dragged the jfoenix jar to the library pane in SceneBuilder to import it. The import completed, JFXTabPane was displayed in the library. When I tried to drag a JFXTabPane from the library catalog into a scene, scene builder started behaving oddly (it broke and did not render the scene being built correctly). So it JFXTabPane still doesn't work with SceneBuilder. I advise you file an report with jfoenix to ask them to fix the issue (they have an issue tracker on their github site).
The asker did note in comments that, under the setup they are using:
jfoenix 9 is displaying the JFXTabPane
That might be due to using a different version of SceneBuilder than the version 17 I used.
If you continue to have issues, just use a plain TabPane in your FXML document rather than a JFXTabPane. I looked at the source and, functionally they are the same, JFXTabPane inherits from TabPane. In your code, create a new JFXTabPane and replace the TabPane injected by scene builder with your new pane (setting the children and properties the same as the fxml), and you should be fine to design in SceneBuilder but still use a JFXTabPane in your actual app. It is a bit of a hack, but not too bad.
There may be similar issues with using other jfoenix controls in SceneBuilder (I don't know, I haven't tried them), but basic jfoenix controls like JFXButton appeared to work in SceneBuilder fine, so perhaps it is on the JFXTabPane which experiences these issues.
For further information on troubleshooting SceneBuilder custom component import, see the following document (though it may not assist in all cases):
How to create an FXML file for an already created new component in java than add it to scene builder?
The answer to which features a SceneBuilder import troubleshooting section.

Adding custom GTK# widget to Glade catalog

I've created a custom widget (with my own drawing) in C# using GTK# 3 toolkit.
Now i want to use it in Glade designer.
Is it possible to add this widget to Glade palette?
It seems that this documentation:
https://developer.gnome.org/gladeui/unstable/catalogintro.html
can be used to add widgets written in C/C++ to Glade palette, but what is the correct way to get the same result for widgets written in C#?
Thanks.
It may not be possible. The way to approach it would be to write a shim library in C that uses libmono to interoperate with your C# widgets. Here is a link to Mono's documentation on how to do that. The entry point into your shim library would then be listed in the <init-function> element in the Glade catalog.
Alternatively, you can "fake" the widget classes in the Glade catalog; their properties and signals will appear (though you have to manually write them in the catalog file.) If they are container widgets you won't be able to add child widgets to them. They'll just appear as grey boxes in Glade. You do this by adding <glade-widget-class> elements to the catalog as described on this page of Glade's documentation.

Add external libraries to my project issue

I try to add external library to my current project, but my project can't pick up the library.
I have MyLib.java file in other directory.
/Users/cat/myfile/github/JavaLib/MyLib.java
I want to my current project (/home/project/HelloWorld/HellowWorld.java) to use my MyLib.java
I'm following the steps to add Library to Intellij(15CE)
Menu->Project Structure->Libraries
click (+) symbol->select Java -> select my path(/home/lib/)
Here is the screenshot
Now that you have added your JavaLib directory to the project you should be able to use the code inside JavaLib in your code now. Intellij should offer auto-complete when you start to type the name of a JavaLib class and automatically include the import for you in your code.
The disabled Apply button you circled isn't an issue. I get that in my view too. It just means nothing has changed that needs to be applied currently.

How to access JDT "static" icon from an eclipse plugin?

I found out how to access some icons:
ISharedImages images = JavaUI.getSharedImages();
Image image = images.getImage(ISharedImages.IMG_WHATEVER);
However, in ISharedImages are constants modifier icons like IMG_FIELD_PUBLIC and IMG_OBJS_PRIVATE etc., but I cannot find any for e.g. the static modifier.
I believe all of the icons in this list should somehow be accessible, but how?
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-156.htm
Unfortunatelly the only way I know if you use internal call. Add org.eclipse.jdt.ui as a dependency to your project. Then you will be able to use the JDT internal mechanism:
JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CLASS); // returns an Image
I think with that you can use whichever icon you want.

How to add shortcuts ("templates") to eclipse properties through my plugin?

I'm developing a plugin for visualization of objects by calling Doo.dle(Object o).
Now I'd like to automatically define a shortcut like sysout for System.out.println(), e.g. doodle.
I already know how to do it by hand:
Window > Preferences > Java > Editor > Templates
Is there an extension point or something similar to do this automatically with my plugin?
I managed to do it on my own:
I had to define a javaCompletionProposalComputer extension and implement an ICompletionProposal.
It's not exactly what I intended, but it's working too.
Update:
I finally found it out:
The key is to define an extension for org.eclipse.ui.editors.templates. Patterns etc. can be cheated off predifined templates in eclipse properties (see question).