1 11 package org.eclipse.core.runtime.model; 12 13 import org.eclipse.core.runtime.PluginVersionIdentifier; 14 15 25 public abstract class PluginModel extends PluginModelObject { 26 27 33 private String schemaVersion = null; 34 35 private String id = null; 37 private String providerName = null; 38 private String version = null; 39 private LibraryModel[] runtime = null; 40 private ExtensionPointModel[] extensionPoints = null; 41 private ExtensionModel[] extensions = null; 42 private PluginPrerequisiteModel[] requires = null; 43 44 private PluginRegistryModel registry = null; 46 private String location = null; 47 48 52 public PluginModel() { 53 super(); 54 } 55 56 61 public ExtensionPointModel[] getDeclaredExtensionPoints() { 62 return extensionPoints; 63 } 64 65 70 public ExtensionModel[] getDeclaredExtensions() { 71 return extensions; 72 } 73 74 83 public String getId() { 84 return id; 85 } 86 87 93 public String getLocation() { 94 return location; 95 } 96 97 106 public abstract String getPluginId(); 107 108 113 public String getProviderName() { 114 return providerName; 115 } 116 117 123 public PluginRegistryModel getRegistry() { 124 return registry; 125 } 126 127 132 public PluginPrerequisiteModel[] getRequires() { 133 return requires; 134 } 135 136 141 public LibraryModel[] getRuntime() { 142 return runtime; 143 } 144 145 150 public String getVersion() { 151 return version; 152 } 153 154 160 public void markReadOnly() { 161 super.markReadOnly(); 162 if (runtime != null) 163 for (int i = 0; i < runtime.length; i++) 164 runtime[i].markReadOnly(); 165 if (extensionPoints != null) 166 for (int i = 0; i < extensionPoints.length; i++) 167 extensionPoints[i].markReadOnly(); 168 if (extensions != null) 169 for (int i = 0; i < extensions.length; i++) 170 extensions[i].markReadOnly(); 171 if (requires != null) 172 for (int i = 0; i < requires.length; i++) 173 requires[i].markReadOnly(); 174 } 175 176 183 public void setDeclaredExtensionPoints(ExtensionPointModel[] value) { 184 assertIsWriteable(); 185 extensionPoints = value; 186 } 187 188 195 public void setDeclaredExtensions(ExtensionModel[] value) { 196 assertIsWriteable(); 197 extensions = value; 198 } 199 200 209 public void setId(String value) { 210 assertIsWriteable(); 211 id = value; 212 } 213 214 220 public void setLocalizedProviderName(String value) { 221 providerName = value; 222 } 223 224 232 public void setLocation(String value) { 233 assertIsWriteable(); 234 location = value; 235 } 236 237 244 public void setProviderName(String value) { 245 assertIsWriteable(); 246 providerName = value; 247 } 248 249 256 public void setRegistry(PluginRegistryModel value) { 257 assertIsWriteable(); 258 registry = value; 259 } 260 261 267 public void setRequires(PluginPrerequisiteModel[] value) { 268 assertIsWriteable(); 269 requires = value; 270 } 271 272 278 public void setRuntime(LibraryModel[] value) { 279 assertIsWriteable(); 280 runtime = value; 281 } 282 283 291 public void setVersion(String value) { 292 assertIsWriteable(); 293 version = new PluginVersionIdentifier(value).toString(); 294 } 295 296 309 public String getSchemaVersion() { 310 return schemaVersion; 311 } 312 313 326 public void setSchemaVersion(String value) { 327 assertIsWriteable(); 328 if (value == null) 329 schemaVersion = null; 330 else 331 schemaVersion = new PluginVersionIdentifier(value).toString(); 332 } 333 334 } 335 | Popular Tags |