Java Code Examples for org.eclipse.ui.actions.ImportResourcesAction#setText()

The following examples show how to use org.eclipse.ui.actions.ImportResourcesAction#setText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PortingActionProvider.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
public void init(ICommonActionExtensionSite anExtensionSite) {

		Assert.isTrue(!disposed);

		if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {

			IWorkbenchWindow window = ((ICommonViewerWorkbenchSite) anExtensionSite
					.getViewSite()).getWorkbenchWindow();
			importAction = new ImportResourcesAction(window);
			importAction.setText(WorkbenchNavigatorMessages.PortingActionProvider_ImportResourcesMenu_label);
			exportAction = new ExportResourcesAction(window);
			exportAction.setText(WorkbenchNavigatorMessages.PortingActionProvider_ExportResourcesMenu_label);
			importWizardActionGroup = new WizardActionGroup(window, PlatformUI
					.getWorkbench().getImportWizardRegistry(),
					WizardActionGroup.TYPE_IMPORT, anExtensionSite.getContentService());
			exportWizardActionGroup = new WizardActionGroup(window, PlatformUI
					.getWorkbench().getExportWizardRegistry(),
					WizardActionGroup.TYPE_EXPORT, anExtensionSite.getContentService());
			contribute = true;
		}
	}
 
Example 2
Source File: PortingActionProvider.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
public void init(ICommonActionExtensionSite anExtensionSite) {

		Assert.isTrue(!disposed);

		if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {

			IWorkbenchWindow window = ((ICommonViewerWorkbenchSite) anExtensionSite
					.getViewSite()).getWorkbenchWindow();
			importAction = new ImportResourcesAction(window);
			importAction.setText(WorkbenchNavigatorMessages.PortingActionProvider_ImportResourcesMenu_label);
			exportAction = new ExportResourcesAction(window);
			exportAction.setText(WorkbenchNavigatorMessages.PortingActionProvider_ExportResourcesMenu_label);
			importWizardActionGroup = new WizardActionGroup(window, PlatformUI
					.getWorkbench().getImportWizardRegistry(),
					WizardActionGroup.TYPE_IMPORT, anExtensionSite.getContentService());
			exportWizardActionGroup = new WizardActionGroup(window, PlatformUI
					.getWorkbench().getExportWizardRegistry(),
					WizardActionGroup.TYPE_EXPORT, anExtensionSite.getContentService());
			contribute = true;
		}
	}