Plug-In not taking affect in Eclipse - java

I have created a plugin project in eclipse to create a new category and view. I run the MANIFEST.MF file as an eclipse application which opens a new eclipse window and I can see my plugin take affect. However, I want the plugin to be part of my standard eclipse installation.
For this I have exported the project to a jar, put the jar in the plugins folder and restarted eclipse. But I cannot see the changes take affect. I have also tried running eclipse from the command prompt with -clean option to force eclipse to search for new plugins. I have also tried putting the jar file in the dropins folder and restarting but nothing is working.
Any idea on what I might be missing ? I know the other option is to create feature but I wanted to understand what is wrong or missing in my approach.
Regards,
Dev

Try starting Eclipse with OSGI console (eclipse -console) and see if it gives any errors or warnings.
See this answer on SO.

Related

How to edit an eclipse plugin?

An eclipse plugin called JDTCommentsV2_1.0.9 does the following in eclipse:
I'm trying to add/edit some comments inside. e.g. add Run TestComment or just change one of the comments' name.
I have the .jar file and here's how it looks inside:
Question is which files should i edit and how.
Thank you
edit:
After following #greg449 and #Robin Green's instructions, I exported the jar file to eclipse, and edited the plugins.xml file. But if i export the files now as a jar, it doesn't work (nothing is changed in the menu). Finally i tried what #Robin Green said (Run -> Run As -> eclipse application) but there is no eclipse application under Run As. I got only Java Applet and Java Application. I'm wondering why. Might it be because i'm using ADT?
edit2:
I downloaded another version of eclipse (not ADT) and here i do have the Run As eclipse application bar". Can't i add it to ADT ?
edit3:
The picked answer works for eclipse JDT and not eclipse ADT.
It looks like you have a jar containing an existing Eclipse plugin so in your Eclipse you do File > Import and choose General > Existing Projects into Workspace and select the jar as the source.
Once you have the plugin project installed in your workspace you are going to have to work out how the plugin works by looking at the source and the plugin.xml.
Once you have modified the plugin use Export > Plug-in Development > Deployable plug-ins and fragments to build a new plugin jar.
Generally speaking you check out the source code from its source control repository or download it as an archive file from its website and then import it into Eclipse, same as any other project.

Why aren't the changes reflected, I made in the GUI?

