diff --git a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/dataprovider/SSStackDataProvider.java b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/dataprovider/SSStackDataProvider.java --- a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/dataprovider/SSStackDataProvider.java +++ b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/dataprovider/SSStackDataProvider.java @@ -135,6 +135,7 @@ private PerfanDataStorage storage; private SSSourceFileInfoSupport sourceFileInfoSupport = null; private PathMapper pathMapper = null; + private String fullRemotePrefix = ""; private Map serviceInfo = null; private volatile HotSpotFunctionsFilter filter; private volatile TimeIntervalDataFilter timeIntervalDataFilter; @@ -150,8 +151,13 @@ ? ExecutionEnvironmentFactory.getLocal() : ExecutionEnvironmentFactory.fromUniqueID(envID); - PathMapperProvider pathMapperProvider = Lookup.getDefault().lookup(PathMapperProvider.class); - pathMapper = pathMapperProvider == null ? null : pathMapperProvider.getPathMapper(execEnv); + String fullRemoteValue = serviceInfoStorage.getValue(ServiceInfoDataStorage.FULL_REMOTE_KEY); + if (fullRemoteValue !=null && "true".equalsIgnoreCase(fullRemoteValue.trim())) { + fullRemotePrefix = "rfs:" + ExecutionEnvironmentFactory.toUniqueID(execEnv); // NOI18N + } else { + PathMapperProvider pathMapperProvider = Lookup.getDefault().lookup(PathMapperProvider.class); + pathMapper = pathMapperProvider == null ? null : pathMapperProvider.getPathMapper(execEnv); + } serviceInfo = Collections.unmodifiableMap(serviceInfoStorage.getInfo()); nonSSSourceInfoCache.clear(); } @@ -341,7 +347,7 @@ final FunctionCallImpl fci = (FunctionCallImpl) functionCall; final Long refID = fci.getFunctionRefID(); - SourceFileInfo result = sourceFileInfoSupport.getSourceFileInfo(fci, pathMapper); + SourceFileInfo result = sourceFileInfoSupport.getSourceFileInfo(fci, pathMapper, fullRemotePrefix); if (result == null || !result.isSourceKnown()) { synchronized (nonSSSourceInfoCache) { diff --git a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/lineinfo/impl/SSSourceFileInfoSupport.java b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/lineinfo/impl/SSSourceFileInfoSupport.java --- a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/lineinfo/impl/SSSourceFileInfoSupport.java +++ b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/lineinfo/impl/SSSourceFileInfoSupport.java @@ -68,12 +68,12 @@ return new SSSourceFileInfoSupport(storage); } - public SourceFileInfo getSourceFileInfo(final FunctionCallImpl functionCall, PathMapper pathMapper) { + public SourceFileInfo getSourceFileInfo(final FunctionCallImpl functionCall, PathMapper pathMapper, String urlPrefix) { SourceFileInfo result = null; try { SourceFileInfoFetchTaskParams params = new SourceFileInfoFetchTaskParams( - functionCall, storage, pathMapper); + functionCall, storage, pathMapper, urlPrefix); result = sourceLineInfoCachedProvider.compute(params); } catch (Throwable ex) { } @@ -81,16 +81,18 @@ return result; } - public final static class SourceFileInfoFetchTaskParams { + final static class SourceFileInfoFetchTaskParams { public final FunctionCallImpl functionCall; public final PerfanDataStorage storage; public final PathMapper pathMapper; + public final String urlPrefix; - SourceFileInfoFetchTaskParams(FunctionCallImpl functionCall, PerfanDataStorage storage, PathMapper pathMapper) { + SourceFileInfoFetchTaskParams(FunctionCallImpl functionCall, PerfanDataStorage storage, PathMapper pathMapper, String urlPrefix) { this.functionCall = functionCall; this.storage = storage; this.pathMapper = pathMapper; + this.urlPrefix = urlPrefix; } @Override @@ -114,6 +116,8 @@ return false; } else if (!this.pathMapper.equals(that.pathMapper)) { return false; + } else if (!this.urlPrefix.equals(that.urlPrefix)) { + return false; } return true; @@ -125,6 +129,7 @@ hash = (int) (17 * hash + this.functionCall.getFunctionRefID()); hash = 17 * hash + (this.storage != null ? this.storage.hashCode() : 0); hash = 17 * hash + (this.pathMapper != null ? this.pathMapper.hashCode() : 0); + hash = 17 * hash + this.urlPrefix.hashCode(); return hash; } } @@ -147,11 +152,11 @@ sourceFile = fStatistics.getSourceFile(); line = line < 0 ? fStatistics.getSrcFileLine() : line; - if (sourceFile != null && params.pathMapper != null && !"(unknown)".equals(sourceFile)) { // NOI18N - String localFile = params.pathMapper.getLocalPath(sourceFile); - if (localFile != null) { - File localFileFile = new File(localFile); - sourceFile = localFileFile.exists() ? localFileFile.getAbsolutePath() : null; + if (sourceFile != null && !"(unknown)".equals(sourceFile)) { // NOI18N + if (!params.urlPrefix.isEmpty()) { + sourceFile = params.urlPrefix + sourceFile; + } else if (params.pathMapper != null) { + sourceFile = params.pathMapper.getLocalPath(sourceFile); } } diff --git a/dlight/src/org/netbeans/modules/dlight/spi/storage/ServiceInfoDataStorage.java b/dlight/src/org/netbeans/modules/dlight/spi/storage/ServiceInfoDataStorage.java --- a/dlight/src/org/netbeans/modules/dlight/spi/storage/ServiceInfoDataStorage.java +++ b/dlight/src/org/netbeans/modules/dlight/spi/storage/ServiceInfoDataStorage.java @@ -50,6 +50,7 @@ */ public interface ServiceInfoDataStorage { static final String EXECUTION_ENV_KEY = "service.storage.execution.env.key";//NOI18N + static final String FULL_REMOTE_KEY = "full.remote";//NOI18N "true"/"false" static final String HOST_NAME = "service.storage.hostname";//NOI18N static final String USER_NAME = "service.storage.username";//NOI18N static final String PORT = "service.storage.port";//NOI18N