Tycho - Eclipse RCP Product (re)branding issue : wrong splash screen shown - eclipse-rcp

Goal:
I would like to make an Eclipse RCP product feature-based with existing Eclipse.org features and additional features of my own.
Introduction:
To start fresh, I've followed the Lars Vogel's Eclipse Tycho tutorial up to step 9.
I made just few adjustments:
I'm using the latest version of Eclips RCP platform (Oxygen)
I'm using the latest version of Eclipse Tycho (1.0.0)
I had to set the autostart-mode of the plugins part of the configuration of the product (c.f. com.vogella.tycho.rcp.product file)
I've added these two branding files
the "splash.bmp" image in the root folder of the com.vogella.tycho.rcp plugin, furthermore I've added the splash.bmp to binary build defined by the build.properties file
the "icons/product.ico" icon to com.vogella.tycho.product project
finally I've completed the definition of the product, defined by com.vogella.tycho.rcp.product file, with the icon and and the location of the splash image.
... I built the product with Maven 3, executing the following command from the root project folder:
mvn clean verify
And finally I made a smoke test:
run-product.bat
Outcome: the startup is as expected, the icon appears in the taskbar and the right splash screen show-up. alright !
The issue:
Now, I add to the production definition exactly one feature from Eclipse.org : org.eclipse.epp.package.java.feature
Then I redo the build and the smoke test ... and unfortunately it is the Eclipse "Oxygen" splash screen that shows-up ...
How could I prevent the Eclipse "Oxygen" splash screen to show up and to have my splash screen instead ?
Product definition file:
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="com.vogella.tycho.rcp" uid="foo" id="com.vogella.tycho.rcp.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="default"></configIni>
<launcherArgs>
<programArgs>-clearPersistedState</programArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
<windowImages/>
<splash location="com.vogella.tycho.rcp" />
<launcher name="foo">
<win useIco="true">
<ico path="icons/product.ico"/>
<bmp/>
</win>
</launcher>
<vm>
</vm>
<plugins>
</plugins>
<features>
<feature id="org.eclipse.e4.rcp" installMode="root"/>
<feature id="com.vogella.tycho.feature" version="1.0.0.qualifier"/>
<feature id="org.eclipse.emf.common"/>
<feature id="org.eclipse.emf.ecore"/>
<feature id="org.eclipse.epp.package.java.feature"/>
</features>
<configurations>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="3" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="3" />
</configurations>
</product>
Attachement:
Eclipse Project achive

After hours of debugging the Maven build, I figured out that the feature "org.eclipse.epp.package.java.feature" seems to contain a configuration with touchpoints to modify the config.ini and therefore change values of osgi.splashPath, eclipse.product and eclipse.application.
So I decided to change the product definition file, and to use the "org.eclipse.jdt" feature (instead of "org.eclipse.epp.package.java.feature") and added its dependencies to the product definition file.
Now both the new icon and new splash screen appears as desired.
Here is the final product definition file:
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="com.vogella.tycho.rcp" uid="foo" id="com.hipperos.workbench.rcp.product" application="org.eclipse.ui.ide.workbench" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
<launcherArgs>
<programArgs>-clearPersistedState
</programArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
</launcherArgs>
<windowImages/>
<splash
location="com.vogella.tycho.rcp" />
<launcher name="foo">
<win useIco="true">
<ico path="icons/product.ico"/>
<bmp/>
</win>
</launcher>
<vm>
</vm>
<plugins>
</plugins>
<features>
<feature id="org.eclipse.e4.rcp" installMode="root"/>
<feature id="com.vogella.tycho.feature" version="1.0.0.qualifier"/>
<feature id="org.eclipse.emf.common"/>
<feature id="org.eclipse.emf.ecore"/>
<feature id="org.eclipse.rcp" version="4.7.0.v20170308-2000"/>
<feature id="org.eclipse.jdt" version="3.13.0.v20170308-2105"/>
<feature id="org.eclipse.platform" version="4.7.0.v20170308-2000"/>
<feature id="org.eclipse.equinox.p2.core.feature" version="1.4.0.v20170208-2010"/>
<feature id="org.eclipse.ecf.core.feature" version="1.3.0.v20170110-1317"/>
<feature id="org.eclipse.ecf.filetransfer.feature" version="3.13.5.v20170216-0456"/>
<feature id="org.eclipse.help" version="2.2.100.v20170308-2000"/>
</features>
<configurations>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="3" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="3" />
</configurations>
</product>

