new year - new problems ;)
I'm working on a Linux machine and I've just installed a new Eclipse.
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
JRE: java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Then I've added the latest Version of Spring Tools 3.9.2.RELEASE via the marketplace.
The only other additional plugin that is currently installed is Subversive 4.0.5
The Project that I'm working on and that previously worked as expected has the Spring Boot Project Nature enabled.
But with the new installation I'm missing the autocomplete feature - No completion or proposals of properties anymore.
In the Project Explorer the application.yml display only the standard file icon and no longer the (if my memory serves me right) Spring leaf icon.
In an other Project using a 'application.properties' file the behavior is the same.
Is there a setting that now needs to be set? Or something else that I can check?
Not directly related to my previous question:
In my old installation that worked, I've always wondered why exactly these two filenames application.properties and application-dev.properties (or their .yml analogous) were recognized as properties files while other were not e.g. application-test.properties or application-prod.properties.
See image taken from STS-3.9.2:
It is not only an issue with the icon, but also it opens the wrong editor and therefore I don't have autocomplete support - unless I say Open with -> Spring Yaml Properties Editor.
The answer to the "sub-question" about the application-test.properties file: the content-type that got defined for the Spring Boot property files got defined for specific file names only, since it wasn't possible to put a wildcard-based name like application*.properties in there. But once you opened that file with Open With -> ..., Eclipse will remember your choice for the next double-click.
Future versions of Eclipse (I think it is Photon) will have a more flexible way to define those file name matchings so that we can solve this in future versions.
Follow these steps:
1) Right click on application.properties
2) Open with -> others.. -> search for spring Properties Editor -> tick the use it for all application.properties nd the click om ok.
I analyzed the problem of the missing property editor and found the reason (and a solution for it), which is documented here:
Missing Spring Properties Yaml Editor and and Spring Properties Editor with Spring Tools 3.9.2
Select the file you would like to open, i.e. application-xyz.yml
Open with "Generic Editor - Spring YAML Properties"
Check the box: Open *.yaml files. Click OK.
That's it. All *.yml files icons now become Spring-ish look and feel. And from now on, you open any YAML file automatically with "Generic Editor - Spring YAML Properties"
Code completions work for me when I edit application.yml.
Is your file names application.yml and located under src/main/resources in your boot maben project?
Did you open the application.yml file with Generic Editor:
install spring tool suite 4 from marketplace
Related
In eclipse, for cucumber feature file using for selenium,
When a feature file was opened, the feature file used to show in cucumber/gherkin format which doesn't show anymore.
When a feature file is created, sample features used to be created
When a feature is executed using dry run, Step definitions used to be created.
src/test/java and src/test/resources are showing greyed out in eclipse which was not the case.
Above mentioned three things are not happening any more which used to work earlier. I believe it's related to the set up of eclipse. I know the issue, not sure what details might be required. So please do let me know what might be required so that I can share here.
Eclipse Version:
Version: 2019-09 R (4.13.0)
Build id: 20190917-1200
That means either your editor is disable or corrupted.
1)
Try to open your feature file again as below:
Select other if cucmber editor not shown.
2)
Uninstall the cucumber plugin and install again.
Refer below link to uninstall the plugin from eclipse
Correct way to remove plugin from Eclipse
When a feature file was opened, the feature file used to show in
cucumber/gherkin format which doesn't show anymore.
Changed the default editor to cucumber, Not sure how default editor
was changed
When a feature file is created, sample features used to be created
After changing the default editor to cucumber, this started working
When a feature is executed using dry run, Step definitions used to
be created.
Added this parameter in the
#CucumberOptions(plugin = {"pretty","summary"})
src/test/java and src/test/resources are showing greyed out in
eclipse which was not the case.
Not sure, but this is not creating any issues so far
Associating feature file type with cucumber in Selenium WebDriver
I don't know the reason but I am also having a similar problem occasionally. When you over the file name go to the file tab and choose properties and then choose Associate with File Type --> then choose cucumber. I hope it helps.
I'm using eclipse and GWT 2.8. From GWT 2.8 in running configuration in eclipse it removes -nosuperDevMode after every restart. It is annoying because I want to debug client code in eclipse, not in browser. Can it be fixed somehow?
Thanks in advance.
I had the same problem before.
I found that I need to update the GWT plugin for eclipse from the GWT site
http://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html
It will delete the old plugin, and you will have to add a facet gwt to your project, but the classic dev mode is working without workaround
If you don't want to update your plugin, as a workaround in eclipse, you can set the run configuration to be kept in a file in your projet (Run configuration / your gwt webapp / common tab / Save as : shared file / store it in .settings for exemple)
When you have done this, configure it whith the -nosuperDevMode parameter, then go to the .settings directory with your file explorer and set the run file (xxx.launch) read only.
Eclipse cannot override it again, it will warn when you open the configuration but it is working.
I accidentally deleted the java folder in Tools -> Templates in NetBeans 8.0. Now it does not show me the option to make a Java class. I reinstalled netbeans, but it did not help.
Could you please help me to recover it?
Close NetBeans IDE, go to NetBeans userdir, then to config/templates directory and delete Classes_hidden file.
When NetBeans IDE is started again templates for Java are back.
An easy to recover your Java template is to go to Tools->Templates and delete another template at random (say the HTML one) then click the Revert to Default button at the right and your HTML and Java templates will be recovered.
P.S. I'm guessing you were trying to remove that author: thing in the template, so a good way to do that is by going to Tools->Templates->Java->Java class->Open in Editor and you can modify freely your template.
I've been using Eclipse ${project_name} variable as a configuration class hack to determine which project is running.
VM args
-Dproject_name=${project_name} in the relevant JRE builder.
Code
String projectName = System.getProperty("project_name");
The problem is that projectName is inconsistent across different machines, and sometimes in the same machine.
Sometimes it is parsed into ${project_name}, sometimes into the the configuration project, and sometimes into the project calling the configuration.
We use Eclipse 3.6 and 3.71, if that's relevant.
Any ideas?
I have seen that the value of ${project_name} depends on the project that has currently the focus in the IDE. A project has a focus for example when one of its files is selected in the package explorer or one of its files is opened in an editor and the focus is on the editor.
Unfortunately it is not related to the project to which the started application belongs to, and I don't know an Eclipse variable that contains that project (although I'm also interested in a solution for this).
So as a workaround, make sure you are actually in the right project when you run the application from within Eclipse.
I'm new to Eclipse and downloaded the following version:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
[edit] Eclipse Platform Version 3.7
I have edited Java > Editor > Save Actions to do the following: Remove trailing white spaces on all lines, Correct indentation
When I save the .java file, those actions are not applied... is this a bug?
Found this that might be related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350475
Assuming that this relates to JavaScript files, then the related Eclipse bug could be helpful.
The problem (as I've just experienced) is that you can edit the JavaScript -> Save Actions preferences via the context menu when editing a JavaScript file, but the actions will not be run.
The solution is to right click on the project containing the .js file, and select Configure -> Convert to JavaScript project.
The bad news is that this will then will also enable Eclipse's not-so-great JavaScript validation, therefore telling you that libraries such as moment.min.js are broken.
Well for those of you who have found this topic... I did find 2 solutions, no thanks to Eclipse, other than the fact that it is open source and people can write plugins.
Eclipse Platform Version 3.7
AnyEdit - plugin that does it for you when you Save file (I believe this is what eclipse SHOULD be doing)
Go to: Window > Preferences. Then under General > Keys. Make sure drop down for Scheme: is Default and enter 'remove trailing' in the filter. You should then see "Remove Trailing Whitespace" under the command column. Bind it to your own key command.
The only drawback to #2 is that you have to actually press the key binding while editing the file, kindof like a cleanup action.
Too bad Eclipse hasn't taken the approach that ALL file types should be configurable in this way... sometimes I miss TextPad.
Old question, but at least for newer Eclipse versions there's a better solution: Go to the project properties, then to Project Facets. If it tells you that your project isn't in faceted form yet, then convert it. Afterwards (or if it already was faceted), just enable the JavaScript checkbox.
I had the same issue with Eclipse 4.4 (Luna) and this fixed it for me, the save actions are now executed on save.
Adding to jlh's answer, I also had to configure the JavaScript include path of the project to enable save actions. Before that even a manual "Clean Up ..." from the source menu wouldn't work.