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

Robert Munteanu commented on SLING-3571:
----------------------------------------

The following seems the fix the problem for me, can you double-check?

I think you might be using Oak-specific properties, which are not present in 
Jackrabbit 2.x .

{code}
diff --git 
a/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltNodeTypeFactory.java
 
b/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltNodeTypeFactory.java
index a7b589d..468eaa0 100644
--- 
a/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltNodeTypeFactory.java
+++ 
b/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/VltNodeTypeFactory.java
@@ -161,28 +161,32 @@ public class VltNodeTypeFactory {
         
         // load mandatory
         String[] mandatoryProperties = (String[]) 
child.getProperties().get("rep:mandatoryProperties");
-        for (int i = 0; i < mandatoryProperties.length; i++) {
-            String aMandatoryProperty = mandatoryProperties[i];
-            VltPropertyDefinition vpd = pds.get(aMandatoryProperty);
-            if (vpd==null) {
-                vpd = new VltPropertyDefinition();
-                vpd.setName(aMandatoryProperty);
-                pds.put(aMandatoryProperty, vpd);
+        if (mandatoryProperties != null) {
+            for (int i = 0; i < mandatoryProperties.length; i++) {
+                String aMandatoryProperty = mandatoryProperties[i];
+                VltPropertyDefinition vpd = pds.get(aMandatoryProperty);
+                if (vpd == null) {
+                    vpd = new VltPropertyDefinition();
+                    vpd.setName(aMandatoryProperty);
+                    pds.put(aMandatoryProperty, vpd);
+                }
+                vpd.setMandatory(true);
             }
-            vpd.setMandatory(true);
         }
         
         // load protected
         String[] protectedProperties = (String[]) 
child.getProperties().get("rep:protectedProperties");
-        for (int i = 0; i < protectedProperties.length; i++) {
-            String aProtectedProperties = protectedProperties[i];
-            VltPropertyDefinition vpd = pds.get(aProtectedProperties);
-            if (vpd==null) {
-                vpd = new VltPropertyDefinition();
-                vpd.setName(aProtectedProperties);
-                pds.put(aProtectedProperties, vpd);
+        if (protectedProperties != null) {
+            for (int i = 0; i < protectedProperties.length; i++) {
+                String aProtectedProperties = protectedProperties[i];
+                VltPropertyDefinition vpd = pds.get(aProtectedProperties);
+                if (vpd == null) {
+                    vpd = new VltPropertyDefinition();
+                    vpd.setName(aProtectedProperties);
+                    pds.put(aProtectedProperties, vpd);
+                }
+                vpd.setProtected(true);
             }
-            vpd.setProtected(true);
         }
         
         nt.setDeclaredPropertyDefinitions(pds.values().toArray(new 
VltPropertyDefinition[pds.size()]));
{code}

> Introduce NodeTypeRegistry, attached to Repository
> --------------------------------------------------
>
>                 Key: SLING-3571
>                 URL: https://issues.apache.org/jira/browse/SLING-3571
>             Project: Sling
>          Issue Type: Task
>          Components: IDE
>            Reporter: Stefan Egli
>            Assignee: Stefan Egli
>             Fix For: Sling Eclipse IDE 1.0.0
>
>
> We need more node type support in the IDE to support proper content 
> manipulation checks and displaying properties with more details.
> To do this, we introduce a NodeTypeRegistry that is attached to the 
> Repository.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to