I give a computer programming course I have written, and I recently switched to recommending Visual Studio Code in the course. We are starting out with the basics, so I just wanted a simple editor. We started learning Git, and one student's repository suddenly had all sorts of cruft in it, including:
.settings/
.vscode/
.classpath
.project
In particular the .settings directory had all sorts of Eclipse settings, such as I would expect to see in an Eclipse project.
The student explained to me that these came from VS Code after installing its Java extensions. But why are the VS Code Java extensions creating Eclipse files? And where is all this documented, so that I can update my lessons with the exact details and avoid this problem in the future?
Thanks in advance.
Simplified the Language Support for Java™ by Red Hat is the headless Eclipse Java IDE integrated into Visual Studio Code via the Language Server Protocol (LSP). See the self-description of the extension:
Provides Java™ language support via Eclipse JDT Language Server, which
utilizes Eclipse JDT, M2Eclipse and Buildship.
Except for .vscode/, the mentioned files are Eclipse Java IDE files.
Because in Eclipse these files are not intended to be edited manually, there is little or no documentation about them (the Java compiler settings in .settings/org.eclipse.jdt.core.prefs are similar to the command line arguments of the Eclipse batch compiler).
For example, the documentation of the Java extension recommends using the Eclipse Java IDE to edit the formatter settings (which are also stored in .settings/org.eclipse.jdt.core.prefs) and concludes:
No it's not an ideal solution, but it should be done only once, unless
you regularly change your formatter settings.
Related
I've been looking into scala lately and from the conciseness and language features I'm completely thrilled.
I have netbeans 8.0 running on ubuntu 12.04 and downloaded scala, edited netbeans.conf (netbeans_default_options="-J-Dscala.home=...), installed plugins from plugin manager inside netbeans (ALL OF THEM). Then, I created scala project (not maven one) and tried out autocomplete. It works, compiles, runs, however, it shows no document found in autocompletion.
This is how I added javadocs Tools > Scala platforms > javadoc tab
I tried adding following ways:
added the entire scala api doc zip from http://downloads.typesafe.com/scala/2.11.2/scala-docs-2.11.2.zip
extracted the previous zip to scala-home folder under $SCALA_HOME/docs/javadocs/scala-docs-2.11.2 and added that
same as 2 but added $SCALA_HOME/docs/javadocs/scala-docs-2.11.2/api in netbeans
None of these pick up documentation! Of course, I could live without it, but it's such a killer for such a concise language where I could just find out stuff instantly from autocompletion. Also, I don't want to use eclipse special ide for scala because I don't want to throw out all the experience with netbeans out of the window and learn new IDE.
P.S. - Netbeans navigator also seem not to work in scala.
And I wonder why there's so little content on google for such a wonderful language?
There is no need to change to IntelliJ. Use the right build tool -sbt or Maven- and everything works fine.
In Netbeans you can use e.g. free Application Servers.
Netbeans support for scala seems pathetic so I just decided to jump to IntelliJ IDEA. It was little bit of learning curve but I'm glad I did because now everything was working (autocomplete, documentation, awesome SBT support etc. etc.)
I have downloaded and installed Eclipse for PHP Developers from here:
http://www.eclipse.org/downloads/
I also need to write some Java applications. How can I add Java support to my PHP Eclipse version? Do I have to install second Eclipse for Java?
You should be able to install the JAVA components, using Help > Install New Software.
In the list of components, there should be Programming Languages > Eclipse Java Development Tools.
Here's a screenshot :
(source: pascal-martin.fr)
Because it is so trivial to have multiple Eclipse instances, I do just that to seperate php and java environments. This reduces the plugins loaded and you can somewhat keep Eclipse lean. Of course the choice is totally yours.
On my version of eclipse:
Help menu->install new software
Choose the download page for your version of eclipse
There is a category "programming language" which should have Java.
What you downloaded was basically the eclipse core project and a list of standard "addon" packages that might help in PHP development. According tho this comparison chart you're only missing two packages to now make eclipse ready for java development:
GEF
JDT
You could just download those two packages from eclipse by going to
Help->Install new software
to have the standard "Eclipse for Java Development" setup.
I've decided that as a pet project meant for learning, I would create a new Eclipse plug-in that, for a given class, takes all private member names and adds a prefix to their name (it doesn't matter to me if it can already be done or not, this is meant to be a learning experience).
I have never developed an Eclipse plug-in and I'm not sure where to begin. Do I need to install some application for this development? How does it work? Where do I begin?
I did a Google search but all the tutorials and results I found were old and referred to antiquated versions of Eclipse, so I'm not sure if they're still accurate.
The Vogella's Eclipse RCP tutorial is quite up-to-date (eclipse3.5), but for RCP (Rich Client Platform).
It comes with an equally up-to-date Plugin Development tutorial.
(source: vogella.de)
Follow that last tutorial and you will have a real good introduction in this Eclipse Plugin development topic.
Note: for AST-related plugins (Abstract Syntax Tree), the resources are older but still accurate:
See Extract all string from a java project.
I would recommend to start with an plugin example included in the Plug-in Development Environment (PDE) some of the distributions contain it, so look for PDE.
Since eclipse plugins are OSGi bundles it might take some time if you're not yet familiar with them, but it is worth.
For details check the following documenations
Platform Plug-in Developer Guide
JDT Plug-in Developer Guide
JDT Plug-in Developer Guide 3.1 as PDF
trying to do some Android development, which means Eclipse, however, most of my experience is Microsoft tools (e.g. Visual Studio). My java experience is mostly either Blackberry dev in the JDE and some miscellaneous stuff back in the Java 1.0 days.
My question is this. In VS200x, there is a .sln (solution), .csproj(project), etc...
What are the equivalent file extensions for Eclipse? Do they even exist? I am having trouble with the basics, like how does one load a project into a workspace.
Is there a tutorial for Microsoft refugees somewhere?
Have a look here for "An introduction to Eclipse for Visual Studio users"...
Basically, for Java program (I never done any Android development) the basic Eclipse configuration files for a project are a .classpath (defining the dependencies of your project), and a .project file, that contains all specificities to your project configuration. In addition to that, a .settings directory is created, which contains some configuration files for plugins activated on your project.
Edit:
Eclipse is the most used IDE for the Java development. However, the best IDE is JetBrains IntelliJ IDEA. I see that there is a plugin for it to develop Android applications (here). If you can affort this wonderful application ($249), you will not regret it! You may eventually try the free 30 days trial...
You need to use file import and then choose Existing projects into workspace.
A .project file and a .classpath file will be created.
I find the Eclipse way of working to be incredibly frustrating having come from Delphi/JBuilder where a single project file held all your settings.
Make sure that you back up your workspace as well - there is nothing worse than recreating it when you are under pressure!
My 2 cents :
Make sure to version control your .project and .classpath. You may aslo want to use path variables to reference directory where the external dependencies (third parties libs) are located.
Are you doing it for fun or for commercial purposes? Because if money is involved, if I were you, I would really consider investing in IntelliJ, which is arguably the best IDE Java IDE out there, but unfortunately it is not exactly free. The Android SDK has some support for IntelliJ out of the box so it's not like you had to write all the makefiles yourself manually. If you liked Visual Studio, you would like IntelliJ, so why don't you download the trial version and have a look at it.
Just my 2 cents.
After much searching, I found the download for the eclipse version of jalopy. Is this compatible with Eclipse 3.4? It's dated 2006.
I've copied the extracted folder to my plugins directory and run eclipse -clean, but I can't find anything matching 'jalopy' in preferences.
If it's not compatible, are there any (free) alternatives?
Just an update:
Note: the latest eclipse3.5 Galileo code formatter now:
supports most of Jalopy formatting option.
has made quite a few improvement on formatters (look for the term 'formatter' in those building notes of jdt-core.
It also can be run from the command-line if needed.
For a specific formatting option which would not be correctly managed by eclipse, you can define a codeFormatter extension point. More practical details in this SO question.
i'm told that open source version of jalopy is not for commercial use.
eclipse itself has good source code formatting capabilities. Go to java | preferences/settings. type format and you should see the various options.
The answer is 'yes'. Preferences are in Window > Jalopy Preferences, and it's run from the right click context menu. Seems a little buggy, though.