This is an automated email from the ASF dual-hosted git repository.

sdedic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 8cffc9c  Improved messages when project is opened bcs of file being 
worked on.
     new 0e13308  Merge pull request #2930 from sdedic/lsp/project-message
8cffc9c is described below

commit 8cffc9cbdb41ec4dde1b68c67cc04a28cebd8c93
Author: Svata Dedic <svatopluk.de...@oracle.com>
AuthorDate: Fri Apr 30 09:27:48 2021 +0200

    Improved messages when project is opened bcs of file being worked on.
---
 .../src/org/netbeans/modules/java/lsp/server/protocol/Server.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
 
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
index 607d328..371a54b 100644
--- 
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
+++ 
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
@@ -342,7 +342,7 @@ public final class Server {
         @NbBundle.Messages({
             "PROMPT_AskOpenProjectForFile=File {0} belongs to project {1}. To 
enable all features, the project should be opened"
                     + " and initialized by the Language Server. Do you want to 
proceed ?",
-            "PROMPT_AskOpenProjectForFileNoName=File {0} belongs to a project. 
To enable all features, the project should be opened"
+            "PROMPT_AskOpenProject=To enable all features of project {0}, it 
should be opened"
                     + " and initialized by the Language Server. Do you want to 
proceed ?",
             "PROMPT_AskOpenProjectForFile_Yes=Open and initialize",
             "PROMPT_AskOpenProjectForFile_No=No",
@@ -399,10 +399,10 @@ public final class Server {
                         yes,
                         new 
MessageActionItem(Bundle.PROMPT_AskOpenProjectForFile_No())
                     ));
-                    if (dispName.equals(prj.getProjectDirectory().getPath())) {
-                        
smrp.setMessage(Bundle.PROMPT_AskOpenProjectForFileNoName(file.getPath()));
+                    if (prj.getProjectDirectory() == file) {
+                        
smrp.setMessage(Bundle.PROMPT_AskOpenProject(dispName));
                     } else {
-                        
smrp.setMessage(Bundle.PROMPT_AskOpenProjectForFile(file.getPath(), dispName));
+                        
smrp.setMessage(Bundle.PROMPT_AskOpenProjectForFile(file.getNameExt(), 
dispName));
                     }
                     smrp.setType(MessageType.Info);
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to