[jbpm-cvs] jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties ...

Koen Aers <[email protected]> Sun, 01 Mar 2009 05:15:44 -0500
Newsgroups gmane.comp.jbpm.cvs
Message-ID <[email protected]>
  User: kaers   
  Date: 09/03/01 05:15:44

  Modified:    designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties         
                        Tag: branch_jbpm_jpdl_gpd_3_1_x
                        EventContainerSectionActionBarContributor.java
                        EsbConfigurationComposite.java
                        ActionElementContainerSectionActionBarContributor.java
                        ActionElementContainerSection.java
                        EventContainerSection.java
                        EsbGeneralConfigurationComposite.java
                        EsbInputOutputConfigurationComposite.java
  Added:       designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties         
                        Tag: branch_jbpm_jpdl_gpd_3_1_x
                        EsbElementSection.java
  Removed:     designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties         
                        Tag: branch_jbpm_jpdl_gpd_3_1_x EsbNodeSection.java
  Log:
  GPD-298
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.4.1   +45 -0     jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EventContainerSectionActionBarContributor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EventContainerSectionActionBarContributor.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EventContainerSectionActionBarContributor.java,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -b -r1.4 -r1.4.4.1
  --- EventContainerSectionActionBarContributor.java	14 Aug 2007 13:31:54 -0000	1.4
  +++ EventContainerSectionActionBarContributor.java	1 Mar 2009 10:15:44 -0000	1.4.4.1
  @@ -34,6 +34,7 @@
   	private static final String CREATE_TIMER_ID = "org.jbpm.gd.jpdl.createTimer";
   	private static final String MAIL_ID = "org.jbpm.gd.jpdl.mail";
   	private static final String SCRIPT_ID = "org.jbpm.gd.jpdl.script";
  +	private static final String ESB_NOTIFIER_ID = "org.jbpm.gd.jpdl.esbNotifier";
   	
   	private String elementToCreate = ACTION_ID;
   	
  @@ -48,6 +49,7 @@
   	private ActionContributionItem addCancelTimerMenuContributionItem;
   	private ActionContributionItem addScriptMenuContributionItem;
   	private ActionContributionItem addMailMenuContributionItem;
  +	private ActionContributionItem addEsbNotifierMenuContributionItem;
   	private ActionContributionItem removeMenuContributionItem;
   	private Separator toolbarSeparator;
   	private Separator firstMenuSeparator;
  @@ -66,6 +68,7 @@
   		addCancelTimerMenuContributionItem = new ActionContributionItem(createAddCancelTimerAction());
   		addScriptMenuContributionItem = new ActionContributionItem(createAddScriptAction());
   		addMailMenuContributionItem = new ActionContributionItem(createAddMailAction());
  +		addEsbNotifierMenuContributionItem = new ActionContributionItem(createAddEsbNotifierAction());
   		removeMenuContributionItem = new ActionContributionItem(createRemoveAction());
   		toolbarSeparator = new Separator();
   		firstMenuSeparator = new Separator();
  @@ -132,6 +135,16 @@
   		return action;
   	}
   	
  +	private IAction createAddEsbNotifierAction() {
  +		IAction action = new Action() {
  +			public void run() {
  +				addNewActionElement(ESB_NOTIFIER_ID);
  +			}
  +		};
  +		setEsbNotifierInfo(action);
  +		return action;
  +	}
  +	
   	private IAction createAddActionElementAction() {
   		IAction action = new Action() {
   			public void run() {
  @@ -209,6 +222,14 @@
   		action.setText("New Script");
   	}
   	
  +	private void setEsbNotifierInfo(IAction action) {
  +		action.setImageDescriptor(
  +				ImageDescriptor.createFromURL(Plugin.getDefault()
  +						.getBundle().getEntry("/icons/full/obj16/esb_enabled.gif")));
  +		action.setToolTipText("Add a ESB Notifier");	
  +		action.setText("New ESB Notifier");
  +	}
  +	
   	private IAction createRemoveAction() {
   		IAction action = new Action() {
   			public void run() {
  @@ -243,6 +264,7 @@
   		createAddCreateTimerMenuItem(menu, enabled);
   		createAddCancelTimerMenuItem(menu, enabled);
   		createAddMailMenuItem(menu, enabled);
  +		createAddEsbNotifierMenuItem(menu, enabled);
   	}
   
   	private void createAddActionMenuItem(Menu menu, boolean enabled) {
  @@ -345,6 +367,26 @@
   		}		
   	}
   	
  +	private void createAddEsbNotifierMenuItem(Menu menu, boolean enabled) {
  +		MenuItem addEsbNotifierMenuItem = new MenuItem(menu, SWT.PUSH);
  +		addEsbNotifierMenuItem.setText("New ESB Notifier");
  +		ImageDescriptor enabledDescriptor = ImageDescriptor.createFromURL(Plugin.getDefault()
  +				.getBundle().getEntry("/icons/full/obj16/esb_enabled.gif"));
  +		addEsbNotifierMenuItem.setImage(SharedImages.INSTANCE.getImage(enabledDescriptor));
  +		addEsbNotifierMenuItem.setEnabled(enabled);
  +		if (enabled) {
  +			addEsbNotifierMenuItem.addSelectionListener(new SelectionAdapter() {
  +				public void widgetSelected(SelectionEvent e) {
  +					addNewActionElement(ESB_NOTIFIER_ID);
  +					if (((MenuItem)e.widget).getParent() != popupMenu) {
  +						elementToCreate = ESB_NOTIFIER_ID;
  +						setEsbNotifierInfo(addActionElementToolbarContributionItem.getAction());
  +					}
  +				}			
  +			});
  +		}		
  +	}
  +	
   	private void addNewActionElement(String elementToCreate) {
   		ActionElementContainer target = eventsSection.getSelectedEvent();
   		ActionElementCreateCommand command = new ActionElementCreateCommand(target.getFactory());
  @@ -394,6 +436,7 @@
   		addCancelTimerMenuContributionItem.getAction().setEnabled(enabled);
   		addScriptMenuContributionItem.getAction().setEnabled(enabled);
   		addMailMenuContributionItem.getAction().setEnabled(enabled);
  +		addEsbNotifierMenuContributionItem.getAction().setEnabled(enabled);
   	}
   
   	public void activateContributions() {
  @@ -408,6 +451,7 @@
   		getActionBars().getMenuManager().add(addCreateTimerMenuContributionItem);
   		getActionBars().getMenuManager().add(addCancelTimerMenuContributionItem);
   		getActionBars().getMenuManager().add(addMailMenuContributionItem);
  +		getActionBars().getMenuManager().add(addEsbNotifierMenuContributionItem);
   		getActionBars().getMenuManager().add(secondMenuSeparator);
   		getActionBars().getMenuManager().add(removeMenuContributionItem);
   		getActionBars().updateActionBars();
  @@ -425,6 +469,7 @@
   		getActionBars().getMenuManager().remove(addCancelTimerMenuContributionItem);
   		getActionBars().getMenuManager().remove(addScriptMenuContributionItem);
   		getActionBars().getMenuManager().remove(addMailMenuContributionItem);
  +		getActionBars().getMenuManager().remove(addEsbNotifierMenuContributionItem);
   		getActionBars().getMenuManager().remove(secondMenuSeparator);
   		getActionBars().getMenuManager().remove(removeMenuContributionItem);
   		getActionBars().updateActionBars();
  
  
  
  1.1.2.4   +17 -75    jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbConfigurationComposite.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EsbConfigurationComposite.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbConfigurationComposite.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -b -r1.1.2.3 -r1.1.2.4
  --- EsbConfigurationComposite.java	22 Apr 2008 13:05:48 -0000	1.1.2.3
  +++ EsbConfigurationComposite.java	1 Mar 2009 10:15:44 -0000	1.1.2.4
  @@ -3,17 +3,13 @@
   import org.eclipse.swt.SWT;
   import org.eclipse.swt.custom.CTabFolder;
   import org.eclipse.swt.custom.CTabItem;
  -import org.eclipse.swt.events.SelectionEvent;
  -import org.eclipse.swt.events.SelectionListener;
   import org.eclipse.swt.layout.FormAttachment;
   import org.eclipse.swt.layout.FormData;
  -import org.eclipse.swt.widgets.Button;
   import org.eclipse.swt.widgets.Composite;
   import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
  -import org.jbpm.gd.common.model.GenericElement;
  -import org.jbpm.gd.jpdl.model.EsbNode;
  +import org.jbpm.gd.jpdl.model.EsbElement;
   
  -public class EsbConfigurationComposite implements SelectionListener {
  +public class EsbConfigurationComposite {
   	
   	public static EsbConfigurationComposite create(TabbedPropertySheetWidgetFactory widgetFactory, Composite parent) {
   		EsbConfigurationComposite result = new EsbConfigurationComposite();
  @@ -25,10 +21,8 @@
   	
   	private TabbedPropertySheetWidgetFactory widgetFactory;
   	private Composite parent;
  -	private EsbNode esbNode;
  -	private GenericElement[] savedEsbToJbpmMappings;
  +	private EsbElement esbElement;
   		
  -	private Button oneWayButton;
   	private CTabFolder actionTabFolder;
   	private CTabItem outputTabItem;
   	private Composite outputTabControl;
  @@ -37,52 +31,46 @@
   	private EsbInputOutputConfigurationComposite esbOutputConfigurationComposite;
   	
   	
  -	public void setEsbNode(EsbNode esbNode) {
  -		if (this.esbNode == esbNode) return;
  +	public void setEsbElement(EsbElement esbElement) {
  +		if (this.esbElement == esbElement) return;
   		unhookListeners();
   		clearControls();
  -		this.esbNode = esbNode;
  -		if (esbNode != null) {
  +		this.esbElement = esbElement;
  +		if (esbElement != null) {
   			updateControls();
   			hookListeners();
   		}
   	}
   	
  -	public EsbNode getEsbNode() {
  -		return esbNode;
  +	public EsbElement getEsbElement() {
  +		return esbElement;
   	}
   	
   	private void unhookListeners() {
  -		oneWayButton.removeSelectionListener(this);
   	}
   	
   	private void hookListeners() {
  -		oneWayButton.addSelectionListener(this);
   	}
   	
   	private void clearControls() {
  -		oneWayButton.setSelection(false);
  -		esbGeneralConfigurationComposite.setEsbNode(null);
  -		esbInputConfigurationComposite.setEsbNode(null);
  +		esbGeneralConfigurationComposite.setEsbElement(null);
  +		esbInputConfigurationComposite.setEsbElement(null);
   		if (outputTabItem != null) {
  -			esbOutputConfigurationComposite.setEsbNode(null);
  +			esbOutputConfigurationComposite.setEsbElement(null);
   			outputTabItem.dispose();
   		}
   	}
   	
   	private void updateControls() {
  -		oneWayButton.setSelection(esbNode.isOneWay());
  -		esbGeneralConfigurationComposite.setEsbNode(esbNode);
  -		esbInputConfigurationComposite.setEsbNode(esbNode);
  -		if (!esbNode.isOneWay()) {
  +		esbGeneralConfigurationComposite.setEsbElement(esbElement);
  +		esbInputConfigurationComposite.setEsbElement(esbElement);
  +		if (!esbElement.isOneWay()) {
   			createOutputTabItem();
  -			esbOutputConfigurationComposite.setEsbNode(esbNode);
  +			esbOutputConfigurationComposite.setEsbElement(esbElement);
   		}
   	}
   	
   	private void create() {
  -		oneWayButton = widgetFactory.createButton(parent, "One Way", SWT.CHECK);
  -		oneWayButton.setLayoutData(createOneWayButtonLayoutData());
   		actionTabFolder = widgetFactory.createTabFolder(parent, SWT.TOP | SWT.BORDER);
   		actionTabFolder.setLayoutData(createEsbNodeTabFolderLayoutData());
   		createGeneralTabItem();
  @@ -125,59 +113,13 @@
   		outputTabItem.setControl(outputTabControl);		
   	}
   	
  -	private FormData createOneWayButtonLayoutData() {
  -		FormData result = new FormData();
  -		result.left = new FormAttachment(0, 0);
  -		result.right = new FormAttachment(100, 0);
  -		result.top = new FormAttachment(0, 0);
  -		return result;
  -	}
  -	
   	private FormData createEsbNodeTabFolderLayoutData() {
   		FormData result = new FormData();
   		result.left = new FormAttachment(0, 0);
   		result.right = new FormAttachment(100, 0);
  -		result.top = new FormAttachment(oneWayButton, 5);
  +		result.top = new FormAttachment(0, 0);
   		result.bottom = new FormAttachment(100, 0);
   		return result;
   	}
   
  -	public void widgetDefaultSelected(SelectionEvent e) {
  -	}
  -
  -	public void widgetSelected(SelectionEvent e) {
  -		if (e.widget == oneWayButton) {
  -			handleOneWayButtonSelected();
  -		}
  -	}
  -	
  -	private void handleOneWayButtonSelected() {
  -		if (oneWayButton.getSelection()) {
  -			esbOutputConfigurationComposite.setEsbNode(null);
  -			outputTabItem.dispose();
  -			saveEsbToJbpmMappings();
  -		} else {
  -			createOutputTabItem();
  -			restoreEsbToJbpmMappings();
  -			esbOutputConfigurationComposite.setEsbNode(esbNode);
  -		}
  -		esbNode.setOneWay(oneWayButton.getSelection());
  -	}
  -	
  -	private void restoreEsbToJbpmMappings() {
  -		if (savedEsbToJbpmMappings == null) return;
  -		for (int i = 0; i < savedEsbToJbpmMappings.length; i++) {
  -			esbNode.addEsbToJbpmMapping(savedEsbToJbpmMappings[i]);
  -		}
  -	}
  -
  -	private void saveEsbToJbpmMappings() {
  -		GenericElement[] esbToJbpmMappings = esbNode.getEsbToJbpmMappings();
  -		savedEsbToJbpmMappings = new GenericElement[esbToJbpmMappings.length];	
  -		for (int i = 0; i < esbToJbpmMappings.length; i++) {
  -			savedEsbToJbpmMappings[i] = esbToJbpmMappings[i];
  -			esbNode.removeEsbToJbpmMapping(esbToJbpmMappings[i]);
  -		}
  -	}
  -	
   }
  
  
  
  1.4.4.1   +41 -0     jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/ActionElementContainerSectionActionBarContributor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ActionElementContainerSectionActionBarContributor.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/ActionElementContainerSectionActionBarContributor.java,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -b -r1.4 -r1.4.4.1
  --- ActionElementContainerSectionActionBarContributor.java	14 Aug 2007 13:31:54 -0000	1.4
  +++ ActionElementContainerSectionActionBarContributor.java	1 Mar 2009 10:15:44 -0000	1.4.4.1
  @@ -31,6 +31,7 @@
   	private static final String CREATE_TIMER_ID = "org.jbpm.gd.jpdl.createTimer";
   	private static final String MAIL_ID = "org.jbpm.gd.jpdl.mail";
   	private static final String SCRIPT_ID = "org.jbpm.gd.jpdl.script";
  +	private static final String ESB_NOTIFIER_ID = "org.jbpm.gd.jpdl.esbNotifier";
   	
   	private String elementToCreate = ACTION_ID;
   	
  @@ -43,6 +44,7 @@
   	private ActionContributionItem addCancelTimerMenuContributionItem;
   	private ActionContributionItem addScriptMenuContributionItem;
   	private ActionContributionItem addMailMenuContributionItem;
  +	private ActionContributionItem addEsbNotifierMenuContributionItem;
   	private ActionContributionItem removeMenuContributionItem;
   	private Separator toolbarSeparator;
   	private Separator menuSeparator;
  @@ -58,6 +60,7 @@
   		addCancelTimerMenuContributionItem = new ActionContributionItem(createAddCancelTimerAction());
   		addScriptMenuContributionItem = new ActionContributionItem(createAddScriptAction());
   		addMailMenuContributionItem = new ActionContributionItem(createAddMailAction());
  +		addEsbNotifierMenuContributionItem = new ActionContributionItem(createAddEsbNotifierAction());
   		removeMenuContributionItem = new ActionContributionItem(createRemoveAction());
   		toolbarSeparator = new Separator();
   		menuSeparator = new Separator();
  @@ -113,6 +116,16 @@
   		return action;
   	}
   	
  +	private IAction createAddEsbNotifierAction() {
  +		IAction action = new Action() {
  +			public void run() {
  +				addNewActionElement(ESB_NOTIFIER_ID);
  +			}
  +		};
  +		setEsbNotifierInfo(action);
  +		return action;
  +	}
  +	
   	private IAction createAddActionElementAction() {
   		IAction action = new Action() {
   			public void run() {
  @@ -179,6 +192,14 @@
   		action.setText("New Script");
   	}
   	
  +	private void setEsbNotifierInfo(IAction action) {
  +		action.setImageDescriptor(
  +				ImageDescriptor.createFromURL(Plugin.getDefault()
  +						.getBundle().getEntry("/icons/full/obj16/esb_enabled.gif")));
  +		action.setToolTipText("Add a esb Notifier");	
  +		action.setText("New ESB Notifier");
  +	}
  +	
   	private IAction createRemoveAction() {
   		IAction action = new Action() {
   			public void run() {
  @@ -212,6 +233,7 @@
   		createAddCreateTimerMenuItem(menu);
   		createAddCancelTimerMenuItem(menu);
   		createAddMailMenuItem(menu);
  +		createAddEsbNotifierMenuItem(menu);
   	}
   
   	private void createAddActionMenuItem(Menu menu) {
  @@ -299,6 +321,23 @@
   		});
   	}		
   	
  +	private void createAddEsbNotifierMenuItem(Menu menu) {
  +		MenuItem addEsbNotifierMenuItem = new MenuItem(menu, SWT.PUSH);
  +		addEsbNotifierMenuItem.setText("New ESB Notifier");
  +		ImageDescriptor enabledDescriptor = ImageDescriptor.createFromURL(Plugin.getDefault()
  +				.getBundle().getEntry("/icons/full/obj16/esb_enabled.gif"));
  +		addEsbNotifierMenuItem.setImage(SharedImages.INSTANCE.getImage(enabledDescriptor));
  +		addEsbNotifierMenuItem.addSelectionListener(new SelectionAdapter() {
  +			public void widgetSelected(SelectionEvent e) {
  +				addNewActionElement(ESB_NOTIFIER_ID);
  +				if (((MenuItem)e.widget).getParent() != popupMenu) {
  +					elementToCreate = ESB_NOTIFIER_ID;
  +					setEsbNotifierInfo(addActionElementToolbarContributionItem.getAction());
  +				}
  +			}			
  +		});
  +	}		
  +	
   	private void addNewActionElement(String elementToCreate) {
   		ActionElementContainer target = actionElementsSection.getActionElementContainer();
   		ActionElementCreateCommand command = new ActionElementCreateCommand(target.getFactory());
  @@ -338,6 +377,7 @@
   		getActionBars().getMenuManager().add(addCreateTimerMenuContributionItem);
   		getActionBars().getMenuManager().add(addCancelTimerMenuContributionItem);
   		getActionBars().getMenuManager().add(addMailMenuContributionItem);
  +		getActionBars().getMenuManager().add(addEsbNotifierMenuContributionItem);
   		getActionBars().getMenuManager().add(menuSeparator);
   		getActionBars().getMenuManager().add(removeMenuContributionItem);
   		getActionBars().updateActionBars();
  @@ -352,6 +392,7 @@
   		getActionBars().getMenuManager().remove(addCancelTimerMenuContributionItem);
   		getActionBars().getMenuManager().remove(addScriptMenuContributionItem);
   		getActionBars().getMenuManager().remove(addMailMenuContributionItem);
  +		getActionBars().getMenuManager().remove(addEsbNotifierMenuContributionItem);
   		getActionBars().getMenuManager().remove(menuSeparator);
   		getActionBars().getMenuManager().remove(removeMenuContributionItem);
   		getActionBars().updateActionBars();
  
  
  
  1.2.4.2   +15 -1     jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/ActionElementContainerSection.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ActionElementContainerSection.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/ActionElementContainerSection.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -b -r1.2.4.1 -r1.2.4.2
  --- ActionElementContainerSection.java	2 Jan 2008 12:56:46 -0000	1.2.4.1
  +++ ActionElementContainerSection.java	1 Mar 2009 10:15:44 -0000	1.2.4.2
  @@ -28,6 +28,8 @@
   import org.jbpm.gd.jpdl.model.ActionElementContainer;
   import org.jbpm.gd.jpdl.model.CancelTimer;
   import org.jbpm.gd.jpdl.model.CreateTimer;
  +import org.jbpm.gd.jpdl.model.EsbElement;
  +import org.jbpm.gd.jpdl.model.EsbNotifier;
   import org.jbpm.gd.jpdl.model.MailAction;
   import org.jbpm.gd.jpdl.model.Script;
   
  @@ -47,6 +49,7 @@
       private TimerConfigurationComposite createTimerConfigurationComposite;
       private CancelTimerConfigurationComposite cancelTimerConfigurationComposite;
       private MailActionConfigurationComposite mailActionConfigurationComposite;
  +    private EsbConfigurationComposite esbConfigurationComposite;
   	 	
   	public void createControls(Composite parent,
   			TabbedPropertySheetPage aTabbedPropertySheetPage) {
  @@ -76,6 +79,7 @@
   		createCreateTimerPage(composite);
   		createCancelTimerPage(composite);
   		createMailPage(composite);
  +		createEsbPage(composite);
   	}
   	
   	private void createActionPage(Composite composite) {
  @@ -118,6 +122,14 @@
   		mailActionConfigurationComposite = MailActionConfigurationComposite.create(getWidgetFactory(), mailPage);
   	}
   	
  +	private void createEsbPage(Composite composite) {
  +		Composite esbPage = getWidgetFactory().createComposite(composite);
  +		esbPage.setLayout(new FormLayout());
  +		esbPage.setLayoutData(createDetailsAreaLayoutData());
  +		detailsPages.put("org.jbpm.gd.jpdl.esbNotifier", esbPage);
  +		esbConfigurationComposite = EsbConfigurationComposite.create(getWidgetFactory(), esbPage);
  +	}
  +	
   	private void handleActionTableSelected() {
   		TableItem[] selectedItems = actionElementTable.getSelection();
   		if (selectedItems.length == 0) {
  @@ -167,7 +179,9 @@
   	}
   	
   	private void updateActionElementDetails() {
  -		if (selectedActionElement instanceof Action) {
  +		if (selectedActionElement instanceof EsbNotifier) {
  +			esbConfigurationComposite.setEsbElement((EsbElement)selectedActionElement);
  +		} else if (selectedActionElement instanceof Action) {
   			actionConfigurationComposite.setAction((Action)selectedActionElement);
   		} else if (selectedActionElement instanceof Script) {
   			scriptConfigurationComposite.setScript((Script)selectedActionElement);
  
  
  
  1.2.4.2   +17 -1     jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EventContainerSection.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EventContainerSection.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EventContainerSection.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -b -r1.2.4.1 -r1.2.4.2
  --- EventContainerSection.java	2 Jan 2008 12:56:46 -0000	1.2.4.1
  +++ EventContainerSection.java	1 Mar 2009 10:15:44 -0000	1.2.4.2
  @@ -28,6 +28,8 @@
   import org.jbpm.gd.jpdl.model.ActionElement;
   import org.jbpm.gd.jpdl.model.CancelTimer;
   import org.jbpm.gd.jpdl.model.CreateTimer;
  +import org.jbpm.gd.jpdl.model.EsbElement;
  +import org.jbpm.gd.jpdl.model.EsbNotifier;
   import org.jbpm.gd.jpdl.model.Event;
   import org.jbpm.gd.jpdl.model.EventContainer;
   import org.jbpm.gd.jpdl.model.MailAction;
  @@ -48,6 +50,7 @@
       private TimerConfigurationComposite createTimerConfigurationComposite;
       private CancelTimerConfigurationComposite cancelTimerConfigurationComposite;
       private MailActionConfigurationComposite mailConfigurationComposite;
  +    private EsbConfigurationComposite esbConfigurationComposite;
       
       private Event selectedEvent;
       private ActionElement selectedActionElement;
  @@ -146,7 +149,9 @@
   	}
   	
   	private void updateActionElementDetails() {
  -		if (selectedActionElement instanceof Action) {
  +		if (selectedActionElement instanceof EsbNotifier) {
  +			esbConfigurationComposite.setEsbElement((EsbElement)selectedActionElement);
  +		} else if (selectedActionElement instanceof Action) {
   			actionConfigurationComposite.setAction((Action)selectedActionElement);
   		} else if (selectedActionElement instanceof Script) {
   			scriptConfigurationComposite.setScript((Script)selectedActionElement);
  @@ -175,6 +180,7 @@
   		createCreateTimerPage(composite);
   		createCancelTimerPage(composite);
   		createMailPage(composite);
  +		createEsbPage(composite);
   	}
   	
   	private void createActionPage(Composite composite) {
  @@ -226,9 +232,19 @@
   		mailPage.setLayout(new FormLayout());
   		mailPage.setVisible(false);
   		mailPage.setLayoutData(createDetailsAreaLayoutData());
  +		pagesMap.put("org.jbpm.gd.jpdl.mail", mailPage);
   		mailConfigurationComposite = MailActionConfigurationComposite.create(getWidgetFactory(), mailPage);
   	}
   	
  +	private void createEsbPage(Composite composite) {
  +		Composite esbPage = getWidgetFactory().createComposite(composite);
  +		esbPage.setLayout(new FormLayout());
  +		esbPage.setVisible(false);
  +		esbPage.setLayoutData(createDetailsAreaLayoutData());
  +		pagesMap.put("org.jbpm.gd.jpdl.esbNotifier", esbPage);
  +		esbConfigurationComposite = EsbConfigurationComposite.create(getWidgetFactory(), esbPage);
  +	}
  +	
   	private FormData createDetailsAreaLayoutData() {
   		FormData data = new FormData();
   		data.left = new FormAttachment(eventTree, 0);
  
  
  
  1.1.2.4   +12 -12    jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbGeneralConfigurationComposite.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EsbGeneralConfigurationComposite.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbGeneralConfigurationComposite.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -b -r1.1.2.3 -r1.1.2.4
  --- EsbGeneralConfigurationComposite.java	27 Feb 2009 16:25:13 -0000	1.1.2.3
  +++ EsbGeneralConfigurationComposite.java	1 Mar 2009 10:15:44 -0000	1.1.2.4
  @@ -11,7 +11,7 @@
   import org.eclipse.swt.widgets.Label;
   import org.eclipse.swt.widgets.Text;
   import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
  -import org.jbpm.gd.jpdl.model.EsbNode;
  +import org.jbpm.gd.jpdl.model.EsbElement;
   
   public class EsbGeneralConfigurationComposite implements FocusListener, SelectionListener {
   	
  @@ -33,16 +33,16 @@
   	private Label replyToFaultToLabel;
   	private CCombo replyToFaultToCombo;
   	
  -	private EsbNode esbNode;
  +	private EsbElement esbElement;
   	
   	private EsbGeneralConfigurationComposite() {}
   	
  -	public void setEsbNode(EsbNode esbNode) {
  -		if (this.esbNode == esbNode) return;
  +	public void setEsbElement(EsbElement esbElement) {
  +		if (this.esbElement == esbElement) return;
   		unhookListeners();
   		clearControls();
  -		this.esbNode = esbNode;
  -		if (esbNode != null) {
  +		this.esbElement = esbElement;
  +		if (esbElement != null) {
   			updateControls();
   			hookListeners();
   		}
  @@ -67,9 +67,9 @@
   	}
   	
   	private void updateControls() {
  -		serviceNameText.setText(esbNode.getServiceName() == null ? "" : esbNode.getServiceName());
  -		categoryNameText.setText(esbNode.getCategoryName() == null ? "" : esbNode.getCategoryName());
  -		replyToFaultToCombo.setText(esbNode.getReplyToOriginator() == null ? "" : esbNode.getReplyToOriginator());
  +		serviceNameText.setText(esbElement.getServiceName() == null ? "" : esbElement.getServiceName());
  +		categoryNameText.setText(esbElement.getCategoryName() == null ? "" : esbElement.getCategoryName());
  +		replyToFaultToCombo.setText(esbElement.getReplyToOriginator() == null ? "" : esbElement.getReplyToOriginator());
   	}
   	
   	private void create() {
  @@ -160,7 +160,7 @@
   		if ("".equals(name)) {
   			name = null;
   		}
  -		esbNode.setServiceName(name);
  +		esbElement.setServiceName(name);
   	}
   	
   	private void updateCategoryName() {
  @@ -168,7 +168,7 @@
   		if ("".equals(name)) {
   			name = null;
   		}
  -		esbNode.setCategoryName(name);
  +		esbElement.setCategoryName(name);
   	}
   	
   	private void updateReplyToFaultTo() {
  @@ -176,7 +176,7 @@
   		if ("".equals(value)) {
   			value = null;
   		}
  -		esbNode.setReplyToOriginator(value);
  +		esbElement.setReplyToOriginator(value);
   	}
   
   }
  
  
  
  1.1.2.3   +13 -13    jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbInputOutputConfigurationComposite.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EsbInputOutputConfigurationComposite.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbInputOutputConfigurationComposite.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -b -r1.1.2.2 -r1.1.2.3
  --- EsbInputOutputConfigurationComposite.java	22 Apr 2008 13:05:48 -0000	1.1.2.2
  +++ EsbInputOutputConfigurationComposite.java	1 Mar 2009 10:15:44 -0000	1.1.2.3
  @@ -20,7 +20,7 @@
   import org.eclipse.swt.widgets.Text;
   import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
   import org.jbpm.gd.common.model.GenericElement;
  -import org.jbpm.gd.jpdl.model.EsbNode;
  +import org.jbpm.gd.jpdl.model.EsbElement;
   import org.jbpm.gd.jpdl.util.AutoResizeTableLayout;
   
   public class EsbInputOutputConfigurationComposite implements SelectionListener, FocusListener, MouseListener {
  @@ -49,16 +49,16 @@
   	private Button removeButton;
   	int selectedColumn = -1;
   	
  -	private EsbNode esbNode;
  +	private EsbElement esbElement;
   	
   	private EsbInputOutputConfigurationComposite() {}
   	
  -	public void setEsbNode(EsbNode esbNode) {
  -		if (this.esbNode == esbNode) return;
  +	public void setEsbElement(EsbElement esbElement) {
  +		if (this.esbElement == esbElement) return;
   		unhookSelectionListener();
   		clearControls();
  -		this.esbNode = esbNode;
  -		if (esbNode != null) {
  +		this.esbElement = esbElement;
  +		if (esbElement != null) {
   			updateControls();
   			hookSelectionListener();
   		}
  @@ -173,7 +173,7 @@
   	}
   	
   	private void handleAddButtonSelected() {
  -		GenericElement element = (GenericElement)esbNode.getFactory().createById("org.jbpm.gd.jpdl.genericElement");
  +		GenericElement element = (GenericElement)esbElement.getFactory().createById("org.jbpm.gd.jpdl.genericElement");
   		element.setName("mapping");
   		addElement(element);
   		TableItem item = new TableItem(table, SWT.NONE);
  @@ -302,7 +302,7 @@
   	private InputOutputConfigurationStrategy[]configurationStrategies = new InputOutputConfigurationStrategy[] {
   		new InputOutputConfigurationStrategy() {
   			public void addElement(GenericElement element) {
  -				esbNode.addJbpmToEsbMapping(element);
  +				esbElement.addJbpmToEsbMapping(element);
   			}
   			public String[] columnHeaders() {
   				return new String[] {"jBPM Name", "ESB Name"};
  @@ -314,15 +314,15 @@
   				return 0;
   			}
   			public void removeElement(GenericElement element) {
  -				esbNode.removeJbpmToEsbMapping(element);
  +				esbElement.removeJbpmToEsbMapping(element);
   			}
   			public GenericElement[] getMappings() {
  -				return esbNode.getJbpmToEsbMappings();
  +				return esbElement.getJbpmToEsbMappings();
   			}
   		},
   		new InputOutputConfigurationStrategy() {
   			public void addElement(GenericElement element) {
  -				esbNode.addEsbToJbpmMapping(element);
  +				esbElement.addEsbToJbpmMapping(element);
   			}
   			public String[] columnHeaders() {
   				return new String[] {"ESB Name", "jBPM Name"};
  @@ -334,10 +334,10 @@
   				return 1;
   			}
   			public void removeElement(GenericElement element) {
  -				esbNode.removeEsbToJbpmMapping(element);
  +				esbElement.removeEsbToJbpmMapping(element);
   			}
   			public GenericElement[] getMappings() {
  -				return esbNode.getEsbToJbpmMappings();
  +				return esbElement.getEsbToJbpmMappings();
   			}
   		}
   	};
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +66 -0     jbpm.3/designer/jpdl/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/Attic/EsbElementSection.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EsbElementSection.java
  ===================================================================
  RCS file: EsbElementSection.java
  diff -N EsbElementSection.java
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ EsbElementSection.java	1 Mar 2009 10:15:44 -0000	1.1.2.1
  @@ -0,0 +1,66 @@
  +package org.jbpm.gd.jpdl.properties;
  +
  +import org.eclipse.jface.viewers.ISelection;
  +import org.eclipse.jface.viewers.IStructuredSelection;
  +import org.eclipse.swt.layout.FormAttachment;
  +import org.eclipse.swt.layout.FormData;
  +import org.eclipse.swt.layout.FormLayout;
  +import org.eclipse.swt.widgets.Composite;
  +import org.eclipse.ui.IWorkbenchPart;
  +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
  +import org.jbpm.gd.common.notation.AbstractNotationElement;
  +import org.jbpm.gd.common.part.NotationElementGraphicalEditPart;
  +import org.jbpm.gd.common.part.OutlineEditPart;
  +import org.jbpm.gd.common.properties.AbstractPropertySection;
  +import org.jbpm.gd.jpdl.model.EsbElement;
  +
  +
  +public class EsbElementSection extends AbstractPropertySection {
  +	
  +	private EsbConfigurationComposite esbConfigurationComposite;
  +	private EsbElement esbElement;
  +	
  +	public void createControls(Composite parent,
  +            TabbedPropertySheetPage aTabbedPropertySheetPage) {
  +        super.createControls(parent, aTabbedPropertySheetPage);
  +        Composite clientArea = getWidgetFactory().createFlatFormComposite(parent);
  +        Composite esbInfoArea = getWidgetFactory().createComposite(clientArea);
  +        esbInfoArea.setLayout(new FormLayout());
  +        esbConfigurationComposite = EsbConfigurationComposite.create(getWidgetFactory(), esbInfoArea);
  +        esbInfoArea.setLayoutData(createEsbInfoAreaLayoutData());
  +    }
  +	
  +	private FormData createEsbInfoAreaLayoutData() {
  +		FormData result = new FormData();
  +		result.left = new FormAttachment(0, 0);
  +		result.top = new FormAttachment(0, 0);
  +		result.right = new FormAttachment(100, 0);
  +		result.bottom = new FormAttachment(100, 0);
  +		return result;
  +	}
  + 
  + 	public void setInput(IWorkbenchPart part, ISelection selection) {
  +        super.setInput(part, selection);
  +        if (!(selection instanceof IStructuredSelection)) return;
  +        Object input = ((IStructuredSelection)selection).getFirstElement();
  +        if (input instanceof NotationElementGraphicalEditPart) {
  +        	AbstractNotationElement notationElement = ((NotationElementGraphicalEditPart)input).getNotationElement();
  +        	input = notationElement.getSemanticElement();
  +        } else if (input instanceof OutlineEditPart) {
  +        	input = ((OutlineEditPart)input).getModel();
  +        }
  +        if (input instanceof EsbElement) {
  +        	esbElement = (EsbElement)input;
  +        	refresh();
  +        }
  +    }
  + 	
  + 	public void refresh() {
  + 		esbConfigurationComposite.setEsbElement(esbElement);
  +     }
  + 	
  +	public boolean shouldUseExtraSpace() {
  +		return true;
  +	}
  +		
  +}
  \ No newline at end of file
  
  
  

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H