当前位置: 首页>>代码示例>>Java>>正文


Java SelectionDialog.setInitialSelections方法代码示例

本文整理汇总了Java中org.eclipse.ui.dialogs.SelectionDialog.setInitialSelections方法的典型用法代码示例。如果您正苦于以下问题:Java SelectionDialog.setInitialSelections方法的具体用法?Java SelectionDialog.setInitialSelections怎么用?Java SelectionDialog.setInitialSelections使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.dialogs.SelectionDialog的用法示例。


在下文中一共展示了SelectionDialog.setInitialSelections方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleMainClassBrowseButtonPressed

import org.eclipse.ui.dialogs.SelectionDialog; //导入方法依赖的package包/类
protected void handleMainClassBrowseButtonPressed() {
	List<IResource> resources= JarPackagerUtil.asResources(fJarPackage.getElements());
	if (resources == null) {
		setErrorMessage(JarPackagerMessages.JarManifestWizardPage_error_noResourceSelected);
		return;
	}
	IJavaSearchScope searchScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(resources.toArray(new IResource[resources.size()]), true);
	SelectionDialog dialog= JavaUI.createMainTypeDialog(getContainer().getShell(), getContainer(), searchScope, 0, false, ""); //$NON-NLS-1$
	dialog.setTitle(JarPackagerMessages.JarManifestWizardPage_mainTypeSelectionDialog_title);
	dialog.setMessage(JarPackagerMessages.JarManifestWizardPage_mainTypeSelectionDialog_message);
	if (fJarPackage.getManifestMainClass() != null)
		dialog.setInitialSelections(new Object[] {fJarPackage.getManifestMainClass()});

	if (dialog.open() == Window.OK) {
		fJarPackage.setManifestMainClass((IType)dialog.getResult()[0]);
		fMainClassText.setText(JarPackagerUtil.getMainClassName(fJarPackage));
	} else if (!fJarPackage.isMainClassValid(getContainer())) {
		// user did not cancel: no types were found
		fJarPackage.setManifestMainClass(null);
		fMainClassText.setText(JarPackagerUtil.getMainClassName(fJarPackage));
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:JarManifestWizardPage.java

示例2: handleSealPackagesDetailsButtonPressed

import org.eclipse.ui.dialogs.SelectionDialog; //导入方法依赖的package包/类
protected void handleSealPackagesDetailsButtonPressed() {
	SelectionDialog dialog= createPackageDialog(getPackagesForSelectedResources());
	dialog.setTitle(JarPackagerMessages.JarManifestWizardPage_sealedPackagesSelectionDialog_title);
	dialog.setMessage(JarPackagerMessages.JarManifestWizardPage_sealedPackagesSelectionDialog_message);
	dialog.setInitialSelections(fJarPackage.getPackagesToSeal());
	if (dialog.open() == Window.OK)
		fJarPackage.setPackagesToSeal(getPackagesFromDialog(dialog));
	updateSealingInfo();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:JarManifestWizardPage.java

示例3: handleUnSealPackagesDetailsButtonPressed

import org.eclipse.ui.dialogs.SelectionDialog; //导入方法依赖的package包/类
protected void handleUnSealPackagesDetailsButtonPressed() {
	SelectionDialog dialog= createPackageDialog(getPackagesForSelectedResources());
	dialog.setTitle(JarPackagerMessages.JarManifestWizardPage_unsealedPackagesSelectionDialog_title);
	dialog.setMessage(JarPackagerMessages.JarManifestWizardPage_unsealedPackagesSelectionDialog_message);
	dialog.setInitialSelections(fJarPackage.getPackagesToUnseal());
	if (dialog.open() == Window.OK)
		fJarPackage.setPackagesToUnseal(getPackagesFromDialog(dialog));
	updateSealingInfo();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:JarManifestWizardPage.java


注:本文中的org.eclipse.ui.dialogs.SelectionDialog.setInitialSelections方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。