Feature file not getting formatted in Cucumber format - eclipse

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.

Related

Acceleo UI doesn't generate any files

I have a GMF editor and an Acceleo UI project that I would like to bundle in a single plugin. That's not the matter though.
You see, when executed in the runtime (Run as > Eclipse Application), both the GMF editor and the Acceleo UI project work fine and dandy.
However, when exported as plugins and installed into Eclipse, only the GMF editor will work. The Acceleo UI item WILL show up in the context menu, and it will create the target folder for the files. But this folder will be empty.
Is there a reason why one plugin would work properly while the other does not? Is there any additional configuring that must be done in the Acceleo UI for it to work outside the runtime?
Searching the Eclipse Forums, I found something about adding a line 'outputFolder="${target.folder}"' to a file "acceleo.build", but I can't find neither the file nor the line anywhere.
Any help would be greatly appreciated. I'm working on Eclipse Mars with version 3.6.3.201602090916 of Acceleo.
So, I know nobody ever replied to me, but I found out the problem so I might as well post it in case someone runs into the same issue in the future.
The issue was that Acceleo needs a file with extension .emtl to work. This file wasn't showing up anywhere when exporting the plugin, though. I thought it was failing to compile it (as the .etml is actually a compiled form of the .mtl file).
After some digging, I found out Acceleo does actually create said file, but it doesn't put it in the same place where the .mtl is - it actually places it in a folder called "bin", which isn't created by default when exporting the plugin. In order to see this "bin" folder, I had to mark it in "Build Configuration", in the build.properties file.
Then, I manually copied the .etml in "bin" to the plugin's "main" folder (where the .mtl file resides) and that was it, it worked like a charm.

Importing Eclipse Plugin source in Eclipse

I have the source code for the VersionOne plugin. I am wanting to modify the code because I am getting a NullPointerException when I click a specific button on the plugin which crashes eclipse. I was wondering what steps I need to take in eclipse to import the source code, modify it, and get it to run. I have read over how to create a new plugin project, but I have never tried importing a plugin before. Plugin Source
Once you have imported the project and that seems to work fine, just run it like any other plugin.
I.e:
Set the breakpoints you want in the code
Click the "Run as..."
In the run dialog start up a new Eclipse instance
On the tab "plugins" make sure your imported plugin is selected
If you are using the plugin at the same time, make sure that the non-workspace is not selected
In the new Eclipse instance, set up a situation that will provoke the bug
You need the following things to do that:
From Eclipse download a distro with PDE (Plugin Development) included.
The source pages
Some configuration management tool like Git or Subversion.
You do then the following steps:
Unzip your sources locally somewhere and add them to the CM system.
Create an eclipse plugin project from that source location (depending on Git or SVN different steps).
Create a run configuration for Eclipse that includes that plugin. That is similar to creating a run configuration for Java, but your Java application is then eclipse (see the Help on Eclipse Application Launcher). You have to ensure that in the "Plug-ins Tab", your new plugin is included. After you have started it, you should see the new feature implemented in the new running eclipse. To debug it, you just have to press the debug button instead of the run button. You may then add breakpoints to the source code of your plugin to see how it is working.
You are then able to start a new eclipse application which includes the plugin and make your tests there. You are able to set breakpoints, debug the code and so on. If you find the error, you can change the code, test it, and as a result have a difference to the source you had initially. The best would be then to make a patch and send it back to the originator.
To deploy it then to others is a different story, and is well documented.

Eclipse Plugin - XML Editor

I've followed this tutorial:
Eclipse Plugin
This tutorial explain why create a HTML Editor.
I need a Text editor,just for auto-highlight some words, anyway I thought this tuto should be a good one to start with.
The thing is that I created the Plugin project and the only thing that I changed it was the extension "pat" instead "html, htm", just that. After that I created a .pat file, but eclipse doesn't open it with my plugin, and my text editor is not in the editor's list.
Any suggestion??
Let me know if you need more information.
My guess is that you have just created the plugin, but aren't running it in your current Eclipse instance. That can be verified by opening the view "Plugin registry". That will show a list of all plugins, see if the plugin you have created is in that list.
If you click on the run button in Eclipse you will open a run configuration dialog. In one of the tabs, you get to choose what plugins should be available. Make sure your plug-in is selected. This will start up a new Eclipse instance that will run your plugin.
To make your plugin be a part of your ordinary Eclipse installation, you will need to export it to a jar and copy that jar to the dropins catalog.

Eclipse Indigo "Save Actions" are not being applied

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.

How to use eclox, the doxygen plugin for Eclipse

