當前位置: 首頁>>代碼示例>>Java>>正文


Java OpenCheatSheetAction類代碼示例

本文整理匯總了Java中org.eclipse.ui.cheatsheets.OpenCheatSheetAction的典型用法代碼示例。如果您正苦於以下問題:Java OpenCheatSheetAction類的具體用法?Java OpenCheatSheetAction怎麽用?Java OpenCheatSheetAction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OpenCheatSheetAction類屬於org.eclipse.ui.cheatsheets包,在下文中一共展示了OpenCheatSheetAction類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createDialogArea

import org.eclipse.ui.cheatsheets.OpenCheatSheetAction; //導入依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	Link messageLnk = new Link(composite,SWT.NONE);
	messageLnk.setText(this.message);
	messageLnk.addListener(SWT.Selection, new Listener() {
		
		@Override
		public void handleEvent(Event event) {
			OpenCheatSheetAction ch = new OpenCheatSheetAction("org.eclipse.thym.ui.requirements.cordova");
			ch.run();
		}
	});
	return composite;
}
 
開發者ID:eclipse,項目名稱:thym,代碼行數:16,代碼來源:MissingRequirementsDialog.java

示例2: startManualRefactoringInternal

import org.eclipse.ui.cheatsheets.OpenCheatSheetAction; //導入依賴的package包/類
@Override
public List<Resource> startManualRefactoringInternal(VariationPoint variationPoint,
        Map<String, Object> refactoringConfigurations) throws VariabilityRefactoringFailedException {
    CASLicenseHandlerConfiguration config = CASLicenseHandlerConfiguration.getInstance();
    config.setConsolidationProject((SPLevoProject) refactoringConfigurations
            .get(VariabilityRefactoringService.SPLEVO_PROJECT));
    config.setRefactoringConfigurations(refactoringConfigurations);
    config.setVariationPoint(variationPoint);
    config.refactoringStarted();
    final OpenCheatSheetAction action = new OpenCheatSheetAction(
            CASLicenseHandlerMetaInf.CAS_LICENSE_HANDLER_CHEAT_SHEET_ID);
    Display.getDefault().syncExec(new Runnable() {
        @Override
        public void run() {
            // TODO Usage of internal classes for cheatsheet resetting should be avoided.
            CheatSheetView view = ViewUtilities.showCheatSheetView();
            action.run();
            view.getCheatSheetViewer().reset(null);
        }
    });

    try {
        config.waitForRefactoringToBeFinished();
    } catch (InterruptedException e) {
        throw new VariabilityRefactoringFailedException(
                "The refactoring has been aborted before it has been finished.", e);
    }
    return Lists.newArrayList();
}
 
開發者ID:kopl,項目名稱:SPLevo,代碼行數:30,代碼來源:CASLicenseHandlerVariabilityRefactoring.java


注:本文中的org.eclipse.ui.cheatsheets.OpenCheatSheetAction類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。