eclipse configuration with pmd - java

I was trying to configure PMD plugin in eclipse (window8) but after 50% progress error occures .
i am using this in path http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/
I need to configure PMD for code review, from some resource's i found pmd useful.
and it is good code analyzer.

If you are new to the Eclipse IDE, it's better to know how to install the plugin for it:
Start the Eclipse IDE (screenshot from the Eclipse Java EE IDE for Web Developers, version: Helios Service Release 2)
Select the Help –>Install New Software.... in the Eclipse menu item.
The install window will be open. On there, click the "Add.." button.
In the "Add Repository" window, enter the name and location (plugin URL)
PMD plugin: http://pmd.sf.net/eclipse
Then click the "OK" button.
Select PMD for Eclipse 3 and Apache Xerces in the "Select the features to install" list and click Next. Accept the terms of the license agreements and click Next.
Verify that the install location in Eclipse installation directory, otherwise select the correct one, then click Finish.

Unable to read repository problem can come because of your internet connection or proxy.
Check if eclipse update is working.
As per your screenshots you are doing fine.
Also double check your PMD url by opening it in browser.
PMD Installation
To install the PMD for Eclipse plugin:-
In Eclipse, click on
Help -> Install New Software...
Click on Add..
Enter the following:
Name: PMD for Eclipse Update Site
URL: https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/
and click OK.
You should see PMD for Eclipse Select the checkbox next to it and
click Next
You'll need to accept the license and confirm you want to install a plugin that is not digitally signed.
Restart eclipse.

Related

How to fix this error Cannot run program "svn" Error in Java

