Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

What's New in 3.5

Here are descriptions of some of the changes of interest to plug-in developers made to the Eclipse Platform, Equinox and SWT for the 3.5 release of Eclipse.

There are also many new features oriented towards end-users of the platform that can be viewed in the What's new section of the Workbench User Guide.

Platform Changes
Declarative services added to the platform The Eclipse rich client platform now includes an implementation of OSGi declarative services (DS). This allows a lazy-starting plug-in to make OSGi services available to other plug-ins before it has been started. Finally the powerful OSGi dynamic service architecture can be fully exploited in the Eclipse world of lazy activation. DS also includes support for dependency injection, so services can be injected into plain old Java objects (POJOs), without adding a dependency on the OSGi framework into your application code. This new platform bundle is complemented by new tooling support in PDE for declarative services.
Compare Core Plug-in Some of the patching functionality provided by the compare plug-in has been refactored into a separate org.eclipse.compare.core plug-in that can be used by headless Eclipse applications
Improved look for filtered tree The button for clearing the filter field of filtered trees has been moved into the text box, even for platforms that don't have a native search field with this functionality.

For backwards compatibility reasons, existing subclasses of FilteredTree will not get the new look automatically. Clients of the FilteredTree are encouraged to switch to the new look as recommended in the porting guide.

New look of filter field

Multiple fonts in one cell The existing owner draw support for JFace TableViewer and TreeViewer has been extended to allow multiple fonts within cells. For example, this can be used to highlight matching text in search results using a bold font.

Table with normal and bold font within the same cells

Using sheets on Mac Cocoa For general prompts and dialogs regarding editors, or the current Workbench window, sheets are now used on Mac Cocoa. In addition to the new style bit SWT.SHEET, new API has been added to MessageDialog and MessageDialogWithToggle so that clients can set the appropriate style for their dialogs.

Prompting to save using a sheet

JFace dialog button order on GTK+ JFace dialogs now respect the default button order on the GTK+ platform. Example: "Cancel" "OK". It is possible to revert the order used by SWT and JFace, see Alternate button order.

Preference Dialog showing Cancel, OK

New "check state" provider JFace now has a new type of provider, called ICheckStateProvider, that can be used to manage the checked and gray states of elements in CheckboxTableViewer or CheckboxTreeViewer objects. This is useful in situations where the viewer should come up with pre-checked elements, or when the check state changes are not always triggered by the user.
Show welcome checkbox A checkbox can be added to a welcome page that will cause the welcome to show when Eclipse is restarted, even if it was closed previously. The unextended Eclipse platform does not show this checkbox, but it can be added using an intro extension that uses the class AlwaysWelcomeCheckbox as a content provider.

The example below shows this checkbox added to the What's New page.

Show Welcome checkbox

Help content filter A new extension point org.eclipse.help.webapp.contentFilter allows for pre-processing of help content before it is delivered from the help server.
Jetty version 6.1 Version 6.1 of the Jetty Web server is now included in the platform, replacing the 5.1 version in the previous release. This brings along an implementation of version 2.5 of the javax.servlet API, replacing the 2.4 version in the Ganymede release.
New release of ICU4J The platform has adopted a major new release of the ICU4J localization library: version 4.0. This release includes support for Unicode 5.1, and the Unicode standard Common Locale Data Repository (CLDR) 1.6 See the ICU4J 4.0 release notes for more details.
Extensible installation details The About Dialog now provides a mechanism for plug-ins to contribute installation pages to the platform about dialog. The buttons for showing feature, plug-in, and configuration details have been replaced by a single Installation Details button.

About Dialog with Installation Details button

Pushing this button will launch a dialog that shows all of the installation pages contributed by plug-ins in a single Installation Details dialog. Plug-ins may contribute installation pages and define buttons that operate on the information in the installation page.

Installation Details dialog showing contributions from multiple plug-ins

The new extension point is org.eclipse.platform.ui.installationPages. Example implementations can be found by browsing the hierarchy of org.eclipse.ui.about.InstallationPage.

New intro theme A new intro theme called "Slate" has been added. Slate is not the default theme for Eclipse but can be specified using the preference org.eclipse.ui.intro/INTRO_THEME=org.eclipse.ui.intro.universal.slate. The main differences in the root page between the new theme and the two existing themes are:
  • Each link has a label.
  • The images are transparent and will display well if a background is added using an extension.
  • The page displays well at high screen resolutions.

Slate intro theme

Non root pages also have a label for each link.

Slate overview page.

