Why Xtext doesn't recognize JavaFX properties? - eclipse-plugin

I started using JavaFX recently. Unfortunately I've been unable to use auto-complete in my css editor with XText.
My project was created using maven so I added JavaFX SDK to the class path.
I'm working on eclipse Luna 4.4 editing the css files with e(fx)clipse Css Editor.
How can I have Xtext working correctly while editing Css files in eclipse?

I had the same issue of being unable to get auto-complete with my JavaFX CSS. My fix was add the JavaFX SDK to the library list. To do that:
Go to Project | Properties
Select Java Build Path in the tree
Click on the Libraries tab
Click the Add Library... button
Choose JavaFX SDK
Click Next then Finish
Click Apply
Click OK
CSS editing worked after those steps.

Related

How can I add gradle support to an existing intellij project?

I have an intellij project that has gradle files in it(build.gradle, settings.gradle, etc.) and I have the project working in intellij. The issue is that intellij can't find any 3rd party libraries so I need to link the gradle project to it. How can I do this to an existing intellij project or at least be able to resolve 3rd party libraries so that the classes don't show up as red in the editor?
I'm on version 2016.1.2 145.972
You can click on the "+" symbol on the Gradle tool window and attach the project. If you don't see the window, use View | Tool Windows | Gradle to bring it up. (Or use the square icon on bottom left). You may then have to click the refresh icon to bring in the dependancies (in case IntelliJ didn't do it).
Refer: https://www.jetbrains.com/help/idea/2016.1/working-with-gradle-projects.html
Alternately, you could just re-import the project freshly using gradle.
Import Existing Project -> Import project from External model -> Gradle

IntelliJ and JavaFX support

I just tried to set up my first IntelliJ Java FX project. I was doing a tutorial where some fxml files are created. A screenshot from a eclipse window is shown:
I tried to do something similiar, but if I go to "new file", I cant even choose a fxml format. Is there no support in IntelliJ for that? I googled around but I couldnt find anything. Always it mentions I should try to enable the JavaFX support for my project, but it is enabled.
Any ideas?
Intellij 13.1, Ultimate Edition
Right Click on the folder you want to create the new file in (e.g. the ch.makery.address.view package), then select from the context menu:
New | File
Type the name of the fxml file you want to create (e.g. RootLayout.fxml).
You now have a blank fxml file which you can hand edit.
Hand editing fxml isn't really advised except for minor tweaks.
So install SceneBuilder and you can edit the new fxml in SceneBuilder by right-clicking on the fxml filename in the Idea project window and choosing "Open in SceneBuilder".
See also, this related question on what constitutes a JavaFX project in Intellij Idea.

How to import and run existing plugins from intellij community edition repo

I'm trying to import and run the IntelliJ git4idea (Git Integration) plugin in order to play around and contribute some of my own code.
I've pulled the Intellij community edition from the github repo, and imported the git4idea plugin as a project. I'm running the Intellij community edition
My main issue is this:
After importing all the modules, the git4idea module comes up as a general module type, and not a plugin module type.
This means that when trying to create a new run\debug configuration, I get [none] under "Use classpath of module", instead of of the ability to select the git4idea plugin. This obviously results in a "Run configuration error: no plugin module specified for configuration".
So the question is -
How can I change the general type of imported "git4idea" to plugin type?
Or better yet, what are the steps required in order to import and build/debug/run a plugin from the Intellij community edition repo?
I was able to solve this by manually reordering file directories, sorting out dependencies and editing the .iml file. The type of plugin is defined by changing type="JAVA_MODULE" to type="PLUGIN_MODULE".
...
This is the answer given by Dmitry Jemerov on the official Jetbrains plugin development forum:
The easiest answer to this is "don't". The IntelliJ IDEA Community
Edition project is set up to be developed as a whole, and the
dependencies are set up accordingly. If you want to hack on the Git
plugin, you simply run IDEA using the provided run configuration, it
runs with all plugins enabled, and you simply make whatever changes
you need and test them using the main run configuration.
If you really want, you can set up a new plugin module and point it to
the source code of the git4idea plugin inside the IntelliJ IDEA
Community Edition Git checkout. This is not too hard, but it's
something you'll need to do from scratch, and you can't use the
existing .iml file.
I had the same no plugin module specified for configuration issue. To work around it, instead of importing, I created a new plugin project and used the existing code directory.
when you import the intelij plugin projects
You should run the 'runIde' task in gradle.
Step-by-step instruction
Build your IDEA plugin (usually done with gradle build).
Start Intellij IDEA.
If you have any project opened, go to menu "File->Close all projects" to return to Intellij IDEA startup screen.
Install the plugin you've just built: on the left side of the "Welcome to Intellij IDEA" startup screen go to "Plugins", then click "gear" icon on the right side, it's located to the right of "Marketplace" and "Installed". From the pop-up menu select "Install Plugin from Disk...", navigate to plugin file (usually in build folder) and click "Ignore and continue" when you see the warning message saying something about signature.
Restart Intellij IDEA.
Open the folder with your IDEA plugin.
Wait until IDEA imported your Gradle project.
Put breakpoints inside your plugin code so you can debug it.
Go to menu "Run->Edit configurations".
In the "Run/Debug Configurations" window on the left side click "+".
Select "Gradle" from the pop-up menu.
On the right side change "Name" to "gradle-run-ide" (without quotes).
On the right side under "Run", inside "Tasks and arguments" field enter runIde ("i" must be capital, other letters small).
Click "OK" to save changes.
Go to menu "Run->Debug 'gradle-run-ide'".
A new, black-colored IDEA window should appear.
In this black-colored IDEA window do whatever you need to do in order to invoke methods of your plugin. When you invoke them, the first IDEA window should stop you on breakpoints you set previously.
Happy debugging.
After changing type="JAVA_MODULE" to type="PLUGIN_MODULE" in *.iml file I was getting following error -
Error running 'IdeaPlugin': Wrong SDK type for plugin module
To fix this go to -
Module Settings -> Platform settings -> SDKs.
Click on Add new SDK
Select Intellij Platform plugin SDK
For home directory select your Inetllij installation dir
Select JAVA SDK you want to use with it.
Once this is added got to Module Settings again
Module Settings -> Project settings -> project.
In Project SDK change the JAVA sdk to the SDK we just added in the above steps.
Run/Debug you plugin now.

New>Generic problem in Eclipse Helios no other attributes

When I am trying to use eclipse Helios for plug-in development,I am not getting any attributes beside generic in any new RCL option. I have gone through net and found to download the source code but there is no way to append the same in Helios. Please suggest
You can install Eclipse RCP Plug-in Developer Resources via Eclipse update site
The shortest way to do it is:
Download the helios version for RCP developers from the eclipse web site.
Open target platform from the preferences menu.
Click "add" to add a new target platform.
"Nothing" is chosen for default target platform creation. Click next
On the new window click on the locations tab.. Click add , on the pop up window click directory and browse the plugin directory of eclipse for RCP developers (This version of helios includes the necessary plugin sources inside) and click finish
On the "implicit dependencies" tab show all the plugins added (choose all plugins)
and then click finish and close the wizard window.
Finally choose the new target platform configuration you have just created.
Now you can see all the new attributes beside generics (related to the plugin)
Download the SDK plugins from:
http://download.eclipse.org/eclipse/updates/4.3/

Eclipse Plugin API: how can I add javadoc support for specific platform plugins?

using Eclipse 3.4 Ganymede and I cannot find the way to add javadoc support for all platform plugin apis, but specifically to JFace e Ui Forms packages.
Opening the property panel of any jar linked to the library named "plug-in dependecies" I receive the following message into the "Javadoc location" node:
The current class path entry belongs to container 'Plug-in Dependencies'
wich does not allow user modifications to Javadoc locations in its entries"...
what does it mean, that I must re-build Eclipse with some wired javadoc location?
If you have the eclipse SDK "classic", "RCP/Plugin" or "Modeling" installed, that means sources for the eclipse plugins are included.
While it is true you cannot setup Javadoc for those plugins, you still access to that documentation since the sources are here, fully "Java-documented".
If there are no sources, you still can import all eclipse plugins with their sources in a dedicated workspace.
alt text http://www.vogella.de/articles/EclipseCodeAccess/images/eclipsesource30.gif
I'm using eclipse 3.4.2 with visual editor 1.4.0.
For some reason, my eclipse doesn't find the swt javadocs by default and the "import plugins method" does not work.
But I found a work arround:
Project Properties -> Java Build Path -> Libraries -> Add External Jar
add /plugins/org.eclipse.swt.gtk.linux.x86_64.3.4.1.v3452b.jar
edit the "source attachment" to org.eclipse.swt.gtk.linux.x86_64.source_3.4.1.v3452b.jar
Press ok. Note, that you are now using swt "twice" :O)
If it is still not working, go to the same dialog, remove the "Standard Widget Toolkit (SWT)" and press ok. Return to the dialog and add it again with the button "Add Library" -> SWT -> IDE Platform. Press ok. Close all Visual Editors. And go to Project -> Clean...
Now you the Javadocs are displayed directly in Eclipse and Visual Editor still works.