1 11 package org.eclipse.core.runtime.model; 12 13 import org.eclipse.core.runtime.Assert; 14 import org.eclipse.core.runtime.PluginVersionIdentifier; 15 16 26 public class PluginFragmentModel extends PluginModel { 27 28 public static final byte FRAGMENT_MATCH_UNSPECIFIED = 0; 29 public static final byte FRAGMENT_MATCH_PERFECT = 1; 30 public static final byte FRAGMENT_MATCH_EQUIVALENT = 2; 31 public static final byte FRAGMENT_MATCH_COMPATIBLE = 3; 32 public static final byte FRAGMENT_MATCH_GREATER_OR_EQUAL = 4; 33 34 private String plugin = null; 36 private String pluginVersion = null; 37 private byte pluginMatch = FRAGMENT_MATCH_UNSPECIFIED; 38 39 43 public PluginFragmentModel() { 44 super(); 45 } 46 47 60 public byte getMatch() { 61 return pluginMatch; 62 } 63 64 69 public String getPlugin() { 70 return plugin; 71 } 72 73 82 public String getPluginId() { 83 return getPlugin(); 84 } 85 86 91 public String getPluginVersion() { 92 return pluginVersion; 93 } 94 95 109 public void setMatch(byte value) { 110 assertIsWriteable(); 111 Assert.isTrue((value == FRAGMENT_MATCH_PERFECT) || (value == FRAGMENT_MATCH_EQUIVALENT) || (value == FRAGMENT_MATCH_COMPATIBLE) || (value == FRAGMENT_MATCH_GREATER_OR_EQUAL)); 112 pluginMatch = value; 113 } 114 115 122 public void setPlugin(String value) { 123 assertIsWriteable(); 124 plugin = value; 125 } 126 127 135 public void setPluginVersion(String value) { 136 assertIsWriteable(); 137 pluginVersion = new PluginVersionIdentifier(value).toString(); 138 } 139 } 140 | Popular Tags |