Related

RCP Application not launching correctly after updating

I have an RCP application that I'm trying to update to a newer version. Selecting the update-site zip and walking through the Install/ Update wizard works fine. Before the restart dialog show pops up, I do see the following:
enter image description here
After restarting, I see framework exceptions, some panels/ UI elements not being able to load, and CoreExceptions. It's almost as if the plugins that are updated cannot be found/ resolved in the application anymore. I've checked the install plugins/ and features/ directory and they are in fact present. A subsequent restart resolves the issues.
Why do the new bundles not resolve after the Update/Install restart wizard?
This is what my base RCP application .product looks like:
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="RCP Application" uid="com.ibm.rcp.product" id="my.rcp.ide" application="org.eclipse.ui.ide.workbench" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="true" autoIncludeRequirements="true">
<aboutInfo>
<image path="about/rcp.gif"/>
<text>
%blurb
</text>
</aboutInfo>
<configIni use="default">
</configIni>
<launcherArgs>
<programArgs>-showlocation
-pluginCustomization plugin_customization.ini
--launcher.defaultAction
openFile
--launcher.appendVmargs
</programArgs>
<programArgsLin>-vm jdk/bin/java
--launcher.GTK_version 3
</programArgsLin>
<programArgsMac>-vm ../Eclipse/jdk/Contents/Home/bin/java
</programArgsMac>
<programArgsWin>-vm jdk/bin/javaw
</programArgsWin>
<vmArgs>-Dosgi.requiredJavaVersion=11
-Dsun.java.command=Eclipse
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=false
-Xms256m
-Xmx2048m
</vmArgs>
<vmArgsMac>-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
</launcherArgs>
<windowImages i16=" ... my ... rcp ... icons"/>
<splash
location="my.rcp.product"
startupProgressRect="0,260,574,8"
startupMessageRect="10,235,320,20"
startupForegroundColor="0F62FE" />
<launcher name="myapp">
<linux icon="/icons/rcp.xpm"/>
<macosx icon="/icons/rcp.icns"/>
<win useIco="true">
<ico path="/icons/rcp.ico"/>
<bmp/>
</win>
</launcher>
<intro introId="org.eclipse.ui.intro.universal"/>
<vm>
</vm>
<plugins>
</plugins>
<features>
<feature id="my.rcp.feature" installMode="root"/>
...some eclipse features...
</features>
<configurations>
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<property name="osgi.instance.area.default" value="#user.home/.workspace" />
<property name="eclipse.p2.skipMigrationWizard" value="true" />
</configurations>
<preferencesInfo>
<targetfile overwrite="false"/>
</preferencesInfo>
<cssInfo>
</cssInfo>
</product>

Eclipse RCP Product Export failed when I check option Generate P2 Repository

I have a feature-based RCP Product.
When I export the product checking option Generate P2 Repository, it is not exported right.
It generates logs zip file but it does not have any error information.
It just has some information about warning and info.
I can export the product right when I don't check option Generate P2 Repository.
I am using eclipse 2020-06 and jdk11.
And I have start level configuration like the below.
<configurations>
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
</configurations>
And .log in workspace .metadata says like the below.
!ENTRY org.eclipse.pde.core 2 0 2022-04-29 15:17:04.122
!MESSAGE Compilation errors occurred during the operation. A zip file containing the build logs has been generated and placed at C:\Users\Administrator\workspace-2022-P6\tesw
Hope anyone could help me with this problem.
Thanks.

Unable to create class 'org.eclipse.ui.internal.StandardTrim' from bundle '485' : Eclipse RCP Product based on features

