[netbeans] branch master updated: Fixed issue #5375 for intersection type

2023-03-23 Thread junichi11
This is an automated email from the ASF dual-hosted git repository.

junichi11 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 ac76fd10e1 Fixed issue #5375 for intersection type
 new 3f2916e457 Merge pull request #5700 from 
troizet/intersection_part_gh5375
ac76fd10e1 is described below

commit ac76fd10e1ab74d0bf885afe325755142c1ee739
Author: Alexey Borokhvostov 
AuthorDate: Wed Mar 22 23:02:09 2023 +0700

Fixed issue #5375 for intersection type
---
 .../modules/php/editor/parser/api/Utils.java   |  4 +-
 .../documentation/issueGH5375Intersection.php  | 44 ++
 ...eGH5375Intersection.php.testIssueGH5375_03.html | 11 ++
 ...eGH5375Intersection.php.testIssueGH5375_04.html | 10 +
 .../editor/completion/PHPCCDocumentationTest.java  |  8 
 5 files changed, 76 insertions(+), 1 deletion(-)

diff --git 
a/php/php.editor/src/org/netbeans/modules/php/editor/parser/api/Utils.java 
b/php/php.editor/src/org/netbeans/modules/php/editor/parser/api/Utils.java
index ee2e2e7c42..70a042f2f2 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/api/Utils.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/api/Utils.java
@@ -29,6 +29,7 @@ import 
org.netbeans.modules.php.editor.parser.astnodes.ClassDeclaration;
 import org.netbeans.modules.php.editor.parser.astnodes.Comment;
 import org.netbeans.modules.php.editor.parser.astnodes.FunctionName;
 import org.netbeans.modules.php.editor.parser.astnodes.Identifier;
+import org.netbeans.modules.php.editor.parser.astnodes.IntersectionType;
 import org.netbeans.modules.php.editor.parser.astnodes.NamespaceName;
 import org.netbeans.modules.php.editor.parser.astnodes.NullableType;
 import org.netbeans.modules.php.editor.parser.astnodes.PHPDocBlock;
@@ -105,7 +106,8 @@ public final class Utils {
 ASTNode next = nodes.iterator().next();
 if (next instanceof NamespaceName
 || next instanceof NullableType
-|| next instanceof UnionType) {
+|| next instanceof UnionType
+|| next instanceof IntersectionType) {
 isFieldDeclaration = true;
 }
 }
diff --git 
a/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php
 
b/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php
new file mode 100644
index 00..83f087b4e5
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php
@@ -0,0 +1,44 @@
+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.
+ */
+
+class ClassA {}
+class ClassB extends ClassA {}
+
+
+class ClassName {
+
+/**
+ * This text should be displayed here.
+ */
+public ClassA $test_without_var_tag;
+
+/**
+ * This text should be displayed here.
+ * @var ClassA
+ */
+public ClassA $test_with_var_tag;
+
+public function test() {
+$this->test_without_var_tag;
+$this->test_with_var_tag;
+}
+
+}
+
diff --git 
a/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php.testIssueGH5375_03.html
 
b/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php.testIssueGH5375_03.html
new file mode 100644
index 00..9b46895426
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php.testIssueGH5375_03.html
@@ -0,0 +1,11 @@
+
+Code completion result for source line:
+$this->test_without_v|ar_tag;
+(QueryType=COMPLETION, prefixSearch=false, caseSensitive=true)
+VARIABLE   ClassA test_without_var  [PUBLIC]   ClassName
+Documentation:$test_without_var_tag
+This text should be displayed here.
+
+
+Type:ClassA & ClassB
+
\ No newline at end of file
diff --git 
a/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php.testIssueGH5375_04.html
 
