I just installed Eclipse Neon PDE and try to build a simple plugin project with the "Hello World" template. Unfortunately i get many "The import org.eclipse cannot be resolved" errors straight after creating the plugin project.
This is the project with the errors in code and dependencies:
.
I use Eclipse Neon for RCP and RAP Developers with these plugins:
.
I already tried cleaning the project and fiddled around with the build path but without success.
Can anyone help me with this error? Probably I'm missing the obvious.
Greg is right. Also check your target platform in Windows->Target Platform->Add.
Add default setup there.
Please find more details adding target platform # http://www.vogella.com/tutorials/EclipseTargetPlatform/article.html
You are missing a number of plug-in dependencies.
You need to add at least:
org.eclipse.core.runtime
org.eclipse.core.resources
to your plug-in dependencies list. You will probably have to do a 'Source > Organize Imports' after adding the dependencies to update the imports.
You can always click on the red X at the left of the editor to get possible resolutions of problems - this will often tell you which dependency to add.
I fixed my problem by launching the eclipse with "-clean" arguments.
Related
I am pretty new to Eclipse.
I try to set up the Eclipse plugin development environment for this:
https://github.com/ajermakovics/eclipse-instasearch
I followed the instruction
Build using Maven from project root:
(in "eclipse-instasearch" folder)
mvn install
Use File -> Import -> Existing Projects to import all instasearch projects ("eclipse-instasearch" folder)
To run or debug right click on 'instasearch' project and select Run As -> Eclipse Application
in "MANIFEST.MF" it complains "Bundle 'org.apache.lucene' cannot be resolved"
Run As Eclipse Application will show this exception in the Console :
org.osgi.framework.BundleException: Could not resolve module: it.unibz.instasearch [19]
Unresolved requirement: Require-Bundle: org.apache.lucene; bundle-version="[2.9.1,2.9.2]"
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
log4j:WARN No appenders could be found for logger (org.eclipse.jgit.internal.storage.file.FileSnapshot).
log4j:WARN Please initialize the log4j system properly.
the plugin does not load, unable to see in the menu.
I also tried "Open Project From FileSystem" to open the root folder, in this way there is no option "Run As Eclipse Application" in the context menu.
I must missed something,
any one can guide me?
By default Eclipse uses its own environment (i.e. the installed plug-ins) to resolve the dependencies of the plug-in projects. As #greg-449 said in comments Lucene is not included by default anymore and that's why the build fails. You basically have two choices to solve the issue:
Add the Lucene plug-in to the environment (it can be found in Orbit's update sites: https://download.eclipse.org/tools/orbit/downloads/)
Wrap Lucene's JAR files in an Eclipse plug-in: How to create Eclipse plug-ins from Java libraries (JAR files) and add the resulting plug-in to the repository.
The tradeoffs are that wrapping JAR files in an Eclipse plug-in is a bit more work (to create & maintain) whereas adding Lucene to the environment through Orbit will slow down the build. Moreover, "adding Lucene to the environment" currently means "installing the plug-in in Eclipse", which is only a per-developer solution. If you're envisioning maintaining the plug-in I would suggest you to consider using a target platform instead: that would make the environment platform-independant (I wrote a bit about that in this answer).
Finally, it seems that a fork of eclipse-instasearch already addresses this issue. You'll find it easily by browsing latest GitHub issues.
I'm trying to build my project obfuscated but It's not working. I get this warning:
Obfuscator type (PROGUARD) is not found in obfuscator classpath, using NONE.
Please use Plugins Manager to install the missing obfuscator library.
I looked at the plugins option but I don't know how to add proguard.
Goto the Tools > Plugins then goto Available Plugins tab and search for Proguard you will have that listed. Tick the checkbox that follows it and press install.
You can see the screenshot below.
EDIT if you are unable to follow above steps then this might help you
http://netbeans.dzone.com/tips/obfuscating-netbeans-java-appl
http://blogs.oracle.com/geertjan/entry/obfuscation
I took the links from this question.
I have followed the steps here: http://mikkonieminen.blogspot.co.uk/2013/04/netbeans-73-proguard.html
and it worked... I don't speak Finnish, but I think from the screenshots you can understand to add the beta2 repositiory for modules and then you can download the proguard plugin.
Good luck! Gergo
If the proguard plugin is unavailable, you can add this plugin repository catalog at netbeans plugins:
http://dlc.sun.com.edgesuite.net/netbeans/updates/7.3/uc/beta2/certified/catalog.xml
After installing proguard plugin, restart netbeans just to make it sure.
I have an eclipse plugin project com.prosseek.asttest, and I spin off a new plugin project com.prosseek.impactAnalyzer that has one class CallHierarchyGenerator.java. Now asttest project depends on impactAnalyzer project. I had no choice but to make impactAnalyzer project eclipse plugin as it uses JDT library.
After setting up the build path in com.prosseek.asttest, it builds without a problem.
However, when I execute the plugin, I got an error missing CallHierarchyGenerator.java class.
What might be wrong?
If you are running this as an OSGI or Eclipse Application, you need to explicity export packages as available to other plugins as by default they are not. Open your manifest editor in plugin 1. Click on the runtime tab and add the packages as "Exported" then the class loader in blugin 2 will be able to find it.
Also looks like you might be doing the class path configuration wrong. in plugin 2 make sure you add plugin 1 as a dependency in the dependencies tab of the manifest editor. Looks like you are doing a dependency configuration as if it were a regular java application
Based on Duncan's answer, I could fix this issue.
Export packages in impactAnalyzer
Actually I didn't add it manually, but it's already exported, as (I guess) I did it with Quick Assist automatically.
Required Plug-ins
I had to Add com.prosseek.impactAnalyzer in the dependecies.
Run configuration update
I had one more step to do, I had to open run configuration to add required plug-ins.
Export the plugin
When exporting the asttest plugin, I also had to export impactAnalyzer also.
Coming from Visual Studio, I'm pretty new to the Eclipse IDE.
And finding it very difficult. I seem to get error messages of the type "missing ..." a LOT.
The latest issue I'm having, where I just can't get around is this:
I"m trying to compile & run this sample project: http://code.google.com/p/gwtgae2011/
When I choose "checkout maven projects from SCM" my SCM drop down is empty...
So I just checked it out with Hg manually. No problem.
Trying Import > Existing Maven Project. Seems to read the pom.xml alright, but shows an error:
"No marketplace entries found to handle maven-gae-plugin:0.8.1:unpack in Eclipse. Please see Help for more information."
Since I can't find it through updates or market within eclipse I downloaded maven-gae-plugin (http://code.google.com/p/maven-gae-plugin/downloads/list). I figured just dropping it into the "plugins" or "dropins" folder should be enough. Apparently not so...
Question: How do I fix this error?
(I tried both 3.6 & 3.7)
Links to some good eclipse tutorials covering these kinds of topics are very welcome too!
THANKS!
maven-gae-plugin is in central repo so it should be found.
Did you set the path to your local repo? http://united-coders.com/phillip-steffensen/maven-2-part-3-configuring-eclipse-for-apache-maven-2-projects
I ran into this error, what worked for me was:
Comment the plugin
Import into eclipse
Uncomment the plugin
Discover an error in the plugin XML
Fix error found in the plugin XML
I am not certain, but it seems like this is a unclear error that something about the pom.xml is invalid.
I am working on an RCP project based on eclipse. It has been working fine but recently I thought I'd upgrade it to use a new eclipse version (3.2 -> 3.5).
After a bit of trouble, it was running on the new platform. Then I did something. Don't know what. The end result is that I'm now getting a classpath error when one of my plugins (A) tries to access a class in one of the dependent plugins (B) (also one of mine).
As far as I can see, Plugin A has Plugin B in its' dependency list and the compiler shows no errors. To test, I created a new Plugin C with one class and accessed the class from Plugin A. That works fine.
Does anyone have any hints for troubleshooting such issues? A checklist of settings to check? I've been struggling with this for hours and getting nowhere! Particularly frustrating as it was working until I changed something!
Thanks
Update
I should also say that the project is quite old and uses the plugin.xml and not the manifest. Could this be a problem? Is there a way to upgrade?
Some ideas:
Clean-and-build every project (maybe after a restart of Eclipse)
Check, whether the required packages are also exported
Check the Error log, maybe there is some unloadable plug-in, etc.
Check the Run configuration, whether every required plug-in is present there
If the problem does not happen in a Runtime workbench, but in an Exported RCP app, then check whether you compile the project with the same settings during export than in Eclipse
I hope, something helps about these.
You can try the following in your run configuration:
In the Main tab check Clear (workspace) under Workspace Data
In the Configuration tab check clear the configuration area before launching under Configuration Area
This helps me every time I encounter some strange ClassNotFound errors.
If I understand you correctly you have no compiler errors but when you run you get class not found exceptions? You could try PDE Tools > Update Classpath from the project's context menu to see if you declared any dependencies outside of the MANIFEST.MF file, which would result in compiling code that fails at runtime.
I developed for RCP quite a long ago, but if I'm not wrong, since 3.4 or 3.5 you have to declare in the plugin configration which packages/classes are exported for dependent plugins and which are not.
This is unlike the old convention of using 'internal' in the package to mark non-exported packages.
Since you have plugin.xml from very old version of eclipse, it might be the problem, as exported resources from one plugin to another were not enforced in Eclipse RCP 3.2.
One more complement, hope it helps.
Open plugin.xml, check "build" tab, see how "binary build" are configured. It affects which files will compiled and exported.
See binary build here : http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Feditors%2Fmanifest_editor%2Fbuild.htm