I am developing Eclipse RCP Application on a custom target platform that contains plugins of EMF, Sphinx, Artop and other features.
I am using Eclipse 2021-09 and OpenJdk17.
There is a product file based on features which works fine when I launch it as Eclipse Application. But when I export the product, I get it all exported but it is not working well.
The tool should show AUTOSAR Perspective with checking a license, but it does not show me anything.
And There are some messages as the following in the .log file.
MESSAGE Unable to create class 'org.eclipse.ui.internal.StandardTrim' from bundle '485'
!STACK 0
org.eclipse.e4.core.di.InjectionException: org.eclipse.e4.core.di.InjectionException: java.lang.RuntimeException: org.eclipse.core.runtime.CoreException: Plug-in com.autron.odin.common.ui was unable to load class com.autron.odin.common.ui.perspectives.ArtopPerspectiveFactory.
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:995)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:403)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:344)
.
.
.
.
.
Caused by: org.eclipse.e4.core.di.InjectionException: java.lang.RuntimeException: org.eclipse.core.runtime.CoreException: Plug-in com.autron.odin.common.ui was unable to load class com.autron.odin.common.ui.perspectives.ArtopPerspectiveFactory.
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:995)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:96)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:83)
at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1469)
.
.
.
.
Caused by: java.lang.RuntimeException: org.eclipse.core.runtime.CoreException: Plug-in com.autron.odin.common.ui was unable to load class com.autron.odin.common.ui.perspectives.ArtopPerspectiveFactory.
at org.eclipse.ui.internal.registry.PerspectiveDescriptor.createFactory(PerspectiveDescriptor.java:81)
at org.eclipse.ui.internal.WorkbenchPage.createPerspective(WorkbenchPage.java:4105)
at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:4012)
at org.eclipse.ui.internal.WorkbenchPage.lambda$10(WorkbenchPage.java:3972)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3972)
at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:898)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I have my product file with the following settings.
<configurations>
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.console" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="org.eclipse.osgi" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
</configurations>
I'd really appreciate for your support.
I've been struggling with this more than 3 days..
Thanks!

Blackberry config.xml is different in Worklight build methodologies

I'm building our BB10 environment in Worklight using two different ways.
1- Through Eclipse IDE:
The config.xml in the native folder which has been generated after building the environment contains all the feature that we need in our project.
<?xml version='1.0' encoding='utf-8'?>
<widget id="MobileBanking" version="1.0.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" rim:backButton="exit">
<name>Mobile Bank</name>
<author email="support#company.com">company</author>
<description>
Mobile Bank
</description>
<license href="http://opensource.org/licenses/alphabetical">
</license>
<access subdomains="true" uri="file:///store/home" />
<access subdomains="true" uri="file:///SDCard" />
<!-- start_worklight_host_server do not change this line-->
<access subdomains="true" uri="https://mobile-qa.company.ca" />
<!-- end_worklight_host_server do not change this line-->
<access subdomains="true" uri="tel://*"/>
<access subdomains="true" uri="http://google.com"/>
<access subdomains="true" uri="http://maps.googleapis.com"/>
<access subdomains="true" uri="http://googleapis.com"/>
<access subdomains="true" uri="http://maps.gstatic.com"/>
<access subdomains="true" uri="http://fonts.gstatic.com"/>
<access subdomains="true" uri="http://csi.gstatic.com"/>
<access subdomains="true" uri="https://www.company.com/*" />
<!-- <access subdomains="true" uri="*" /> -->
<icon src="icon.png" />
<rim:splash src="splash-1024x600.png" />
<rim:splash src="splash-600x1024.png" />
<rim:splash src="splash-1280x768.png" />
<rim:splash src="splash-768x1280.png" />
<content src="webresources/skinLoader.html" />
<rim:permissions>
<rim:permit>read_device_identifying_information</rim:permit>
<rim:permit>access_shared</rim:permit>
<rim:permit>read_geolocation</rim:permit>
<rim:permit>access_pimdomain_contacts</rim:permit>
<rim:permit>access_pimdomain_messages</rim:permit>
<rim:permit>access_location_services</rim:permit>
</rim:permissions>
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
<preference name="Orientation" value="portrait"/>
<preference name="ChildBrowser" value="disable"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="WebSecurity" value="enabled" />
<feature id="blackberry.invoke" name="blackberry.invoke" value="blackberry.invoke" />
<feature id="blackberry.app" name="blackberry.app" value="blackberry.app" />
<feature id="com.blackberry.utils" name="com.blackberry.utils" />
<feature id="com.blackberry.pim.lib" name="com.blackberry.pim.lib" />
<feature id="Battery" name="Battery" value="Battery" />
<feature id="Camera" name="Camera" value="Camera" />
<feature id="Contacts" name="Contacts" value="Contacts" />
<feature id="Device" name="Device" value="Device" />
<feature id="Accelerometer" name="Accelerometer" value="Accelerometer" />
<feature id="Compass" name="Compass" value="Compass" />
<feature id="Notification" name="Notification" value="Notification" />
<feature id="org.apache.cordova.file" name="File" value="File" />
<feature id="FileTransfer" name="FileTransfer" value="FileTransfer" />
<feature id="Geolocation" name="Geolocation" value="Geolocation" />
<feature id="Media" name="Media" value="Media" />
<feature id="Capture" name="media-capture" value="Capture" />
<feature id="NetworkStatus" name="NetworkStatus" value="NetworkStatus" />
<feature id="SplashScreen" name="SplashScreen" value="SplashScreen" />
<feature id="Vibration" name="Vibration" value="Vibration" />
</widget>
2- When I use Ant Worklight Builder, the generated native folder for BB10 contains the following config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="MobileBank" version="1.0.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" rim:backButton="exit">
<name>MobileBank</name>
<author email="support#company.com">company</author>
<description>
MobileBanking
</description>
<license href="http://opensource.org/licenses/alphabetical">
</license>
<access subdomains="true" origin="file:///store/home" />
<access subdomains="true" origin="file:///SDCard" />
<!-- start_worklight_host_server do not change this line-->
<access subdomains="true" origin="https://mobile-qa.company.ca" />
<!-- end_worklight_host_server do not change this line-->
<access subdomains="true" origin="*" />
<icon src="icon.png" />
<rim:splash src="splash-1024x600.png" />
<rim:splash src="splash-600x1024.png" />
<rim:splash src="splash-1280x768.png" />
<rim:splash src="splash-768x1280.png" />
<content src="webresources/skinLoader.html" />
<rim:permissions>
<rim:permit>read_device_identifying_information</rim:permit>
<rim:permit>access_shared</rim:permit>
<rim:permit>read_geolocation</rim:permit>
<rim:permit>access_pimdomain_contacts</rim:permit>
</rim:permissions>
</widget>
All the feature tags disappear using Ant builder.
Worklight Ant task version 6.2.0.01.20150329-1923
WebWorks SDK version 2.2.0.15.
I tried Windows and Mac. got same result.
Thank you.
See this blog post: https://developer.ibm.com/mobilefirstplatform/2015/03/05/ootb-support-blackberry-webworks-2-2/
I've created an application with the BlackBerry 10 environment two times: using The WebWorks 1.0 SDK and the WebWorks 2.2 SDK. The difference in config.xml is due to the SDK used.
The Worklight builder will create the first config.xml if your environment variable for WEBWORKS_HOME is pointing to WebWorks 1.0.
The Worklight builder will create the second config.xml if your environment variable for WEBWORKS_HOME is pointing to WebWorks 2.2.
This means that your Studio and Ant .jar file are not of the same version Worklight.
Get the latest iFix from IBM Fix Central; to get the Ant .jar I believe that you will need to extract the Server installation to get it.

"Unknown extension point" in plugin.xml problem

In "Contributing to Eclipse" book it is written that to introduce an extension point you should type the next section in plugin.xml
<extension point="org.eclipse.contribution.junit.listeners">
<listener
class="org.eclipse.contribution.junit.RunTestAction$Listener">
</listener>
</extension>
But this code gives me the "Unknown extension point" error".
Read the book carefully, extension point is defined in the same plugin.xml as <extension-point id="listeners" name="Test Listeners"/>
Get sample code from Downloads at http://www.informit.com/store/product.aspx?isbn=0321205758
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="org.eclipse.contribution.junit"
name="JUnit Plug-in"
version="1.0.0"
provider-name=""
class="org.eclipse.contribution.junit.JUnitPlugin">
<runtime>
<library name="contribjunit.jar">
<export name = "*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.junit"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.eclipse.jdt.launching"/>
</requires>
<extension-point id="listeners" name="Test Listeners"/>
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.jdt.core.IType"
id="org.eclipse.contribution.junit.runtest">
<action
label="Run Test"
class="org.eclipse.contribution.junit.RunTestAction"
enablesFor="1"
id="org.eclipse.contribution.junit.runtest.action">
</action>
</objectContribution>
</extension>
<extension point="org.eclipse.contribution.junit.listeners">
<listener
class="org.eclipse.contribution.junit.RunTestAction$Listener">
</listener>
</extension>
</plugin>
Cheers,
Max