diff options
Diffstat (limited to 'rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java')
-rw-r--r-- | rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java index 25edcd7664..d06422a589 100644 --- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java +++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java @@ -18,62 +18,62 @@ import org.eclipse.jface.text.IDocument; public class SpecfileSection extends SpecfileElement { - private SpecfilePackage parentPackage; - private int sectionEndLine; + private SpecfilePackage parentPackage; + private int sectionEndLine; - public SpecfileSection(String name, Specfile specfile) { - super(name); - parentPackage = null; - super.setSpecfile(specfile); - } + public SpecfileSection(String name, Specfile specfile) { + super(name); + parentPackage = null; + super.setSpecfile(specfile); + } - public SpecfilePackage getPackage() { - return parentPackage; - } + public SpecfilePackage getPackage() { + return parentPackage; + } - public void setPackage(SpecfilePackage thePackage) { - this.parentPackage = thePackage; - } + public void setPackage(SpecfilePackage thePackage) { + this.parentPackage = thePackage; + } - @Override - public String toString() { - if (parentPackage == null) { - return getName(); - } else { - return MessageFormat.format("{0} {1}", getName(), parentPackage); //$NON-NLS-1$ - } - } + @Override + public String toString() { + if (parentPackage == null) { + return getName(); + } else { + return MessageFormat.format("{0} {1}", getName(), parentPackage); //$NON-NLS-1$ + } + } - public String getPackageName() { - return parentPackage.getPackageName(); - } + public String getPackageName() { + return parentPackage.getPackageName(); + } - /** - * @param sectionEnd - * the sectionEnd to set - */ - public void setSectionEndLine(int sectionEnd) { - this.sectionEndLine = sectionEnd; - } + /** + * @param sectionEnd + * the sectionEnd to set + */ + public void setSectionEndLine(int sectionEnd) { + this.sectionEndLine = sectionEnd; + } - /** - * @return the sectionEnd - */ - public int getSectionEndLine() { - return sectionEndLine; - } + /** + * @return the sectionEnd + */ + public int getSectionEndLine() { + return sectionEndLine; + } - public String getContents() { - IDocument document = getSpecfile().getDocument(); - int beginning = getLineStartPosition(); - try { - int end = document.getLineOffset(getSectionEndLine()); - return document.get(beginning, end-beginning); - } catch (BadLocationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return ""; //$NON-NLS-1$ - } + public String getContents() { + IDocument document = getSpecfile().getDocument(); + int beginning = getLineStartPosition(); + try { + int end = document.getLineOffset(getSectionEndLine()); + return document.get(beginning, end-beginning); + } catch (BadLocationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return ""; //$NON-NLS-1$ + } } |