The import org.eclipse.jface cannot be resolved in Eclipse Luna - eclipse-plugin

I wrote a plugin five years ago and it was correct (with no compiler error) in all version of Eclipse until Luna. When I updated my eclipse to Luna, I got two compiler errors.
The error is because of these two import statements. (The import org.eclipse.jface cannot be resolved, The import org.eclipse.swt cannot be resolved)
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
I wanted to add two new dependencies to the plugin file, but I could not find any relevent. For example, I could not find org.eclipse.jface.resource in dependency page.
Does anyone have any idea why the plugin works in Kepler, but has the above compiler errors in Luna?

Maybe this page can help you:
http://wiki.eclipse.org/JFace#Create_the_Eclipse_SWT.2FJFace_Project
Sections: Identify the Required External JAR Files for SWT and JFace and also Add the org.eclipse.swt Project to Your Java Project

Add you eclipse plugins directory to it in Target Platform. All problem will be resolved

Related

How do I import the flatlaf library to my project using intellij?

When compiling my main class I get this error:
Main.java:1: error: package com.formdev.flatlaf does not exist
import com.formdev.flatlaf.FlatLightLaf;
I have followed all the steps online, I have gone to project structure, libraries, "+", added the flatlaf.jar file and pressed on apply. I have also tried to revalidate caches. The JDK recognises the import of the library as well as all its functions as they all show up in the suggested and give no errors until you try to compile.
Make sure that you've added the library to the module dependencies.

Using the import statement. Which files is it importing from?

I'm trying to migrate my eclipse install from one workstation to another. I primarily work with Selenium, so I've copied my workspaces, imported the projects and imported the appropriate jars. However, I am still getting a lot of errors including some stating the import statements are failing to find certain packages.
Half of the errors cleared when I finished importing the last of the jars, but it seems like it's missing something. Basically guessing at this point, I right clicked my project and hit "build project", which cleared the import errors, but the rest of my code has errors indicating things are not imported correctly. I have a feeling the build path is still not configured correctly. Is there a way I can look at my old PC and see what files the import statement is looking for?
When you copied the files to another machine, and imported the project, some jars were not properly added to the classpath. So the compiler complained about not being able to find a class/package in an import statement. You can definitely have a look at the old work station, and look at the project imported jars. You can find those by:
Right click on the project in "Project Explorer", and select "Build Path > Configure Build Path".
This will give you an idea about what you are missing.
Alternatively, (if the libraries you are missing are third party), you can google the missing import statement, and get a clue in which jar (library) contains the jar, then download and add it to the classpath of the project.

Intellij can not locate some classes - Play SBT. Intellij bug?

I have a few import statements in my project that are displayed in RED. Intellij shows 'Cannot resolve symbol' errors, and I am not able to autocomplete these classes or their methods. However, when I run my project it runs perfectly fine. This is strange so much so, that lets say I have an import statement
import org.apache.velocity.app.Velocity
It cannot resolve the 'Velocity' class, even though when I do a ctrl+b selecting the 'app' package, it clearly shows the Velocity class:
I am lost in this and I am struggling to code like this. Any help will be appreciated.
Best Regards.
EDIT: In my project, some of the dependencies are also not resolved, although I refreshed my project multiple times. The exact same dependencies are resolved in my colleague's system, who is using the same code-branch and environment as me.
I can see that the unresolved dependencies lie inside the play.sbt package, but are still not resolved. Is there a compatibility issue between Intellij("15.0.2") and SBT("0.13.8" mentioned in build.properties of my app)?
Reimport project using option 'Import project from external model' and choose 'sbt'. In next window choose options like 'use auto-import' and download 'sources for SBT and plugins'.

How to import COM4j as Eclipse Plugin?

I am following the guide shown in https://molteni.wordpress.com/2012/10/16/connect-hp-quality-center-with-java-using-com4j-tutorial/ to generate resources of COM4J.
This is how the COM4J folder looks like
I tried to create an Eclipse plugin based on it and show as below
However when I added the plugin as one of the dependencies of my application I am unable to import the file.
I get the following error when I tried to search it through "Open Type" in Eclipse as follow
What steps am I missing here ?
Usually it is done like this: in Eclipse go to File ->
New -> Plugin Development -> Plugin From Existing Jar Files
Though it might not help in this case: please see this issue: https://java.net/jira/browse/COM4J-57
It sounds like you have not specified which classes are exported by the plugin.
Open the MANIFEST.MF editor for the plugin and select the Runtime tab. In the 'Exported Packages' section click Add and select all the packages which should be available to other plugins.

Why is IntelliJ not showing the project structure?

Just tried to create a JAR with IntelliJ as always. Now IntelliJ doesn't show the project structure. It looks like this (I can't post an image, because Stackoverlow says I need "at least 10 reputation to post images"):
MyProject.iml
pom.xml
External Libraries
There are no classes or anything, that are the only files shown in tab "Project". Why? Version is 13.1.5
I checked all view options with an older project which does not have this problem after creating a jar, everthing is fine. First time that is occurs for me.
I'm using version 12.1.4
You can create a new project File -> Import Module -> and importing the older project.
Import Project also works as well.