File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
com.archimatetool.zest/src/com/archimatetool/zest Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import org .eclipse .core .runtime .IStatus ;
9
9
import org .eclipse .jface .action .Action ;
10
+ import org .eclipse .jface .commands .ActionHandler ;
10
11
import org .eclipse .jface .dialogs .MessageDialog ;
11
12
import org .eclipse .swt .custom .BusyIndicator ;
12
13
import org .eclipse .swt .graphics .Image ;
13
14
import org .eclipse .swt .graphics .ImageData ;
14
15
import org .eclipse .swt .widgets .Display ;
16
+ import org .eclipse .ui .handlers .IHandlerService ;
15
17
16
18
import com .archimatetool .editor .Logger ;
17
19
import com .archimatetool .editor .diagram .util .DiagramUtils ;
@@ -28,10 +30,15 @@ public class CopyZestViewAsImageToClipboardAction extends Action {
28
30
29
31
private ZestGraphViewer fGraphViewer ;
30
32
31
- public CopyZestViewAsImageToClipboardAction (ZestGraphViewer graphViewer ) {
33
+ public CopyZestViewAsImageToClipboardAction (ZestView zestView ) {
32
34
super (Messages .CopyZestViewAsImageToClipboardAction_0 );
33
- fGraphViewer = graphViewer ;
35
+ fGraphViewer = zestView . getViewer () ;
34
36
setToolTipText (getText ());
37
+
38
+ // Register for key binding
39
+ setActionDefinitionId ("com.archimatetool.editor.action.exportAsImageToClipboard" ); //$NON-NLS-1$
40
+ IHandlerService service = zestView .getSite ().getService (IHandlerService .class );
41
+ service .activateHandler (getActionDefinitionId (), new ActionHandler (this ));
35
42
}
36
43
37
44
@ Override
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ public ImageDescriptor getImageDescriptor() {
377
377
}
378
378
};
379
379
380
- fActionCopyImageToClipboard = new CopyZestViewAsImageToClipboardAction (fGraphViewer );
380
+ fActionCopyImageToClipboard = new CopyZestViewAsImageToClipboardAction (this );
381
381
fActionExportImageToFile = new ExportAsImageAction (fGraphViewer );
382
382
383
383
fActionSelectInModelTree = new Action (Messages .ZestView_8 ) {
You can’t perform that action at this time.
0 commit comments