Hi

As I described in the my previous comment, it is possible to use activities
to permit or restrict the access to some preference pages. But there is one
more problem. There is no information about pluginId in
org.eclipse.ui.internal.preferences.WorkbenchPreferenceExtensionNode. The
method WorkbenchPreferenceExtensionNode#getPluginId always returns null. But
the RCP provide the pluginId correctly.

It seems that we have to reduce differences between implementations of
WorkbenchPreferenceExtensionNode on RAP and RCP platforms.

I attached the patch.

Thank you, Igor
### Eclipse Workspace Patch 1.0
#P org.eclipse.rap.ui.workbench
Index: Eclipse 
UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java
===================================================================
RCS file: 
/cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.ui.workbench/Eclipse 
UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java,v
retrieving revision 1.5
diff -u -r1.5 WorkbenchPreferenceExtensionNode.java
--- Eclipse 
UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java    
    1 Aug 2008 13:11:01 -0000       1.5
+++ Eclipse 
UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java    
    10 May 2009 12:58:35 -0000
@@ -52,6 +52,8 @@
        
        private int priority;
 
+       private String pluginId;
+       
        /**
         * Create a new instance of the reciever.
         * 
@@ -61,6 +63,7 @@
        public WorkbenchPreferenceExtensionNode(String id, 
IConfigurationElement configurationElement) {
                super(id);
                this.configurationElement = configurationElement;
+               this.pluginId = configurationElement.getNamespaceIdentifier();
        }
 
        /**
@@ -203,7 +206,7 @@
         * @see 
org.eclipse.ui.activities.support.IPluginContribution#getPluginId()
         */
        public String getPluginId() {
-               return null;
+               return pluginId;
        }
 
     /* (non-Javadoc)
_______________________________________________
rap-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/rap-dev

Reply via email to