01: /*
02: * To change this template, choose Tools | Templates
03: * and open the template in the editor.
04: */
05: package org.netbeans.modules.bpel.design.actions;
06:
07: import java.awt.event.ActionEvent;
08: import org.netbeans.modules.bpel.design.DesignView;
09: import org.netbeans.modules.bpel.design.model.patterns.CollapsedPattern;
10: import org.netbeans.modules.bpel.design.model.patterns.Pattern;
11:
12: /**
13: *
14: * @author Alexey
15: */
16: public class ExpandCurrentPatternAction extends DesignModeAction {
17:
18: private static final long serialVersionUID = 1L;
19:
20: public ExpandCurrentPatternAction(DesignView view) {
21: super (view);
22: }
23:
24: public void actionPerformed(ActionEvent event) {
25: // System.out.println("ExpandCurrentPatternAction");
26: Pattern pattern = getDesignView().getSelectionModel()
27: .getSelectedPattern();
28: if (pattern == null) {
29: return;
30: }
31: if (!(pattern instanceof CollapsedPattern)) {
32: return;
33: }
34:
35: getDesignView().getCollapseExpandDecorationProvider()
36: .createCollapseExpandAction(pattern).actionPerformed(
37: event);
38: }
39: }
|