|
Lines 59-64
Link Here
|
| 59 |
private static final String PROP_FILETOCHECK = "fileToCheck"; //$NON-NLS-1$ |
59 |
private static final String PROP_FILETOCHECK = "fileToCheck"; //$NON-NLS-1$ |
| 60 |
private static final String PROP_ELEMENTNAME = "elementName"; //$NON-NLS-1$ |
60 |
private static final String PROP_ELEMENTNAME = "elementName"; //$NON-NLS-1$ |
| 61 |
|
61 |
|
|
|
62 |
//Associated repository provider |
| 63 |
private static final String CVS_ID = "org.eclipse.team.cvs.core.cvsnature"; //$NON-NLS-1$ |
| 64 |
|
| 62 |
private void generateAuthentificationAntTask(Map entryInfos, IAntScript script) { |
65 |
private void generateAuthentificationAntTask(Map entryInfos, IAntScript script) { |
| 63 |
String password = (String) entryInfos.get(KEY_PASSWORD); |
66 |
String password = (String) entryInfos.get(KEY_PASSWORD); |
| 64 |
String cvsPassFileLocation = (String) entryInfos.get(KEY_CVSPASSFILE); |
67 |
String cvsPassFileLocation = (String) entryInfos.get(KEY_CVSPASSFILE); |
|
Lines 180-185
Link Here
|
| 180 |
int index = arg.indexOf('='); |
183 |
int index = arg.indexOf('='); |
| 181 |
if (index == -1) { |
184 |
if (index == -1) { |
| 182 |
legacyParseMapFileEntry(arguments, overrideTags, entryInfos); |
185 |
legacyParseMapFileEntry(arguments, overrideTags, entryInfos); |
|
|
186 |
addProjectReference(entryInfos); |
| 183 |
return; |
187 |
return; |
| 184 |
} |
188 |
} |
| 185 |
String key = arg.substring(0, index); |
189 |
String key = arg.substring(0, index); |
|
Lines 197-202
Link Here
|
| 197 |
entryInfos.put(KEY_PASSWORD, table.get(KEY_PASSWORD)); |
201 |
entryInfos.put(KEY_PASSWORD, table.get(KEY_PASSWORD)); |
| 198 |
entryInfos.put(KEY_PATH, table.get(KEY_PATH)); |
202 |
entryInfos.put(KEY_PATH, table.get(KEY_PATH)); |
| 199 |
entryInfos.put(KEY_PREBUILT, table.get(KEY_PREBUILT)); |
203 |
entryInfos.put(KEY_PREBUILT, table.get(KEY_PREBUILT)); |
|
|
204 |
addProjectReference(entryInfos); |
| 205 |
} |
| 206 |
|
| 207 |
private void addProjectReference(Map entryInfos) { |
| 208 |
String repoLocation = (String) entryInfos.get(KEY_CVSROOT); |
| 209 |
String module = (String) entryInfos.get(KEY_PATH); |
| 210 |
String projectName = (String) entryInfos.get(KEY_ELEMENT_NAME); |
| 211 |
String tag = (String) entryInfos.get(IFetchFactory.KEY_ELEMENT_TAG); |
| 212 |
if (repoLocation != null && module != null && projectName != null) { |
| 213 |
entryInfos.put(Constants.KEY_REPOSITORY_PROVIDER_ID, CVS_ID); |
| 214 |
entryInfos.put(Constants.KEY_PROJECT_REFERENCE, asReference(repoLocation, module, projectName, tag)); |
| 215 |
} |
| 216 |
} |
| 217 |
|
| 218 |
/** |
| 219 |
* Creates a project reference memento. |
| 220 |
* |
| 221 |
* @param repoLocation |
| 222 |
* @param module |
| 223 |
* @param projectName |
| 224 |
* @return project reference string |
| 225 |
*/ |
| 226 |
private String asReference(String repoLocation, String module, String projectName, String tagName) { |
| 227 |
StringBuffer buffer = new StringBuffer(); |
| 228 |
buffer.append("1.0,"); //$NON-NLS-1$ |
| 229 |
|
| 230 |
buffer.append(repoLocation); |
| 231 |
buffer.append(","); //$NON-NLS-1$ |
| 232 |
|
| 233 |
buffer.append(module); |
| 234 |
buffer.append(","); //$NON-NLS-1$ |
| 235 |
|
| 236 |
buffer.append(projectName); |
| 237 |
if (tagName != null) { |
| 238 |
buffer.append(","); //$NON-NLS-1$ |
| 239 |
buffer.append(tagName); |
| 240 |
} |
| 241 |
return buffer.toString(); |
| 200 |
} |
242 |
} |
| 201 |
|
243 |
|
| 202 |
/** |
244 |
/** |