Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawid Pakuła2019-04-13 07:16:29 -0400
committerDawid Pakuła2019-04-13 07:16:29 -0400
commite992f2edd332b4a0811747e3193ba56ce2ea9b33 (patch)
treecedb1f859fa74e03cfd3e503303a2897b6cd78b5
parent6c94be435827235b90a54e2ed067f1fe6b635c7a (diff)
downloadorg.eclipse.pdt-e992f2edd332b4a0811747e3193ba56ce2ea9b33.tar.gz
org.eclipse.pdt-e992f2edd332b4a0811747e3193ba56ce2ea9b33.tar.xz
org.eclipse.pdt-e992f2edd332b4a0811747e3193ba56ce2ea9b33.zip
Bug 545444 - replace php:internal by PHP
Change-Id: I445e9532c62f832562775c4c9a4316dc42817bf0 Signed-off-by: Dawid Pakuła <zulus@w3des.net>
-rw-r--r--plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFileData.java5
-rw-r--r--plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFunctionData.java2
-rw-r--r--plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/engine/cachegrind/CacheGrindModelParser.java8
3 files changed, 10 insertions, 5 deletions
diff --git a/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFileData.java b/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFileData.java
index 2b178ad4a..e7591c4fc 100644
--- a/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFileData.java
+++ b/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFileData.java
@@ -23,7 +23,6 @@ import org.eclipse.php.internal.debug.core.zend.debugger.CodeCoverageData;
* Profiler file data.
*/
public class ProfilerFileData {
-
private String fName;
private String fLocalName;
private int fFunctionsCount;
@@ -36,12 +35,12 @@ public class ProfilerFileData {
}
public ProfilerFileData(String name) {
- this.fName = name;
+ this.setName(name);
}
public ProfilerFileData(String fileName, String localFileName, int functionsCount, double totalOwnTime,
List<ProfilerFunctionData> functions) {
- fName = fileName;
+ this.setName(fileName);
fLocalName = localFileName;
fFunctionsCount = functionsCount;
fTotalOwnTime = totalOwnTime;
diff --git a/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFunctionData.java b/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFunctionData.java
index 27ec21f70..d13249606 100644
--- a/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFunctionData.java
+++ b/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/data/ProfilerFunctionData.java
@@ -115,7 +115,7 @@ public class ProfilerFunctionData {
* Sets local file name
*
* @param String
- * file name
+ * file name
*/
public void setLocalFileName(String name) {
this.fLocalFileName = name;
diff --git a/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/engine/cachegrind/CacheGrindModelParser.java b/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/engine/cachegrind/CacheGrindModelParser.java
index 49639ddad..57adf783a 100644
--- a/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/engine/cachegrind/CacheGrindModelParser.java
+++ b/plugins/org.eclipse.php.profile.core/src/org/eclipse/php/profile/core/engine/cachegrind/CacheGrindModelParser.java
@@ -24,6 +24,9 @@ import org.eclipse.php.profile.core.engine.cachegrind.CacheGrindParser.CacheGrin
public class CacheGrindModelParser {
private static final String MAIN = "{main}"; //$NON-NLS-1$
+ private static final String PHP_INTERNAL = "php:internal"; //$NON-NLS-1$
+ private static final String PHP_CLASS = "php"; //$NON-NLS-1$
+ private static final String PHP_FILE = "PHP"; //$NON-NLS-1$
private CacheGrindParser source;
private ProfilerData model;
private List<ProfilerData> models = new ArrayList<>();
@@ -247,6 +250,9 @@ public class CacheGrindModelParser {
}
private File regFile(int id, String name) {
+ if (name != null && name.equals(PHP_INTERNAL)) {
+ name = PHP_FILE;
+ }
if (id == -1) {
if (fileIds.containsKey(name)) {
return files.get(fileIds.get(name));
@@ -319,7 +325,7 @@ public class CacheGrindModelParser {
if (fName.equals(file.name)) {
modelFnc.setFunctionName(new StringBuilder(className).append(':').append(fName).toString());
} else {
- if (!file.name.equals("php:internal") && !className.equals("php")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (!file.name.equals(PHP_FILE) && !className.equals(PHP_CLASS)) {
modelFnc.setClassName(className);
}
modelFnc.setFunctionName(fName);

Back to the top