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