There is a vague thing going on.
I downloaded a java project with all the libraries it uses. I set it up in netbeans. Now if I make any change in the GUI, it doesn't get reflected. But if I make a jar file of the project by clean and build option, and run it through the command prompt, the changes get reflected.
I have never faced this problem before ! What could be the reason for this ? The same thing happens if use the eclipse IDE.(The changes aren't reflected)
What happens is that, the default project always runs. The project that I downloaded.It doesn't include my modification.
Note : The build automatically option is already enabled for both netbeans and eclipse
Faced long back
It means the project not building automatically.
Checking that build automatically option,resolves the problem.
Maybe it's this:
In Eclipse: Take a look at the run-config and the classpath-configuration. There are several ways to include code in the classpath.
One is to include a jar that has been build somewhere else, maybe by maven, or as an external library. That is added with the Buttons "add JARS" or "add external JARS". These jars are not built by eclipse.
And there is a way to include code from an internal eclipse Project. That is done with the button "add Project". This is the code that is built by eclipse.
Maybe your GUI-code has been added to the classpath as a JAR and not as a Project. Try to add your GUI-Sources as a eclipse-project to the classpath.
Greetings
Do you execute Eclipse and NetBeans as Administrator? Try to do so and re-build the project.
Other option is to check file permissions.

Eclipse plugin not working properly

I developed an Eclipse plugin that compiles and runs java code in German. The technique I am using is that I translate the code to English and pass it to Java Compiler and get the results back and print it in the console.
The problem is that the plugin works when I run the plugin from Inside Eclipse but when I install the plugin in Eclipse so that when I open Eclipse it already exists there and start to test if a real user uses my plugin and creates a new Java project and try to the compile button in my plugin it says [The chosen operation is not currently available] ![Here is the the way I run and it opens a new Eclipse application with the installed plugin ]
Any help please
the way you installed your plugin sounds a little weird to me. So at first please try to export your plugin via the Export Wizard.
(Select Export -> Deployable plugins and features from your projects context menu)
Export your project as jar file and copy it to the 'plugin' folder of your eclipse instance.
After that it might be helpful to debug your plugin on OSGI-Level as there might be a problem loading your plugin (at least the error description you have posted indicates that).
Run eclipse with -console -noExit -consoleLog flags to open an OSGI console for debugging. After that try running ss <your-plugin-name> to see what the state of your plugin is.
The output gives you the ID of your plugin and the state it currently has. If the state of your plugin is not ACTIVE try running start <your-plugin-id> to see whether it starts correctly. If there is a problem starting your plugin you should get a respective log message. Feel free to post it here in case you need further help.
Otherwise there are plenty of options what might cause your problems, so maybe its better to try the steps I have described above before getting into details.
If you want to run eclipse plug-in withput using Eclipse Application , then you need to make a Feature project.
Now if your algorithm has something to do with system Path , you must
check Unpack plug-in and you should read the resource accordingly.
Like PLatformUI.getWorkBC() etc..
No other eclipse plug-in (jar) should be inside plugins directory of eclipse of same name of your plug-in. Ensure for this.

How can I disable "Initialize Java Tooling" on Eclipse startup?

In our application which is a Eclipse plugin, when Eclipse starts it takes long time and the users are seeing "Initialize Java tooling" message on the left down corner of application. Because our users don't have anything to do with java, I wonder if it is possible to disable Initialize Java tooling.
Another question: What is Initialize Java tooling?
Try to terminate eclipse then backup and delete the folder
.metadata/.plugins/org.eclipse.core.resources/.history
Restarting eclipse will not hang the Java Tooling process.
from Command prompt just type
eclipse.exe -clean
The java-tooling implement a Java IDE supporting the development of any Java application, including Eclipse plug-ins. It adds a Java project nature and Java perspective to the Eclipse Workbench as well as a number of views, editors, wizards, builders, and code merging and refactoring tools. The Java-tooling provides a development environment to developer.
how to disable plugin at startup
you can try disabling the java-tooling while launching the application.I am giving you a snapshot.
go find perspective as Window->Preferences->Run&Launching->java Application-> and make debug an run combobox to none value.
Hope this can solve your problem.
In case of Eclipse Oxygen, this settings can be found at:
Eclipse > Preferences > Run/Debug > Launching > Perspectives > Java Application > Eclipse JDT Launcher
There will be a folder .metadata in your project workspace directory. Just delete the .log files in it and restart eclipse.
Just uncheck "Build Automatically" and force quit Eclipse. Then start it again.
Project>Build Automatically - uncheck
-force quit
-start Eclipse
I know kind of late advice but because I have this issue 3 days now and I am very very frustrated....just have a copy of your eclipse IDE "virgin" as much possible to rerun it. And any plugin you want to have just do it on a direct copied version of this "virgin" eclipse. This is the only way to get away with clumsy plugins and staff under the hood that you cannot control.
It's devastating to import the projects all the time from the start or deleting the metadata folders....
Is to remove or rename the .projects folder in .metadata/.plugins/org.eclipse.core.resources in the workspace folder. This doesn’t seem to affect any project and the .project folder will be recreated when Eclipse restarts

Program in Eclipse not Running

I've just installed Eclipse 4.2.0 and also imported all my old programs into it, except that when I run my programs, it pops up with a message saying:
Select what to run:
Ant Build: Launches an Ant Build with default
Ant Build...: Launches an Ant Build and allows it to be configured
This message has never appeared to me before. I wonder if it is because I imported my files incorrectly or something that I forgot to install. Please tell me how I can make it work properly again. Thanks in advance.
Ah! this is an issue I've experienced earlier. This tip solved the issue. Here's How to do it.
Make sure that you've built it. Or you can enable Project --> Build Automatically.
After the above option is set, try cleaning the workspace. Project --> Clean and clean all the projects you've imported.
Now restart eclipse and you can launch your program.

Categories