Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A Summary Of Sat Accumulation

449 views

Published on

Published in: Technology, Business
  • Be the first to comment

A Summary Of Sat Accumulation

  1. 1. A Summary of SAT Accumulation Proving SOA & Asset Reuse work with IBM’s Globally Integrated Enterprise Strategy Authors: Huang Wei
  2. 2. Agenda <ul><li>1. CBM extension </li></ul><ul><ul><li>1.1 Customize the Tabview </li></ul></ul><ul><ul><li>1.2 Modify the CBM model </li></ul></ul><ul><li>2. CNF extension </li></ul><ul><ul><li>2.1 objectContribution </li></ul></ul><ul><ul><li>2.2 viewContribution </li></ul></ul><ul><ul><li>2.3 actionProvider </li></ul></ul><ul><li>3. EMF related </li></ul><ul><li>4. SWT/JFace & Plugin related </li></ul>
  3. 3. 1.1 CBM extension - Customize the Tabview <ul><li>Now, CBM tool supplies with an extension point called com.ibm.almaden.asr.cbm.activities.activity </li></ul><ul><li>(in the final release may be a more general one) </li></ul><ul><ul><li>Extend it to override the content of the Activity Tabview </li></ul></ul>
  4. 4. 1.1 CBM extension - Customize the Tabview
  5. 5. 1.2 CBM extension – Modify the CBM model <ul><li>Now we can modify the existing element of CBM model(e.g. modify a component, delete a component). </li></ul><ul><li>Besides, we can also add our own element to CBM model(e.g. add a Function Set, add a Function Item under Function Set). </li></ul>
  6. 6. 2. CNF extension <ul><li>CNF extension here means the left navigator viewer extension. The CBM tool has hooked some content on the viewer. </li></ul><ul><li>Now we have our own model (in the future will be the SAT model). </li></ul><ul><li>So with the help of CNF, we can also hook what we want on it. </li></ul><ul><li>e.g. we add some function sets under the enterprise element. </li></ul>
  7. 7. 2.1 CNF extension – objectContribution <ul><li>objectContribution means contribution to a single object </li></ul><ul><li>We specify the object target class in the plugin.xml </li></ul><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>
  8. 8. 2.1 CNF extension – objectContribution <ul><li>If it’s under the popupMenu extension point, it should be like this: </li></ul>
  9. 9. 2.2 CNF extension – viewContribution <ul><li>viewContribution means contribution to a viewer </li></ul><ul><li>we can hook some action to the toolbar or triangle button of the view </li></ul>
  10. 10. 2.3 CNF extension – actionProvider <ul><li>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. </li></ul><ul><li>In the plugin.xml, define an actionProvider under org.eclipse.ui.navigator.navigatorContent point, </li></ul><ul><li>then define the matching viewerActionBinding under org.eclipse.ui.navigator.viewer , included by the instance of com.ibm.almaden.asr.navigator.view.CBMCommonNavigator </li></ul>
  11. 11. 2.3 CNF extension – actionProvider
  12. 12. 3. EMF related <ul><li>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. </li></ul><ul><li>However, if we implement the original JFace I**Provider, the notification should be handled by ourselves. That’s a trouble when facing changes. </li></ul><ul><li>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. </li></ul>
  13. 13. 3. EMF related Not generated Adapter Ref: http://www.cnblogs.com/bjzhanghao/articles/324909.html
  14. 14. 4. SWT/JFace & Plugin related <ul><li>FormLayout </li></ul><ul><ul><li>Use this layout style as a principle (it’s really convenient) </li></ul></ul><ul><li>Section </li></ul><ul><ul><li>Use toolkit.create** method to create a widget </li></ul></ul><ul><ul><li>Otherwise, if using “new” to create, you have to invoke the toolkit.adapt method to ensure section and the widget has the consistent style </li></ul></ul><ul><li>CBMEditingDomain. INSTANCE .runAsWrite </li></ul><ul><ul><li>Control the scope of the thread code the less the better </li></ul></ul><ul><li>**EditorInput.equals </li></ul><ul><ul><li>Override this method, so that an object has its single editor </li></ul></ul>@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
  15. 15. 4. SWT/JFace & Plugin related <ul><li>“ Monkey See Monkey Do” </li></ul><ul><ul><li>Eclipse CVS examples </li></ul></ul><ul><ul><ul><li>Host: dev.eclipse.org </li></ul></ul></ul><ul><ul><ul><li>Repository Path: /cvsroot/eclipse, /cvsroot/modeling, /cvsroot/tools </li></ul></ul></ul><ul><ul><li>CBM tool itself </li></ul></ul><ul><li>Refresh Problems </li></ul><ul><ul><li>Ensure the **Provider is able to notify the propertyChangeEvent </li></ul></ul><ul><ul><li>2 examples till now </li></ul></ul><ul><ul><ul><li>Navigator tree </li></ul></ul></ul><ul><ul><ul><li>Activity tabview </li></ul></ul></ul>

×