In the second part of this series i will show how to create a launch configuration in Eclipse to run or debug Notes. In the launch configuration you can select which of your self developed plugins should be deployed to the launched Notes client. So you do not need features, an updatesite and widgets for your development. This allows rapid development. Before you start to create the launch configuration be sure that you have followed all steps from the first part of this series.
Open the "Run Configurations" Dialog from the drop down menu.
Select "Eclipse Application in the right sidebar and click the "New" Button.
Change the Name of your newly created launch configuration to "Notes 9". Select "Run as a product" and choose "com.ibm.notes.branding.notes". Be sure that the Execution environment is the Notes JRE you defined in the first part of my tutorial.
Go to the second tab "Arguments" and fill in the program arguments:
-personality com.ibm.rcp.platform.personality
-product com.ibm.notes.branding.notes
-debug
-console
-nl en_US
and the VM arguments:
${build_files}-Xshareclasses
-Xss1m
-Drcp.home=${rcp.home}
-Dcom.ibm.rcp.install.id=${install_id}
-Drcp.install.config=user
-Dosgi.install.area=${rcp.home}\eclipse
-Dcom.ibm.pvc.osgiagent.core.logfileloc=${rcp.home}\rcp
-Dcom.ibm.pvc.webcontainer.port=0
-Declipse.pluginCustomization=${rcp.home}\rcp\plugin_customization.ini
-Declipse.registry.nulltoken=true
-Djava.protocol.handler.pkgs=com.ibm.net.ssl.www.protocol
-Djava.util.logging.config.class=com.ibm.rcp.core.internal.logger.boot.LoggerConfig
-Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook
-Dosgi.framework.extensions=com.ibm.rcp.core.logger.frameworkhook
-Xbootclasspath/a:${rcp.home}\rcp\eclipse\plugins\com.ibm.rcp.base_${rcp.base_version}\rcpbootcp.jar;
Then click on the "Variables" button and then on the "Edit Variables" Button to define the Variables we have used in the VM arguments.
You can create the variables with the "New" button.
install_id=1401453279265
rcp.base_version=9.0.1.20131002-1404
rcp.home=C:\Progra~2\IBM\Notes\framework
You have to adapt the rcp.home path with your notes path. But be careful that there are no blanks in the path. As you see in my example i have used the 8.3 format to avoid the blanks in C:\Programme (x86)".
Click "Ok" to leave the String Substitution dialog.
Attention: Close the "Select Variable" Dialog with "Cancel" and not with "Ok". When you select "Ok", the selected variable will be inserted in the VM Arguments and your launch config will not work.
Go to the "Configuration" tab and choose "Use an existing config file as a template". You can find the config.ini of your Notes installation in \framework\rcp\eclipse\plugins\com.ibm.rcp.base_9.0.1.20131002-1404\ in the Notes program directory.
After applying your changes with the "Apply" button you can start notes with the launch button. Be sure that Notes is not already running, because the start of notes will fail if it is already running. All plugins in your workspace will be auto deployed to the launched Notes client. Leave a comment if it is not working for you.
You are now ready to start extending the Notes client with your own extensions. In one of my next posts i will show how to write a plugin to block recent contacts permanently directly from the typeahaed function.
ad
Nice article.
ReplyDeleteIf you are developing a plugin for Domino Designer, do you know if it is possible to configure the run configuration to launch Domino Designer instead?
Yes that is possible. I will post a detailed description how to do this in the evening.
ReplyDeleteHello Ralf,
ReplyDeleteVery interesting step to step tutorial, thank you!
In Part 1, I just have noticed that I didn't get about 2034 plugins when adding Notes as a target platform, but only 1643 plugins available. Is this a problem?
In part 2, all seems OK but when I launch Notes 9, I get a lot of errors/warnings (see below). What does it mean?
I should say that, if I work with Notes since version 4, I don't have any skill with Eclipse nor Java :-)
Serge.
2014/08/10 09:58:13.789 ATTENTION Un ou plusieurs regroupements ne sont pas résolus car les contraintes principales suivantes ne le sont pas : ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.790 ATTENTION Le regroupement update@../shared/eclipse/plugins/com.ibm.domino.calendar.store.nl1_9.0.1.v00_00_20131107-0450.jar n'a pas été résolu. ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.790 ATTENTION Hôte com.ibm.domino.calendar.store_0.0.0 manquant. ::class.method=unknown ::thread=main ::loggername=com.ibm.domino.calendar.store.nl1
2014/08/10 09:58:13.790 ATTENTION Le regroupement update@../shared/eclipse/plugins/com.ibm.domino.calendar.dbstore.nl1_9.0.1.v00_00_20131107-0450.jar n'a pas été résolu. ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.791 ATTENTION Hôte com.ibm.domino.calendar.dbstore_0.0.0 manquant. ::class.method=unknown ::thread=main ::loggername=com.ibm.domino.calendar.dbstore.nl1
2014/08/10 09:58:13.791 ATTENTION Le regroupement update@../shared/eclipse/plugins/com.ibm.domino.das.nl1_9.0.1.v00_00_20131107-0450.jar n'a pas été résolu. ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.791 ATTENTION Hôte com.ibm.domino.das_0.0.0 manquant. ::class.method=unknown ::thread=main ::loggername=com.ibm.domino.das.nl1
2014/08/10 09:58:13.791 ATTENTION Le regroupement update@../shared/eclipse/plugins/com.ibm.domino.services.calendar.nl1_9.0.1.v00_00_20131107-0450.jar n'a pas été résolu. ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.791 ATTENTION Hôte com.ibm.domino.services.calendar_0.0.0 manquant. ::class.method=unknown ::thread=main ::loggername=com.ibm.domino.services.calendar.nl1
2014/08/10 09:58:13.792 ATTENTION Le regroupement update@../shared/eclipse/plugins/com.ibm.designer.ide.broker_9.0.1.20131015-0605.jar n'a pas été résolu. ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.792 ATTENTION Le regroupement requis javax.wsdl_1.5.1 est manquant. ::class.method=unknown ::thread=main ::loggername=com.ibm.designer.ide.broker
2014/08/10 09:58:13.794 ATTENTION La liste suivante comprend tous les regroupements non résolus, recherchez la cause principale dans la première entrée (si elle existe) : ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
2014/08/10 09:58:13.795 ATTENTION Le regroupement update@../shared/eclipse/plugins/com.ibm.designer.ide.broker.nl1_9.0.1.20131107-0450.jar [574] n'a pas été résolu. ::class.method=unknown ::thread=main ::loggername=org.eclipse.osgi
…
The count of the plugins depends on the Notes version and Fixpack level you have installed. You should not worry about the error messages if Notes works normal after you start it from eclipse. By the way i do not know, why you have tried the tutorial, but if the reason was to get your own extensions in the Masthead (ShortcutButtonBar) then you can try my new tutorial for people without java and eclipse skills: http://www.everythingaboutit.eu/2014/07/add-your-own-shortcuts-to-masthead.html
ReplyDelete