You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/11/30 16:43:43 UTC

[GitHub] [netbeans] entlicher opened a new pull request #2572: Display sources loaded from String and find their MIME type.

entlicher opened a new pull request #2572:
URL: https://github.com/apache/netbeans/pull/2572


   Sources that have no File associated are put to a special virtual SourceFS filesystem. We add the MIME type information and use these files in NetBeans. It's also assured that breakpoints submitted into these files are resolved correctly.
   A simple API change needs to be done: `DVFrame.getSourceMimeType()`.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] entlicher merged pull request #2572: Display sources loaded from String and find their MIME type.

Posted by GitBox <gi...@apache.org>.
entlicher merged pull request #2572:
URL: https://github.com/apache/netbeans/pull/2572


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] entlicher commented on a change in pull request #2572: Display sources loaded from String and find their MIME type.

Posted by GitBox <gi...@apache.org>.
entlicher commented on a change in pull request #2572:
URL: https://github.com/apache/netbeans/pull/2572#discussion_r534033326



##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/NbProtocolServer.java
##########
@@ -286,11 +290,33 @@ public NbProtocolServer(DebugAdapterContext context) {
                     stackFrame.setId(frameId);
                     stackFrame.setName(frame.getName());
                     URI sourceURI = frame.getSourceURI();
-                    if (sourceURI != null && sourceURI.getPath() != null) {
+                    if (sourceURI != null) {
                         Source source = new Source();
-                        source.setName(Paths.get(sourceURI).getFileName().toString());
-                        source.setPath(sourceURI.getPath());
-                        source.setSourceReference(0);
+                        String scheme = sourceURI.getScheme();
+                        if (null == scheme || scheme.isEmpty() || "file".equalsIgnoreCase(scheme)) {
+                            source.setName(Paths.get(sourceURI).getFileName().toString());
+                            source.setPath(sourceURI.getPath());
+                            source.setSourceReference(0);
+                        } else {

Review comment:
       Right. I've created https://issues.apache.org/jira/browse/NETBEANS-5084




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2572: Display sources loaded from String and find their MIME type.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2572:
URL: https://github.com/apache/netbeans/pull/2572#discussion_r533575312



##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/NbProtocolServer.java
##########
@@ -286,11 +290,33 @@ public NbProtocolServer(DebugAdapterContext context) {
                     stackFrame.setId(frameId);
                     stackFrame.setName(frame.getName());
                     URI sourceURI = frame.getSourceURI();
-                    if (sourceURI != null && sourceURI.getPath() != null) {
+                    if (sourceURI != null) {
                         Source source = new Source();
-                        source.setName(Paths.get(sourceURI).getFileName().toString());
-                        source.setPath(sourceURI.getPath());
-                        source.setSourceReference(0);
+                        String scheme = sourceURI.getScheme();
+                        if (null == scheme || scheme.isEmpty() || "file".equalsIgnoreCase(scheme)) {
+                            source.setName(Paths.get(sourceURI).getFileName().toString());
+                            source.setPath(sourceURI.getPath());
+                            source.setSourceReference(0);
+                        } else {

Review comment:
       A test for this path would be nice. Maybe extend `ServerTest`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists