Skip to main content

Platform and Equinox API

Platform Changes

New API for JFace TextViewers: IMultiTextSelection JFace Text now supports a new type of ITextSelection that allows to keep track of multiple simultaneous selections or caret locations. The new interface is IMultiTextSelection.

Most text manipulation operations are capable of working with IMultiTextSelection. Some other operations may need to be customized to handle this IMultiTextSelection more specifically.

Enable "Select All" with IFindReplaceTargetExtension4 The extension interface IFindReplaceTargetExtension4 can be added to existing IFindReplaceTarget implementations in order to enable the Select All feature from the Find/Replace dialog. It consists of addition of a single setSelection(IRegion[] regions) method.
Double click on Problem without File shows in default view Double click on Problems executes "Go to Resource". But there are cases where no File (column "Path") is associated with the Problem. In those cases "Go to Resources" cannot be executed. Instead the new defaultShowIn view is opened. It is optional and can be configured per perspective using the defaultShowIn attribute. Example:

      <perspective
            name="MyPerspective"
            icon="$nl$/icons/eview16/plugins.png"
            class="org.eclipse.pde.internal.ui.PDEPerspective"
            defaultShowIn="org.eclipse.ui.navigator.ProjectExplorer"
            id="org.eclipse.pde.ui.PDEPerspective">
         <description>My own Perspective</description>
      </perspective>
	  
The default is also moved to the top of the "Show In" Context Menu.
Resource cache in Jface We added a LRU cache for image resources. It can be disable with system property: org.eclipse.jface.resource.cacheSize=0
The default cacheSize is 300.
In the eclipse IDE it is used to automatically cache the icons of the toolbars.
See DeviceResourceDescriptor(boolean shouldBeCached) for details.

SWT Changes

Windows dark theme styles title bar bars The windows title bar in the dark theme on Windows OS is now styled:

On Windows 10, all the dark theme tweaks including the dark title bar can be disabled using the org.eclipse.swt.internal.win32.disableCustomThemeTweaks Java property.
For Example: add this VM argument in eclipse.ini or on the command line after -vmargs:

-Dorg.eclipse.swt.internal.win32.disableCustomThemeTweaks=true
Display.syncCall() returns a value from SWT thread Do you need a user feedback (or any value from swt widget) in a background thread from SWT thread? You can get it now even easier then using Display.syncExec():
Object result = Display.getDefault().syncCall(()-> myQuestion())
Display.syncCall(...) calls the given function in swt thread and returns the value back to the calling thread.
SyncCall also forwards checked Exceptions. For example:
try {
	int read = Display.getDefault().syncCall(()->System.in.read());
} catch (IOException e) {
	/* handle exception in background thread */
}
Tree fires SWT.EmptinessChanged event SWT Tree widget now fires SWT.EmptinessChanged event on below two conditions:
  • After first tree item addition.
  • On last tree item removal.

Equinox p2 Changes

Log unsafe transport or verification technologies used at installation When installing from a repository, p2 now logs a warning in case some technologies used for the installation are considered unsafe. Here are the cases covered so far and that will trigger a logged warning:
  • http repositories are used (http repositories expose to CVE-2021-41033)
  • Artifact checksums are either missing, or none of the available digest algorithms is considered safe (eg md5).

Previous Up Next

Back to the top