troizet commented on code in PR #6241:
URL: https://github.com/apache/netbeans/pull/6241#discussion_r1272326101


##########
php/php.dbgp/src/org/netbeans/modules/php/dbgp/ui/DbgpLineBreakpointCustomizerPanel.java:
##########
@@ -367,49 +398,77 @@ public boolean cancel() {
 
         @NbBundle.Messages({
             "CustomizerController.invalid.file=Existing file must be set.",
-            "CustomizerController.invalid.line=Valid line number must be set."
+            "CustomizerController.non.php.file=PHP source file is expected.",
+            "CustomizerController.invalid.line=Valid line number must be set.",
+            "# {0} - entered line number",
+            "# {1} - maximum line number in file",
+            "CustomizerController.too.big.line.number=The line number {0} is 
too big. Maximum line number is {1}."
         })
-        @Override
-        public boolean isValid() {
+        public void checkValid() {
             boolean isValid = true;
             // file
             String fileName = fileTextField.getText();
             if (fileName == null || fileName.trim().length() == 0) {
                 setErrorMessage(Bundle.CustomizerController_invalid_file());
-                return false;
+                setValid(false);
+                return;
             }
             File file = new File(fileName.trim());
             if (!file.exists()) {
                 setErrorMessage(Bundle.CustomizerController_invalid_file());
-                return false;
+                setValid(false);
+                return;
             }
             FileObject fileObject = FileUtil.toFileObject(file);
             if (fileObject == null) {
                 setErrorMessage(Bundle.CustomizerController_invalid_file());
-                return false;
+                setValid(false);
+                return;
+            }
+            else if (!FileUtils.isPhpFile(fileObject)) {

Review Comment:
   Done.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to