zk pages not correctly visualized in eclipse - eclipse

Good morning, everyone,
my colleague uses the same Eclipse that I do, the 2019-12 with Java 1.8 and we both have ZKStudios installed as plugins. I see everything correctly zuls with all the tags, while she sees a text page. It completely lacks the option to see the zuls.
She has reinstalled ZkStudios several times but to no avail.
I attach screens of what I see and what my colleague sees.
Has anyone ever had a similar problem?
My zk pages correct
My project config
my coworker zul page, not correct
my coworker config
We tried to reinstall the plugin
New info, thanks to comments, My coworker has this error when she tries to install zk studios :
org.osgi.framework.BundleException: Could not resolve module: org.zkoss.eclipse.editor [731]
Unresolved requirement: Require-Bundle: org.eclipse.wst.common.snippets
-> Bundle-SymbolicName: org.eclipse.wst.common.snippets; bundle-version="1.2.500.v201811170421"; singleton:="true"
org.eclipse.wst.common.snippets [428]
Unresolved requirement: Require-Bundle: org.eclipse.gef; bundle-version="[3.10.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.gef; bundle-version="3.13.0.202211301913"; singleton:="true"
org.eclipse.gef [498]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Unresolved requirement: Require-Bundle: org.eclipse.draw2d; bundle-version="[3.7.0,4.0.0)"; visibility:="reexport"
-> Bundle-SymbolicName: org.eclipse.draw2d; bundle-version="3.12.0.202211301913"
org.eclipse.draw2d [490]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Unresolved requirement: Require-Bundle: org.zkoss.eclipse.zks
-> Bundle-SymbolicName: org.zkoss.eclipse.zks; bundle-version="2.0.5.v202202111348"; singleton:="true"
org.zkoss.eclipse.zks [735]
Unresolved requirement: Require-Bundle: org.eclipse.gef
-> Bundle-SymbolicName: org.eclipse.gef; bundle-version="3.13.0.202211301913"; singleton:="true"
Unresolved requirement: Require-Bundle: org.eclipse.gef
-> Bundle-SymbolicName: org.eclipse.gef; bundle-version="3.13.0.202211301913"; singleton:="true"

According to your screenshot, you don't open a zul file with a zul editor: (check the icon)
The zul editor icon is:
You can open a zul with zul editor:
Check file type and editor association:

Related

Eclipse RCP build - Unresolved requirement: com.sun.jna

I just installed Eclipse 2022-06 (4.24.0) and built and export default RCP application product.
When I try to run this product in windows I get error in log file listed below. (in Eclipse IDE environment it runs perfectly).
It looks like library com.sun.jna is missing... But it included in required plug-ins.
It exists in config.ini and plugins folder of built product as well...
I spent two days trying to solve this issue and ran out of ides already...
!SESSION 2022-08-16 14:25:08.798 -----------------------------------------------
eclipse.buildId=unknown
java.version=18.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -clearPersistedState
Command-line arguments: -os win32 -ws win32 -arch x86_64 -clearPersistedState
!ENTRY org.eclipse.e4.ui.workbench.addons.swt 4 0 2022-08-16 14:25:09.361
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.e4.ui.workbench.addons.swt [42]
Unresolved requirement: Import-Package: org.eclipse.e4.ui.internal.workbench.swt
-> Export-Package: org.eclipse.e4.ui.internal.workbench.swt; bundle-symbolic-name="org.eclipse.e4.ui.workbench.swt"; bundle-version="0.16.500.v20220506-1520"; version="0.0.0"; x-friends:="org.eclipse.e4.ui.workbench.addons.swt,org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.ui.workbench"
org.eclipse.e4.ui.workbench.swt [44]
Unresolved requirement: Require-Bundle: org.eclipse.urischeme; bundle-version="1.1.0"
-> Bundle-SymbolicName: org.eclipse.urischeme; bundle-version="1.2.100.v20211001-1648"; singleton:="true"
org.eclipse.urischeme [64]
Unresolved requirement: Require-Bundle: com.sun.jna; bundle-version="[5.8.0,6.0.0)"
Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.workbench.renderers.swt; bundle-version="0.9.1"
-> Bundle-SymbolicName: org.eclipse.e4.ui.workbench.renderers.swt; bundle-version="0.15.500.v20220511-1638"; singleton:="true"
org.eclipse.e4.ui.workbench.renderers.swt [43]
Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.workbench.swt; bundle-version="0.9.0"
-> Bundle-SymbolicName: org.eclipse.e4.ui.workbench.swt; bundle-version="0.16.500.v20220506-1520"; singleton:="true"
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667)
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)
As greg-449 suggests problem was with version of com.sun.jna...
Version 4.5.1 was included by default instead of 5.8.0.
So, to solve this, I added version requirements for com.sun.jna in *.product file "Contents" tab.

How does eclipse resolve dependencies in a plugin

It is known that any dependent plugin in a plugin gets loaded only when referenced portion (of dependent plugin) gets called up due to lazy loading concept . In that case, I have a doubt how does the dependencies in a plugin gets resolved. Is it via the name check in plugin registry ?
Platform plug-in loader checks the plug-in dependencies in MANIFEST.MF file. The content of typical MANIFEST.MF file looks like:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: XXX;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: XXX
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Eclipse-BundleShape: dir
Require-Bundle: Plugin id 1,
Plugin id 2,
Plugin id 3,
Plugin id 4
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Here Require-Bundle property lists all dependent plug-ins.
Read more about this here
Use this plugin to check dependencies.

