1 11 package org.eclipse.pde.internal.ui.model.bundle; 12 13 import java.io.PrintWriter ; 14 15 import org.eclipse.pde.internal.core.bundle.BundleObject; 16 import org.eclipse.pde.internal.core.ibundle.IBundle; 17 import org.eclipse.pde.internal.ui.model.IDocumentKey; 18 19 public class ManifestHeader extends BundleObject implements IDocumentKey { 20 private static final long serialVersionUID = 1L; 21 private int fOffset = -1; 22 private int fLength = -1; 23 24 protected String fName; 25 protected String fValue; 26 private IBundle fBundle; 27 28 public ManifestHeader(String name, String value, IBundle bundle) { 29 fName = name; 30 fValue = value; 31 fBundle = bundle; 32 setModel(fBundle.getModel()); 33 } 34 35 38 public void setName(String name) { 39 fName = name; 40 } 41 44 public String getName() { 45 return fName; 46 } 47 48 public void setValue(String value) { 49 fValue = value; 50 } 51 52 public String getValue() { 53 return fValue; 54 } 55 58 public void setOffset(int offset) { 59 fOffset = offset; 60 } 61 64 public int getOffset() { 65 return fOffset; 66 } 67 70 public void setLength(int length) { 71 fLength = length; 72 } 73 76 public int getLength() { 77 return fLength; 78 } 79 82 public String write() { 83 updateValue(); 84 return fName + ": " + fValue; } 86 89 public void write(String indent, PrintWriter writer) { 90 } 91 92 public void setBundle(IBundle bundle) { 93 fBundle = bundle; 94 } 95 96 public IBundle getBundle() { 97 return fBundle; 98 } 99 100 public void updateValue() { 101 } 102 103 104 } 105 | Popular Tags |