b/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php.testIssueGH5375_04.html
new file mode 100644
index 00..a8d985526a
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/completion/documentation/issueGH5375Intersection.php.testIssueGH5375_04.html
@@ -0,0 +1,10 @@
+
+Code completion result for source line:
+$this->test_with_v|ar_tag;
+(QueryType=COMPLETION, prefixSearch=false, caseSensitive=true)
+VARIABLE   ClassA test_with_var_ta  [PUBLIC]   ClassName
+Documentation:$test_with_var_tag

[netbeans-nbpackage] branch dependabot/maven/master/org.apache.commons-commons-compress-1.23.0 created (now 7994962)

2023-03-23 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/master/org.apache.commons-commons-compress-1.23.0
in repository https://gitbox.apache.org/repos/asf/netbeans-nbpackage.git


  at 7994962  Bump commons-compress from 1.22 to 1.23.0

No new revisions were added by this update.


-
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 master updated: calculate javadoc links dynamically.

2023-03-23 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien 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 0ec0a985da calculate javadoc links dynamically.
 new cbacd2b7db Merge pull request #4837 from mbien/javadoc-link-gen
0ec0a985da is described below

commit 0ec0a985da4d07e464b657e8a4622d3286ed60c3
Author: Michael Bien 
AuthorDate: Fri Oct 21 19:50:15 2022 +0200

calculate javadoc links dynamically.
---
 .../J2SEPlatformDefaultJavadocImpl.java| 29 --
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git 
a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
 