How do I get eclox working in Eclipse 3.5?
I'm using Ubuntu 9.04. I installed Doxygen from ubuntu repositories(version 1.5.8). Then I installed eclox on eclipse through the update site.
Despite this, I don't get any option to in any menu to initiate it.
Also the eclox site doesn't seem to have any "getting started" guide.
Please help.
BTW there is a manual inside org.gna.eclox_0.8.0.jar, wierd they did not post this on the project site!!!
Here is the content
Eclox, a Doxygen frontend plugin for Eclipse.
<http://gna.org/projects/eclox>
INSTALLATION
There are two options to install the plugin: using the update site or
using the packaged feature.
The update site is the more convenient way to install eclox. It is
located at https://anb0s.github.io/eclox. See eclipse's user
guilde for additionnal details.
When using the packaged feature, you must extract the archive content into
your eclipse's root location. For additionnal details, please refer to
eclipse's user guide.
CONFIGURATION
Once the plugin installed, you must ensure that the default PATH environment
variable makes the doxygen binary reachable for the plugin. If not, you can
update PATH to include to directory containing the Doxygen binary, or you can
tell Eclox where that binary is located on your system (which is in my opinion
the better solution). To do this, open eclipse's preference edition dialog
window and go into the new "Doxygen" section.
USAGE
You can create new Doxygen projects (also called doxyfiles) using the
creation wizard. Go to "File->New->Other->Other->Doxygen Configuration". Press
next and set both file location and name. Then a empty doxyfile will be
created at the specified location, the wizard automatically adds the
".Doxyfile" extension.
You should now see a file with a blue #-sign icon. This is your new
doxyfile. Double-clicking on it will open the editor. You can now browse and
edit the settings.
Once your have properly set all doxyfile fields, you can launch a
documentation build using the toolbar icon showing a blue #-sign. In
the case the button is not visible in the toolbar, your current perspective
needs to get configured. Go to "Window->Customize perspective->Commands" and
in "Available command groups" check "Doxygen". Additionnaly, you can browse
the laetest builds by clicking the down arrow right to the toolbar button.
When the documentation build starts, a new view showing the build log opens.
In its toolbar, a button named "Stop" allows you to halt the current build
process. The current build also appears in the Eclipse job progress view and
you can control the job from there.
The build toolbar action determine the next doxyfile to build depending on
the current active workbench part (editor or view) and the current selection
in that part. For example, if the active part is a doxyfile editor, the next
doxyfile to build will be the one being edited. If the active part is the
resource explorer and the current selection is a doxyfile, that doxyfile will
be next to get build. In the case the active part selection doesn't correspond
to a doxyfile, the last built doxyfile will be rebuiled. And if the build
history is empty, you will be asked for the doxyfile to build.
HTH Anybody
Never mind, worked it out my self.
First you need to create a DoxyFile (which is the configuration file) by giving the source path and the output path.
Then only you can generate the documentation by right clicking the project and selecting the "Generate Documentation".
Thanks anyway!
I just faced a problem setting the Doxygen binary path in eclox 0.8.0 settings in Eclipse on Mac OS X 10.7.
There is no way to configure the path via Eclipse-preferences->Doxygen.
The solution is to edit the preferences file manually
add a (fake) location, let's say /Applications, using the wizard mentioned above.
close Eclipse
edit this file:
$WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.gna.eclox.core.prefs:
Replace the value for doxygen.default (currently eclox.core.doxygen.CustomDoxygen /Applications\n) with eclox.core.doxygen.CustomDoxygen /Applications/Doxygen.app/Contents/Resources/doxygen\n.
restart Eclipse
For MacOS user there is a very easy way to get around via the issue of the Doxygen version selection. The link that provides details is here:https://github.com/theolind/mahm3lib/wiki/Integrating-Doxygen-with-Eclipse
After installing the Eclox plugging:
1)"go to "Eclipse --> Preferences --> Oxygen"
2)"Press Shift+CMD+G then Add: "/Applications/Doxygen.app/Contents/Resources/doxygen"
3) Doxygen's version should be displayed
this might help you or any windows user trying to install eclox:
Tutorial for Installing eclox — Document Transcript
Step 1: go to eclox website (http://home.gna.org/eclox/) and to copy the update link address.Step
step 2: Insert the link into the update manager in eclipse and press OK.
Step 3: Select the Eclox item and to complete the installation.
Step 4: When the installation has done, you should select a project that you want to generate thedoxygen documents. Then, create a doxygen project for it.
Step 5: config the options. Note: You have to provide the “Input directories” correctly and to select the “Scan recursively”item. Finally, save the configuration file.
Step 6: find out the “#” and to choice “Choose Doxyfile...”.
Step 7: select a doxyfile.Step 8: wait for few seconds and the doucments will be generated.
its from this link: http://www.slideshare.net/pickerweng/tutorial-for-installing-eclox
Like claus I had to dig into the preferences file maually, because eclox 0.8.0 would just not take a good path from Eclipse Preferences file chooser.
So, edit this file: $WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.gna.eclox.core.prefs and alter the given path (in my case I had to change from
doxygen.default=eclox.core.doxygen.CustomDoxygen C\:\\Programm Files\\doxygen\\bin
to this
doxygen.default=eclox.core.doxygen.CustomDoxygen C\:\\Programme\\doxygen\\bin
Hope this helps.
I find a webpage https://github.com/theolind/mahm3lib/wiki/Integrating-Doxygen-with-Eclipse where you can find more details. Especially, for Mac users, you need to Press Shift+CMD+G then Add: "/Applications/Doxygen.app/Contents/Resources/doxygen" when you configure the doxygen in eclipse before compiling .doxygfile by using Eclox.
Alternative from eclipse is to use Javadoc:
From menu (...Search Project Run...)
Project > Generate Javadoc
You should be in Java project and add comments with tags.
!!!