You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2008/08/26 14:07:17 UTC

svn commit: r689041 - in /directory/studio/trunk: aciitemeditor/ aciitemeditor/META-INF/ aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ apacheds/ apacheds/META-INF/

Author: pamarcelot
Date: Tue Aug 26 05:07:16 2008
New Revision: 689041

URL: http://svn.apache.org/viewvc?rev=689041&view=rev
Log:
Part of a fix for DIRSTUDIO-375 (Move each plugin IDs in a plugin.properties file).

Added:
    directory/studio/trunk/aciitemeditor/plugin.properties
Modified:
    directory/studio/trunk/aciitemeditor/META-INF/MANIFEST.MF
    directory/studio/trunk/aciitemeditor/plugin.xml
    directory/studio/trunk/aciitemeditor/pom.xml
    directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java
    directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
    directory/studio/trunk/apacheds/META-INF/MANIFEST.MF
    directory/studio/trunk/apacheds/plugin.properties

Modified: directory/studio/trunk/aciitemeditor/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/META-INF/MANIFEST.MF?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/aciitemeditor/META-INF/MANIFEST.MF Tue Aug 26 05:07:16 2008
@@ -1,10 +1,10 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: Apache Directory Studio ACI Item Editor
+Bundle-Name: %plugin_name
 Bundle-SymbolicName: org.apache.directory.studio.aciitemeditor;singleton:=true
 Bundle-Version: 1.3.0.SNAPSHOT
 Bundle-Activator: org.apache.directory.studio.aciitemeditor.Activator
-Bundle-Vendor: Apache Software Foundation
+Bundle-Vendor: %plugin_vendor
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,

Added: directory/studio/trunk/aciitemeditor/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/plugin.properties?rev=689041&view=auto
==============================================================================
--- directory/studio/trunk/aciitemeditor/plugin.properties (added)
+++ directory/studio/trunk/aciitemeditor/plugin.properties Tue Aug 26 05:07:16 2008
@@ -0,0 +1,26 @@
+# 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.
+
+plugin_name=Apache Directory Studio ACI Item Editor
+plugin_vendor=Apache Software Foundation
+
+ValueEditor_AciItemValueEditor_name=ACI Item Editor
+
+ValueEditor_SubtreeValueEditor_name=Subtree Specification Editor
+
+CtxType_AciItem_Template_id=org.apache.directory.studio.aciitemeditor.templates
+CtxType_AciItem_Template_name=ACI Item
\ No newline at end of file

Modified: directory/studio/trunk/aciitemeditor/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/plugin.xml?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/plugin.xml (original)
+++ directory/studio/trunk/aciitemeditor/plugin.xml Tue Aug 26 05:07:16 2008
@@ -25,13 +25,13 @@
       <valueEditor
             class="org.apache.directory.studio.aciitemeditor.ACIItemValueEditor"
             icon="resources/icons/aciitemeditor.gif"
-            name="ACI Item Editor">
+            name="%ValueEditor_AciItemValueEditor_name">
          <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.1"/>
       </valueEditor>
       <valueEditor
             class="org.apache.directory.studio.aciitemeditor.valueeditors.SubtreeValueEditor"
             icon="resources/icons/subtreeeditor.png"
-            name="Subtree Specification Editor">
+            name="%ValueEditor_SubtreeValueEditor_name">
          <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.45"/>
       </valueEditor>
    </extension>
@@ -40,8 +40,8 @@
       <include file="resources/templates/templates.xml"/>
       <contextType
             class="org.eclipse.jface.text.templates.TemplateContextType"
-            id="org.apache.directory.studio.aciitemeditor.templates"
-            name="ACI Item"/>
+            id="%CtxType_AciItem_Template_id"
+            name="%CtxType_AciItem_Template_name"/>
    </extension>
 
 </plugin>

Modified: directory/studio/trunk/aciitemeditor/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/pom.xml?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/pom.xml (original)
+++ directory/studio/trunk/aciitemeditor/pom.xml Tue Aug 26 05:07:16 2008
@@ -39,6 +39,7 @@
       <resource>
         <directory>.</directory>
         <includes>
