This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 203232
Collapse All | Expand All

(-)a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/dataprovider/SSStackDataProvider.java (-3 / +9 lines)
Lines 135-140 Link Here
135
    private PerfanDataStorage storage;
135
    private PerfanDataStorage storage;
136
    private SSSourceFileInfoSupport sourceFileInfoSupport = null;
136
    private SSSourceFileInfoSupport sourceFileInfoSupport = null;
137
    private PathMapper pathMapper = null;
137
    private PathMapper pathMapper = null;
138
    private String fullRemotePrefix = "";
138
    private Map<String, String> serviceInfo = null;
139
    private Map<String, String> serviceInfo = null;
139
    private volatile HotSpotFunctionsFilter filter;
140
    private volatile HotSpotFunctionsFilter filter;
140
    private volatile TimeIntervalDataFilter timeIntervalDataFilter;
141
    private volatile TimeIntervalDataFilter timeIntervalDataFilter;
Lines 150-157 Link Here
150
                ? ExecutionEnvironmentFactory.getLocal()
151
                ? ExecutionEnvironmentFactory.getLocal()
151
                : ExecutionEnvironmentFactory.fromUniqueID(envID);
152
                : ExecutionEnvironmentFactory.fromUniqueID(envID);
152
153
153
        PathMapperProvider pathMapperProvider = Lookup.getDefault().lookup(PathMapperProvider.class);
154
        String fullRemoteValue = serviceInfoStorage.getValue(ServiceInfoDataStorage.FULL_REMOTE_KEY);
154
        pathMapper = pathMapperProvider == null ? null : pathMapperProvider.getPathMapper(execEnv);
155
        if (fullRemoteValue !=null && "true".equalsIgnoreCase(fullRemoteValue.trim())) {
156
            fullRemotePrefix = "rfs:" + ExecutionEnvironmentFactory.toUniqueID(execEnv); // NOI18N
157
        } else {
158
            PathMapperProvider pathMapperProvider = Lookup.getDefault().lookup(PathMapperProvider.class);
159
            pathMapper = pathMapperProvider == null ? null : pathMapperProvider.getPathMapper(execEnv);
160
        }
155
        serviceInfo = Collections.unmodifiableMap(serviceInfoStorage.getInfo());
161
        serviceInfo = Collections.unmodifiableMap(serviceInfoStorage.getInfo());
156
        nonSSSourceInfoCache.clear();
162
        nonSSSourceInfoCache.clear();
157
    }
163
    }
Lines 341-347 Link Here
341
        final FunctionCallImpl fci = (FunctionCallImpl) functionCall;
347
        final FunctionCallImpl fci = (FunctionCallImpl) functionCall;
342
        final Long refID = fci.getFunctionRefID();
348
        final Long refID = fci.getFunctionRefID();
343
349
344
        SourceFileInfo result = sourceFileInfoSupport.getSourceFileInfo(fci, pathMapper);
350
        SourceFileInfo result = sourceFileInfoSupport.getSourceFileInfo(fci, pathMapper, fullRemotePrefix);
