<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to BackportEclipse32</title><link>https://sourceforge.net/p/rcpforms/doc/BackportEclipse32/</link><description>Recent changes to BackportEclipse32</description><atom:link href="https://sourceforge.net/p/rcpforms/doc/BackportEclipse32/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 20 May 2014 09:13:21 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/rcpforms/doc/BackportEclipse32/feed" rel="self" type="application/rss+xml"/><item><title>BackportEclipse32 modified by Remo Loetscher</title><link>https://sourceforge.net/p/rcpforms/doc/BackportEclipse32/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="backport-to-eclipse-32"&gt;Backport to Eclipse 3.2&lt;/h1&gt;
&lt;p&gt;Since Databinding is a 3.2 fe3 feature, and many forms enhancements were made in 3.3 too, it is recommended to use Eclipse 3.3 if at any way possible. &lt;br /&gt;
IIf there is no possible way, you can use the Eclipse 3.2 backport. It brings a special patched ve backport of Eclipse databinding, which will even support emf databinding. &lt;/p&gt;
&lt;p&gt;It is maintained in a branch 320_backport in the repository. Check it out, compile against Eclipse 3.2 and run the examples. &lt;br /&gt;
Be aware, that the examples only run when the swt native dlls (windows) are contained in the library path, e.g. add something like this to your vm arguments: &lt;br /&gt;
-Djava.library.path=d:\develop\swt320libs &lt;/p&gt;
&lt;p&gt;Eclipse &amp;gt;= 3.3 automatically sets a default realm when starting the workbench. Eclipse 3.2 does not know databinding, thus it does not. You need to add code to do this, e.g. in the main method of your rcp application; if you use feature or plugins, you need to set the real early in the startup process or wrap all binding calls into a runnable and start it with Realm.runWithDefault(). &lt;/p&gt;
&lt;h2 id="nice-things-about-the-backport"&gt;Nice things about the backport&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;the newest possible implementations of databinding were patched and ported, thus you get a lot of functionality even from Eclipse 3.4 for free &lt;/li&gt;
&lt;li&gt;RCPForms 3.2 backport is api compatible to RCPForms head; thus your investments are safe, rcpforms encapsulates the differences between 3.2 and 3.4. Just recompile your code against rcpforms 3.4 and you are done. &lt;/li&gt;
&lt;li&gt;EMF Databinding will work with 3.2 backport ! &lt;/li&gt;
&lt;li&gt;we save you a lot of time and know how to do the backport yourself &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="not-so-nice-things"&gt;Not so nice things&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;well, since there are loads of differences in Eclipse 3.2 vs. Eclipse 3.4 concerning data binding, form header decorations and the like, some rcpforms features wont work too well on Eclipse 3.2 backport. &lt;/li&gt;
&lt;li&gt;The backport will not be maintained by us. If you don't deliver patches, you have to stay with whats there at the moment. &lt;/li&gt;
&lt;li&gt;info decorator for fields is not available since not supported by Eclipse 3.2 &lt;/li&gt;
&lt;li&gt;Warning and error messages in the Form Decoration look a bit ugly; we just used what was there in Eclipse 3.2, but enhanced it by hacking a tooltip with all error messages in the form heading. &lt;/li&gt;
&lt;li&gt;table support has several limitations; only the things we needed are backported. The main use case of configuring a table works; some cell editors do not work optimally. Still you will do better fixing these bugs and sending patches than doing it all on your own. &lt;/li&gt;
&lt;li&gt;Databinding backport is quite hacked to get the most out of it; we took the following versions and combined them: &lt;/li&gt;
&lt;li&gt;org.eclipse.core.databinding tag R3_4, patched the Activator class and manifest.mf &lt;/li&gt;
&lt;li&gt;org.eclipse.core.databinding.beans tag R3_4 &lt;/li&gt;
&lt;li&gt;org.eclipse.jface.databinding tag R3_3 &lt;/li&gt;
&lt;li&gt;org.eclipse.emf.databinding 1.0.0.v200808251517 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Patch for org.eclipse.core.databinding: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="gh"&gt;Index: src/org/eclipse/core/internal/databinding/Activator.java&lt;/span&gt;
&lt;span class="gh"&gt;===================================================================&lt;/span&gt;
RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Activator.java,v
retrieving revision 1.2
&lt;span class="gh"&gt;diff -u -r1.2 Activator.java&lt;/span&gt;
&lt;span class="gd"&gt;--- src/org/eclipse/core/internal/databinding/Activator.java    11 Apr 2008 22:18:08 -0000    1.2&lt;/span&gt;
&lt;span class="gi"&gt;+++ src/org/eclipse/core/internal/databinding/Activator.java    8 Apr 2009 10:26:50 -0000&lt;/span&gt;
&lt;span class="gu"&gt;@@ -11,29 +11,16 @@&lt;/span&gt;

 package org.eclipse.core.internal.databinding;

