Adding a sample plugin into Eclipse - eclipse

I have a plugin that i want to integrate with my Eclipse IDE . The plugin I downloaded from the internet consists of two jar files, namely:
org.eclipse.dg.ex.core_1.0.jar
org.eclipse.dg.ex.ui_1.0.jar
How do i get them into my IDE? I tried putting them in the Eclipse dropins folder, but i think this may be incorrect .
Can someone help ?

The definitely belong in the eclipse/plugins folder. You will likely need to restart eclipse as well.

Placing the plugin in the dropins directory is correct! It does not belong in the plugins directory. Ever since p2 was added to Eclipse, the dropins directory was introduced as a means to install new plugins via general file system operations
The dropins folder is configured to be scanned during startup. Thus the dropins folder can be used
much like the plugins directory was used in the past.
Here is some information about the dropins folder. This also includes valid layouts for a plugin that lives in dropins. Have a look. It's very likely you just need to 'layout' the plugin properly.

Related

Replacing Jar files within Tomcat in Eclipse

I want to replace old jar file of lucene i.e. lucene 3.6.2.jar(marked in the following figure) with new lucene 4.3.0.jar. But I am a beginner in developing Dynamic Web Project in Eclipse. So I have no idea how to do it. Each time I am opening the window of build path I see no option to modify those jar files included in Tomcat library. I am working with Eclipse Juno. Please help me to fix this problem.
If you see a jar file in Apache Tomcat libraries, it means you have it under the ${tomcat_home}/lib folder. If you want to remove it from global .classpath you should remove it from lib folder manually and then refresh your project in eclipse.

Should I put nbproject directory under source control in NetBeans

I'm using NetBeans to develop J2EE web service.
NetBeans create a directory called nbproject inside my project directory.
I'm wondering if I should put this directory under source control. I think it is required to build the project without NetBeans.
This is usually not required. Think of it this way: If I was to check out your project but happened to be using a different IDE, I would not require your nbproject directory. In other words: This directory is machine specific, not project specific. Hope this helps.
The nbProject folder contains all the netbeans metadata about your project. When you go Project -> properties all the settings (and others) that you find there are stored in the nbProjects folder.
EDIT:
This has been answered in another question, and the answer there is more complete and accurate
In short you should include nbproject, but not nbproject/private
If you are building your project with Maven or Gradle you should definitely exclude the folder from the VCS.

how to setup the sphinx with netbeans

i have successfully configured sphinx4 with eclipse.
for that these steps i have used.
copy my java and config files to SRC folder
all the necessary jar files (in the lib). the lib folder added to the root of the project
build those jar files (jsapi files too)
change the configuration file and give the proper path
test the java file
but in Netbeans i really dont understand how to do the proper steps. can someone help me. the jar files should be added to "Libraries" rite.
then after adding them how to build them.
in the netbeans it dont show a SRC folder. so all the java files and configuration files should go to Source Packages folder rite.
can someone help me with this. please
If you have sphinx4-1.0beta6 then you can just open the folder up as a netbeans project. Open netbeans, click open project, then navigate to the sphinx folder and open it. It is already a netbeans project file type as of this version. I assume this will work in later versions also. I have no clue why sphinx doesn't say this on their website.
Sphinx4 is a Java library available in OSS repository, so you can use it as any library.
If your project uses maven/gradle, add repository in your project configuration, then add dependency on two packages - sphinx4 core and sphinx4-data. The former is the main library, the latter is required if you want to recognize US English. Then just start writing the code.
If you want to rely on jar files, just download sphinx4-core and sphinx4-data files from the repository and add them as dependency to the project, then start writing code.
If you want to modify or develop sphinx4 itself, install Gradle support in your IDE, then import latest sphinx4 sources as a Gradle project.
For more details and links see the tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
click on Add JAR/Folder
select jar file you want to add

Eclipse Galileo does not deploy external jars into WEB-INF/lib directory

I created new web project testweb.
By default default output folder is testweb\build\classes.
Added some jars to build path.
Then selected these jars in "Java EE Module Dependencies" in order to Eclipse put this jars into WEB-INF/lib during deploying on some server.
Then I deployed this web application from Eclipse on server(JBoss).
All is ok - there are jars in WEB-INF/lib directory.
But if I change default output folder from testweb\build\classes to testweb\web\WEB-INF\classes Eclipse stops to deploy external jars to WEB-INF/lib directory.
This directory is empty!
Why?
What is wrong?
Looks like bug 266268 , also described in this thread.
Notes:
this was for eclipse3.4, do you still have this issue with the latest eclipse3.5.1 (since "Galileo" could be just 3.5)?
there is a debug procedure.
Thanks to Larry and his hints for debugging I found the source cause of this:
don't use WEB-INF/classes as the default output folder. There is a bug (probably), that makes eclipse to calculate project contents differently in this case.
So the workaround solution is to change the default output folder.
The bug is a duplicate of bug 249044, reported fixed in WTP3.0.5: what version of WTP do you have with your Galileo eclipse?

Modifying Existing Eclipse Plugin and Correctly Installing it

I downloaded the source code for the EMF based UML2 Plugin and changed a class in the org.eclipse.uml2.uml.edit project to remove special characters when returning string representations. Now when I export the projects and place the jar files either in the dropins directory or replace my current uml2 plugin jar files in plugins directory, The UML files are no longer recognized, in short my modified plugin does not install correctly (no error is thrown and I can see the files being picked up under Plugins->Target Platform) .
However, When I run the plugin as an eclipse application (from the workspace) I can see the changes I made being reflected in the new instance of eclipse.
What can I do to ensure that the plugin installs correctly?
Is there a documented procedure of how to build the uml2 plugin (or any comparable plugin) after modification?
Select the project and open the context menu. There is an entry PDE near the bottom of the menu. In there, you can find an entry to build the plugin for deployment. This gives you the features and plugins directory with the fixed files. Copy both into your Eclipse install.
Unless the UML2 plugins require some kind of magic build script, exporting the one plugin you changed and overwriting the original in your Eclipse installation should be the easiest solution. One potential problem which comes to mind is conflicting plugin version numbers: make sure you don't have two identical versions of your modified plugin in your Eclipse installation.
When debugging plugins which apparently don't work properly at runtime, I always look at Help > About Eclipse Platform > Configuration Details. This lists all the plugins found by Equinox during startup, along with their status (see the Javadoc of the org.osgi.framework.Bundle interface for explanation).
I faced the exact same problem as you describe here . I dont have any answer to your problem but i am sharing what worked for me .
I created a local update site of the plugin on my system. Create update site for your plug-in article explains very very nicely the steps needed to accomplish this .