Eclipse plugin view is empty when installed - eclipse

I'm developing an eclipse plugin with a view. When launched in dev mode it's displaying and working perfectly fine:
But when I packaged and installed the plugin in the Eclipse instance, the view is empty when launched:
EDIT:
Looking at Error Log view, sometimes there is the following error:
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: swing2swt/layout/BorderLayout
It might be relevant because a swing2swt.jar was magically automatically added to my plugin project by Eclipse. I tried including it in the build but the build failed complaining there is no value set for source.swing2swt.jar which I totally don't understand why it needs setting.

I have found the solution to this problem.
The problem itself is caused by swing2swt.jar not included in the build. For some reason WindowBuilder automatically added this jar to the project but didn't mark it for inclusion in the build.
However the struggle here is because Eclipse doesn't delete plugin jar files when uninstalling "software" that was previously installed. So if the version does not advance, the cached old, wrong plugin jar file will be reused when reinstalling the feature, causing any non-version-advancing fixes uneffective when reinstalling the feature/plugin.
It is so very common that during the development of a plugin, version does not advance for small fixes when trying distribution so I think this needs to be fixed. A ticket has been created at Eclipse site.
Bug 509781

Related

Problems creating a project with CodenameOne in Netbeans

Install Netbeans 12.6 on a Windows 10 machine. I was able to install the CodenameOne plugin with no problem. When creating a project I get the following error message:
Cannot invoke "org.openide.filesystems.FileObject.getFileObject(String)" because "folder" is null
I've been surfing the internet and can't find a way to fix it.
Thank you for your support.
This approach is no longer supported. The plugin is only used for legacy applications and no longer works in newer IDEs due to breaking changes in almost all IDEs.
Starting with Codename One 7.x we moved to maven projects which don't require the plugin and can be created in https://start.codenameone.com/
I have followed the instructions in the manual and it mentions as important:
"Before opening the project in NetBeans, you need to copy the contents of the tools/netbeans directory into the root project directory. These files are required by NetBeans to build, run, and debug the project correctly. "
But I can't find this folder in netbeans version 12.6.

Update Eclipse plugin from 2.x style to 4.x style (plugin.xml to manifest.mf/osgi bundle)