345
351
346
        if (result == null || !result.isSourceKnown()) {
352
        if (result == null || !result.isSourceKnown()) {
347
            synchronized (nonSSSourceInfoCache) {
353
            synchronized (nonSSSourceInfoCache) {
(-)a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/lineinfo/impl/SSSourceFileInfoSupport.java (-9 / +14 lines)
Lines 68-79 Link Here
68
        return new SSSourceFileInfoSupport(storage);
68
        return new SSSourceFileInfoSupport(storage);
69
    }
69
    }
70
70
71
    public SourceFileInfo getSourceFileInfo(final FunctionCallImpl functionCall, PathMapper pathMapper) {
71
    public SourceFileInfo getSourceFileInfo(final FunctionCallImpl functionCall, PathMapper pathMapper, String urlPrefix) {
72
        SourceFileInfo result = null;
72
        SourceFileInfo result = null;
73
73
74
        try {
74
        try {
75
            SourceFileInfoFetchTaskParams params = new SourceFileInfoFetchTaskParams(
75
            SourceFileInfoFetchTaskParams params = new SourceFileInfoFetchTaskParams(
76
                    functionCall, storage, pathMapper);
76
                    functionCall, storage, pathMapper, urlPrefix);
77
            result = sourceLineInfoCachedProvider.compute(params);
77
            result = sourceLineInfoCachedProvider.compute(params);
78
        } catch (Throwable ex) {
78
        } catch (Throwable ex) {
79
        }
79
        }
Lines 81-96 Link Here
81
        return result;
81
        return result;
82
    }
82
    }
83
83
84
    public final static class SourceFileInfoFetchTaskParams {
84
    final static class SourceFileInfoFetchTaskParams {
85
85
86
        public final FunctionCallImpl functionCall;
86
        public final FunctionCallImpl functionCall;
87
        public final PerfanDataStorage storage;
87
        public final PerfanDataStorage storage;
88
        public final PathMapper pathMapper;
88
        public final PathMapper pathMapper;
89
        public final String urlPrefix;
89
90
90
        SourceFileInfoFetchTaskParams(FunctionCallImpl functionCall, PerfanDataStorage storage, PathMapper pathMapper) {
91
        SourceFileInfoFetchTaskParams(FunctionCallImpl functionCall, PerfanDataStorage storage, PathMapper pathMapper, String urlPrefix) {
91
            this.functionCall = functionCall;
92
            this.functionCall = functionCall;
92
            this.storage = storage;
93
            this.storage = storage;
93
            this.pathMapper = pathMapper;
94
            this.pathMapper = pathMapper;
95
            this.urlPrefix = urlPrefix;
94
        }
96
        }
95
97
96
        @Override
98
        @Override
Lines 114-119 Link Here
114
                return false;
116
                return false;
115
            } else if (!this.pathMapper.equals(that.pathMapper)) {
117
            } else if (!this.pathMapper.equals(that.pathMapper)) {
116
                return false;
118
                return false;
119
            } else if (!this.urlPrefix.equals(that.urlPrefix)) {
120
                return false;
117
            }
121
            }
118
122
119
            return true;
123
            return true;
Lines 125-130 Link Here
125
            hash = (int) (17 * hash + this.functionCall.getFunctionRefID());
129
            hash = (int) (17 * hash + this.functionCall.getFunctionRefID());
126
            hash = 17 * hash + (this.storage != null ? this.storage.hashCode() : 0);
130
            hash = 17 * hash + (this.storage != null ? this.storage.hashCode() : 0);
127
            hash = 17 * hash + (this.pathMapper != null ? this.pathMapper.hashCode() : 0);
131
            hash = 17 * hash + (this.pathMapper != null ? this.pathMapper.hashCode() : 0);
132
            hash = 17 * hash + this.urlPrefix.hashCode();
128
            return hash;
133
            return hash;
129
        }
134
        }
130
    }
135
    }
Lines 147-157 Link Here
147
                        sourceFile = fStatistics.getSourceFile();
152
                        sourceFile = fStatistics.getSourceFile();
148
153
149
                        line = line < 0 ? fStatistics.getSrcFileLine() : line;
154
                        line = line < 0 ? fStatistics.getSrcFileLine() : line;
150
                        if (sourceFile != null && params.pathMapper != null && !"(unknown)".equals(sourceFile)) { // NOI18N
155
                        if (sourceFile != null && !"(unknown)".equals(sourceFile)) { // NOI18N
151
                            String localFile = params.pathMapper.getLocalPath(sourceFile);
156
                            if (!params.urlPrefix.isEmpty()) {
152
                            if (localFile != null) {
157
                                sourceFile = params.urlPrefix + sourceFile;
153
                                File localFileFile = new File(localFile);
158
                            } else if (params.pathMapper != null) {
154
                                sourceFile = localFileFile.exists() ? localFileFile.getAbsolutePath() : null;
159
                                sourceFile = params.pathMapper.getLocalPath(sourceFile);
155
                            }
160
                            }
156
                        }
161
                        }
157
162
(-)a/dlight/src/org/netbeans/modules/dlight/spi/storage/ServiceInfoDataStorage.java (+1 lines)
Lines 50-55 Link Here
50
 */
50
 */
51
public interface ServiceInfoDataStorage {
51
public interface ServiceInfoDataStorage {
52
    static final String EXECUTION_ENV_KEY = "service.storage.execution.env.key";//NOI18N
52
    static final String EXECUTION_ENV_KEY = "service.storage.execution.env.key";//NOI18N
53
    static final String FULL_REMOTE_KEY = "full.remote";//NOI18N "true"/"false"
53
    static final String HOST_NAME = "service.storage.hostname";//NOI18N
54
    static final String HOST_NAME = "service.storage.hostname";//NOI18N
54
    static final String USER_NAME = "service.storage.username";//NOI18N
55
    static final String USER_NAME = "service.storage.username";//NOI18N
55
    static final String PORT = "service.storage.port";//NOI18N
56
    static final String PORT = "service.storage.port";//NOI18N

Return to bug 203232