|
Lines 789-796
Link Here
|
| 789 |
* @param modelId |
789 |
* @param modelId |
| 790 |
* @throws CoreException |
790 |
* @throws CoreException |
| 791 |
*/ |
791 |
*/ |
| 792 |
public void setModelId(String modelId) throws CoreException { |
792 |
public void setModelId(String modelId, String modelVersion) throws CoreException { |
| 793 |
BundleDescription newModel = getModel(modelId); |
793 |
BundleDescription newModel = getModel(modelId, modelVersion); |
| 794 |
if (newModel == null) { |
794 |
if (newModel == null) { |
| 795 |
String message = NLS.bind(Messages.exception_missingElement, modelId); |
795 |
String message = NLS.bind(Messages.exception_missingElement, modelId); |
| 796 |
throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_ELEMENT_MISSING, message, null)); |
796 |
throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_ELEMENT_MISSING, message, null)); |
|
Lines 1295-1302
Link Here
|
| 1295 |
* @param modelId the identifier of the model object to lookup |
1295 |
* @param modelId the identifier of the model object to lookup |
| 1296 |
* @return the model object or <code>null</code> |
1296 |
* @return the model object or <code>null</code> |
| 1297 |
*/ |
1297 |
*/ |
| 1298 |
protected BundleDescription getModel(String modelId) throws CoreException { |
1298 |
protected BundleDescription getModel(String modelId, String modelVersion) throws CoreException { |
| 1299 |
return getSite(false).getRegistry().getResolvedBundle(modelId); |
1299 |
if (modelVersion == null) |
|
|
1300 |
return getSite(false).getRegistry().getResolvedBundle(modelId); |
| 1301 |
return getSite(false).getRegistry().getResolvedBundle(modelId, modelVersion); |
| 1300 |
} |
1302 |
} |
| 1301 |
|
1303 |
|
| 1302 |
public IPluginEntry getAssociatedEntry() { |
1304 |
public IPluginEntry getAssociatedEntry() { |