Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] [CN] Updates for the Common Navigator in Platform 3.2


The core.resources plugin now has a dependency on the expressions plugin. It was added to allow the ModelProvider to use expressions to match resources of interest. I think it makes sense to have the resource based expressions there as well, especially considering that ModelProvider implementors will want to use them for their matching rules.


Nick Edgar/Ottawa/IBM@IBMCA
Sent by: platform-ui-dev-bounces@xxxxxxxxxxx

29/11/2005 09:52 AM

Please respond to
"Eclipse Platform UI component developers list."

"Eclipse Platform UI component developers list." <platform-ui-dev@xxxxxxxxxxx>
Re: [platform-ui-dev] [CN] Updates for the Common        Navigator        in        Platform        3.2


There are not currently any property testers at org.eclipse.core.resources
level.  There are some rudimentary ones at org.eclipse.ui.ide level, but I
was going to provide a fully featured one to support the Common Navigator
and other scenarios.  It should be at least as expressive as the
IActionFilter for resources.
While it would be better to put this in core.resources, core.resources
does not currently depend on core.expressions.  Let me check with the core
team to see how they feel about this.


Michael Elder <mdelder@xxxxxxxxxx>
Sent by: platform-ui-dev-bounces@xxxxxxxxxxx
11/29/2005 09:35 AM
Please respond to
"Eclipse Platform UI component developers list."

"Eclipse Platform UI component developers list."
platform-ui-dev@xxxxxxxxxxx, platform-ui-dev-bounces@xxxxxxxxxxx
Re: [platform-ui-dev] [CN] Updates for the Common Navigator     in
Platform        3.2

Hi Dirk,

     Your first point was my oversight. It wasn't apparent to me in the
documentation that enclosing the test element in adapt was required. When
following through the _expression_ in the debugger, it tested both
in series (adapts to IProject, then IProject.hasNature()). The use of
"args" instead of value can also be corrected. When looking for
documentation on the test element, I didn't see that it had a value

     The property tester is in a lone plugin in my workspace. Nick has
proposed that I release this property tester as part of
org.eclipse.ui.navigator.resources; at which point, the namespace will
change to match the plugin. I'll release this today and send out a new
version of the JDT patch with the changes that you have suggested.


Kind Regards,

Michael D. Elder
Rational Studio / Services Tools Development
Ext: (919) 543-8356
T/L:  441-8356

Tuesday, November 29, 2005 4:45 AM
To: "Eclipse Platform UI component developers list."
cc: platform-ui-dev@xxxxxxxxxxx, platform-ui-dev-bounces@xxxxxxxxxxx
From: Dirk Baeumer <dirk_baeumer@xxxxxxxxxx>
Subject: Re: [platform-ui-dev] [CN] Updates for the Common Navigator in
Platform    3.2

Hi Michael,

here some feedback to the use of the _expression_ language:

<adapt type="org.eclipse.core.resources.IProject" />
<test property="org.eclipse.core.resources.projectNature"
        args="org.eclipse.jdt.core.javanature" />

The current <adapt> _expression_ is superfluous since the element adapted to
IProject is only
visible inside of the adapt element. So the _expression_ should either look

<adapt type="org.eclipse.core.resources.IProject">
      <test property="org.eclipse.core.resources.projectNature"
      args="org.eclipse.jdt.core.javanature" />

or the adapt _expression_ can be removed assuming that the default variable
(or an
explicit provided variable) used is always of type IResource/IProject
on how the project nature tester is implemented)

Furthermore the test _expression_ looks strange to me as well. IMO it should

      <test property="org.eclipse.core.resources.projectNature"
      value="org.eclipse.jdt.core.javanature" />

since you are expecting the nature value to be
or the property name should be hasNature. I prefer the former.

And a more general question: which plug-in contains the implementation of
nature tester. If it is not the core resource plug-in (which I would
to be) then
the name space should not be org.eclipse.core.resources. The namespace
should always match the plug-in providing the tester.

Nick, is there any activity going on to provide resource specific property
in the core resources plug-in ?


            Michael Elder
            om>                                                        To
            Sent by:                  platform-ui-dev@xxxxxxxxxxx
            platform-ui-dev-b                                          cc
            g                                                     Subject
                                      [platform-ui-dev] [CN] Updates for
                                      the Common Navigator in Platform
            28/11/2005 03:34          3.2

            Please respond to
            "Eclipse Platform
              UI component
              developers list."

Changes have been made to the Common Navigator which require changes for
early adopters. The following 5 items will require some reaction from

(1)        Expressions converted to org.eclipse.core.expressions.

<objectClass name="org.eclipse.core.resources.IWorkspaceRoot" />

<instanceof value="org.eclipse.core.resources.IFile" />

<objectClass name="org.eclipse.core.resources.IWorkspaceRoot"
            adapt=?true? />

<adapt type="org.eclipse.core.resources.IWorkspaceRoot" />

  <objectClass name="org.eclipse.core.resources.IProject"
  adapt=?true? />
  <objectState name="nature"
  value="org.eclipse.jdt.core.javanature" />

  <adapt type="org.eclipse.core.resources.IProject" />
  <test property="org.eclipse.core.resources.projectNature"
        args="org.eclipse.jdt.core.javanature" />

(2)        ?enablement? split into two more focused expressions:
?triggerPoints? and ?possibleChildren? ? see schema doc for
(3)        navigatorViewer renamed to viewerContentBinding ? see schema
for viewerContentBinding. Also, the rootContentExtensionId attribute has
also been reformed as part of the enhanced viewer configuration. Clients
may now specify regular expressions to describe the content extensions
should be included or excluded.


