I am doing an eclipse plugin using gef. When I restart eclipse after a plugin installation I got a lot of errors regarding draw2d imports. For example in one of my classes I had:
import org.eclipse.draw2d.ImageFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.MouseEvent;
import org.eclipse.draw2d.MouseMotionListener;
the 3 last imports were fine but the first one "import org.eclipse.draw2d.ImageFigure"
could not anymore be resolved.
I can not figure out what is going wrong. Any ideas?
Do you have org.eclipse.draw2d in Required Plug-ins(plugin.xml -> Dependencies)? If no - add and try to rebuild plugin, if yes - ... remove and add once again?
Ok I finally found the solution. The plugin was using its own version of draw2d.jar file. I manually replace that file with the draw2d.jar from the eclipse GEF plugin and everything was working fine again.
Related
as above, I cannot get access to classes of external library MathParser imported with Maven in IntelliJ. I've configured pom.xml file and enabled auto-download, so (as seen on the bottom of Project files section) it got downloaded, but when I try to use classes/import with import org.mariuszgromada.math.mxparser.*; - auto and manual import do not work.
Here's a screenshot of current situation
Any ideas?
Created new project for this test purposes, but same thing is happening. In ,,External Libraries" (in project files on the left in the screenshot) the lib appears , nevertheless no way to access to it's classes.
Update:
1) I've deleted jdk, and downloaded the newest 10'th - no results.
2) Reinstalled IntelliJ IDE couple times, same. Also I've tried to set up IntelliJ on Windows in VirtualBox (I need to finish my short project), same with jdk 10, and finally it worked. Nevertheless, I need to make it work without externalising from macOS (also, friend of mine with Mac, didn't have any similar problems). Totally same procedure, but on the macOS side on my Macbook I cannot import anything from this exterbal library (what is possible on virtualised Windows side).
3) I was trying to clean my Mac out of IntelliJ folders, then uninstall it, then imported settings from ,,healthy mac's IntelliJ" - still nothing new.
Solution:
I've reinstalled macOS, and finally that's how I've solved the problem.
Everything seems to be correct. You can try to
directly import of mxParser by changing import to import org.mariuszgromada.math.mxparser.mxParser or
check which classes you have in that package by pressing Ctrl + Space after mXparser package in import statement.
After forking OkHttp and then cloning it, I tried to import the project into IntelliJ using Maven.
However, IntelliJ is not resolving the dependencies properly for me. I see errors all over and I have to add the dependencies between each module and external libraries myself.
There must be a proper way to do this, really appreciate any help I can get here.
Edit:
I am putting the screenshots here to explain better
This is one of those dependencies errors I am facing
From this you can see that no dependencies is added automatically
I imported the project from the root folder pom file
If it helps, this is the project I am trying to import OkHttp. I am expecting a much easier way to get the code down and to start work on them.
Sorry for late answer, but maybe it helps someone especially I keep seeing similar problems all the time and had them myself few times. These steps usually works for me and were tested on OkHttp. They are the same like from my comment above but maybe something has been missed:
git clone https://github.com/square/okhttp.git
Download JDK (in my case it's 1.8.0_91 but it shouldn't be so important)
Download Apache Maven (3.3.9 works for me)
Run IntelliJ Idea (tested on 2016.2 Community) and enter "Settings" (Click "Cancel" if a project is loaded automatically)
Find "Maven" and choose downloaded and extracted in step 3
Find "jre" and choose the one downloaded in step 2
Accept changes - "Ok" button
Choose "Open"
And choose pom.xml from root directory
After re-indexing and import everything should work correctly
This morning I just open Eclipse and find my project (which was working perfectly last time I worked on it and ran it) with tons of errors.
Error with package: "java.lang.Class cannot be resolved" same for java.lang.Object
I tried to add in library my JRE again so the error on package is fixed with this but now ALL other lines of my project (all my imports in each file, all my class , ...) contain an error so I don't understand 2 days ago my packages and imports were well imported into my project and everything goes well and no it's like all my project just break and now I don't find the solution to solve this ..
Please help
Hi all,
Finally I re-add a JDK and install all packages updated for eclipse and now I just have errors with my imports it seems eclipse doesn't find the imports I want I think it's because I start my project to the university and want to continue it at home on my own computer so do you know how should I add this imports and then eclipse can use them ? (on eclipse Juno 4.3)
Thanks for answers
Go to 'Configure Build Path' and add the required libraries
I am running IntelliJ 13 (the latest version) on Mac Mavericks. IntelliJ had been working well until yesterday when I found it got stuck when importing maven projects.
I created maven projects by using "mvn archetype:generate". IntelliJ is stuck at the following screen captured: No matter how many times I click the "Next" button or how long I wait, nothing shows up.
I've done a search on google, and have enabled IPv4 for maven per some answers I found, however, this does not work for me. I think my problem is caused by something different. So what could be wrong? Thanks
I found out the cause: some .jar files I put at /Library/Java/Extensions directory yesterday caused InteliJ to be unable to import maven projects. After removing those problematic jar files from /Library/Java/Extensions, IntelliJ import works again!!
thanks everyone
Probably it is stuped, but may be reinstal IteliiJ IDEA?
I recently figured out how to add the Jung libraries to eclipse, but now I ran into a new problem. I'm using the Jung tutorial and I can't seem to run the first tutorial, because the Eclipse IDE is saying that the .DIRECTED ,in the code, cannot be resolved or is not a field. How do I fix this?
edit: Yes, using that package worked! However, I'm surprised that the Eclipse IDE did not offer to import the package for me. Is this unusual?
Make sure to include all the required JUNG2 libraries into your Eclipse project. When you do that, Eclipse will give a few suggestions after you right-click on those yellow-underlined words. Choose the one(s) related to JUNG2 to remove the warning(s).
EgeType.DIRECTED must be imported from edu.uci.ics.jung.graph.util.EdgeType package which is under jung-graph-impl-2.0.1.jar