Equinox Changes
New publisher bundle p2 has introduced a new bundle called the publisher, which provides infrastructure for generating, packaging, and publishing metadata and artifacts into p2 repositories. The publisher provides an extensible API that clients can extend to perform customized publishing to repositories, and includes an advice mechanism for injecting additional metadata into the generation and packaging process.
New Equinox concurrency API This release includes a new provisional API for futures. Futures facilitate handling of concurrency and synchronization in multi-threaded and/or distributed systems. They serve as a proxy for a result that is not known, because the computation of the result is not yet complete. See the wiki documentation for more details on this new experimental concurrency API.
Enhanced DebugOptions The Equinox DebugOptions API has been enhanced to support dynamic changes to option settings. Now debug option settings can be modified while an application is running to facilitate problem determination and support. A new interface, DebugOptionsListener, can be registered as a service to enable your plug-in to respond to dynamic debug option changes.
New tracing API A new debug tracing API, org.eclipse.osgi.service.debug.DebugTrace, has been added to enhance and simply writing of debug trace messages in your code. The DebugTrace object will take care of writing additional trace information along with your message, such as your bundle symbolic name, and the class, method, and line in which the tracing message was written. This reduces clutter in the code being traced, while ensuring that consistent and complete contextual information is recorded. The tracing data can either be directed to a file, or written on stdout, depending on the setting of DebugOptions#setFile. By default the Eclipse platform will write trace data to the file trace.log in the workspace metadata location (next to the platform log file).
Security Manager enhancements This release includes an implementation of the updated Conditional Permission Admin Specification included in the OSGi Service Platform Core Specification Release 4, Version 4.2. This version of the specification includes enhancements to the Conditional Permission Admin service which is used to manage the permissions assigned to bundles. The enhancements include adding the ability to grant or deny permissions based on conditions, and to manage conditions as an ordered list of rules. For more information see the OSGi Release 4 Version 4.2 specification.
OSGi service registry enhancements This release includes an implementation of the new Service Hooks Specification included in the OSGi Service Platform Core Specification Release 4, Version 4.2. Certain specialized bundles need to be able to alter output results of service layer's find and event delivery operations to affect their purpose. The Service Hooks Specification enhances the service registry to allow service registry hooks to affect the service registry's find and event delivery operations.

The Service Hooks Specification is targeted at bundles which need to observe and react to selected service layer operations. In general these will be highly specialized bundles written by systems programmers. The is not intended to be used by so-called "normal" application bundles. For more information see the OSGi Release 4 Version 4.2 specification.

OSGi framework launching The OSGi Service Platform Core Specification Release 4, Version 4.2 defines a standard way to launch an OSGi framework implementation. This release of Equinox includes an implementation the OSGi standard launching APIs. A framework implementation must provide a factory class. A factory class is an indirection to create a framework implementation object. The implementation factory class must implement the FrameworkFactory interface. A launcher can use the following ways to get this class name:
  • The Java-SE Service Provider Configuration model.
  • Get it from some configuration and use Class.forName.
  • Hardcode the factory name.
To create a framework instance a launcher uses the FrameworkFactory to constructs the implementation's Framework object. The Framework can then be used to control the lifecycle of the framework (e.g. start, stop, update etc.) The org.eclipse.osgi.launch.EquinoxFactory class is the public class in Equinox which implements the new org.osgi.framework.launch.FrameworkFactory interface.

This Release 4, Version 4.2 specification also defines standard configuration properties which all framework implementations must recognize. This allows for a generic framework launcher to be implemented that can launch any framework implementation. For more information see the OSGi Release 4 Version 4.2 specification.

OSGi Declarative Services Changes This release includes an implementation of the updated Declarative Services Specification included in the OSGi Service Platform Core Specification Release 4, Version 4.2. The following list highlights the changes to Declarative Services for Version 4.2 of the OSGi Specification:
  • The definition of the Service-Component header now uses the definition of a header from the module layer. It also allows wild-cards to be used in the last component of the path of a header entry.
  • The DS runtime now follows the recommendations of Property Propagation and does not propagate properties whose names start with '.' to service properties.
  • The component description now allows for a configuration policy to control whether component configurations are activated when configuration objects are present or not.
  • The component description now allows the names of the activate and deactivate methods to be specified. The signatures of the activate and deactivate methods are also modified.
  • Additional signatures of the bind and unbind methods have been added.
  • The definition of accessible methods for activate, deactivate, bind and unbind methods is expanded to include any method accessible from the component implementation class. This allows private and package private method declared in the component implementation class to be used.
  • The XML schema and name space have been updated to v1.1.0. It now allows for wild-carded attributes and elements for extensibility. The name attribute of the component element is now optional and the default value of this attribute is the value of the class attribute of the nested implementation element. The name attribute of the reference element is now optional and the default value of this attribute is the value of the interface attribute of the reference element. The Char type for the property element has been renamed Character to match the Java type name. The attributes configuration-policy, activate and deactivate have been added to the component element.
  • When logging error messages, SCR now uses a LogService obtained using the component's bundle context so that the resulting log entry is associated with the component's bundle.
  • Target properties are now component properties that can be set wherever component properties can be set, including configurations.

For more information see the OSGi Release 4 Version 4.2 specification.

