I am learning JAXB.
I need to know how should I create a simple java project for JAX-B in IntelliJ IDEA13. If anyone have idea, please update me and also update me with any plugin for IDEA
Thanks.
You don't need to do anything special when you create your project. Just a simple java project will do.
There are however some tricks that can help you. There are 2 built-in live templates for jaxb :
typing mjo + hit tab-key: will generate the code for a marshaller.
typing ujo + hit tab-key: will generate the code for an unmarshaller.
Intellij has built-in functionality for generating an xsd file for any xml file. Just right-click on any xsd file and you will see a button "Generate xsd schema from xml file".
JAXB also offers a tool (xjc.exe) to generate JAXB code stubs. There is a simple way to add this functionality to IntelliJ. I prefer to add a button for xsd to java source conversion, using the configuration in the "External Tools" menu.
After this configuration, you can right-click on an xsd file and there will be a button "JAXB (XSD->JAVA)".
Note: According to some websites, there is also a dialog/wizard for generating jaxb stubs. However, I haven't found this wizard yet. Maybe it's only available in more recent IntelliJ versions (14+), maybe only in the commercial edition, or it may require some plugins. My solution works fine in IntelliJ 13.0.3 - Community Edition.
Related
I'm beginner in using IntelliJ IDEA IDE and I want to create a new GWT project. I have added the GWT plugin to IntelliJ IDEA and now and I want to create a project. I googled but I didn't find a helpful tutorials or examples. Did you have guys a helpful tutorials to start. Thanks in advance.
Do not use the GWT project builders from IntelliJ or Eclipse. Both generate projects which use the same class path for client and server. In todays GWT development it is common to use a separate class path for client and server.
Depending on the server you prefer to use, choose:
https://github.com/tbroyer/gwt-maven-archetypes
in case you want to use Jetty or Tomcat on the server side or:
https://github.com/NaluKit/gwt-maven-springboot-archetype
in case you want to use Spring Boot.
How to create a new GWT project in IntelliJ
Create a new project: File → New... → Project...
Select Java EE (Legacy).
Select Java 8.
Do not use Java 9 or above unless you know what you're doing. Yes, GWT 2.8.2+ works with Java 11+, but you'll need to open some internal modules for it to work. If you just want to learn GWT, stay with Java 8.
In Additional Libraries and Frameworks, check ☑ Google Web Toolkit.
In GWT SDK, fill in the path to your GWT installation.
Check ☑ Create sample application and introduce a fully qualified class name for the main class.
Click Next, and fill in the rest of needed info for your new project (this has nothing to do with GWT).
You'll end up with something like this:
If you followed the steps closely, the sample project should be fully functional. IntelliJ should've created a Run configuration for you, too, so you can run the GWT app right away and see it in action:
This is all explained in the official help documentation for IntelliJ 2020.1, which was the last version to include GWT support out of the box.
I work on a Java based Play! project for severals months now and I'd like to import it completely in IntelliJ, meaning being able to run, compile, test and debug from IntelliJ, without the need to use the command line.
According to this post from Jetbrain, it seems to be possible, if I quote the article it says clearly : "Now you don’t need to switch between IntelliJ IDEA and Play console anymore. Everything is available right from your favorite IDE.", but I can't figure out a way to achieve this for now, even if I follow the tutorial provided by Jetbrains.
Here are the steps I've been throught :
Open my fav IDE IntelliJ ;)
Go to the project list window.
Import project
Import from external model and choose SBT as suggested in Jetbrains tutorial.
option "Use auto import" checked, option "create directories for empty content roots automatically" checked. Project SDK Java 1.7
Global sbt settings : JVM From project JDK.
Finish
By now, if I try to make the project and launch it from IntelliJ, I'll get scala compiling errors related to routes object. Thanks to this post, we can understand that this happens because scala routes are located to specific folders that needs to be included in IntelliJ sources settings for this project. So next step was :
File -> Project Structure -> Modules
Add target/scala-2.10/classes:target/scala-2.10/resources_managed:target/scala-2.10/src_managed as sources folders.
But my problem remains the same, routes object being unrecognized.
Notes : I have no scala facets in my project structure configuration nor can add one.
IntelliJ provides integrated support for the Play Framework for Scala and Java. Support is currently only available in IntelliJ Ultimate Edition (see the Frameworks and Technology section).
Assuming Ultimate Edition, the setup for Play is incredibly easy. Simply create a new project by importing build.sbt, then choose Add Framework Support and choose Play 2.
Once complete, you can start and stop Play using the Play 2 Run/Debug configuration. No command line necessary.
Here is a more in depth look at IntelliJ's Play project configuration.
You could try the command play idea if you are using play or activator idea if you are using activator. That will do the magic.
On the page https://www.jetbrains.com/idea/whatsnew/ it is said that Intellij Idea 14 has got a visual diagrams for spring integration.
But I can't find how to visualize my integration xml file.
(right click on file)/Diagrams/Show Diagram... shows a diagram with links between the beans. It is not very usefull.
Spring Integration Patterns plugin is enabled
I have Intellij Idea installed on a computer without access to the internet. May it be the reason why the diagrams are not working properly?
What do you want to see there?
For example.
We have stomp-chat sample: https://github.com/spring-projects/spring-integration-samples/tree/master/applications/stomp-chat
And here is a diagram for this config: https://github.com/spring-projects/spring-integration-samples/blob/master/applications/stomp-chat/src/main/resources/org/springframework/integration/samples/chat/stomp/server/stomp-server.xml
I'd say that it is OK, however I agree that it would better if I'd provide id attribute for all components.
Of course, Spring Integration Patterns plugin has to be switched on.
This link helps - https://devnet.jetbrains.com/message/5529839#5529839
"Please make sure the XML file is correctly configured in Spring context setup via Spring facet.
It requires spring-integration-core to be in module dependency of selected XML file."
I had the same problem, and found that in addition to having the Spring facet enabled, and having the spring-integration-core dependency and having the relevant context file set as an application context under the facet, you also need to have just the containing module open. i.e. the stomp-chat spring-integration sample provides the "Spring Integration" diagram option if it is opened from its own pom.xml, however if you open the parent applications\pom.xml then the "Spring Integration" diagram option is not available, regardless of facets etc.
I have the same problem in a project where I use spring integration 2.1.4.
In a newer project I use 4.0.0 and there Intellij Idea offers the option to open the spring integration diagram.
Perhaps that is the reason and you "only" need a newer version of spring integration.
The issue is that the newer versions of Intellij create separate modules per source set by default which somehow ends up conflicting with earlier setups. Using Intellij 2016.1, I instead reimported my project with the following options checked:
Once I did that then (right click on file)/Diagrams/Show Diagram once again gave me the Spring Integration Option.
Yes, click on your Spring Integration context file > Diagrams > Show Diagram... > Spring Integration., but if you haven't this menu follow below:
You should have identified integration context as Spring XML based configurations. Instruction here : Create a Intellij file set
I don't know why, but I had a problem with Spring Integration Diagram when I installed Springirun plugin.
We use framework where for some classes there is xml configuration file. I want to write plugin which adds icon near field declaration (in eclipse that icons are called markers). When click on this icon user navigate to xml configuration for the field. This is similar to spring or hibernate plugin with xml config. How can I add that markers? Is there some open source plugin that do similar things?
Grab IntelliJ IDEA Community Edition source code from GitHub if don't have it already.
Please see com.intellij.navigation.GotoRelatedProvider, sample implementation can be found in com.theoryinpractice.testng.TestNGRelatedFilesProvider.
Can anybody tell me how to add the openlaszlo plugin to the eclipse or any IDE for openlaszlo ?
Thank you!
IDE4Laszlo - http://wiki.openlaszlo.org/IDE4Laszlo - an Eclipse-based development environment for creating, editing, debugging, and testing applications based on the LZX declarative mark-up language.
Also check https://stackoverflow.com/a/11676129/363075 for details of other development tools for OpenLaszlo.
I would use the Spket IDE plugin. It has some support for Laszlo, and I've used it in projects. The old IBM IDE project has been discontinued back in 2006. The Eclipse Update Site for Spket is http://www.agpad.com/update.
If you would rather use an XML Schema file with Eclipse, there is an Ant build script capable of generating a custom XSD file for your application. See the OpenLaszlo Schema Generator site for more info.