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

cgarcia pushed a commit to branch feature/app
in repository https://gitbox.apache.org/repos/asf/plc4x-extras.git


The following commit(s) were added to refs/heads/feature/app by this push:
     new 248cc7f  Update to fix library version.
248cc7f is described below

commit 248cc7fd49d1305dc47eda9157d772a3bf6e805b
Author: César García <[email protected]>
AuthorDate: Fri Jan 16 16:48:41 2026 -0400

    Update to fix library version.
---
 .../tools/malbec/application/nb-configuration.xml  |   1 +
 plc4j/tools/malbec/application/pom.xml             |   5 +-
 .../application/src/main/resources/malbec.conf     |  68 ++++++++++++
 .../malbec/projecttype/impl/Plc4xProjectImpl.java  |   1 +
 .../impl/Plc4xProjectLogicalViewImpl.java          | 118 +++++++++++++++++++++
 5 files changed, 191 insertions(+), 2 deletions(-)

diff --git a/plc4j/tools/malbec/application/nb-configuration.xml 
b/plc4j/tools/malbec/application/nb-configuration.xml
index 947ae8a..a9d1710 100644
--- a/plc4j/tools/malbec/application/nb-configuration.xml
+++ b/plc4j/tools/malbec/application/nb-configuration.xml
@@ -14,5 +14,6 @@ That way multiple projects can share the same settings 
(useful for formatting ru
 Any value defined here will override the pom.xml file value but is only 
applicable to the current project.
 -->
         
<com-github-philippefichet-sonarlint4netbeans.excludedRules>[{"repository":"php","rule":"S3335"},{"repository":"php","rule":"S3336"},{"repository":"php","rule":"S2002"},{"repository":"php","rule":"S2005"},{"repository":"php","rule":"S3333"},{"repository":"php","rule":"S3334"},{"repository":"Web","rule":"ImgWithoutWidthOrHeightCheck"},{"repository":"php","rule":"S1151"},{"repository":"php","rule":"S3332"},{"repository":"php","rule":"S2001"},{"repository":"Web","rule":"UnclosedTagC
 [...]
+        <netbeans.hint.jdkPlatform>Zulu_21.0.9_10</netbeans.hint.jdkPlatform>
     </properties>
 </project-shared-configuration>
diff --git a/plc4j/tools/malbec/application/pom.xml 
b/plc4j/tools/malbec/application/pom.xml
index 2dbe68e..878f2ff 100644
--- a/plc4j/tools/malbec/application/pom.xml
+++ b/plc4j/tools/malbec/application/pom.xml
@@ -158,7 +158,7 @@
         <dependency>
             <groupId>org.jspecify</groupId>
             <artifactId>jspecify</artifactId>
-            <version>1.0.0</version>
+            <version>0.3.0</version>            
         </dependency>
         <dependency>
             <groupId>org.netbeans.api</groupId>
@@ -174,6 +174,7 @@
                 <artifactId>nbm-maven-plugin</artifactId>
                 <extensions>true</extensions>
                 <configuration>
+                    <etcConfFile>src/main/resources/malbec.conf</etcConfFile>  
                   
                     <moduleDependencies>
                         <dependency>
                             <id>${project.groupId}:malbec-libs</id>
@@ -218,7 +219,7 @@
                 <plugins>
                     <plugin>
                         <groupId>org.apache.netbeans.utilities</groupId>
-                        <artifactId>nbm-maven-plugin</artifactId>              
                                 
+                        <artifactId>nbm-maven-plugin</artifactId>              
                                                     
                         <executions>
                             <execution>
                                 <id>extra</id>
diff --git a/plc4j/tools/malbec/application/src/main/resources/malbec.conf 
b/plc4j/tools/malbec/application/src/main/resources/malbec.conf
new file mode 100644
index 0000000..bf0d4e0
--- /dev/null
+++ b/plc4j/tools/malbec/application/src/main/resources/malbec.conf
@@ -0,0 +1,68 @@
+# 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.
+
+# ${HOME} will be replaced by user home directory according to platform.
+#
+# Default locations of userdir and cachedir:
+# (http://wiki.netbeans.org/FaqWhatIsUserdir)
+#
+# On Windows ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
+# with <AppData>\<AppName>, where <AppData> is the value of 
+# "AppData" key in Windows Registry under
+# "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
+# and ${DEFAULT_CACHEDIR_ROOT} will be replaced by the launcher
+# with the value of "<LocalAppData>\<AppName>\Cache" where "LocalAppData"
+# is a key in Windows Registry under 
+# "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders".
+# <AppName> is the the executable's filename without the extension.
+#
+# On Mac ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
+# with "~/Library/Application Support/<AppName>" and
+# ${DEFAULT_CACHEDIR_ROOT} with "~/Library/Caches/<AppName>"
+# where <AppName> is the launcher script's name.
+#
+# On other systems ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
+# with "${HOME}/.<AppName>" and ${DEFAULT_CACHEDIR_ROOT} with 
+# "${HOME}/.cache/<AppName>".
+#
+# You can also use ${HOME} variable which will be replaced with
+# user.home JVM system property value. 
+#
+# The above location variables are valid only in the default_userdir and
+# default_cachedir properties.
+#
+# NOTE: If you specify a non-default userdir path on command line
+# (--userdir option) and don't specify a cachedir path (--cachedir option),
+# cachedir will be in "<userdir>/var/cache".
+#
+# Cachedir must be different from userdir. The same cachedir and userdir
+# would cause problems.
+#
+
+default_userdir="${DEFAULT_USERDIR_ROOT}/dev"
+default_cachedir="${DEFAULT_CACHEDIR_ROOT}/dev"
+
+# options used by the launcher by default, can be overridden by explicit
+# command line switches
+default_options="--branding malbec 
-J--add-opens=java.base/java.net=ALL-UNNAMED 
-J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED 
-J--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED 
-J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED 
-J--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED 
-J--add-opens=java.desktop/javax.swing=ALL-UNNAMED"
+# for development purposes you may wish to append: 
-J-Dnetbeans.logger.console=true -J-ea
+
+# default location of JDK/JRE, can be overridden by using --jdkhome <dir> 
switch
+#jdkhome="/path/to/jdk"
+
+# clusters' paths separated by path.separator (se   micolon on Windows, colon 
on Unices)
+#extra_clusters=
diff --git 
a/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectImpl.java
 
b/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectImpl.java
index 816c233..3a42a7c 100644
--- 
a/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectImpl.java
+++ 
b/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectImpl.java
@@ -53,6 +53,7 @@ public class Plc4xProjectImpl implements Project{
             lkp = Lookups.fixed(new Object[]{
             // register your features here
                 new Plc4xProjectInfoImpl(),
+                new Plc4xProjectLogicalViewImpl(this),
             });
         }
         return lkp;
diff --git 
a/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectLogicalViewImpl.java
 
b/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectLogicalViewImpl.java
new file mode 100644
index 0000000..18cb69a
--- /dev/null
+++ 
b/plc4j/tools/malbec/malbec-projecttype/src/main/java/org/apache/plc4x/malbec/projecttype/impl/Plc4xProjectLogicalViewImpl.java
@@ -0,0 +1,118 @@
+/*
+ * 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
+ *
+ *   https://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.apache.plc4x.malbec.projecttype.impl;
+
+import java.awt.Image;
+import javax.swing.Action;
+import org.netbeans.api.annotations.common.StaticResource;
+import org.netbeans.spi.project.ui.LogicalViewProvider;
+import org.netbeans.spi.project.ui.support.CommonProjectActions;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataFolder;
+import org.openide.loaders.DataObjectNotFoundException;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.FilterNode;
+import org.openide.nodes.Node;
+import org.openide.util.Exceptions;
+import org.openide.util.ImageUtilities;
+import org.openide.util.Lookup;
+
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ProxyLookup;
+
+public class Plc4xProjectLogicalViewImpl implements LogicalViewProvider {
+
+    
+    @StaticResource()
+    public static final String CUSTOMER_ICON = 
"org/apache/plc4x/malbec/projecttype/impl/Proyecto.png";       
+    
+    private final Plc4xProjectImpl project;
+
+    public Plc4xProjectLogicalViewImpl(Plc4xProjectImpl project) {
+        this.project = project;
+    }
+    
+    @Override
+    public Node createLogicalView() {    
+        try {
+            //Obtain the project directory's node:
+            FileObject projectDirectory = project.getProjectDirectory();
+            DataFolder projectFolder = DataFolder.findFolder(projectDirectory);
+            Node nodeOfProjectFolder = projectFolder.getNodeDelegate();
+            //Decorate the project directory's node:
+            return new ProjectNode(nodeOfProjectFolder, project);
+        } catch (DataObjectNotFoundException donfe) {
+            Exceptions.printStackTrace(donfe);
+            //Fallback-the directory couldn't be created -
+            //read-only filesystem or something evil happened
+            return new AbstractNode(Children.LEAF);
+        }
+    }
+
+    @Override
+    public Node findPath(Node node, Object o) {
+        //leave unimplemented for now
+        return null;
+    }
+    
+    private final class ProjectNode extends FilterNode {
+
+        final Plc4xProjectImpl project;
+
+        public ProjectNode(Node node, Plc4xProjectImpl project)
+            throws DataObjectNotFoundException {
+            super(node,
+                    new FilterNode.Children(node),
+                    new ProxyLookup(
+                    new Lookup[]{
+                        Lookups.singleton(project),
+                        node.getLookup()
+                    }));
+            this.project = project;
+        }
+
+        @Override
+        public Action[] getActions(boolean arg0) {
+            return new Action[]{
+                        CommonProjectActions.newFileAction(),
+                        CommonProjectActions.copyProjectAction(),
+                        CommonProjectActions.deleteProjectAction(),
+                        CommonProjectActions.closeProjectAction()
+                    };
+        }
+
+        @Override
+        public Image getIcon(int type) {
+            return ImageUtilities.loadImage(CUSTOMER_ICON);
+        }
+
+        @Override
+        public Image getOpenedIcon(int type) {
+            return getIcon(type);
+        }
+
+        @Override
+        public String getDisplayName() {
+            return project.getProjectDirectory().getName();
+        }
+
+    }    
+    
+}

Reply via email to