001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.core.reverseengineering.reframework.parsingframework;
043:
044: import java.util.Vector;
045:
046: import org.netbeans.modules.uml.core.support.umlsupport.IStrings;
047: import org.netbeans.modules.uml.core.support.umlutils.ETList;
048:
049: public interface ILanguageManager {
050: /**
051: * Retrieves the instantiation directive for the RequestProcessor associated with the passed in file.
052: */
053: public String retrieveContextForFile(String Filename, String context);
054:
055: /**
056: * Sets / Gets the location of the language configuration file used by this manager.
057: */
058: public String getConfigLocation();
059:
060: /**
061: * Sets / Gets the location of the language configuration file used by this manager.
062: */
063: public void setConfigLocation(String value);
064:
065: /**
066: * Retrieves the instantiation directive for the RequestProcessor associated with the passed in language name.
067: */
068: public String retrieveContextForLanguage(String language,
069: String context);
070:
071: /**
072: * Retrieves the language defintion from the language manager.
073: */
074: public ILanguage getLanguage(String langName);
075:
076: /**
077: * Retrieves a language parser for the specified langauge.
078: */
079: public ILanguageParser retrieveParserForLanguage(String language,
080: String Type);
081:
082: /**
083: * Retrieves a langauge parser that will parse the specified file. The parser will selected based on the file extension.
084: */
085: public ILanguageParser getParserForFile(String File, String Type);
086:
087: /**
088: * Retrieves the languages that are supported by the Language Manager.
089: */
090: public IStrings getSupportedLanguages();
091:
092: /**
093: * Retrieves the language definition from the language manager. The file name is used to determine the language defintion to retrieve.
094: */
095: public ILanguage getLanguageForFile(String Filename);
096:
097: /**
098: * Retrieves the languages that are supported by the Language Manager
099: */
100: public ETList<ILanguage> getSupportedLanguages2();
101:
102: /**
103: * Retrieves the Default data type for a new attribute. If a data type is not defined as the default type then the default type will be retrieved from the UML language.
104: */
105: public ILanguageDataType getAttributeDefaultType(Object pOwner);
106:
107: /**
108: * Retrieves the Default data type for a new operation. If a data type is not defined as the default type then the default type will be retrieved from the UML language.
109: */
110: public ILanguageDataType getOperationDefaultType(Object pOwner);
111:
112: /**
113: * Retrieves the default langauge for the project that contains the element.
114: */
115: public ILanguage getDefaultLanguage(Object pElement);
116:
117: /**
118: * Retrieves a list of file extensions for the specified language.
119: */
120: public IStrings getFileExtensionsForLanguage(String language);
121:
122: /**
123: * Retrieves a list of file extensions for the specified language.
124: */
125: public IStrings getFileExtensionsForLanguage(ILanguage pLanguage);
126:
127: /**
128: * Retrieves the list of supported language. The output will be a delemeted string. The deleminter is '|'.
129: */
130: public String getSupportedLanguagesAsString();
131:
132: /**
133: * Gets a Default setting
134: */
135: public String getDefaultForLanguage(String language, String name);
136:
137: /**
138: * Returns the default source code file extension
139: */
140: public String getDefaultSourceFileExtensionForLanguage(
141: String language);
142:
143: /**
144: * Retrieves the languages that support Code Generation.
145: */
146: public ETList<ILanguage> getLanguagesWithCodeGenSupport();
147:
148: /**
149: * Retrieves a collection of file filters for a specified language.
150: */
151: public ETList<ILanguageFilter> getFileExtensionFilters(
152: String languageName);
153:
154: /**
155: * Retrieves a collection of file filters for a specified language.
156: */
157: public ETList<ILanguageFilter> getFileExtensionFilters(
158: ILanguage language);
159:
160: }
|