[160558] Screenshot feature for XSD Editor. Update.
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDMultiPageEditorContributor.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDMultiPageEditorContributor.java
index b595c7f..6025e2d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDMultiPageEditorContributor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDMultiPageEditorContributor.java
@@ -105,6 +105,7 @@
isSource = true;
zoomInRetargetAction.setEnabled(false);
zoomOutRetargetAction.setEnabled(false);
+ captureScreenAction.setEnabled(false);
activateSourcePage(activeEditorPart, true);
}
else
@@ -138,6 +139,7 @@
actionBars.setGlobalActionHandler(ActionFactory.PRINT.getId(), registry.getAction(ActionFactory.PRINT.getId()));
zoomInRetargetAction.setEnabled(true);
zoomOutRetargetAction.setEnabled(true);
+ captureScreenAction.setEnabled(true);
}
}
}
@@ -207,6 +209,7 @@
menu.add(zoomInRetargetAction);
menu.add(zoomOutRetargetAction);
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(captureScreenAction);
menu.updateAll(true);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/CaptureScreenAction.java b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/CaptureScreenAction.java
index a3a8c75..79bb101 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/CaptureScreenAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/CaptureScreenAction.java
@@ -49,6 +49,7 @@
setToolTipText(Messages._UI_CAPTURE_SCREEN_ACTION_TOOLTIPTEXT);
setImageDescriptor(XSDEditorPlugin.getImageDescriptor("icons/etool16/capturescreen.gif")); //$NON-NLS-1$
setDisabledImageDescriptor(XSDEditorPlugin.getImageDescriptor("icons/dtool16/capturescreen.gif")); //$NON-NLS-1$
+ setAccelerator(SWT.CTRL | SWT.SHIFT | 'X'); //$NON-NLS-1$
}
public void run()
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/messages.properties b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/messages.properties
index 88367bb..274e66a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/messages.properties
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/messages.properties
@@ -28,8 +28,8 @@
_UI_ACTION_CAPTURE_SCREEN_ERROR_TITLE=Error
_UI_ACTION_CAPTURE_SCREEN_ERROR_DESCRIPTION=Could not save editor contents
_UI_ACTION_CAPTURE_SCREEN_FORMAT_NOT_SUPPORTED=Format not supported
-_UI_CAPTURE_SCREEN_ACTION_TEXT = &Capture Screen
-_UI_CAPTURE_SCREEN_ACTION_TOOLTIPTEXT = Capture screen
-_UI_ACTION_CAPTURE_SCREEN_DEFAULT_FILE_NAME = ScreenCapture
-_UI_ACTION_CAPTURE_SCREEN_FILE_SAVE_DIALOG_TITLE=Save Screen Capture Image
+_UI_CAPTURE_SCREEN_ACTION_TEXT = &Export Diagram as Image...
+_UI_CAPTURE_SCREEN_ACTION_TOOLTIPTEXT = Export Diagram as Image
+_UI_ACTION_CAPTURE_SCREEN_DEFAULT_FILE_NAME = Diagram
+_UI_ACTION_CAPTURE_SCREEN_FILE_SAVE_DIALOG_TITLE=Export Diagram as Image
_UI_HOVER_BACK_TO_SCHEMA=Show schema index view