Editing Play 2.8 Twirl templates in Eclipse - java

The same question was asked 3 years ago. However, the answer from that time is no longer valid.
I have the last stable version of Debian and the last version of Eclipse (2020-03) running on it. I have a Java Play 2.8 project which sbt compiles and runs just fine. I am able to edit all source files (.java code and .scala.html templates) in Eclipse. However, template files in the Eclipse editor look like ordinary text opened in Notepad: no syntax highlighting, no syntax checking. Editing cmplicated template files without any help from the IDE is very painful.
In the past I was able to download Scala IDE plugin with Play support from Scala IDE project. However, Scala plugin for Eclipse seems to be gone (it's not being developed any more). My tries to install the last version of the plugin have failed.
What is the right way to edit Play templates in Eclipse right now? I need at least syntax highlighting, syntax checking is not critical.

i use eclipse on Linux mint cinnamon, the same version as yours.
in the eclipse marketplace, i can see a plugin is available which can be used for this purpose,
in eclipse, Help->Eclipse Marketplace and then search for Scala IDE 4.7.x and install it.
hopefully this will work.

Related

Is the source for gluon's netbeans project templates (Gluon-Glisten-Afterburner, Gluon-Multiview-FXML, Gluon-Multiview) available?

Being a noob with JavaFX, and having fallen in love with Gluon's 4 Netbeans project templates, I hope to make some minor changes. However, there are no avenues for making slight modifications to the templates.
For example, all 4 of the templates generate a maven pom file with Java version 11 hardcoded. I'd like to change that to 17 as it is tedious to manually change the pom file each time I use one of the plugins.
If the source were available, I could make that change (and others), and re-install locally.
You can the source code for the templates used by the Gluon IDE plugins here:
https://github.com/gluonhq/ide-plugin-templates
And you can find the Gluon IDE plugins source code here:
https://github.com/gluonhq/ide-plugins
Gluon integration with Java IDEs. The repository contains Gluon plugin source for the following IDEs:
Eclipse
IntelliJ IDEA
Apache Netbeans
Related docs: https://docs.gluonhq.com/#_ide_plugins
You can do changes and test locally, of course, but being an open source project, issues and pull requests are welcome.

VS Code Cannot Detect Java Libraries

I recently downloaded VS Code for Java development. When I initially opened an existing Java Project in VS Code, it was unable to identify objects from the Selenium library. I downloaded the Java Extensions plugin and a few others, and now VS code will not recognize any of my imports as valid. Javax and Java.swing are among the now undetectable libraries. Is there a setting I missed? What do you recommend?
VSCode just an Editor, after you install some extensions, it only makes the editor more convenient, get more abilities even can help you develop the project of some kind of language through combine with the language support in your computer. Such as, you need to install JDK, then to install the 'Java' extension, then the extension to combine with the JDK and the VSCode, then you will get the ability to develop java project in VSCode.
That's means, The 'Language Support for Java(TM) by Red Hat' has nothing to do with java development. For example, after you install the JDK on your computer, you can develop java projects in the other IDEAs such as Intellij IDEA or some others. The 'Language Support for Java(TM) by Red Hat' extension just to combine the JDK with VSCode better, to make VSCode better to develop java project.
As you said, you failed to import libraries. Of course, the 'Java' extension without any libraries of java. You need to configure it by yourself. In the Explorer panel, you can find 'JAVA PROJECTS'. In it, you can find which libraries you have referenced and you can adds libraries in it. And of course, you'd better take maven to manage your project.
By the way, recommend you to install 'Java Extension Pack' extension.
You're going to need to add support through extensions because by default VS Code does not support Java. The great thing about this extension is that you get a slue of other extensions as well, such as; maven, debugging tools, support for junit, auto completion, etcetera.
On a side note, you could always use an IDE/IDEA like IntelliJ, Eclipse, or likewise. I'm definitely partial to IntelliJ but they all have their pro's and con's.

Unable to install org.eclipse.ajdt.ui.nature in Spring Tools 4 / Eclipse

I just downloaded the latest Spring Tools 4 package, 4.3.2 RELEASE. My code base makes widespread use of AspectJ, and every time I try to import a project, I get a "Marketplace solutions available" dialog saying my IDE is missing natures to properly support my projects. It offers org.eclipse.ajdt.ui.ajnature as a solution, but the marketplace won't install it. When I try to access it directly through the Eclipse marketplace in my browser, I get an error dialog saying it's not compatible with this version of Eclipse. I'm using Java 11 on Linux. It's a little hard to figure out which version of Eclipse is embedded in this tool, but it appears to be Eclipse Equinox. Thanks for any help or suggestions.
The link provided by howlger http://download.eclipse.org/tools/ajdt/48/dev/update was the missing piece of information. That solves the problem, everything builds.

Do I need to install Java plugins for Eclipse Neon if I already have JDK and JRE installed?

I've been using Eclipse Neon (4.6.0) which only supports C/C++ by default. Now that I need to program in Java, I want to integrate Java to the IDE I'm using. So I went to install the "Eclipse JDT Plug-in Developer Resources" Java plugin, including "Eclipse Java Development Tools."
But then, I have the JDK and JRE installed from Oracle very much prior to this day. Now I wonder...
Do I need to install the Eclipse Java plugins from Eclipse even if I already have the Java JDK and JRE installed in my computer?
If yes, then there must be a difference between the Eclipse JDK and Oracle's JDK. What's the difference?
If no, how can I link the JDK and JRE (if either/both is needed) to the project, such that I can finally program in Java?
Clear and concise answers are very much appreciated.
TL;DR: Yes, you need the JDT plugin with your JDK
Long answer
There is no such thing as an Eclipse JDK, (albeit the SDK used for creating plugins but that's not what you want)
Eclipse needs at a minimum, the JRE to run itself. If you need to program in Java, you install the JDK.
As for the Eclipse JDT plugin, it is needed for making Eclipse ready for Java development (necessary things like the Java perspective for example)
Cheers!
The JRE is the Java Runtime. You need it to run Eclipse.
The JDK are the command-line tools to compile Java code. Eclipse has a compiler and most of those tools re-implemented in it "Java Development Tools", so you don't need a JDK to start coding. However, you might need some of its features later, but not worth caring about it right now.
Eclipse Java Development Tools plugin provides the main tools inside the IDE to develop Java code. The Java Editor -providing completion, documentation, navigation, instant error reporting...- and Java Debugger are the 2 main ones. If you want to be productive at writing and debugging Java code, you need to install those into your IDE. Otherwise, it won't be much better than a plain text editor.

Download and install JavaFX for Eclipse

I'm an experienced (Java, Eclipse & Maven) developer, and have used a couple of frameworks thus far. Every time I'm trying to start with something new, it seems like there are about a zillion configuration possible for downloading and installing it.
I've looked here for instructions, and all the near pages, but they seem out dated, the Eclipse plugin path is invalid, and when I install the latest version I've found no the site (2.0.2), it says that I have a newer version installed.
Also, the Maven setup in most posts I've read seems obscure.
I'm using:
Windows 7
Eclipse x64 Indigo
JDK x64 1.6.0.24
Maven 3.0.3
And I don't recall installing the JavaFX.
What an I missing? Where can I read about the setup in order to start working with this framework?
JavaFX gets installed if you install the latest JDK 7 from Oracle (co-bundled).
You can find the Eclipse plugin here:
http://efxclipse.org/
If your're interested in Maven builds: I've recently released an initial version of Drombler FX, a modular RCP for JavaFX based on OSGi and Maven (POM-first):
http://puces-blog.blogspot.ch/2012/12/drombler-fx-building-modular-javafx.html
http://wiki.drombler.org/GettingStarted
I did tried efxclipse but it was not enough for me. I have also tried to give the path of javafx jar file to efxclipse
Window->Prefrences->javafx->"The path to javafx jar which is
jfxrt.jar"
. But nothing worked for me I don't know what was going wrong.
Then I just add the jfxrt.jar file to my Library and everything worked fine :-
1. Right click your JRE System Library
2. Build Path
3. Configure Build Path
4. Add External Jars
5. "The path to jfxrt.jar"
You can download jfxrt.jar file from this link.
Or
If you have already downloaded the latest oracle JAVA JDK you will find in this path
Extracted_oracle_jdk_folder/jre/lib/ext/jfxrt.jar
That's it everything should work fine.
Try e(fx)clipse at http://efxclipse.org/. I'm a netbeans developer, but heard a lot of good stuff about that plugin from my eclipse using friends.

Categories