Does STS 4 has yaml editor in build - spring-tool-suite

I have downloaded latest STS 4 for windows 10 but for some reason its not detecting yml formatting errors. Do I need to include any specific plugins

There is a YAML editor but i personally dont like it.
Therefore i would like to recommend the Yaml Editor.
In STS go to help > eclipse marketplace
Find: yaml [enter]
Install Yaml Editor 1.4.2
If there is a warning just select Install anyway and after that restart STS.
For the first time make sure to open the .yml file with the Yaml Editor by using open with > Yaml Editor

STS 4 does not have a dedicate yaml editor. Instead it uses the 'Generic Text Editor' from Eclipse together with textmate grammar for Yaml files.
These are setup to be used with Spring Boot 'application.yml' and Cloud Foundry "manifest.yml" files explicitly. For those specific cases there is also special support for generating completions and validations specifically for those type of yaml files.
For general .yml files there is no built-in support.
I'm not sure exactly what types of files you are trying to edit, and what types of warnings or errors you were expecting. So it's hard to give much/any specific advice than this.

Related

Feature file not getting formatted in Cucumber format

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.

To create yml file in eclipse

I would like to create buildspec.yml file in eclipse. I have downloaded yaml editor and ydit from eclipse market place. How to create yaml file in src code. i could see only class and other files. not yaml. Please help on this
It's just normal file text, Right click your wanted project -> New -> Other -> File.
If you need more support you could install Yedit from Eclipse Market.
YEdit is an Eclipse editor for editing YAML files. It has the following features:
Syntax highlighting
Syntax checking
Content outline
Templates
Various text editing support like auto-indenting and toggling of comments.
Symfony compatibility mode. * Source formatting (experimental)
Use Right-click > New > Other > File and make sure its extension is .yaml or .yml.
PS: I suggest you try https://marketplace.eclipse.org/content/eclipse-wild-web-developer-web-development-eclipse-ide instead of Yedit. It's a better alternative IMO.

Eclipse Spring Tools missing content assist/ autocomplete

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

Eclipse: Switching between build configurations doesn't update excluded files

I have two c++ source files. I am building each in a separate build configuration. I have set up each build configuration to exclude the other source file. In the Project Explorer, one of the file's icons has a slash through it, showing it as the source file that is excluded and I cannot refactor code for this source file. This is all as expected, done according to the instructions found here.
I have verified that each file has the "Exclude resource from build" box checked for the appropriate build configuration. Furthermore, I have verified that the build command for each build configuration builds the correct source file.
Then I click Project->Build Configurations->Set Active and select the other build configuration but the same source file is excluded. I also tried switching configurations by actually building the different configurations, but again, the file exclusions remain the same (both the icon shows it as deactivated and I cannot refactor that source file).
I have searched various posts but do not see the exact circumstance I'm facing, though this one was close. Perhaps I don't know the correct terminology to do a proper search.
Am I switching between configurations correctly? Is there a workaround for this behavior (besides including all files in the build, if I need to refactor, and then re-excluding them before build)?
I have seen this behavior in Nsight (running Eclipse 3.8) and in Eclipse Mars (4.5.0). I am running on Linux CentOS 6.7, 64-bit.
In Window->Preferences->Indexer, select "Use active build configuration" (help.eclipse.org/mars/…) in the frame titled "Build configuration for the indexer".

How to configure nodeclipse for auto completion?

I have just installed this eclipse plugin. But I found it can neither show a list of functions when typing '.', nor use templates like 'if...else...'.
Read http://www.nodeclipse.org/ carefully
Features Creating default structure for New Node
Project and New Node Source File Generating Express project
with Wizard JavaScript Syntax highlighting Bracket
matching and marking selection occurences with background color
Content Assistant within one file Go to definition with
Ctrl+click when JSDoc is
used Refactoring within one file
(Alt+Shift+R) JSON files highlight and
validation NPM support Debugging - Breakpoint,
Trace, Variables, Expressions, etc... via Eclipse debugger plugin for
V8 Setting project properties for JSHint-Eclipse
automatically; JSHint
settings template
Passing arguments to Node application and Node.js,
specifying environment variables values to use Running
CoffeeScript *.coffee files Running *.js files with
PhantomJS, MongoDB Shell or Java 8 Nashorn jjs util
Bundled together with Markdown Editor, GitHub Flavored Markdown,
StartExplorer (for system explorer and shell), RegEx, Icon Editor,
MongoDB, RestClient Tool and other plugins (20+ in total, check
update site and Nodeclispe Plugin
List) Support for Eclipse Juno, Kepler, Luna M3
As of 0.7 completion work as standard JSDT functionality, that is
for objects defined in the same class,
for objects annotated with with JSDoc
If you want more, do it yourself with help from the other people.
I suggest you that you install tern.java which uses the powerful JavaScript inference engine tern.js. You have a node.js module which provides node.js completion. As Nodeclipse editor is based on JSDT, you can use it with tern.