本文整理汇总了Java中org.eclipse.ui.dialogs.FilteredItemsSelectionDialog类的典型用法代码示例。如果您正苦于以下问题:Java FilteredItemsSelectionDialog类的具体用法?Java FilteredItemsSelectionDialog怎么用?Java FilteredItemsSelectionDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FilteredItemsSelectionDialog类属于org.eclipse.ui.dialogs包,在下文中一共展示了FilteredItemsSelectionDialog类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: handleBrowse
import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; //导入依赖的package包/类
/**
* Handles the project browse button.
*/
private void handleBrowse() {
FilteredItemsSelectionDialog dialog = new FilteredResourcesSelectionDialog(getShell(), false,
ResourcesPlugin.getWorkspace().getRoot(), IResource.PROJECT);
dialog.setTitle("Browse...");
String path = project.getText();
if (path != null && path.length() > 0 && new Path(path).lastSegment().length() > 0) {
dialog.setInitialPattern(new Path(path).lastSegment());
} else {
dialog.setInitialPattern("**");
}
dialog.open();
if (dialog.getResult() != null && dialog.getResult().length > 0
&& dialog.getResult()[0] instanceof IProject) {
project.setText(((IProject)dialog.getResult()[0]).getFullPath().toString());
}
}
开发者ID:Axellience,项目名称:gmm-eclipse-plugins,代码行数:20,代码来源:GMMRunconfigTab.java
示例2: run
import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; //导入依赖的package包/类
/**
* Main-method to start the dialog.
*
* @param params
* is not used in this context.
* @param manager
* is not used in this context.
*/
@Override
public void run(String[] params, ICheatSheetManager manager) {
FilteredItemsSelectionDialog typeSelectionDialog = initTypeDialog(dialogTitle);
int dialogResult = typeSelectionDialog.open();
if (dialogResult != Window.OK) {
notifyResult(false);
} else {
IType type = (IType) typeSelectionDialog.getResult()[0];
Optional<ConcreteClassifier> classifier = JaMoPPRoutines.getConcreteClassifierOf(type);
if (classifier.isPresent()) {
processFoundClassifier(classifier.get());
notifyResult(true);
} else {
openErrorMessage();
notifyResult(false);
}
}
}
开发者ID:kopl,项目名称:SPLevo,代码行数:28,代码来源:OpenTypeDialogAction.java
示例3: createManageSelectionDialog
import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; //导入依赖的package包/类
private OpenResourceDialog createManageSelectionDialog(String message) {
OpenResourceDialog resourceDialog = new OpenResourceDialog(EditorUtils.getShell(), selectedProject,
IResource.FILE);
try {
//Hack warning: changing the multi internal field to false because we don't want a multiple selection
//(but the OpenResourceDialog didn't make available an API to change that -- even though
//it'd be possible to create a FilteredItemsSelectionDialog in single selection mode)
Field field = FilteredItemsSelectionDialog.class.getDeclaredField("multi");
field.setAccessible(true);
field.set(resourceDialog, false);
} catch (Throwable e) {
//just ignore any error here
}
resourceDialog.setInitialPattern("manage.py");
resourceDialog.setMessage(message);
return resourceDialog;
}
开发者ID:fabioz,项目名称:Pydev,代码行数:18,代码来源:DjangoAction.java
示例4: getType
import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; //导入依赖的package包/类
private OpenTypeClassHolder[] getType(Shell shell, Map<String, OpenTypeClassHolder> resources) {
FilteredItemsSelectionDialog filteredDialog = new FilteredApexResourcesSelectionDialog(shell, resources);
if (filteredDialog.open() == Window.OK) {
Object[] selected = filteredDialog.getResult();
if (selected.length > 0) {
return Arrays.copyOf(selected, selected.length, OpenTypeClassHolder[].class);
}
}
return null;
}
开发者ID:forcedotcom,项目名称:idecore,代码行数:11,代码来源:OpenTypeHandler.java
示例5: initTypeDialog
import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog; //导入依赖的package包/类
/**
* Opens the FilteredItemSelectionDialog.
*
* @param dialogTitle
* represent the title of the dialog.
* @return returns the dialog.
*/
protected FilteredItemsSelectionDialog initTypeDialog(String dialogTitle) {
final Shell parentShell = Display.getCurrent().getActiveShell();
final Iterable<IProject> leadingProjects = WorkspaceUtil
.transformProjectNamesToProjects(CASLicenseHandlerConfiguration.getInstance().getConsolidationProject()
.getLeadingProjects());
return new ScopedOpenTypeSelectionDialog(parentShell, dialogTitle, leadingProjects);
}
开发者ID:kopl,项目名称:SPLevo,代码行数:15,代码来源:OpenTypeDialogAction.java
注:本文中的org.eclipse.ui.dialogs.FilteredItemsSelectionDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论