[jira] [Commented] (NETBEANS-6475) Php namespace input not filled up

2022-04-26 Thread Junichi Yamamoto (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528464#comment-17528464
 ] 

Junichi Yamamoto commented on NETBEANS-6475:


Note: Please don't misunderstand. I say the same thing for not only you but 
also everyone. "Write/Attach an example code/project". I'm not the reporter. 
It's the reporter to know the details.
It's hard for a developer to create an example code/project from scratch for 
each issue because the developer doesn't know the details and there are also 
issues other than this. (Do you want to do it if you were me?)
If we can't reproduce it, we have to repeat questions. It means that we(of 
course, also including the reporter) have to spend more time. I don't think 
that it is happy with each other. At least, I would like to avoid that. (Maybe, 
you, too?) As you say (have no time), our time is limited. It's the better way 
to attach that.

As I wrote above, no need to hurry, of course.

Thanks.

> Php namespace input not filled up
> -
>
> Key: NETBEANS-6475
> URL: https://issues.apache.org/jira/browse/NETBEANS-6475
> Project: NetBeans
>  Issue Type: Bug
>  Components: php - Editor, php - Project
>Affects Versions: 13
>Reporter: Jayce
>Assignee: Junichi Yamamoto
>Priority: Minor
>
> In a project, in Netbeans 12.X, RightClick->New php class: The Namespace 
> input was filled with the correct namespace if an other class is present with 
> a namespace in the folder.
> +*Bug:*+ With Netbeans 13, the Namespace input is {*}always empty{*}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

-
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



[netbeans] branch delivery updated: Smart stepping implemented for Groovy. SmartSteppingFilterWrapper introduced as a step-specific filter.

2022-04-26 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/delivery by this push:
 new 74580fc2e7 Smart stepping implemented for Groovy. 
SmartSteppingFilterWrapper introduced as a step-specific filter.
 new 28b6c66af7 Merge pull request #4004 from entlicher/GroovySmartStepping
74580fc2e7 is described below

commit 74580fc2e77f048b3bb85b0eb8386afaecabe40c
Author: Martin Entlicher 
AuthorDate: Thu Apr 14 11:06:47 2022 +0200

Smart stepping implemented for Groovy. SmartSteppingFilterWrapper 
introduced as a step-specific filter.
---
 .../groovy/support/debug/GroovySmartStepping.java  | 105 +
 .../spi/debugger/jpda/SmartSteppingCallback.java   |  13 ++-
 .../debugger/jpda/ui/SmartSteppingImpl.java|  12 +--
 .../ui/actions/JPDAMethodChooserFactoryUIImpl.java |   6 ++
 .../modules/debugger/jpda/JPDADebuggerImpl.java|  11 +--
 .../modules/debugger/jpda/JPDAStepImpl.java|  36 ++-
 .../jpda/actions/SmartSteppingFilterImpl.java  |  47 +
 .../jpda/actions/SmartSteppingFilterWrapper.java   |  87 +
 .../debugger/jpda/actions/StepActionProvider.java  |  49 +++---
 .../debugger/jpda/actions/StepIntoNextMethod.java  |  41 
 10 files changed, 287 insertions(+), 120 deletions(-)

diff --git 
a/groovy/groovy.support/src/org/netbeans/modules/groovy/support/debug/GroovySmartStepping.java
 