&lt;span class="gd"&gt;-import java.util.ArrayList;&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-import org.eclipse.core.databinding.util.ILogger;&lt;/span&gt;
&lt;span class="gd"&gt;-import org.eclipse.core.databinding.util.Policy;&lt;/span&gt;
&lt;span class="gd"&gt;-import org.eclipse.core.runtime.CoreException;&lt;/span&gt;
&lt;span class="gd"&gt;-import org.eclipse.core.runtime.IStatus;&lt;/span&gt;
&lt;span class="gd"&gt;-import org.eclipse.osgi.framework.log.FrameworkLog;&lt;/span&gt;
&lt;span class="gd"&gt;-import org.eclipse.osgi.framework.log.FrameworkLogEntry;&lt;/span&gt;
&lt;span class="gd"&gt;-import org.osgi.framework.BundleActivator;&lt;/span&gt;
&lt;span class="gi"&gt;+import org.eclipse.core.runtime.Plugin;&lt;/span&gt;
 import org.osgi.framework.BundleContext;
&lt;span class="gd"&gt;-import org.osgi.util.tracker.ServiceTracker;&lt;/span&gt;

 /**
&lt;span class="gd"&gt;- * @since 3.3&lt;/span&gt;
&lt;span class="gd"&gt;- *&lt;/span&gt;
&lt;span class="gi"&gt;+ * The activator class controls the plug-in life cycle&lt;/span&gt;
  */
