本文整理汇总了Java中org.eclipse.ui.dialogs.ContainerSelectionDialog.OK属性的典型用法代码示例。如果您正苦于以下问题:Java ContainerSelectionDialog.OK属性的具体用法?Java ContainerSelectionDialog.OK怎么用?Java ContainerSelectionDialog.OK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.ui.dialogs.ContainerSelectionDialog
的用法示例。
在下文中一共展示了ContainerSelectionDialog.OK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleBrowse
/**
* Uses the standard container selection dialog to
* choose the new value for the container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog =
new ContainerSelectionDialog(
getShell(),
ResourcesPlugin.getWorkspace().getRoot(),
false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path)result[0]).toOSString());
}
}
}
示例2: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for
* the container field.
*/
public void handleBrowse() {
IWorkspace _workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot _root = _workspace.getRoot();
ContainerSelectionDialog _containerSelectionDialog = new ContainerSelectionDialog(this.shell, _root, false,
"Select new file container");
final ContainerSelectionDialog dialog = _containerSelectionDialog;
int _open = dialog.open();
boolean _equals = (_open == ContainerSelectionDialog.OK);
if (_equals) {
final Object[] result = dialog.getResult();
int _length = result.length;
boolean _equals_1 = (_length == 1);
if (_equals_1) {
Object _get = result[0];
String _string = ((Path) _get).toString();
this.containerText.setText(_string);
}
}
}
示例3: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for
* the container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例4: handleBrowse
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例5: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for the
* container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
ResourcesPlugin.getWorkspace().getRoot(), false,
EditorConfigMessages.NewEditorConfigFileWizardPage_containerSelectionDialog_title);
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
folderText.setText(((Path) result[0]).toString());
}
}
}
示例6: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for
* the container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerSourceText.setText(((Path) result[0]).toString());
}
}
}
示例7: handleBrowse2
private void handleBrowse2() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerTargetText.setText(((Path) result[0]).toString());
}
}
}
示例8: handleProjectBrowse
/**
* This method handles project selection. It displays the user, all the projects in current workspace and let user
* select the project
**/
private void handleProjectBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerTargetText.setText(((Path) result[0]).toString());
}
}
}
示例9: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for
* the container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例10: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for the
* container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例11: handleBrowse
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace()
.getRoot(), false, "Select Project/Folder");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例12: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for
* the container field.
*/
protected void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例13: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for the container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
示例14: selectProject
/**
* Open a dialog box asking the user to select an existing project under the
* current workspace.
*
* @param parentShell
* @param defaultValue
* @return a String representing the name of the chosen project, or
* defaultValue if nothing was selected (or "cancel" button was
* pressed...)
*/
public static String selectProject(Shell parentShell, String defaultValue) {
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
parentShell, workspaceRoot, false, "Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
return ((Path) result[0]).toString();
}
}
return defaultValue;
}
示例15: handleBrowse
/**
* Uses the standard container selection dialog to choose the new value for
* the container field.
*/
private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select project");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
updateProjectPathDep(containerText.getText());
}
}
}