New:        <viewerContentBinding

        isRoot=?true? />

(4)        The popup menu id of ?viewerContentBinding? now defaults to the
viewer id, but can be overridden in the viewerContentBinding extension
point (formerly navigatorViewer).

(5)        Each extension has three states that are relevant. For
consistency, the following terms have specific meanings:
visible: A content extension is visible if the set of aggregated includes
and excludes statements for all viewerContentBindings allow the extension
to be invoked by a viewer.
active: A content extension is active if the user has not disabled the
content extension in the ?Available types of content? dialog and/or the
enabledByDefault attribute of the navigatorContent extension allows the
content extension to be ?active?
enabled: A content extension is enabled for a specific element only if it
contributed the element to the viewer or the element matches its
triggerPoints _expression_ in the navigatorContent extension point.

The full change log for the release:

Resolving several defects [..]
+ 117591 [CommonNavigator] References to the AWT and Swing libraries
be removed
+ 116690 [CommonNavigator] View title is blank
+ 114993 [CommonNavigator] Missing NLS message
+ 116685 [CommonNavigator] ClassCastException trying to execute action
+ 115130 [CommonNavigator] Port the ActionExpression enablement classes to


+ 116460 [CommonNavigator] Code review comments

The following issues from the review have been addressed.

General issues

Illegal internal refs:
- Should use org.eclipse.core.expressions, not old action filter
expressions and
IActionFilter (ActionExpression is internal to UI, not API).  It's more
and extensible, and it's API.
- WorkbenchMessages -  Copy strings if necessary.
- WorkbenchPlugin - Registries are available via API on IWorkbench (or
should be).
- IWorkbenchHelpContextIds - Need to decide whether CN should define its
help ids here, or whether we need to expose some Workbench ones as API.
- Assert - Use the one in JFace.

Fix up copyright header in .java files (e.g. copy from IWorkbench,
dates accordingly).

Fix up deprecations:
- WorkbenchHelp -> IWorkbench.getHelpSystem

- All plug-ins should have about.html.  Can copy from org.eclipse.ui.
Important: if any content did not come directly from us this needs to be
and reviewed before we can put it under the EPL.

NLS: Need to externalize all human-readable strings in code and plug-in
manifests (except for log messages).  Ensure the corresponding JDT and PDE
compiler settings generate errors.  Use project-specific settings, and
they're shared in CVS (e.g. copy the settings from
Mark strings that should not be externalized with  //$NON-NLS-#$. Ctrl+1
friend for these.  Note: Job names do show up in the UI, in the Progress
indicator and view, and should be externalized.
Extension points:
   - class attributes should be of Kind "java" with type name specified

Based On property
@since tags:
- Need @since 3.2 tags on all API types. file:
- ensure it is accurate for all projects
- proper source folders for jars (top pane)
- proper files and folders for source and binary builds (excluding source

folders in top pane)
- binary build must have: plugin.xml,, META-INF dir,
any icon dirs
   - source build must include xpt schemas
   - property_files/
 - is this used (in addition to


+115486        [CommonNavigator] [arch] Navigator viewers should be more
The former "navigatorViewer" extension point has been renamed to
The new extension point defines two elements 'includes' and 'excludes'
which can describe (using regular expressions) which content extensions
should be visible to the viewer with the given viewer id. This extension
point augments one existing org.eclipse.ui.views extension and potentially
multiple org.eclipse.ui.navigator.navigatorContent extensions.
+114931 [CommonNavigator] Filtering by types of content shws all content
As part of 115486, the "Filter by types of content" dialog now only shows
extensions which are described by one or more
org.eclipse.ui.navigator.viewerContentBinding extensions.
+ 114940 [CommonNavigator] [Discussion] Navigator extensions only operate
at one level
Extensions now automatically are given the opportunity to contribute
children to elements they have already contributed.
+ 115123 [CommonNavigator] [API] Update extension point schema doc for
The extension point schema has been further update. This defect will be
closed for now, but please provide feedback and re-open if there are
still areas that need clarification.

+ 118170 [CommonNavigator] [Resource] Support Open/Open With menu
Added open/open with menu and retargetable action with actionId
+ 117065 [CommonNavigator] Should support better filtering of duplicate
Extensions may now define filters with their extension which are
not known to the user, and are active only when the content extension is

The attached patch is for the working version of the Java extension. No
changes have been addressed yet from the code review from Dirk ( , but these are on
there way. This patch is for clients that are experimenting with the Java
extension in their environments.

For clients that are interested in the override discussion, I think the
final conclusion is that the ability to override specific extensions for
navigatorContent and actionProvider will be required. That will be next
delivery of functoinality for the Common Navigator framework. In addition,
a 'depends' attribute may allow more relative prioritizing of extensions
instead of the generic (Lowest ... Highest) scale.

For clients that are anxiously anticipating other feature enhancements,
thank you for your patience as we stablize the API and base framework
through the M4 milestone. Other more 'feature' type enhancements will be
addressed in M5.

Kind Regards,

Michael D. Elder
Rational Studio / Services Tools Development
Ext: (919) 543-8356
T/L:  441-8356
(See attached file: org.eclipse.jdt.ui_patch.txt)
platform-ui-dev mailing list
(See attached file: org.eclipse.jdt.ui_patch.txt)
platform-ui-dev mailing list

(Attachments removed)_______________________________________________
platform-ui-dev mailing list

platform-ui-dev mailing list

Back to the top