New core framework API The OSGi Service Platform Core Specification Release 4, Version 4.2 is adding a number of small API additions to the core Framework. The following is a list of API additions included in this release.
org.osgi.framework.Bundle#getVersion()
Returns the Version of a bundle.
org.osgi.framework.Bundle#getSignerCertificates()
Returns the signers of a bundle.
org.osgi.framework.BundleException#getType()
Returns the error type for a BundleException. For example, a resolver error.
org.osgi.framework.BundleReference
Interface which must be implemented by bundle classloaders. This gives clients the ability to determine what bundle a ClassLoader is for.
org.osgi.framework.Constants
A number of new constants have been added to define standard launching configuration properties.
org.osgi.framework.FrameworkEvent
A number of new FrameworkEvent types have been added give launchers standard notification when a framework is stopped or restarted.
org.osgi.framework.FrameworkUtil#getBundle(Class)
Utility to get a Bundle object for a given class. A static method equivalent to the PackageAdmin#getBundle(Class) method.
org.osgi.framework.FrameworkUtil#matchDistinguishedNameChain(String, List)
Utility to match a certificate chain against a pattern. This is used for permission and condition checks against signed bundles.
org.osgi.framework.ServiceEvent
A new ServiceEvent type has been added to indicate the properties of a registered service have been modified and the new properties no longer match a listener's filter.
org.osgi.framework.ServiceException
A new ServiceException type has been added to indicate that a service problem occurred.
org.osgi.util.tracker.BundleTracker
The BundleTracker class simplifies tracking bundles much like the ServiceTracker simplifies tracking services.
Composite bundles This release includes an implementation of the Composite Bundles specification. The Composite Bundles specification is a proposed specification for the OSGi Release 4, Version 4.2 specification. In a large system built upon a large number of modules, sometimes it is necessary to provide a mechanism for isolating the various modules from each other at runtime. Composite Bundles introduces a concept to provide isolation for a group of bundles.

Conceptually a composite bundle is composed of a set of bundles which are contained in another (nested) framework instance. New API is introduced in the org.osgi.service.framework package to manage composite bundles. The CompositeBundleFactory service interface is used to install composite bundles. The CompositeBundle interface is used to manage the bundles which compose a composite bundle.

For more information see the OSGi Release 4 Version 4.2 specification.

Note: The API introduced in the org.osgi.service.framework package is a proposed OSGi API. This API is considered provisional in Equinox and may change drastically or be dropped altogether in a future release of Equinox. We encourage use of the API and any feedback on the specification, but consumers must be aware that breaking changes may occur in a future release.

SWT Changes
Cairo on AIX Cairo support has been added to Eclipse on AIX. This enables advanced graphics support on AIX.

Cairo on AIX

JNI Generator A new plug-in based tool has been added to simplify the process of generating the SWT JNI code. For more info click here.

Cairo on AIX

Block selection in StyledText StyledText can be switched into block selection mode with new API StyledText.setBlockSelection(true).

Block Selection in StyledText

JavaScript-to-Java JavaScript can now call out to Java in the Browser widget. Supported types are numbers, booleans, strings, null, and arrays (example snippet).
Improved Java-to-JavaScript Java can now call into JavaScript. An expression is evaluated in the context of a Browser document and a value is returned. Supported types are numbers, booleans, strings, null's, and arrays (example snippet).
New caret listener New API has been added to StyledText to allow you to listen for changes in the caret offset. See StyledText.addCaretListener() and StyledText.removeCaretListener() for more information.
New text editor demo This new example makes extensive use of StyledText to demonstrate how it can be used to create a multi-font rich text editor with bullets, links and embedded objects.

Text Editor

Improved search field The SWT.SEARCH style is now supported on all platforms, allowing the application to display a text message when the control is awaiting input. The SWT.ICON_SEARCH and SWT.ICON_CANCEL hints control the appearance of the search field (example snippet).

Text with SWT.SEARCH

Improved copy and paste support Support has been added to the FileTransfer class to allow for copy/paste operations between the Explorer and the Nautilus file manager.

Nautilus copy

StyledText margin spacing and color New API has been added to StyledText to set margin spacing and color. See Snippet316.

StyledText with margins

Disabling Javascript Javascript can be disabled from running in a Browser with the new API Browser.setJavascriptEnabled(boolean).
Browser wants a cookie Cookies can be created and accessed in the Browser with new API Browser.setCookie() and Browser.getCookie().
Authentication listener Browser clients can now provide a listener that responds to basic authentication challenges. This is useful for enabling users to access sites without presenting them with a manual authentication prompter. See Snippet317.
Shell modified state hint New API has been added to Shell to provide a user hint that the window is in a modified state. See Snippet314.

Shell.setModified

DateTime DROP_DOWN DateTime widgets created with SWT.DATE style can now also have SWT.DROP_DOWN style.

DateTime with DROP_DOWN style

SWT.SHEET style for Shell and Dialog Sheet windows are now supported on Mac OS X Cocoa.

Shell with SWT.SHEET style

Mozilla browser support on Solaris x86 Mozilla browser support has been added to the Solaris x86 platform.

Solaris x86 Browser

Improved DND feedback on Cocoa Cocoa drag and drop in trees and tables is now fully supported. Aside from the visual feedback, other native features are supported, such as automatic collapse of tree items when the drag is finished.

Cocoa drag and drop feedback

Paper orientation Applications can now programmatically select portrait or landscape mode when printing, or when opening a PrintDialog. See Snippet318.

PrintDialog seeded with Landscape orientation


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire