001    // Copyright 2005-2006 Ferdinand Prantl <prantl@users.sourceforge.net>
002    // Copyright 2001-2004 The Apache Software Foundation
003    // All rights reserved.
004    //
005    // Licensed under the Apache License, Version 2.0 (the "License");
006    // you may not use this file except in compliance with the License.
007    // You may obtain a copy of the License at
008    //
009    // http://www.apache.org/licenses/LICENSE-2.0
010    //
011    // Unless required by applicable law or agreed to in writing, software
012    // distributed under the License is distributed on an "AS IS" BASIS,
013    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014    // See the License for the specific language governing permissions and
015    // limitations under the License.
016    //
017    // See http://ant-eclipse.sourceforge.net for the most recent version
018    // and more information.
019    
020    package prantl.ant.eclipse;
021    
022    /**
023     * Configures a component preferences file under the directory <tt>.settings</tt> on the
024     * low level - allowing to define the variables directly.
025     * 
026     * @since Ant-Eclipse 1.0
027     * @author Ferdinand Prantl &lt;prantl@users.sourceforge.net&gt;
028     */
029    public class GeneralPreferencesElement extends PreferencesElement {
030    
031        /**
032         * Creates a new instance of the element for a general preferences under the settings
033         * element.
034         * 
035         * @param parent
036         *        The parent settings element of this preferences one.
037         * @since Ant-Eclipse 1.0
038         */
039        public GeneralPreferencesElement(SettingsElement parent) {
040            super(parent);
041        }
042    
043        /**
044         * Sets the name of the file with preferences.
045         * 
046         * @param value
047         *        A name of the file with preferences.
048         * @since Ant-Eclipse 1.0
049         */
050        public void setName(String value) {
051            internalSetName(value);
052        }
053    
054        /**
055         * Adds a definition of a new variable element.
056         * 
057         * @return A definition of a new variable element.
058         * @since Ant-Eclipse 1.0
059         */
060        public VariableElement createVariable() {
061            return internalCreateVariable();
062        }
063    
064    }