aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kozlov2012-04-05 09:28:51 (EDT)
committerRoland Grunberg2012-04-12 17:01:33 (EDT)
commita4b943458b64b4bb253b23dc7620b840edfce7b8 (patch)
tree04e66e54ae09b169ac6727d946a372033c18a41b
parentfd6f2240f82cf50784730cee75a54faaf050d940 (diff)
downloadorg.eclipse.linuxtools-a4b943458b64b4bb253b23dc7620b840edfce7b8.zip
org.eclipse.linuxtools-a4b943458b64b4bb253b23dc7620b840edfce7b8.tar.gz
org.eclipse.linuxtools-a4b943458b64b4bb253b23dc7620b840edfce7b8.tar.bz2
Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.core.opxml.modeldata.DependentProcessor,
org.eclipse.linuxtools.internal.oprofile.core.opxml.modeldata.ModelDataProcessor, org.eclipse.linuxtools.internal.oprofile.core.opxml.modeldata.ModelDataProcessor.SamplesProcessor.
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java22
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java38
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java22
3 files changed, 41 insertions, 41 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java
index 979e5ba..f1c2e9e 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java
@@ -32,22 +32,22 @@ public class DependentProcessor extends XMLProcessor {
private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
//the current image being constructed
- private OpModelImage _image;
+ private OpModelImage image;
//a list of all the dependent images
- private ArrayList<OpModelImage> _imageList;
+ private ArrayList<OpModelImage> imageList;
//processor used for symbols of an image
private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
public void reset(Object callData) {
- _image = new OpModelImage();
- _imageList = new ArrayList<OpModelImage>();
+ image = new OpModelImage();
+ imageList = new ArrayList<OpModelImage>();
}
public void startElement(String name, Attributes attrs, Object callData) {
if (name.equals(IMAGE_TAG)) {
- _image.setName(valid_string(attrs.getValue(ATTR_IMAGENAME)));
- _image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
+ image.setName(valid_string(attrs.getValue(ATTR_IMAGENAME)));
+ image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
} else if (name.equals(SYMBOLS_TAG)) {
OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
}
@@ -57,18 +57,18 @@ public class DependentProcessor extends XMLProcessor {
*/
public void endElement(String name, Object callData) {
if (name.equals(IMAGE_TAG)) {
- _imageList.add(_image);
- _image = new OpModelImage();
+ imageList.add(image);
+ image = new OpModelImage();
} else if (name.equals(SYMBOLS_TAG)) {
- _image.setSymbols(_symbolsProcessor.getSymbols());
+ image.setSymbols(_symbolsProcessor.getSymbols());
} else if (name.equals(DEPENDENT_TAG)) {
OprofileSAXHandler.getInstance(callData).pop(DEPENDENT_TAG);
}
}
public OpModelImage[] getImages() {
- OpModelImage[] images = new OpModelImage[_imageList.size()];
- _imageList.toArray(images);
+ OpModelImage[] images = new OpModelImage[imageList.size()];
+ imageList.toArray(images);
return images;
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java
index ab27356..973d4ba 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java
@@ -24,8 +24,8 @@ import org.xml.sax.Attributes;
public class ModelDataProcessor extends XMLProcessor {
//The resulting image compiled by the processor to be used by the caller.
public static class CallData {
- public OpModelImage image;
- public CallData(OpModelImage im) { image = im; }
+ public OpModelImage opModelImage;
+ public CallData(OpModelImage im) { opModelImage = im; }
}
//XML tags parsed by this processor
@@ -39,8 +39,8 @@ public class ModelDataProcessor extends XMLProcessor {
private static final String ATTR_DEPCOUNT = "count"; //$NON-NLS-1$
//the current image being constructed
- private OpModelImage _image;
- private int img_seen; //for ensuring image singleton-ness
+ private OpModelImage image;
+ private int imgSeen; //for ensuring image singleton-ness
//processors used for symbols and dependent images
private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
@@ -48,22 +48,22 @@ public class ModelDataProcessor extends XMLProcessor {
public void reset(Object callData) {
- _image = ((CallData) callData).image;
- img_seen = 0;
+ image = ((CallData) callData).opModelImage;
+ imgSeen = 0;
}
public void startElement(String name, Attributes attrs, Object callData) {
if (name.equals(IMAGE_TAG)) {
- if (img_seen == 0) {
- _image.setName(valid_string(attrs.getValue(ATTR_IMAGENAME)));
- _image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
+ if (imgSeen == 0) {
+ image.setName(valid_string(attrs.getValue(ATTR_IMAGENAME)));
+ image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
}
- img_seen++;
+ imgSeen++;
} else if (name.equals(SYMBOLS_TAG)) {
OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
} else if (name.equals(DEPENDENT_TAG)) {
- _image.setDepCount(Integer.parseInt(attrs.getValue(ATTR_DEPCOUNT)));
+ image.setDepCount(Integer.parseInt(attrs.getValue(ATTR_DEPCOUNT)));
OprofileSAXHandler.getInstance(callData).push(_dependentProcessor);
} else {
super.startElement(name, attrs, callData);
@@ -72,19 +72,19 @@ public class ModelDataProcessor extends XMLProcessor {
public void endElement(String name, Object callData) {
if (name.equals(IMAGE_TAG)) {
- if (img_seen > 1) {
+ if (imgSeen > 1) {
//should only ever be one image, otherwise oprofile was run
// outside of eclipse and the ui would not handle it properly
- _image.setCount(OpModelImage.IMAGE_PARSE_ERROR);
- _image.setDepCount(0);
- _image.setDependents(null);
- _image.setSymbols(null);
- _image.setName(""); //$NON-NLS-1$
+ image.setCount(OpModelImage.IMAGE_PARSE_ERROR);
+ image.setDepCount(0);
+ image.setDependents(null);
+ image.setSymbols(null);
+ image.setName(""); //$NON-NLS-1$
}
} else if (name.equals(SYMBOLS_TAG)){
- _image.setSymbols(_symbolsProcessor.getSymbols());
+ image.setSymbols(_symbolsProcessor.getSymbols());
} else if (name.equals(DEPENDENT_TAG)){
- _image.setDependents(_dependentProcessor.getImages());
+ image.setDependents(_dependentProcessor.getImages());
} else {
super.endElement(name, callData);
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
index 699622c..91f31cc 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
@@ -31,13 +31,13 @@ public class SamplesProcessor extends XMLProcessor {
private static final String FILE_TAG = "file"; //$NON-NLS-1$
//the current sample being constructed
- private OpModelSample _sample;
+ private OpModelSample sample;
//a list of all samples (for this symbol)
- private ArrayList<OpModelSample> _sampleList;
+ private ArrayList<OpModelSample> sampleList;
public void reset(Object callData) {
- _sample = new OpModelSample();
- _sampleList = new ArrayList<OpModelSample>();
+ sample = new OpModelSample();
+ sampleList = new ArrayList<OpModelSample>();
}
/**
@@ -45,22 +45,22 @@ public class SamplesProcessor extends XMLProcessor {
*/
public void endElement(String name, Object callData) {
if (name.equals(COUNT_TAG)) {
- _sample.setCount(Integer.parseInt(characters));
+ sample.setCount(Integer.parseInt(characters));
} else if (name.equals(LINE_TAG)) {
- _sample.setLine(Integer.parseInt(characters));
+ sample.setLine(Integer.parseInt(characters));
} else if (name.equals(FILE_TAG)) {
- _sample.setFilePath(characters);
+ sample.setFilePath(characters);
} else if (name.equals(SAMPLE_TAG)) {
- _sampleList.add(_sample);
- _sample = new OpModelSample();
+ sampleList.add(sample);
+ sample = new OpModelSample();
} else if (name.equals(SYMBOL_TAG)) {
OprofileSAXHandler.getInstance(callData).pop(SYMBOL_TAG);
}
}
public OpModelSample[] getSamples() {
- OpModelSample[] samples = new OpModelSample[_sampleList.size()];
- _sampleList.toArray(samples);
+ OpModelSample[] samples = new OpModelSample[sampleList.size()];
+ sampleList.toArray(samples);
return samples;
}
}