b/groovy/groovy.support/src/org/netbeans/modules/groovy/support/debug/GroovySmartStepping.java
new file mode 100644
index 00..946a74f786
--- /dev/null
+++ 
b/groovy/groovy.support/src/org/netbeans/modules/groovy/support/debug/GroovySmartStepping.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.groovy.support.debug;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.WeakHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+
+import org.netbeans.api.debugger.jpda.CallStackFrame;
+import org.netbeans.api.debugger.jpda.JPDAStep;
+import org.netbeans.api.debugger.jpda.JPDAThread;
+import org.netbeans.api.debugger.jpda.SmartSteppingFilter;
+import org.netbeans.spi.debugger.ContextProvider;
+import org.netbeans.spi.debugger.jpda.SmartSteppingCallback;
+
+/**
+ * Stepping in Groovy, steps through the language implementation.
+ */
+@SmartSteppingCallback.Registration(path="netbeans-JPDASession")
+public class GroovySmartStepping extends SmartSteppingCallback {
+
+private static final String[] GROOVY_PACKAGES = { "org.codehaus.groovy.", 
"org.apache.groovy.", "groovy.", "groovyjar" };   // NOI18N
+private static final Set PATTERNS_SKIP_IN_GROOVY = 
Collections.unmodifiableSet(new HashSet<>(Arrays.asList("java.", 
"jdk.internal.", "sun.", "com.sun."))); // NOI18N
+private static final Set FILTERS_SKIP_IN_GROOVY = 
PATTERNS_SKIP_IN_GROOVY.stream().map(pattern -> pattern + 
'*').collect(Collectors.toSet());
+
+private static final Logger logger = 
Logger.getLogger(GroovySmartStepping.class.getName());
+
+private final Map steppingInGroovy = 
Collections.synchronizedMap(new WeakHashMap<>());
+
+@Override
+public void initFilter (SmartSteppingFilter filter) {
+}
+
+@Override
+public boolean stopHere (ContextProvider lookupProvider, JPDAThread 
thread, SmartSteppingFilter filter) {
+return true;
+}
+
+@Override
+public StopOrStep stopAt(ContextProvider lookupProvider, CallStackFrame 
frame, SmartSteppingFilter filter) {
+String className = frame.getClassName();
+if (logger.isLoggable(Level.FINE)) {
+logger.fine("GroovySmartStepping.stopAt("+className+")");
+}
+JPDAThread thread = frame.getThread();
+boolean inGroovy = false;
+for (String gp : GROOVY_PACKAGES) {
+if (className.startsWith(gp)) {
+inGroovy = true;
+steppingInGroovy.put(filter, true);
+ 

[jira] [Commented] (NETBEANS-6475) Php namespace input not filled up

2022-04-26 Thread Junichi Yamamoto (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528065#comment-17528065
 ] 

Junichi Yamamoto commented on NETBEANS-6475:


Well, I meant not an _actual_ project but an _example_ project.

It's good to report issues. However, we can't do anything if we can't reproduce 
it exactly. So, I say "attach an example code/project".

Thanks for understanding.

> 1) i have no time for that

Need not hurry, Please do it when you have time.

> Php namespace input not filled up
> -
>
> Key: NETBEANS-6475
> URL: https://issues.apache.org/jira/browse/NETBEANS-6475
> Project: NetBeans
>  Issue Type: Bug
>  Components: php - Editor, php - Project
>Affects Versions: 13
>Reporter: Jayce
>Assignee: Junichi Yamamoto
>Priority: Minor
>
> In a project, in Netbeans 12.X, RightClick->New php class: The Namespace 
> input was filled with the correct namespace if an other class is present with 
> a namespace in the folder.
> +*Bug:*+ With Netbeans 13, the Namespace input is {*}always empty{*}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

-
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



[jira] [Commented] (NETBEANS-6475) Php namespace input not filled up

2022-04-26 Thread Jayce (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528043#comment-17528043
 ] 

Jayce commented on NETBEANS-6475:
-

1) i have no time for that

2) it occurs on private composer from the company, i can't disclose any 
name/code on. I guess you can have it on others.

As we understand and respect the time you spend on netbeans, you may also 
respect that on the ones spending time on reporting bugs instead of just throw 
some "attach something...".

I'm one of the last one trying to use Netbeans professionally in php dev 
because it still have advantages on competitors. But it's less and less true. I 
just try to improve Netbeans usability.

It's a regression i see daily since V12 (using V13 now)

Close the report if you don't want to handle it or can't reproduce it. I 
already spent too much time on that.

thanks.

 

> Php namespace input not filled up
> -
>
> Key: NETBEANS-6475
> URL: https://issues.apache.org/jira/browse/NETBEANS-6475
> Project: NetBeans
>  Issue Type: Bug
>  Components: php - Editor, php - Project
>Affects Versions: 13
>Reporter: Jayce
>Assignee: Junichi Yamamoto
>Priority: Minor
>
> In a project, in Netbeans 12.X, RightClick->New php class: The Namespace 
> input was filled with the correct namespace if an other class is present with 
> a namespace in the folder.
> +*Bug:*+ With Netbeans 13, the Namespace input is {*}always empty{*}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

-
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



[jira] [Commented] (NETBEANS-6475) Php namespace input not filled up

2022-04-26 Thread Junichi Yamamoto (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528027#comment-17528027
 ] 

Junichi Yamamoto commented on NETBEANS-6475:


As I wrote above, please attach an example project as a zip file.

> Php namespace input not filled up
> -
>
> Key: NETBEANS-6475
> URL: https://issues.apache.org/jira/browse/NETBEANS-6475
> Project: NetBeans
>  Issue Type: Bug
>  Components: php - Editor, php - Project
>Affects Versions: 13
>Reporter: Jayce
>Assignee: Junichi Yamamoto
>Priority: Minor
>
> In a project, in Netbeans 12.X, RightClick->New php class: The Namespace 
> input was filled with the correct namespace if an other class is present with 
> a namespace in the folder.
> +*Bug:*+ With Netbeans 13, the Namespace input is {*}always empty{*}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

-
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



[jira] [Commented] (NETBEANS-6475) Php namespace input not filled up

2022-04-26 Thread Jayce (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17527977#comment-17527977
 ] 

Jayce commented on NETBEANS-6475:
-

* Create a new project
 * Add some composer package to it
 * Inside the package, go to something like, let say, MyStuff/View/WhatEver.
 * Create a Class "Test1", with namespace MyStuff/View/WhatEver.
 * In the same folder, Use RightClick->New php class

The *Namespace dropdown* in the interface should show "MyStuff/View/WhatEver" 
because it already contains a file (Test1) with the correct namespace.

Again {*}it used to work before V12{*}. Something changed after that. You may 
start to see how the Input was filled back then compared to now.

> Php namespace input not filled up
> -
>
> Key: NETBEANS-6475
> URL: https://issues.apache.org/jira/browse/NETBEANS-6475
> Project: NetBeans
>  Issue Type: Bug
>  Components: php - Editor, php - Project
>Affects Versions: 13
>Reporter: Jayce
>Assignee: Junichi Yamamoto
>Priority: Minor
>
> In a project, in Netbeans 12.X, RightClick->New php class: The Namespace 
> input was filled with the correct namespace if an other class is present with 
> a namespace in the folder.
> +*Bug:*+ With Netbeans 13, the Namespace input is {*}always empty{*}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

-
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