Monday, July 4, 2022

How to show a progress monitor on eclipse rcp splash screen

Create plugin_customization.ini in your product branding plugin with the following property

# show progress on startup

org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true



Add plugin_customization.ini in plugin.xml property extension


<plugin>

   <extension

         id="myid"

         name="my-IDE"

         point="org.eclipse.core.runtime.products">

      <product

            application="org.eclipse.ui.ide.workbench"

            description="About product description"

            name="%product.name">

         <property

               name="appName"

               value="my-IDE">

         </property>

         

    <property

               name="preferenceCustomization"

               value="plugin_customization.ini">

        </property>

      </product>

   </extension>

</plugin>


To control the coordinates of the progress monitor and message on the splash screen add the following three properties

      <property

           name="startupForegroundColor"

           value="000000">

     </property>

     <property

           name="startupMessageRect"

           value="7,305,285,20">

     </property>

     <property

           name="startupProgressRect"

           value="7,290,490,15">

     </property>


In Eclipse 3.x RCP applications, this could be done directly from the .product splash screen page





Thursday, February 11, 2021

Installing features in eclipse from command line

We can install eclipse features from the command line also. Here is an example, where I am going to install esp-idf eclipse plugin into my eclipse cdt

Go to the command line
Go to the eclipse directory and run the below command

Installing a single feature
$ eclipsec.exe -application org.eclipse.equinox.p2.director -repository https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/ -installIU com.espressif.idf.feature.feature.group

This installs com.espressif.idf.feature.feature.group feature from  https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/ repository

$ eclipsec.exe -application org.eclipse.equinox.p2.director -repository https://download.eclipse.org/swtchart/releases/0.13.0 -installIU org.eclipse.swtchart.feature.feature.group

To install multiple features at the same time.
$eclipsec.exe -application org.eclipse.equinox.p2.director -repository https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/ -installIU ,com.cthing.cmakeed.feature.feature.group,ilg.gnumcueclipse.debug.gdbjtag.openocd.feature.feature.group



Resources:

Monday, October 19, 2020

Icon editor for resizing and creating new icons

 http://www.xiconeditor.com/

This is a simple icon editor which I'm using these days for resizing and creating new icons for the eclipse plugin

Wednesday, August 19, 2020

Understanding OSGI Bundle states

Eclipse runs on top of the OSGi runtime, which manages the bundles (components) that make up an application. At any time, each bundle has one of these lifecycle states:

Bundle States:

  • Not in the list - If your bundle isn't in the list, then OSGi doesn't know anything about it. See the next section for debugging this problem.
  • INSTALLED - This means that OSGi knows about your bundle but there is something wrong and it couldn't resolve. Problems may include thing from missing dependencies to requiring a higher Java VM version than you are running with. To get more information on why your bundle is not resolved try running the diag <bundle id> command, where <bundle id> is your bundle id or bundle symbolic name.
  • RESOLVED - If your bundle is resolved but you expected it to be started, then try starting your bundle from the command-line with the start 123 command. If it won't start, then you should get some feedback as to what the problem is.
  • <<lazy>> - This means your bundle is resolved and is marked to be lazy started. Everything should be ok.
  • ACTIVE - your bundle is resolved and has been started, everything should be working as planned.


(source: OSGi Service Platform – Core Specification)


For example: I want to check the bundle states for my company plugins so I will use the below command.

osgi> ss com.espressif

"Framework is launched."

id State       Bundle

6 RESOLVED    com.espressif.idf.branding_1.2.0.qualifier

7 ACTIVE      com.espressif.idf.core_1.0.0.qualifier

8 STARTING    com.espressif.idf.help_1.0.0.qualifier

9 ACTIVE      com.espressif.idf.launch.serial.core_1.0.0.qualifier

10 ACTIVE      com.espressif.idf.launch.serial.ui_1.0.0.qualifier

11 STARTING    com.espressif.idf.sdk.config.core_1.0.1.qualifier

12 STARTING    com.espressif.idf.sdk.config.ui_1.0.0.qualifier

13 STARTING    com.espressif.idf.terminal.connector_1.0.0.qualifier

14 STARTING    com.espressif.idf.terminal.connector.serial_1.0.0.qualifier

15 ACTIVE      com.espressif.idf.ui_1.0.0.qualifier

721 ACTIVE      com.espressif.idf.debug.gdbjtag.openocd_1.0.0.qualifier


References:

https://wiki.eclipse.org/Where_Is_My_Bundle

Monday, June 29, 2020

GNU MCU Eclipse Plugins

Source code:
https://github.com/eclipse-embed-cdt/eclipse-plugins


It took some time to find this plugin source code since there are multiple GitHub repositories under GNU MCU Eclipse Plugin

Check more on this here https://gnu-mcu-eclipse.github.io/

GNU MCU Eclipse plug-ins getting rebranded as The Eclipse Embedded CDT plug-ins for Arm & RISC-V C/C++ developers


Tuesday, May 26, 2020

How to change a default Java version in macOS X

Let me check the current Java version
$ java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)

In macOS Java is installed as part of /Library/Java/JavaVirtualMachines folder.

Let me go there.
$ cd /Library/Java/JavaVirtualMachines/

I want to set Java 11 as the default Java version. Let me check what all I've installed in my system.
$ pwd
/Library/Java/JavaVirtualMachines 

$ ls
jdk-11.0.7.jdk jdk-13.0.2.jdk jdk1.8.0_201.jdk

Let me set the default Java version to jdk-11.0.7.jdk
$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home/
$ export PATH=$JAVA_HOME/bin:$PATH

The above changes are applicable only for the current shell. To change permanently for all the shells you need set those two lines in the .bash_profile

First, go to the user home directory to run the below command
$ cd ~

$ pwd
/Users/kondal

$vim .bash_profile

Append the above two lines in the .bash_profile at the end, and save and exit.

All set.

Check again!

$ java --version
java 11.0.7 2020-04-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)

Good to go!!