I have an Eclipse plugin that was originally written (not by me, and I don't have access to the original developer) that I'm trying to update for Eclipse Luna, because it stopped working when my team updated to Eclipse 4.4.
I downloaded the Luna Plugin development version, cleared a few warnings, updated some broken code, fixed a few bugs, and tested with "Run As -> Eclipse Application
This worked fine: all the views showed up, the preferences pages, etc.
So then I tried to export the plugin so I could test on a fresh installation of vanilla Eclipse Luna. I did that by using the Export Wizard:
And generated a deployable set of jars with said wizard:
I copied the generated folder (which contains all the jars appropriately) into the dropins folder of my fresh vanilla Eclipse Luna and started it up.
Unfortunately, I got the following error:
Which led me to this SO question and this Eclipse bug report, which explains that I have a 2.x style plugin that uses the plugin.xml instead of an OSGi style manifest.mf. Continuing my search, I found this SO question, which was directed at a 3.x version of Eclipse, but I used the 4.x equivalent:
Which I used with the following options checked:
And I accepted all the changes in the previous pane after the (long-running) changeset. However, upon deploying to my vanilla install, I got the same error about the plugin converter. That led me back to this SO question, which recommending installing the Eclipse 2.0 plugin support package. I did so and restarted Eclipse. The error in my error log did stop showing up, however the view/preferences/etc for my plugin are still not showing up. The plugin does show up under Help -> Installation Details -> Plug-ins, but doesn't seem to be interacting at all.
The text of the plugin.xml can be found here at Pastebin. The text of the MANIFEST.MF can by found at this other Pastebin link
Any suggestions for getting my plugin to work through the manual export so the other developers on my team can test my changes before I try releasing the update to the world?

Bundle 'org.eclipse.core.runtime' cannot be resolved

I recently upgraded from Eclipse Kepler to Luna. A plugin I had been working on is now showing build errors without any source being changed.
Here is an extract from my MANIFEST.MF,
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.ui.forms;bundle-version="3.6.0",
org.eclipse.wst.sse.ui;bundle-version="1.3.0",
org.eclipse.jface.text;bundle-version="3.8.100",
org.eclipse.ui.workbench.texteditor;bundle-version="3.8.101",
org.eclipse.ui.views;bundle-version="3.6.0"
None of the core or ui bundles are resolved. I don't think Eclipse could even run without them and their equivalent .jar files are present and readable and haven't been modified as part of the upgrade, so they are not actually missing. When I try to add dependencies on the Dependencies tab the problem bundles do not show.
Eclipse was upgraded by the Arch Linux package manager. I mention it for completeness but believe it is likely identical to any other upgrade mechanism. I also tried creating a new plug-in project but the same happens, I guess this means it's a global setting. I'm relatively new to PDE and so far haven't had a need to change any settings.
From the preference page (Preferences > Plug-in Development > Target Platform), try Removing the Running Platform target definition, Applying, and then Restoring Defaults. Maybe it's just stale and pointing to the jars that it doesn't know Arch has changed about.

Can't run the sample project on spring STS

After installing STS successefuly on Juno, i opened a new MVC project, fixed the errors in the sample STS project by adding all the required spring jars, and now there are 2 problems:
I can't get the option: "Run on server" (altough i did set a tomcat's server in the workspace).
With every step i make (clean, delete etc') i'm getting the follwing error:
Errors occurred during the build.
Errors running builder 'Faceted Project Validation Builder' on project 'First_STS_Project'.
Could not initialize class org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants
Errors running builder 'Validation' on project 'First_STS_Project'.
org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants
This is not a local problem on my specific workspace, because i getting the same error in my second PC as well.
I don't recommend JUNO since it has many bugs and it also has a bad impact in performance. If you're in Windows, try to use short paths when installing the plugins or selecting the workspace. I have similar issues when working in windows. If I create a workspace in c:/users/Marcelo/Documents/java/workspaces, I always get issues, but whenever I change to "c:/workspaces" directly, works perfectly. Try with Eclipse Indigo instead. Also try to use the latest version of tomcat. If any of the previous recommendations fix the issue, (that could be weird), try to install the STS plugin again but check all the features, maybe a component is missing.

Android Eclipse can't see library's class

I have around 5 projects in my Eclipse, all of them were working and compiling just fine but since last eclipse and sdk update I've got a strange bug with mobclix and admob libraries:
app is compiling fine without any errors but when I open any activity with ads it crashes!
Error:
E/AndroidRuntime(22504): Caused by: java.lang.ClassNotFoundException: com.mobclix.android.sdk.MobclixMMABannerXLAdView in loader dalvik.system.PathClassLoader[/data/app/com.rvanavr.app.apk]
I've spent a day trying to fix this bug:
- removed/added library
- cleaned project
- reinstalled sdk
- reinsalled everyhing
Did somebody face this bug? Really need you help guys!
Yes, I had the same issue yesterday, and found that the problem maybe related to how ANT builds the projects underneath eclipse. I too started seeing this problem right after I upgraded Eclipse ADT plugin, and also get the latest updates for Android SDKs (API versions 10 and 15). So, generally based on other stackoverflow questions, I upgraded eclipse as described below, and the problem went away. The way I understand is that Eclipse's build system wasn't including mobclix.jar in the final build, and did not report any errors or warnings to alert this fact. Here's how I upgrade eclipse:
Eclipse Help Menu -> Install New Software, pops up this window:
Select "The Eclipse Project Updates" - I'm using version 3.7 (Indigo). Then click on "Select All", and hit "Finish". All Eclipse components that aren't up-to-date, will get upgraded to the latest. And then it'll ask you to restart Eclipse. When I did that, and rebuilt my project, I didn't have any problems with mobclix.jar and undefined classes.
Btw, after the upgrade, here's my Eclipse version (in case you want to compare your current version to mine):
Version: Indigo Service Release 2
Build id: 20120216-1857