The import org.eclipse.ui.internal.ShowViewAction cannot be resolved - java

I can not figure out what I am missing solve this import error. I have org.eclipse.ui_3.107.0.v20150507-1945.jar included in my build path, but it does not seem to be what is required. I've tried including all the other org.eclipse.ui.* jar files in my build path but none seem to be resolving the import error. Does any one know what is needed for this?
I'm a relatively new java developer, but have run into the "The import * cannot be resolved" quite a bit and the only way I've found to fix it, if it can't be auto resolved with eclipse's quick fix, is to try and guess what jar needs to be added to the build path. Is there a more reliable method or is trial and error what it comes down to?

This is an internal class (the package name includes 'internal'). You should not be trying to use it. Internal classes are often created / changed / deleted without warning between Eclipse releases.
See Eclipse API Rules of Engagement for more information about the Eclipse API.
This particular action existed in Eclipse 3.x but is no longer present in Eclipse 4. The action essentially calls IWorkbenchPage.showView, you will have to write your own action to do the same.

Related

SelendroidDriver cannot be resolved

I am trying to test a Selendroid test on Eclipse and followed the necessary steps on how to run it. Unfortunately, the two libraries that are mentioned above cannot be resolved to a type. I have added all the necessary jar files in the build path however, but it still cannot be resolved. Is there another way to resolve this problem? Images as here:
I struggled a lot with this error and finally came to know that the paths have been changed in the latest releases.
Use these paths and it shall work:
import io.selendroid.common.SelendroidCapabilities;
import io.selendroid.client.SelendroidDriver;
Tested this for versions 0.15.0 and 0.17.0

Eclipse editor/build losing access to imported javax classes

I fixed my problem but I don't know how/why this fixed it so I am looking for an explanation.
I opened my project yesterday and I could no longer build due to the fact that the java and jsp imports could no longer see javax.* classes. I had another project that worked fine but could find no differences in their build paths.
After reading several threads on build path, etc. and not finding any problems in the configuration file I simply retyped the import in one of the source files, eclipse was able to lookup class tree as I typed in the editor, and once one of the imports was retyped the project would now build.
I would like to understand what in the Eclipse project configuration was hit and why this happened and how this method I used actually resolved the problem.

How to run the source code for com.android.browser?

I downloaded the source code from github.com for standard android browser:
https://github.com/android/platform_packages_apps_browser
I opened the project in Eclipse. It showed me a lot of mistakes, mostly related to not connected libraries, but there are errors related to the fact that the class is connected but the corresponding method that is invoked in the class doesnt. Incidentally, it should be noted that when opening the project through File -> New -> Android Project -> then put the tab Create project from existing source and selecting the column Location path to the source com.android.browser, it is not selected version of Android, under which the program is written in the graph Build Target and have it set itself, I tried to choose one by one all and still having the same error.
Here is a partial list of classes that are not found:
import android.net.WebAddress;
import android.app.DownloadManager;
import android.os.ServiceManager;
import android.text.IClipboard;
import android.os.ServiceManager;
import android.text.IClipboard;
import android.speech.RecognizerResultsIntent;
etc.
The same methods were not found or variables connected to the following classes:
Browser.getVisitedLike (cr, url)
Browser.BookmarkColumns.THUMBNAIL
Browser.HISTORY_PROJECTION_THUMBNAIL_INDEX
etc.
I tried to look for com.android.browser on other sites, everything that I found showed me the similar pattern. Can someone explain what the problem is, because all of the standard libraries and classes exist but the project is not created?
I tried to use the Hidden API, as shown on this page:
http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/
downloaded from there the platform Hidden API, tried to compile them, some bugs got solved, but more than half the errors still remain.
Please help me figure out how to compile browser from the source code.
The browser project is designed to be built in the context of the entire Android Open Source Project framework. It will not build with just the client App SDK that you have installed.
If you wish to build this browser, you will need to download the complete Android OS project to provide the correct environment.
You may want to look for a different browser (such as Firefox) which is open source and is not so tightly integrated into the OS.

How to import android email source code into eclipse project?

I downloaded the android Email app source code [version 2.2] from here. I deleted the .classpath and .project file so that I could import an existing android project. Everything seems to have worked. However, I get quite a few recurring errors such as:
Attendees cannot be resolved to a
variable
android.provider.Calendar cannot be
resolved to a variable
Calendar cannot be resolved to a
variable
I have set the correct android version 2.2, what am I missing?
Thanks all for any help
I faced the same issue with Email. I fixed the issue, by adding the following jars into the build path and thus, all the errors were resolved.
../out/target/common/obj/APPS/Email_intermediates/classes.jar
../out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar
But you need to make the Application build using the platform.
Many of the included applications cannot(or at least could not) be built with the SDK, as they depend(ed) on non-exported functionality that is only "visible" during the system build. I'm not sure if Email is still in this category, but it was in the cupcake days.
There are three potential workarounds. Best is to rewrite those parts of the application to instead use functionality which is exported in the SDK, and thus fairly stable.
Next up is to use reflection to pick up the missing pieces at runtime.
Last is to make do-nothing dummy classes for the needed non-public platform pieces, within your project. These are enough to let the program compile, and at runtime they get rejected due to name collisions with the hidden system functionality, so you end up utilizing the real classes rather than the dummies.
The proper thing to do is to build the application with the platform build system, rather than the SDK.

Strange problem with imports in Java Application

I'm building a plugin to extend the Eclipse BPEL Designer. That plugin is supposed to allow users to add meta information to certain model elements via EAnnotations. I already did the same thing for a BPMN model and it work just finde but when doing this for the BPEL designer I reveive rather strange exceptions.
The first I thing realized when trying to extend the BPEL Designer was that the designers plugins are defined in an unusual package structure. Instead of org.eclipse.bpel.xxx they have a "bin" in front of all package names. When I'm trying to import some of the designers classes I therefore have to refernce the bin path to make it work. However all the examples I was able to find just imported classes from the ordinary package structure.
Most of the time importing classes with the bin in front of the package name worked fine for me but every now and then I receive a strange error message. The message is in the form of: The type org.eclipse.bpel.xxx cannot be resolved. It is indirectly referenced from required .class files
It seems that Eclipse somehow can't find certain classes. I'm stuck at this point for over a week now and don't find any solution. From my point of view the problem has to be seen in the BPEL Designer plugins. Inside those plugins they reference classes in the form of org.eclipse.bpel.xxx but as I said when I reference those plugins their classes are inside packages with a "bin" in front of the normal package name. Could that be an explanation why certain classes can't be referenced by Eclipse and I get those strange error messages?
I'd appreciate any new ideas about that problem and hope that somwebody can give me an advice to solve that problem.
Cheers
Stefan
I already encountered in the past such troubles ...
I think there is a problem with the export/import of the BPEL Designer plugin.
How did you get this plugin ? Are you working with binary plugin or plugin imported as source in your SDk ?
Try to get again this plugin, may be an other version, or from an other source .. an update site.
I really think these "bin" packages/folders should not be here
Hope this can help ...

Categories

Resources