&lt;span class="gd"&gt;-public class Activator implements BundleActivator {&lt;/span&gt;
&lt;span class="gd"&gt;-    /**&lt;/span&gt;
&lt;span class="gd"&gt;-     * The plug-in ID&lt;/span&gt;
&lt;span class="gd"&gt;-     */&lt;/span&gt;
&lt;span class="gd"&gt;-    public static final String PLUGIN_ID = &amp;quot;org.eclipse.core.databinding&amp;quot;; //$NON-NLS-1$&lt;/span&gt;
&lt;span class="gi"&gt;+public class Activator extends Plugin {&lt;/span&gt;

&lt;span class="gd"&gt;-    private volatile static ServiceTracker _frameworkLogTracker;&lt;/span&gt;
&lt;span class="gi"&gt;+    // The shared instance&lt;/span&gt;
&lt;span class="gi"&gt;+    private static Activator plugin;&lt;/span&gt;

     /**
      * The constructor
&lt;span class="gu"&gt;@@ -41,62 +28,37 @@&lt;/span&gt;
     public Activator() {
     }

&lt;span class="gi"&gt;+    /*&lt;/span&gt;
&lt;span class="gi"&gt;+     * (non-Javadoc)&lt;/span&gt;
&lt;span class="gi"&gt;+     *&lt;/span&gt;
&lt;span class="gi"&gt;+     * @see&lt;/span&gt;
&lt;span class="gi"&gt;+     * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext&lt;/span&gt;
&lt;span class="gi"&gt;+     * )&lt;/span&gt;
&lt;span class="gi"&gt;+     */&lt;/span&gt;
     public void start(BundleContext context) throws Exception {
&lt;span class="gd"&gt;-        _frameworkLogTracker = new ServiceTracker(context, FrameworkLog.class.getName(), null);&lt;/span&gt;
&lt;span class="gd"&gt;-        _frameworkLogTracker.open();&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-        Policy.setLog(new ILogger() {&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-            public void log(IStatus status) {&lt;/span&gt;
&lt;span class="gd"&gt;-                ServiceTracker frameworkLogTracker = _frameworkLogTracker;&lt;/span&gt;
&lt;span class="gd"&gt;-                FrameworkLog log = frameworkLogTracker == null ? null : (FrameworkLog) frameworkLogTracker.getService();&lt;/span&gt;
&lt;span class="gd"&gt;-                if (log != null) {&lt;/span&gt;
&lt;span class="gd"&gt;-                    log.log(createLogEntry(status));&lt;/span&gt;
&lt;span class="gd"&gt;-                } else {&lt;/span&gt;
&lt;span class="gd"&gt;-                    // fall back to System.err&lt;/span&gt;
&lt;span class="gd"&gt;-                    System.err.println(status.getPlugin() + &amp;quot; - &amp;quot; + status.getCode() + &amp;quot; - &amp;quot; + status.getMessage());  //$NON-NLS-1$//$NON-NLS-2$&lt;/span&gt;
&lt;span class="gd"&gt;-                    if( status.getException() != null ) {&lt;/span&gt;
&lt;span class="gd"&gt;-                        status.getException().printStackTrace(System.err);&lt;/span&gt;
&lt;span class="gd"&gt;-                    }&lt;/span&gt;
&lt;span class="gd"&gt;-                }&lt;/span&gt;
&lt;span class="gd"&gt;-            }&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-        });&lt;/span&gt;
&lt;span class="gi"&gt;+        super.start(context);&lt;/span&gt;
&lt;span class="gi"&gt;+        plugin = this;&lt;/span&gt;
     }
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-    // Code copied from PlatformLogWriter.getLog(). Why is logging an IStatus so&lt;/span&gt;
&lt;span class="gd"&gt;-    // hard?&lt;/span&gt;
&lt;span class="gd"&gt;-    FrameworkLogEntry createLogEntry(IStatus status) {&lt;/span&gt;
&lt;span class="gd"&gt;-        Throwable t = status.getException();&lt;/span&gt;
&lt;span class="gd"&gt;-        ArrayList childlist = new ArrayList();&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-        int stackCode = t instanceof CoreException ? 1 : 0;&lt;/span&gt;
&lt;span class="gd"&gt;-        // ensure a substatus inside a CoreException is properly logged&lt;/span&gt;
&lt;span class="gd"&gt;-        if (stackCode == 1) {&lt;/span&gt;
&lt;span class="gd"&gt;-            IStatus coreStatus = ((CoreException) t).getStatus();&lt;/span&gt;
&lt;span class="gd"&gt;-            if (coreStatus != null) {&lt;/span&gt;
&lt;span class="gd"&gt;-                childlist.add(createLogEntry(coreStatus));&lt;/span&gt;
&lt;span class="gd"&gt;-            }&lt;/span&gt;
&lt;span class="gd"&gt;-        }&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-        if (status.isMultiStatus()) {&lt;/span&gt;
&lt;span class="gd"&gt;-            IStatus[] children = status.getChildren();&lt;/span&gt;
&lt;span class="gd"&gt;-            for (int i = 0; i &amp;lt; children.length; i++) {&lt;/span&gt;
&lt;span class="gd"&gt;-                childlist.add(createLogEntry(children[i]));&lt;/span&gt;
&lt;span class="gd"&gt;-            }&lt;/span&gt;
&lt;span class="gd"&gt;-        }&lt;/span&gt;

&lt;span class="gd"&gt;-        FrameworkLogEntry[] children = (FrameworkLogEntry[]) (childlist.size() == 0 ? null : childlist.toArray(new FrameworkLogEntry[childlist.size()]));&lt;/span&gt;
&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-        return new FrameworkLogEntry(status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), stackCode, t, children);&lt;/span&gt;
&lt;span class="gi"&gt;+    /*&lt;/span&gt;
&lt;span class="gi"&gt;+     * (non-Javadoc)&lt;/span&gt;
&lt;span class="gi"&gt;+     *&lt;/span&gt;
&lt;span class="gi"&gt;+     * @see&lt;/span&gt;
&lt;span class="gi"&gt;+     * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext&lt;/span&gt;
&lt;span class="gi"&gt;+     * )&lt;/span&gt;
&lt;span class="gi"&gt;+     */&lt;/span&gt;
&lt;span class="gi"&gt;+    public void stop(BundleContext context) throws Exception {&lt;/span&gt;
&lt;span class="gi"&gt;+        plugin = null;&lt;/span&gt;
&lt;span class="gi"&gt;+        super.stop(context);&lt;/span&gt;
     }

&lt;span class="gd"&gt;-&lt;/span&gt;
&lt;span class="gd"&gt;-    public void stop(BundleContext context) throws Exception {&lt;/span&gt;
&lt;span class="gd"&gt;-        if (_frameworkLogTracker != null) {&lt;/span&gt;
&lt;span class="gd"&gt;-            _frameworkLogTracker.close();&lt;/span&gt;
&lt;span class="gd"&gt;-            _frameworkLogTracker = null;&lt;/span&gt;
&lt;span class="gd"&gt;-        }&lt;/span&gt;
&lt;span class="gi"&gt;+    /**&lt;/span&gt;
&lt;span class="gi"&gt;+     * Returns the shared instance&lt;/span&gt;
&lt;span class="gi"&gt;+     *&lt;/span&gt;
&lt;span class="gi"&gt;+     * @return the shared instance&lt;/span&gt;
&lt;span class="gi"&gt;+     */&lt;/span&gt;
&lt;span class="gi"&gt;+    public static Activator getDefault() {&lt;/span&gt;
&lt;span class="gi"&gt;+        return plugin;&lt;/span&gt;
     }

 }
&lt;span class="gh"&gt;Index: META-INF/MANIFEST.MF&lt;/span&gt;
&lt;span class="gh"&gt;===================================================================&lt;/span&gt;
RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/META-INF/MANIFEST.MF,v
retrieving revision 1.14
&lt;span class="gh"&gt;diff -u -r1.14 MANIFEST.MF&lt;/span&gt;
&lt;span class="gd"&gt;--- META-INF/MANIFEST.MF    11 Apr 2008 22:18:08 -0000    1.14&lt;/span&gt;
&lt;span class="gi"&gt;+++ META-INF/MANIFEST.MF    8 Apr 2009 10:26:50 -0000&lt;/span&gt;
&lt;span class="gu"&gt;@@ -22,7 +22,9 @@&lt;/span&gt;
  org.eclipse.core.internal.databinding.observable.masterdetail;x-friends:=&amp;quot;org.eclipse.jface.tests.databinding&amp;quot;,
  org.eclipse.core.internal.databinding.observable.tree;x-friends:=&amp;quot;org.eclipse.jface.databinding,org.eclipse.jface.tests.databinding&amp;quot;,
  org.eclipse.core.internal.databinding.validation;x-friends:=&amp;quot;org.eclipse.jface.tests.databinding&amp;quot;
&lt;span class="gd"&gt;-Require-Bundle: org.eclipse.equinox.common;bundle-version=&amp;quot;[3.2.0,4.0.0)&amp;quot;&lt;/span&gt;
&lt;span class="gi"&gt;+Require-Bundle: org.eclipse.equinox.common;bundle-version=&amp;quot;[3.2.0,4.0.0)&amp;quot;,&lt;/span&gt;
&lt;span class="gi"&gt;+ org.eclipse.osgi,&lt;/span&gt;
&lt;span class="gi"&gt;+ org.eclipse.core.runtime;bundle-version=&amp;quot;3.2.0&amp;quot;&lt;/span&gt;
 Import-Package-Comment: see http://wiki.eclipse.org/
 Import-Package: com.ibm.icu.text,
  org.osgi.framework;version=&amp;quot;[1.4.0,2.0.0)&amp;quot;;resolution:=optional,
&lt;span class="gu"&gt;@@ -31,4 +33,5 @@&lt;/span&gt;
 Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
  J2SE-1.4
 Bundle-Activator: org.eclipse.core.internal.databinding.Activator
&lt;span class="gd"&gt;-Bundle-ActivationPolicy: lazy&lt;/span&gt;
&lt;span class="gi"&gt;+Eclipse-LazyStart: true&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Remo Loetscher</dc:creator><pubDate>Tue, 20 May 2014 09:13:21 -0000</pubDate><guid>https://sourceforge.net988553737a418a6e9791d2a1dc65b189285942b6</guid></item></channel></rss>