I have problem loading open source application
I have followed these steps
Perform a fresh checkout from SVN
1. Start IntelliJ IDEa.
2.In the "Quick Start" menu, select "Check out from Version Control".
This will display a drop-down box.
3.In the drop-down box, select "Subversion".
This will open a "Checkout from Subversion" dialog.
4.In the "Checkout from Subversion" dialog, click the "+" button in the top left to add a new Repository.
This will open a "New Repository Location" dialog.
5.In the "New Repository Location" dialog, enter the svn checkout location of cTakes.
Click "Ok".
This will inspect the repository.
6.Click the "Expand" triangle.
This should display the directory listing of trunk.
Click "Checkout".
This will open a "Destination Directory" dialog.
Enter a local directory in which to keep trunk (your sandbox).
Click "Ok". This will open a "Checkout Options" dialog.
The default options ("Head", etc.) are fine for most users.
Click "Ok".
This will open a "Working Copy Format" dialog.
Select a (version) format and click "Ok". I use version 1.8, but any should be fine.
This will start the actual checkout and display a progress dialog. The checkout may take a little while.
After the checkout has completed, a new dialog will ask you if you'd like to open the project. Click "No".
but when i reach step 5, i enter svn location
and get this error
Cannot run program "svn" (in directory "C:\Program
Files\JetBrains\IntelliJ IDEA Community Edition 2019.3"):
CreateProcess error=2, The system cannot find the file specified
note this is my first time to use Java
How can I load my application and make run successfully?
From jetbrains official blog:
... it is now required to use a command-line svn client for integration
with Subversion.
In 2018.1 the SVNKit library has been removed from the IntelliJ
platform, resulting in the above changes.
also it seems there is no plugin for svn client in marketplace.
so you should install svn command line as suggested here
IntelliJ IDEA comes bundled with the Subversion plugin. Apart from it,
you also need to download and install the command line client on your
machine.

Run as cucumber feature not showing in eclipse

I am new to automation. Im facing this problem while running cucumber feature. It doesnt show run as Cucumber feature option at all
Screen shot of Run as options in eclipse
As, when you open a feature file in Eclipse and right-click, then you do not find an option 'Run As->Cucumber Feature', it appears that your Eclipse do not have the required Cucumber Eclipse Plug-in. You can install this plug-in using following steps:
Launch Eclipse and navigate to 'Help->Install New Software'.
Click on 'Add' button
Enter any name e.g. 'Cucumber' and type 'http://cucumber.github.com/cucumber-eclipse/update-site' as location.
Click on OK.
'Cucumber Eclipse Plugin' option will appear in the available software list.
Select the check box against it and click on 'Next' button.
Read the terms of license agreement and click on 'I accept the terms of the license agreement” if you agree with the license terms.
Click on 'Finish' button.
Let it install, it will take few seconds to complete.
After successful installation of this plug-in, if you open any feature file (i.e. file with .feature extension) and right-click, you should see 'Run As->Cucumber Feature' option.
Update 1
In Eclipse, go to 'Windows->Preferences->Run/Debug/Launching/Launch Configuration' and uncheck 'Cucumber Feature' checkbox if it is checked. Refer to below screen shot for more details:
If it is a maven project make sure you have included it as a dependency.
If you are running it as automation it would be a good idea to set it up as a maven project.
It's hard from your brief description, but if you are seeing the 'Run as Cucumber Feature' but it isn't doing anything, I had to open up the feature, right click on the white space in it, and then run as Cucumber Feature there. For some reason that worked for me.

How to install a Plug-in project to my Eclipse? (Version: Luna Service Release 2 (4.4.2))

I have generated a demo popup menu plugin project automatically by Eclipse. Here is the project structure,
I have set a objectContribution to the point org.eclipse.ui.popupMenus,
When I right click the project and choose Run as -> Eclipse Application, another Eclipse process run and I can see the configured menu works well,
How can I install this plugin for my original Eclipse process?
What I have tried
I did some research and tried to Export -> Deployable plug-ins and fragments, then put it into the %EclipseFolder%/plugins, but it didn't work. I also have tried to Export -> Deployable features and installed it by Help->Install New Software, also failed to see the menu when right click the project.
Will you please help? BTW, I would like to know how to contribute a menu which will display when I right click on a package in a project? Thanks so much.
Use the Deployable plug-ins and fragments wizard and select Intall into Host on the Destination page.
This will create a p2 repository at the denoted location and install the selected plug-ins from there into the host instance, i.e. the Eclipse IDE that you are currently working with. I think a restart may be required.

Can't get eclipse to recognize my plugin

I exported my eclipse plugin through the "Export Wizard" in the manifest and seems like everything went well (no errors). It created a .jar file within a plugin directory in a zip file.
I thought putting the jar into my Eclipse plugin directory would install it (after re-launching eclipse) but that didn't work. Eclipse can't see the plugin (the perspective isn't showing up)
I tried with Help->Install new software->local archive but it keeps saying "no software found"
Can you help me getting my plugin ready to be installed on a fresh Eclipse copy?
Ps. my plugin uses other dependencies like EMF/GMF
In eclipse, go to your console window. From the drop down meny, select OSGI console. Run the command ss or ss <name of your plugin>
You will then see the state of your plugin and a number. The state will probably be "installed" which means if has been found, but some dependencies were not satisfied.
Run the command diag <number of your plugin> and you will see why it wasn't started.
For more details, see Wheres my bundle
Edit: A first step to verify that the plugin is working would be to start up a new eclipse instance with your plugin. In the run configuration dialog, there is a tab with all the plugins that should be started. Make sure yours is checked and it will start with the new eclipse instance.
If you are using Eclipse 3.4 or above, put your plugin in the 'dropins' directory.
To install via Help->Install new software you need to create an 'Update site' or a 'p2 repository'.
By far the most ellaborate descriptions of installing your plugin is provided by Vogella deployment of your plug-in
It covers all 3 possible ways in which you may install your plugin detailing the pros & cons of each of the following approaches :
1 . Installing your plug-in from your Eclipse IDE
2 . Export plug-in and put into dropins folder
3 . Create update site for your plug-in
Sometimes you just have to restart Eclipse. File -> Restart and try again. Worked for me because Eclipse was caching the results of my local update site.
Open plugin.xml
In "Overview" Tab in "Exporting section" go to "Export Wizard"
In "Export" window in "Destination" section choose "Install into host. Repository" and choose dir which will looks like "xxx/.metadata/.plugins/org.eclipse.pde.core/install/"
Press "Finish" button
Wait for Export to finish without any problems
Restart Eclipse

Help installing PMD Eclipse plugin

I am trying to install PMD onto my Eclipse Helios installation. I follow the usual instructions to use the 'Install New Software' feature within Eclipse. All seems to go swimmingly and the installation completes. After restarting Eclipse, the option to use PMD is not there as expected (by right-clicking on a project).
Could someone advise on any steps I may have missed? Eclipse is the 20100617-1415 version installed on Red Hat running KDE.
Any guidance will be appreciated.
Thanks
Either the PMD plugin had an error on installation, or there was a problem when trying to start the plugin up. Either way, there should be something in your error log.
I'd first check there to see if something relevant in the log (open the Error log view). If not, then you can check to see if the plugin is actually installed. Click on Help -> About Eclipse -> Installation Details -> plugins and look for PMD.
If it is installed, then try uninstalling and reinstalling it. If the PMD plugin is not installed, then something failed.
Make sure that your eclipse/ directory is writable for the current user (while not a hard requirement, many plugins do need this for some reason).
Unfortunately it is not possible to install PMD from the Eclipse Marketplace.
Only way: Help > Install New Software... > Add... > http://pmd.sourceforge.net/eclipse
Maybe you have installed eclipse-pmd instead of PMD. It'll be avalible only in the project's properties option.
You can better try to install from http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/
But, make sure the Window-Preferences-General-Network Connection is "Direct" and "Native".
And restart. You'll surely find the PMD in preferences. I did for Keplar and works fine.
To install the PMD plugin for Eclipse:
Start Eclipse and open a project
Select "Help"->"Software Updates"->"Find and Install"
Click "Next", then click "New remote site"
Enter "PMD" into the Name field and
"http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/"
into the URL field
Click through the rest of the dialog boxes to install the plugin
To configure PMD, select "Windows"->"Preferences", then select PMD.
To run PMD, right-click on a project node and select "PMD"->"Check code with PMD".
For more info refer LINK

Categories

Resources