private List<RepositoryData> loadData() { final GlobalSettings globalSettings = GlobalSettings.getInstance(); final String prj_url_delim = globalSettings.getPropertyValue(PROJECT_URL_DELIMITER.toUpperCase(), EMPTY_STR); final String prj_url_pair_delim = globalSettings.getPropertyValue(PROJECT_URL_PAIR_DELIMITER.toUpperCase(), EMPTY_STR); final List<RepositoryData> repDataList = new ArrayList<RepositoryData>(); final String projectUrlPair = this.preferenceStore.getString(P_REPOSIROTY_PROJECT_URL_PAIR); if (!isEmpty(projectUrlPair)) { final String[] prjUrlArray = projectUrlPair.split(prj_url_pair_delim); for (final String prjURL : prjUrlArray) { if (!isEmpty(prjURL)) { final String[] prjUrlArr = prjURL.split(prj_url_delim); if (prjUrlArr.length < 2) { continue; } final RepositoryData dataFromPref = new RepositoryData(); dataFromPref.setAssociatedProject(prjUrlArr[0].trim()); dataFromPref.setRepUrl(prjUrlArr[1].trim()); repDataList.add(dataFromPref); } } } return repDataList; }
/* * @see * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang * .Object, int) */ @Override public String getColumnText(final Object element, final int columnIndex) { final RepositoryData data = (RepositoryData) element; switch (columnIndex) { case 0: return data.getAssociatedProject(); case 1: return data.getRepUrl(); default: return EMPTY_STR; //$NON-NLS-1$ } }