b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
index b41084cebf..4800d3635e 100644
--- 
a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
+++ 
b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
@@ -22,6 +22,9 @@ import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.time.LocalDate;
+import java.time.Month;
+import java.time.Period;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -57,19 +60,19 @@ public final class J2SEPlatformDefaultJavadocImpl 
implements J2SEPlatformDefault
 OFFICIAL_JAVADOC.put("1.6", 
"https://docs.oracle.com/javase/6/docs/api/;); // NOI18N
 OFFICIAL_JAVADOC.put("1.7", 
"https://docs.oracle.com/javase/7/docs/api/;); // NOI18N
 OFFICIAL_JAVADOC.put("1.8", 
"https://docs.oracle.com/javase/8/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("9", 
"https://docs.oracle.com/javase/9/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("10", 
"https://docs.oracle.com/javase/10/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("11", 
"https://docs.oracle.com/en/java/javase/11/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("12", 
"https://docs.oracle.com/en/java/javase/12/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("13", 
"https://docs.oracle.com/en/java/javase/13/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("14", 
"https://docs.oracle.com/en/java/javase/14/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("15", 
"https://docs.oracle.com/en/java/javase/15/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("16", 
"https://docs.oracle.com/en/java/javase/16/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("17", 
"https://docs.oracle.com/en/java/javase/17/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("18", 
"https://docs.oracle.com/en/java/javase/18/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("19", 
"https://docs.oracle.com/en/java/javase/19/docs/api/;); // NOI18N
-OFFICIAL_JAVADOC.put("20", 
"https://download.java.net/java/early_access/jdk20/docs/api/;); // NOI18N Early 
access
-OFFICIAL_JAVADOC.put("21", 
"https://download.java.net/java/early_access/jdk21/docs/api/;); // NOI18N Early 
access
+
+// timezone shouldn't matter since the accuracy is worse than a day
+LocalDate jdk9 = LocalDate.of(2017, Month.SEPTEMBER, 21); // start of 
6 month schedule
+LocalDate now = LocalDate.now();
+
+if (now.isAfter(jdk9)) { // time traveler -> only java 8 doc for you
+int[] jdk = new int[] {9};
+jdk9.datesUntil(now, Period.ofMonths(6)).forEach((t) -> {
+OFFICIAL_JAVADOC.put(String.valueOf(jdk[0]), 
"https://docs.oracle.com/javase/"+jdk[0]+"/docs/api/;); // NOI18N
+jdk[0]++;
+});
+OFFICIAL_JAVADOC.put(String.valueOf(jdk[0]), 
"https://download.java.net/java/early_access/jdk"+jdk[0]+"/docs/api/;); // 
NOI18N Early access
+}
 }
 
 @Override


-
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 master updated: Do not register AddADBAction in context menu, the action is only used from NBLS (#5696)

2023-03-23 Thread jhorvath
This is an automated email from the ASF dual-hosted git repository.

jhorvath 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 150be19401 Do not register AddADBAction in context menu, the action is 
only used from NBLS (#5696)
150be19401 is described below

commit 150be1940121e740d2785e253be5767b1532c728
Author: Tomas Hurka 
AuthorDate: Thu Mar 23 10:38:46 2023 +0100

Do not register AddADBAction in context menu, the action is only used from 
NBLS (#5696)
---
 .../src/org/netbeans/modules/cloud/oracle/actions/AddADBAction.java | 6 --
 1 file changed, 6 deletions(-)

diff --git 
a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/AddADBAction.java
 
b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/AddADBAction.java
index 401f5cb3e8..d394e81903 100644
--- 
a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/AddADBAction.java
+++ 
b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/AddADBAction.java
@@ -28,7 +28,6 @@ import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.stream.Collectors;
@@ -49,8 +48,6 @@ import org.openide.NotifyDescriptor.ComposedInput.Callback;
 import org.openide.NotifyDescriptor.QuickPick;
 import org.openide.NotifyDescriptor.QuickPick.Item;
 import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionReferences;
 import org.openide.awt.ActionRegistration;
 import org.openide.util.Exceptions;
 import org.openide.util.NbBundle;
@@ -68,9 +65,6 @@ import org.openide.util.NbBundle;
 asynchronous = true
 )
 
-@ActionReferences(value = {
-@ActionReference(path = "Cloud/Oracle/Common/Actions", position = 260)
-})
 @NbBundle.Messages({
 "AddADB=Add Oracle Autonomous DB",
 "SelectProfile=Select OCI Profile",


-
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 master updated: register Database node under 'Cloud/Oracle/Databases' to match registration of corresponding actions (DownloadWalletAction and OpenServiceConsoleAction) (#5698)

2023-03-23 Thread jhorvath
This is an automated email from the ASF dual-hosted git repository.

jhorvath 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 7ac6511710 register Database node under 'Cloud/Oracle/Databases' to 
match registration of corresponding actions (DownloadWalletAction and 
OpenServiceConsoleAction) (#5698)
7ac6511710 is described below

commit 7ac6511710c25fe048a9254512f9b1e6c43d7e7a
Author: Tomas Hurka 
AuthorDate: Thu Mar 23 10:38:30 2023 +0100

register Database node under 'Cloud/Oracle/Databases' to match registration 
of corresponding actions (DownloadWalletAction and OpenServiceConsoleAction) 
(#5698)
---
 .../src/org/netbeans/modules/cloud/oracle/database/DatabaseNode.java| 2 +-
 .../src/org/netbeans/modules/cloud/oracle/resources/layer.xml   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/database/DatabaseNode.java
 
b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/database/DatabaseNode.java
index 65ca231bde..01f2ca6ce2 100644
--- 
a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/database/DatabaseNode.java
+++ 
b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/database/DatabaseNode.java
@@ -79,7 +79,7 @@ public class DatabaseNode extends OCINode {
 .map(d -> {
 List profiles = 
d.getConnectionStrings().getProfiles();
 DatabaseItem item = new DatabaseItem(
-OCID.of(d.getId(), "Database"), //NOI18N
+OCID.of(d.getId(), "Databases"), //NOI18N
 d.getDbName(),
 d.getServiceConsoleUrl(),
 getConnectionName(profiles));
diff --git 
a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/resources/layer.xml
 
b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/resources/layer.xml
index 9458a084c2..03c6ebc786 100644
--- 
a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/resources/layer.xml
+++ 
b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/resources/layer.xml
@@ -154,7 +154,7 @@
 
 
 
-
+
 
 
 



-
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