本文整理匯總了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;
}
示例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();
}