Package does not exist in this plugin

I tried importing a plugin as a source project in my workspace. Now I am getting a package does not exist in this plugin error in the Manifest.mf file. But the packages do exist in the source folder of the same plugin. What could be the issue? I tried googling but I could find only these kind of errors when the package is coming from a different eclipse project. Pls give me some light on this
http://i.stack.imgur.com/g2lrE.png
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: xyz Plug-in 2.1.0
Bundle-SymbolicName: com.abc.xyz
Bundle-Version: 2.1.0
Bundle-ClassPath: xyz.jar
Bundle-Activator: com.abc.xyz.xyzPlugin
Bundle-Vendor: FHG
Bundle-Localization: plugin
Export-Package: xyz.common,
xyz.common.pattern,
xyz.cursor,
xyz.dm.common,
xyz.dom,
xyz.dom.bootModel,
xyz.dom.exception,
xyz.dom.x,
xyz.errmsg,
xyz.eventHandling,
xyz.mof,
xyz.mof.exception,
xyz.mof.x,
xyz.versioning.extent,
xyz.versioning.versionstore,
com.CH_co.cryptx,
com.CH_co.util,
com.abc.xyz,
com.abc.xyz.uuid,
com.tools,
config,
mdd.delta.model,
mdd.diffmerge,
mdd.diffmerge.event,
mdd.model,
transactionHandling,
uuidGenerator
Eclipse-AutoStart: true
Require-Bundle: org.eclipse.core.runtime,
com.abc.mdd.common
This is the manifest.mf file
The answer I found was a bit strange and I am unable to find the logic behind it. I deleted the errors in the Problems view and restarted the eclipse in clean mode. It started working. Pls let me know what could be the reason behind it

org.eclipse.jdt.ui.wizards.NewClassWizardPage available on Linux, but not on the Mac?

Most esteemed host of Eclipse magi ..
I am trying to create an instance of the org.eclipse.jdt.ui.wizards.NewClassWizardPage class. I have one project where I do this, and it will compile & run on Linux, but not on a Mac. Both machines are running the Helios edition of Eclipse with the PDE, both were downloaded with the last week.
The bundle org.eclipse.jdt.ui is available on the Mac, but for some reason the Mac will not compile the phrase
import org.eclipse.jdt.ui.wizards.NewClassWizardPage;
Saying "The import org.eclipse.jdt.ui.wizards.NewClassWizardPage cannot be resolved". The MANIFEST.MF is a simple one ..
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: RcpTest0
Bundle-SymbolicName: rcpTest0; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: rcptest0.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt,
org.eclipse.jdt.core,
org.eclipse.jdt.ui
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Your clues & boos are all most welcome.
Aha! The answer was that I had current versions of the JDT checked out in other projects in the workspace. They were being picked in preference over the JARs. Now to understand how I can get the PDE and JDT source bundles downloaded & installed.

Eclipse/OSGi class loading issue - java.lang.LinkageError when trying to load a plugin with two versions

In my Eclipse runtime, I have the following three plug-ins (file names simplified for better readability):
javax.wsdl.1.4.0.jar
javax.wsdl.1.5.1.jar
eclipse.wsdl.jar, which has a version restriction on the dependency: [1.4.0, 1.5.0)
The dependencies of my own plugin look like this:
eclipse.wsdl
javax.wsdl : "1.4.0"
When my own plugin tries to use the class WSDLFactory, an error would be thrown:
java.lang.LinkageError: loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader#a7b0a7b" previously initiated loading for a different type with name "javax/wsdl/factory/WSDLFactory" defined by loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader#7c647c64"
Apparently, my own plug-in loads the 1.5.1 version of WSDLFactory, while eclipse.wsdl loads the 1.4.0 version of WSDLFactory, and this cause the conflict. If I change the version restriction of my plugin to be [1.4.0, 1.5.1), the code would work just fine. However, this is unacceptable since my code needs to support Eclipse 3.5 which forces to use javax.wsdl.1.5.1 intead of 1.4.0.
Are there any way to force my code to use the WSDLFactory loaded by eclipse.wsdl instead of trying to load its own?
And if possible at all, is there a way to force loading the lowest version (instead of highest) bundle?
Update: I tried both Require-Bundle and Import-Package and got different results in dev and release environment. Require-Bundle doesn't work for either one. Import-Package works in the dev environment but not in the release environment.
My question is, while Require-Bundle would try to load classes that are in the highest version of the plugin, does Import-Package NOT behave like that?
The following are corresponding MANIFEST.MF's:
Require-Bundle:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test
Bundle-SymbolicName: wsdl.classloading.test; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: wsdl.classloading.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.wst.wsdl;bundle-version="1.1.202",
javax.wsdl;bundle-version="1.4.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test
Bundle-SymbolicName: wsdl.classloading.test; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: wsdl.classloading.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.wst.wsdl;bundle-version="1.1.202"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: javax.wsdl,
javax.wsdl.factory,
javax.wsdl.xml