Class AbstractV8FileNameConverter
java.lang.Object
com.e1c.langtool.v8.dt.resourcestorage.AbstractV8FileNameConverter
- All Implemented Interfaces:
IV8FileNameConverter
- Direct Known Subclasses:
ProjectCommonFileNameConverter,V8FileNameConverter
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLanguage(org.eclipse.core.resources.IFile translationFile) Gets the translate language file.getLanguage(org.eclipse.core.runtime.IPath translationPath) Gets the translate language from file path.getLanguageCode(org.eclipse.core.runtime.IPath translationPath) getSegment(org.eclipse.core.resources.IFile translationFile) Gets the segment of translation file name.getSegment(org.eclipse.core.runtime.IPath translationPath) Gets the segment of translation file name.org.eclipse.core.resources.IFilegetTranslationFile(org.eclipse.core.resources.IFile v8File, boolean isLocalizable, TranslateLanguage language) Gets the translation file.org.eclipse.core.resources.IFilegetTranslationFile(org.eclipse.core.runtime.IPath v8Path, boolean isLocalizable, TranslateLanguage language) Gets the translation file.org.eclipse.core.runtime.IPathgetTranslationPath(org.eclipse.core.resources.IFile v8File, boolean isLocalizable, TranslateLanguage language) Gets the translation file path.Set<org.eclipse.core.resources.IFile>getV8File(org.eclipse.core.resources.IFile translationFile) Gets the v8 files by the given translation file.Set<org.eclipse.core.resources.IFile>getV8File(org.eclipse.core.runtime.IPath translationPath) Gets the v8 files by the given translation file path.Set<org.eclipse.core.runtime.IPath>getV8Path(org.eclipse.core.resources.IFile translationFile) Gets the v8 file path by the given translation file.Set<org.eclipse.core.runtime.IPath>getV8Path(org.eclipse.core.runtime.IPath translationPath) Gets the v8 file path by the given translation file path.protected static booleanhasRootFolder(org.eclipse.core.runtime.IPath path) booleanisInterface(org.eclipse.core.resources.IFile translationFile) Checks if the given file is interface translation file.booleanisInterface(org.eclipse.core.runtime.IPath translationPath) Checks if the given file path is interface translation file.booleanisTranslation(org.eclipse.core.resources.IFile translationFile) Checks if the give file is translation file.booleanisTranslation(org.eclipse.core.runtime.IPath translationPath) Checks if the given file path is translation file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.e1c.langtool.v8.dt.resourcestorage.IV8FileNameConverter
getTranslationPath
-
Field Details
-
FILE_EXTENSION_TRANS
- See Also:
-
FILE_EXTENSION_LSTR
- See Also:
-
FILE_EXTENSION_NSTR
- See Also:
-
FILE_EXTENSION_DICT
- See Also:
-
FILE_EXTENSION_LSDICT
- See Also:
-
FILE_NAME_SEGMENT_SPLITTER
- See Also:
-
SOURCE_FOLDER
- See Also:
-
translatingProjectManager
-
-
Constructor Details
-
AbstractV8FileNameConverter
public AbstractV8FileNameConverter()
-
-
Method Details
-
getTranslationFile
public org.eclipse.core.resources.IFile getTranslationFile(org.eclipse.core.resources.IFile v8File, boolean isLocalizable, TranslateLanguage language) Description copied from interface:IV8FileNameConverterGets the translation file.- Specified by:
getTranslationFilein interfaceIV8FileNameConverter- Parameters:
v8File- the v8 file, cannot benull.isLocalizable- the is localizablelanguage- the language, cannot benull.- Returns:
- the translation file. It can return
nullwhen it's impossible to get translation file from the given file.
-
getTranslationFile
public org.eclipse.core.resources.IFile getTranslationFile(org.eclipse.core.runtime.IPath v8Path, boolean isLocalizable, TranslateLanguage language) Description copied from interface:IV8FileNameConverterGets the translation file.- Specified by:
getTranslationFilein interfaceIV8FileNameConverter- Parameters:
v8Path- the v8 path, cannot benull.isLocalizable- the is localizablelanguage- the language , cannot benull.- Returns:
- the translation file. It can return
nullwhen it's impossible to get translation file from the given path.
-
getTranslationPath
public org.eclipse.core.runtime.IPath getTranslationPath(org.eclipse.core.resources.IFile v8File, boolean isLocalizable, TranslateLanguage language) Description copied from interface:IV8FileNameConverterGets the translation file path.- Specified by:
getTranslationPathin interfaceIV8FileNameConverter- Parameters:
v8File- the v8 file, cannot benull.isLocalizable- the is localizablelanguage- the language, cannot benull.- Returns:
- the translation path. It can return
nullwhen it's impossible to get a path to translation file from the given file.
-
getV8File
public Set<org.eclipse.core.resources.IFile> getV8File(org.eclipse.core.resources.IFile translationFile) Description copied from interface:IV8FileNameConverterGets the v8 files by the given translation file. Caller could not to check that given file is translation file.- Specified by:
getV8Filein interfaceIV8FileNameConverter- Parameters:
translationFile- the translation file- Returns:
- all possible v8 files converted from translation file
-
getV8File
public Set<org.eclipse.core.resources.IFile> getV8File(org.eclipse.core.runtime.IPath translationPath) Description copied from interface:IV8FileNameConverterGets the v8 files by the given translation file path. Caller could not to check that given file path is translation file.- Specified by:
getV8Filein interfaceIV8FileNameConverter- Parameters:
translationPath- the translation path- Returns:
- all possible v8 files converted from translation file
-
getV8Path
public Set<org.eclipse.core.runtime.IPath> getV8Path(org.eclipse.core.runtime.IPath translationPath) Description copied from interface:IV8FileNameConverterGets the v8 file path by the given translation file path. Caller could not to check that given file path is translation file.- Specified by:
getV8Pathin interfaceIV8FileNameConverter- Parameters:
translationPath- the translation path- Returns:
- all possible v8 files converted from translation file. Can return
nullor emptySet.
-
getV8Path
public Set<org.eclipse.core.runtime.IPath> getV8Path(org.eclipse.core.resources.IFile translationFile) Description copied from interface:IV8FileNameConverterGets the v8 file path by the given translation file. Caller could not to check that given file is translation file.- Specified by:
getV8Pathin interfaceIV8FileNameConverter- Parameters:
translationFile- the translation file- Returns:
- all possible v8 files converted from translation file
-
isInterface
public boolean isInterface(org.eclipse.core.runtime.IPath translationPath) Description copied from interface:IV8FileNameConverterChecks if the given file path is interface translation file. Caller must check first that the file is translation file viaIV8FileNameConverter.isTranslation(IPath).- Specified by:
isInterfacein interfaceIV8FileNameConverter- Parameters:
translationPath- the translation path, cannot benull.- Returns:
true, if the file path is interface translation file.
-
isInterface
public boolean isInterface(org.eclipse.core.resources.IFile translationFile) Description copied from interface:IV8FileNameConverterChecks if the given file is interface translation file. Caller must check first that the file is translation file viaIV8FileNameConverter.isTranslation(IFile).- Specified by:
isInterfacein interfaceIV8FileNameConverter- Parameters:
translationFile- the translation file, cannot benull.- Returns:
true, if the file is interface translation file.
-
getLanguage
Description copied from interface:IV8FileNameConverterGets the translate language from file path.- Specified by:
getLanguagein interfaceIV8FileNameConverter- Parameters:
translationPath- the translation path- Returns:
- the translate language
-
getLanguageCode
-
getLanguage
Description copied from interface:IV8FileNameConverterGets the translate language file.- Specified by:
getLanguagein interfaceIV8FileNameConverter- Parameters:
translationFile- the translation file- Returns:
- the translate language
-
isTranslation
public boolean isTranslation(org.eclipse.core.runtime.IPath translationPath) Description copied from interface:IV8FileNameConverterChecks if the given file path is translation file.- Specified by:
isTranslationin interfaceIV8FileNameConverter- Parameters:
translationPath- the translation path, can benull.- Returns:
true, if it is translation file
-
isTranslation
public boolean isTranslation(org.eclipse.core.resources.IFile translationFile) Description copied from interface:IV8FileNameConverterChecks if the give file is translation file.- Specified by:
isTranslationin interfaceIV8FileNameConverter- Parameters:
translationFile- the translation file, can benull.- Returns:
true, if it is translation file
-
getSegment
Description copied from interface:IV8FileNameConverterGets the segment of translation file name.- Specified by:
getSegmentin interfaceIV8FileNameConverter- Parameters:
translationPath- the translation file path, cannot benull.- Returns:
- the segment or
nullif it is not translation file.
-
getSegment
Description copied from interface:IV8FileNameConverterGets the segment of translation file name.- Specified by:
getSegmentin interfaceIV8FileNameConverter- Parameters:
translationFile- the translation file, cannot benull.- Returns:
- the segment or
nullif it is not translation file.
-
hasRootFolder
protected static boolean hasRootFolder(org.eclipse.core.runtime.IPath path)
-