• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
A Summary Of Sat Accumulation

A Summary Of Sat Accumulation






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    A Summary Of Sat Accumulation A Summary Of Sat Accumulation Presentation Transcript

    • A Summary of SAT Accumulation Proving SOA & Asset Reuse work with IBM’s Globally Integrated Enterprise Strategy Authors: Huang Wei
    • Agenda
      • 1. CBM extension
        • 1.1 Customize the Tabview
        • 1.2 Modify the CBM model
      • 2. CNF extension
        • 2.1 objectContribution
        • 2.2 viewContribution
        • 2.3 actionProvider
      • 3. EMF related
      • 4. SWT/JFace & Plugin related
    • 1.1 CBM extension - Customize the Tabview
      • Now, CBM tool supplies with an extension point called com.ibm.almaden.asr.cbm.activities.activity
      • (in the final release may be a more general one)
        • Extend it to override the content of the Activity Tabview
    • 1.1 CBM extension - Customize the Tabview
    • 1.2 CBM extension – Modify the CBM model
      • Now we can modify the existing element of CBM model(e.g. modify a component, delete a component).
      • Besides, we can also add our own element to CBM model(e.g. add a Function Set, add a Function Item under Function Set).
    • 2. CNF extension
      • CNF extension here means the left navigator viewer extension. The CBM tool has hooked some content on the viewer.
      • Now we have our own model (in the future will be the SAT model).
      • So with the help of CNF, we can also hook what we want on it.
      • e.g. we add some function sets under the enterprise element.
    • 2.1 CNF extension – objectContribution
      • objectContribution means contribution to a single object
      • We specify the object target class in the plugin.xml
      <objectContribution adaptable=&quot;false&quot; id=&quot;com.ibm.test.testcbm.actions.ActivityCreateAction&quot; objectClass=&quot;com.ibm.almaden.asr.cbm.metamodel.BusinessComponent&quot;> <action class=&quot;com.ibm.test.testcbm.actions.ActivityCreateAction&quot; enablesFor=&quot;1&quot; icon=&quot;eclipse-icons/add_att(1).gif&quot; id=&quot;ActivityMenu&quot; label=&quot;Create an activity&quot; tooltip=&quot;create it&quot;/> </objectContribution>
    • 2.1 CNF extension – objectContribution
      • If it’s under the popupMenu extension point, it should be like this:
    • 2.2 CNF extension – viewContribution
      • viewContribution means contribution to a viewer
      • we can hook some action to the toolbar or triangle button of the view
    • 2.3 CNF extension – actionProvider
      • actionProvider means if you select one element in the navigator view, then you can hook actions action (e.g. double-click the element) and contextMenu on it.
      • In the plugin.xml, define an actionProvider under org.eclipse.ui.navigator.navigatorContent point,
      • then define the matching viewerActionBinding under org.eclipse.ui.navigator.viewer , included by the instance of com.ibm.almaden.asr.navigator.view.CBMCommonNavigator
    • 2.3 CNF extension – actionProvider
    • 3. EMF related
      • As we know, no matter which way (in the navigator tree or in the table of tabview) to show the model, we should give a contentProvider and a labelProvider.
      • However, if we implement the original JFace I**Provider, the notification should be handled by ourselves. That’s a trouble when facing changes.
      • So, we can use the provider code generated by EMF genmodel. Each model element has its ItemProvider. And with the help of **TestcbmItemProviderAdapterFactory (it is an adapter), we can adapt the I**ItemProvider hierarchy of EMF to the I**Provider hierarchy of JFace.
    • 3. EMF related Not generated Adapter Ref: http://www.cnblogs.com/bjzhanghao/articles/324909.html
    • 4. SWT/JFace & Plugin related
      • FormLayout
        • Use this layout style as a principle (it’s really convenient)
      • Section
        • Use toolkit.create** method to create a widget
        • Otherwise, if using “new” to create, you have to invoke the toolkit.adapt method to ensure section and the widget has the consistent style
      • CBMEditingDomain. INSTANCE .runAsWrite
        • Control the scope of the thread code the less the better
      • **EditorInput.equals
        • Override this method, so that an object has its single editor
      @Override public boolean equals(Object arg0) { if (arg0 instanceof MyElementEditorInput) { MyElementEditorInput input = (MyElementEditorInput) arg0; if (input.getModel() == this.getModel()) return true; } return false; } //~MyElementEditorInput.java
    • 4. SWT/JFace & Plugin related
      • “ Monkey See Monkey Do”
        • Eclipse CVS examples
          • Host: dev.eclipse.org
          • Repository Path: /cvsroot/eclipse, /cvsroot/modeling, /cvsroot/tools
        • CBM tool itself
      • Refresh Problems
        • Ensure the **Provider is able to notify the propertyChangeEvent
        • 2 examples till now
          • Navigator tree
          • Activity tabview