Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java')
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java154
1 files changed, 77 insertions, 77 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java
index 05a761ea92..9fa290df2a 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java
@@ -17,81 +17,81 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackage;
public class SpecfileTag extends SpecfileElement {
- public enum TagType {
- INT, STRING
- }
-
- private TagType tagType;
-
- private String stringValue;
- private int intValue;
- private SpecfilePackage parent;
-
- public SpecfileTag() {
- // Empty constructor
- }
-
- public SpecfileTag(String name, String value, Specfile specfile,
- SpecfilePackage parentPackage) {
- setName(name);
- this.stringValue = value;
- this.tagType = TagType.STRING;
- super.setSpecfile(specfile);
- this.parent = parentPackage;
- }
-
- public SpecfileTag(String name, int value, Specfile specfile,
- SpecfilePackage parentPackage) {
- setName(name);
- this.intValue = value;
- this.tagType = TagType.INT;
- super.setSpecfile(specfile);
- this.parent = parentPackage;
- }
-
- public String getStringValue() {
- if (tagType == TagType.INT) {
- return Integer.toString(intValue);
- }
- return resolve(stringValue);
- }
-
- public void setValue(String value) {
- this.tagType = TagType.STRING;
- this.stringValue = value;
- }
-
- public int getIntValue() {
- return intValue;
- }
-
- public void setValue(int value) {
- this.tagType = TagType.INT;
- this.intValue = value;
- }
-
- public SpecfilePackage getParent() {
- return parent;
- }
-
- public void setParent(SpecfilePackage parent) {
- this.parent = parent;
- }
-
- @Override
- public String toString() {
- if (tagType == TagType.INT) {
- return getName() + ": " + getIntValue(); //$NON-NLS-1$
- }
- String tagValue = getStringValue();
- if ((tagValue != null) && (tagValue.length() > 0)
- && (tagValue.indexOf('%') > 0)) {
- return getName() + ": " + super.resolve(tagValue); //$NON-NLS-1$
- }
- return getName() + ": " + getStringValue(); //$NON-NLS-1$
- }
-
- public TagType getTagType() {
- return tagType;
- }
+ public enum TagType {
+ INT, STRING
+ }
+
+ private TagType tagType;
+
+ private String stringValue;
+ private int intValue;
+ private SpecfilePackage parent;
+
+ public SpecfileTag() {
+ // Empty constructor
+ }
+
+ public SpecfileTag(String name, String value, Specfile specfile,
+ SpecfilePackage parentPackage) {
+ setName(name);
+ this.stringValue = value;
+ this.tagType = TagType.STRING;
+ super.setSpecfile(specfile);
+ this.parent = parentPackage;
+ }
+
+ public SpecfileTag(String name, int value, Specfile specfile,
+ SpecfilePackage parentPackage) {
+ setName(name);
+ this.intValue = value;
+ this.tagType = TagType.INT;
+ super.setSpecfile(specfile);
+ this.parent = parentPackage;
+ }
+
+ public String getStringValue() {
+ if (tagType == TagType.INT) {
+ return Integer.toString(intValue);
+ }
+ return resolve(stringValue);
+ }
+
+ public void setValue(String value) {
+ this.tagType = TagType.STRING;
+ this.stringValue = value;
+ }
+
+ public int getIntValue() {
+ return intValue;
+ }
+
+ public void setValue(int value) {
+ this.tagType = TagType.INT;
+ this.intValue = value;
+ }
+
+ public SpecfilePackage getParent() {
+ return parent;
+ }
+
+ public void setParent(SpecfilePackage parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public String toString() {
+ if (tagType == TagType.INT) {
+ return getName() + ": " + getIntValue(); //$NON-NLS-1$
+ }
+ String tagValue = getStringValue();
+ if ((tagValue != null) && (tagValue.length() > 0)
+ && (tagValue.indexOf('%') > 0)) {
+ return getName() + ": " + super.resolve(tagValue); //$NON-NLS-1$
+ }
+ return getName() + ": " + getStringValue(); //$NON-NLS-1$
+ }
+
+ public TagType getTagType() {
+ return tagType;
+ }
}

Back to the top