Skip to main content

Platform and Equinox API

Platform Changes

Enhanced IFile API for create/read/write

The org.eclipse.core.resources plug-in defines the following new methods:

  • IFile.create(byte[], boolean, boolean, IProgressMonitor)
  • IFile.create(byte[], int, IProgressMonitor)
  • IFile.write(byte[], boolean, boolean, boolean, IProgressMonitor)
  • IFile.setContents(byte[], boolean, boolean, IProgressMonitor)
  • IFile.setContents(byte[], int, IProgressMonitor)
  • IFile.readAllBytes()
  • IFile.readNBytes(int)
  • IFile.readAllChars()
  • IFile.readString()

These methods are for convenience and are optimized for performance, handling small files that do not require streaming.

SWT Changes

Enhanced BusyIndicator API for Futures

The BusyIndicator class defines the following new method:

  • static void showWhile(Future<?> future)

If called from a Display thread, it waits for the given Future to complete and provides busy feedback using the busy indicator. While waiting for completion, pending UI events are processed to prevent UI freeze. If there is no Display for the current thread, Future.get() will be called, ignoring any ExecutionException and no busy feedback will be displayed.

Previous Up Next

Back to the top