public void reLoadResource() { try { treeList.clear(); List<String> groupNames = TadpoleSystem_UserDBQuery.getUserGroup(SessionManager.getGroupSeqs()); for (String groupName : groupNames) { ManagerListDTO parent = new ManagerListDTO(groupName); treeList.add(parent); } List<UserDBDAO> userDBS = TadpoleSystem_UserDBQuery.getUserDB(); for (UserDBDAO userDBDAO : userDBS) { addUserDB(userDBDAO, false); } } catch (Exception e) { logger.error("initialize Managerview", e); Status errStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); // $NON-NLS-1$ ExceptionDetailsErrorDialog.openError( getSite().getShell(), "Error", "Can't load database.", errStatus); // $NON-NLS-1$ } treeViewer.refresh(); treeViewer.expandToLevel(2); }
@Override public boolean performOk() { String txtSessionTime = textSessionTime.getText(); String txtExportDelimit = textExportDelimit.getText(); String txtHomePage = textHomePage.getText(); String txtHomePageUse = "" + btnCheckButtonHomepage.getSelection(); try { Integer.parseInt(txtSessionTime); } catch (Exception e) { MessageDialog.openError( getShell(), "Confirm", Messages.DefaultPreferencePage_2 + Messages.GeneralPreferencePage_0); // $NON-NLS-1$ return false; } // 테이블에 저장 try { TadpoleSystem_UserInfoData.updateGeneralUserInfoData(txtSessionTime); TadpoleSystem_UserInfoData.updateGeneralExportDelimitData(txtExportDelimit); TadpoleSystem_UserInfoData.updateDefaultHomePage(txtHomePage); TadpoleSystem_UserInfoData.updateDefaultHomePageUse(txtHomePageUse); // session 데이터를 수정한다. SessionManager.setUserInfo(PreferenceDefine.SESSION_DFEAULT_PREFERENCE, txtSessionTime); SessionManager.setUserInfo(PreferenceDefine.EXPORT_DILIMITER, txtExportDelimit); SessionManager.setUserInfo(PreferenceDefine.DEFAULT_HOME_PAGE, txtHomePage); SessionManager.setUserInfo(PreferenceDefine.DEFAULT_HOME_PAGE_USE, txtHomePageUse); } catch (Exception e) { logger.error("GeneralPreference saveing", e); MessageDialog.openError( getShell(), "Confirm", Messages.GeneralPreferencePage_2 + e.getMessage()); // $NON-NLS-1$ return false; } return super.performOk(); }