+          <include>plugin.properties</include>
           <include>plugin.xml</include>
         </includes>
       </resource>

Modified: directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java (original)
+++ directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java Tue Aug 26 05:07:16 2008
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.studio.aciitemeditor;
 
+
 /**
  * This interface is used to store all constants related to the ACI Item Editor Plugin
  *
@@ -27,6 +28,7 @@
  */
 public interface ACIITemConstants
 {
-        /** The ID for ACI Item Template*/
-        public static final String ACI_ITEM_TEMPLATE_ID = "org.apache.directory.studio.aciitemeditor.templates"; //$NON-NLS-1$
+    /** The ID for ACI Item Template */
+    public static final String ACI_ITEM_TEMPLATE_ID = Activator.getDefault().getPluginProperties().getString(
+        "CtxType_AciItem_Template_id" );; //$NON-NLS-1$
 }

Modified: directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java (original)
+++ directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java Tue Aug 26 05:07:16 2008
@@ -21,10 +21,14 @@
 
 
 import java.io.IOException;
+import java.util.PropertyResourceBundle;
 
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.studio.aciitemeditor.sourceeditor.ACICodeScanner;
 import org.apache.directory.studio.aciitemeditor.sourceeditor.ACITextAttributeProvider;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -48,7 +52,6 @@
  */
 public class Activator extends AbstractUIPlugin
 {
-
     /** The plug-in ID */
     public static final String PLUGIN_ID = "org.apache.directory.studio.aciitemeditor"; //$NON-NLS-1$
 
@@ -70,6 +73,9 @@
     /** The context type registry */
     private ContributionContextTypeRegistry aciTemplateContextTypeRegistry;
 
+    /** The plugin properties */
+    private PropertyResourceBundle properties;
+
 
     /**
      * The constructor
@@ -263,4 +269,32 @@
         return aciTemplateStore;
     }
 
+
+    /**
+     * Gets the plugin properties.
+     *
+     * @return
+     *      the plugin properties
+     */
+    public PropertyResourceBundle getPluginProperties()
+    {
+        if ( properties == null )
+        {
+            try
+            {
+                properties = new PropertyResourceBundle( FileLocator.openStream( this.getBundle(), new Path(
+                    "plugin.properties" ), false ) );
+            }
+            catch ( IOException e )
+            {
+                // We can't use the PLUGIN_ID constant since loading the plugin.properties file has failed,
+                // So we're using a default plugin id.
+                getLog().log(
+                    new Status( Status.ERROR, PLUGIN_ID, Status.OK,
+                        "Unable to get the plugin properties.", e ) );
+            }
+        }
+
+        return properties;
+    }
 }

Modified: directory/studio/trunk/apacheds/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/META-INF/MANIFEST.MF?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/apacheds/META-INF/MANIFEST.MF Tue Aug 26 05:07:16 2008
@@ -1,10 +1,10 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: Apache Directory Studio Apache DS
+Bundle-Name: %plugin_name
 Bundle-SymbolicName: org.apache.directory.studio.apacheds;singleton:=true
 Bundle-Version: 1.3.0.SNAPSHOT
 Bundle-Activator: org.apache.directory.studio.apacheds.ApacheDsPlugin
-Bundle-Vendor: Apache Software Foundation
+Bundle-Vendor: %plugin_vendor
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,

Modified: directory/studio/trunk/apacheds/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/plugin.properties?rev=689041&r1=689040&r2=689041&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/plugin.properties (original)
+++ directory/studio/trunk/apacheds/plugin.properties Tue Aug 26 05:07:16 2008
@@ -15,6 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+plugin_name=Apache Directory Studio Apache DS
+plugin_vendor=Apache Software Foundation
+
 Pref_MainPage_id=org.apache.directory.studio.apacheds.prefs.MainPage
 Pref_MainPage_name=Apache DS