Search in sources :

Example 1 with BrokerConfigEditorInput

use of com.cubrid.common.ui.common.control.BrokerConfigEditorInput in project cubrid-manager by CUBRID.

the class BrokerConfOpenFileDialog method buttonPressed.

/**
	 * When press button,call it
	 * 
	 * @param buttonId the button id
	 */
protected void buttonPressed(int buttonId) {
    if (buttonId == IDialogConstants.OK_ID) {
        if (!validate()) {
            CommonUITool.openErrorBox(Messages.cubridBrokerConfOpenFileDialogErrMsg);
            return;
        }
    }
    try {
        IEditorInput input = new BrokerConfigEditorInput(filePath.getText(), fileCharsetCombo.getText());
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, BrokerConfigEditorPart.ID);
    } catch (Exception e) {
        LOGGER.error(e.getMessage());
    }
    setReturnCode(buttonId);
    close();
}
Also used : BrokerConfigEditorInput(com.cubrid.common.ui.common.control.BrokerConfigEditorInput) IEditorInput(org.eclipse.ui.IEditorInput)

Aggregations

BrokerConfigEditorInput (com.cubrid.common.ui.common.control.BrokerConfigEditorInput)1 IEditorInput (org.eclipse.ui.IEditorInput)1