A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / folding / JavaFoldingStructureProviderDescriptor.java
index f800cf6..a810ba8 100644 (file)
@@ -25,58 +25,68 @@ import org.eclipse.jface.text.Assert;
 public final class JavaFoldingStructureProviderDescriptor {
 
        /* extension point attribute names */
-       
-       private static final String PREFERENCES_CLASS= "preferencesClass"; //$NON-NLS-1$
-       private static final String CLASS= "class"; //$NON-NLS-1$
-       private static final String NAME= "name"; //$NON-NLS-1$
-       private static final String ID= "id"; //$NON-NLS-1$
-       
+
+       private static final String PREFERENCES_CLASS = "preferencesClass"; //$NON-NLS-1$
+
+       private static final String CLASS = "class"; //$NON-NLS-1$
+
+       private static final String NAME = "name"; //$NON-NLS-1$
+
+       private static final String ID = "id"; //$NON-NLS-1$
+
        /** The identifier of the extension. */
        private String fId;
+
        /** The name of the extension. */
        private String fName;
+
        /** The class name of the provided <code>IJavaFoldingStructureProvider</code>. */
        private String fClass;
+
        /**
         * <code>true</code> if the extension specifies a custom
         * <code>IJavaFoldingPreferenceBlock</code>.
         */
        private boolean fHasPreferences;
+
        /** The configuration element of this extension. */
        private IConfigurationElement fElement;
-       
+
        /**
         * Creates a new descriptor.
         * 
-        * @param element the configuration element to read
+        * @param element
+        *            the configuration element to read
         */
        JavaFoldingStructureProviderDescriptor(IConfigurationElement element) {
-               fElement= element;
-               fId= element.getAttributeAsIs(ID);
+               fElement = element;
+               fId = element.getAttributeAsIs(ID);
                Assert.isLegal(fId != null);
-               
-               fName= element.getAttribute(NAME);
+
+               fName = element.getAttribute(NAME);
                if (fName == null)
-                       fName= fId;
-               
-               fClass= element.getAttributeAsIs(CLASS);
+                       fName = fId;
+
+               fClass = element.getAttributeAsIs(CLASS);
                Assert.isLegal(fClass != null);
-               
+
                if (element.getAttributeAsIs(PREFERENCES_CLASS) == null)
-                       fHasPreferences= false;
+                       fHasPreferences = false;
                else
-                       fHasPreferences= true;
+                       fHasPreferences = true;
        }
-       
+
        /**
         * Creates a folding provider as described in the extension's xml.
         * 
         * @return a new instance of the folding provider described by this
         *         descriptor
-        * @throws CoreException if creation fails
+        * @throws CoreException
+        *             if creation fails
         */
        public IJavaFoldingStructureProvider createProvider() throws CoreException {
-               IJavaFoldingStructureProvider prov= (IJavaFoldingStructureProvider) fElement.createExecutableExtension(CLASS);
+               IJavaFoldingStructureProvider prov = (IJavaFoldingStructureProvider) fElement
+                               .createExecutableExtension(CLASS);
                return prov;
        }
 
@@ -85,17 +95,19 @@ public final class JavaFoldingStructureProviderDescriptor {
         * 
         * @return a new instance of the reference provider described by this
         *         descriptor
-        * @throws CoreException if creation fails
+        * @throws CoreException
+        *             if creation fails
         */
        public IJavaFoldingPreferenceBlock createPreferences() throws CoreException {
                if (fHasPreferences) {
-                       IJavaFoldingPreferenceBlock prefs= (IJavaFoldingPreferenceBlock) fElement.createExecutableExtension(PREFERENCES_CLASS);
+                       IJavaFoldingPreferenceBlock prefs = (IJavaFoldingPreferenceBlock) fElement
+                                       .createExecutableExtension(PREFERENCES_CLASS);
                        return prefs;
                } else {
                        return new EmptyJavaFoldingPreferenceBlock();
                }
        }
-       
+
        /**
         * Returns the identifier of the described extension.
         * 
@@ -104,7 +116,7 @@ public final class JavaFoldingStructureProviderDescriptor {
        public String getId() {
                return fId;
        }
-       
+
        /**
         * Returns the name of the described extension.
         *