Common Navigator Framework

Using CNF

Use-case-based topic description:

General CNF setup

The usage of CNF is about several questions. First of all, it is about definition of the CNF View. This is covered here.

  • Add org.eclipse.ui.navigator plugin dependency
  • Add the view definition (provide a hint to render the title)
  • Provide binding to content/filters/wizards ← here only the schema, the actual content is discussed later…(so the how and why goes here, the what is the subject of the next pages)

CNF content binding

The definition of the view in the previous section only provides an empty view. In order to see some content in it, it is required to provide the content binding. In this section three use cases are discussed:

Resource-oriented approach

CNF is used to provide a resource view.

  • Add org.eclipse.ui.navigator.resources plugin dependency
  • Add viewer content bindings, and action bindings
  • For usage in RCP see special section
Resources in RCP

For resources to work in CNF in RCP you need to:

  • IDE registerAdapters() ← this adds a dependency to ide-plugin
  • Set default page input

Resource/Non-Resource approach

CNF is used to provide content that follows the resource tree, but have some additions. E.G. providing some additional content for particular resources goes into this category.

  • Do everything you do for resources-oriented
  • Add some custom content
  • Add trigger points, children
  • Write providers

Non Resource-oriented approach

  • No org.eclipse.ui.navigator.resources dependency
  • Still the root is required: but now it is not the workspace root → info from your mail (so I understood it wrong too!)
  • Content definition (As in resource/non-resource)
  • Write providers
eclipse/cnf/start.txt · Last modified: %2009/%04/%29 %19:%Apr by admin
Translations of this page:
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0