]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Revert "Fixed PropertyPageView to publish its selection to the workbench"
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 13 Dec 2018 11:43:35 +0000 (13:43 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 13 Dec 2018 11:43:35 +0000 (13:43 +0200)
This reverts commit 5675f72f9664c8ff275614d1ebe8a5a5d3014a98.

bundles/org.simantics.browsing.ui.platform/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.platform/src/org/simantics/browsing/ui/platform/PropertyPageView.java

index d95fd417dab2173f8d444553a30cdbb7c98d2c40..f70303d53f4c338d7565f18bfcdde8782c19897a 100644 (file)
@@ -13,8 +13,7 @@ Require-Bundle: org.eclipse.ui,
  org.simantics.views.swt;bundle-version="1.0.0",
  org.simantics.selectionview;bundle-version="1.0.0",
  org.simantics.utils.thread.swt;bundle-version="1.1.0",
  org.simantics.views.swt;bundle-version="1.0.0",
  org.simantics.selectionview;bundle-version="1.0.0",
  org.simantics.utils.thread.swt;bundle-version="1.1.0",
- org.eclipse.e4.core.contexts;bundle-version="1.1.0",
- org.slf4j.api;bundle-version="1.7.25"
+ org.eclipse.e4.core.contexts;bundle-version="1.1.0"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: org.simantics.browsing.ui.platform
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: org.simantics.browsing.ui.platform
index ed78ebc339004e7743a533c748801ea86d2461ac..05109c8132bef66da570f2448270949503be2f10 100644 (file)
@@ -43,8 +43,6 @@ import org.simantics.ui.workbench.IPropertyPage;
 import org.simantics.ui.workbench.ResourceInput;
 import org.simantics.utils.ui.BundleUtils;
 import org.simantics.utils.ui.SWTUtils;
 import org.simantics.ui.workbench.ResourceInput;
 import org.simantics.utils.ui.BundleUtils;
 import org.simantics.utils.ui.SWTUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * This is a version of the standard eclipse <code>PropertySheet</code> view a
 
 /**
  * This is a version of the standard eclipse <code>PropertySheet</code> view a
@@ -85,8 +83,6 @@ import org.slf4j.LoggerFactory;
  */
 public class PropertyPageView extends PageBookView implements IContributedContentsView {
 
  */
 public class PropertyPageView extends PageBookView implements IContributedContentsView {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(PropertyPageView.class);
-
     private static final String                   PROPERTY_VIEW_CONTEXT      = "org.simantics.modeling.ui.properties";
 
     private static final String                   PROP_PINNED                = "pinned";
     private static final String                   PROPERTY_VIEW_CONTEXT      = "org.simantics.modeling.ui.properties";
 
     private static final String                   PROP_PINNED                = "pinned";
@@ -196,6 +192,11 @@ public class PropertyPageView extends PageBookView implements IContributedConten
         //System.out.println("PPV init: " + this);
         super.init(site);
 
         //System.out.println("PPV init: " + this);
         super.init(site);
 
+        // This prevents the Properties view from providing a selection to other
+        // workbench parts, thus making them lose their selections which is not
+        // desirable.
+        site.setSelectionProvider(null);
+
         contextProvider = Simantics.getSessionContextProvider();
 
         if (!bootstrapOnly) {
         contextProvider = Simantics.getSessionContextProvider();
 
         if (!bootstrapOnly) {
@@ -385,8 +386,6 @@ public class PropertyPageView extends PageBookView implements IContributedConten
      *         <code>false</code> otherwise
      */
     boolean doSelectionChanged(IWorkbenchPart part, ISelection sel) {
      *         <code>false</code> otherwise
      */
     boolean doSelectionChanged(IWorkbenchPart part, ISelection sel) {
-        LOGGER.trace("doSelectionChanged({}): incoming selection {}", part, sel);
-
         // we ignore our own selection or null selection
         if (isPropertyView(part) || sel == null) {
             return false;
         // we ignore our own selection or null selection
         if (isPropertyView(part) || sel == null) {
             return false;
@@ -425,7 +424,6 @@ public class PropertyPageView extends PageBookView implements IContributedConten
             }
 
             if (!sameSelection) {
             }
 
             if (!sameSelection) {
-                LOGGER.trace("doSelectionChanged({}): updating page input selection to {}", part, sel);
                 updatePartName(ppage, sel);
                 ppage.selectionChanged(part, sel);
                 return true;
                 updatePartName(ppage, sel);
                 ppage.selectionChanged(part, sel);
                 return true;