Package com._1c.g5.v8.dt.md.help
Class MdHelpUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.md.help.MdHelpUtil
-
public class MdHelpUtil extends Object
Help content utilities
-
-
Field Summary
Fields Modifier and Type Field Description static String
MD_HELP_CSS_LINK
-
Constructor Summary
Constructors Constructor Description MdHelpUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkHelpExists(org.eclipse.emf.ecore.EObject parent)
Check existance ofHelp
object in parent objectstatic boolean
checkHelpExists(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EStructuralFeature feature)
Check existance ofHelp
object in parent objectstatic boolean
checkHelpPageExists(Help help, String languageCode)
Check existance ofHelpPage
object with languageCodestatic HelpPage
createHelpPage(Help help, String languageCode)
Creates help page.static MdObject
findEObjectByUuid(String uuid, org.eclipse.emf.ecore.EObject context)
FindMdObject
from index with uuidstatic org.eclipse.emf.ecore.EReference
findHelpFeature(org.eclipse.emf.ecore.EClass eClass)
Find first feature of eClass type HELPstatic Help
getHelp(org.eclipse.emf.ecore.EObject parent)
Get or create newHelp
object in parent objectstatic Help
getHelp(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EStructuralFeature feature)
Get or create newHelp
object in parent objectstatic HelpPage
getHelpPage(Help help, String languageCode)
Get or create newHelpPage
object with languageCodestatic HelpPage
getHelpPage(Help help, String languageCode, IBmTransaction transaction)
Get or create newHelpPage
object with languageCode in the given transaction.static HelpPage
selectHelpPage(Help help, String languageCode)
Selects the help page with the given language code.static String
templateHelpNotExist()
The help content is not exist templatestatic String
templateNewHelp(String lineSeparator, String defaultCSSHref)
New help content of empty template
-
-
-
Field Detail
-
MD_HELP_CSS_LINK
public static final String MD_HELP_CSS_LINK
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHelp
public static Help getHelp(org.eclipse.emf.ecore.EObject parent)
Get or create newHelp
object in parent object- Parameters:
parent
- object with help- Returns:
- contain
Help
object or null if parent object can't contains help.
-
checkHelpExists
public static boolean checkHelpExists(org.eclipse.emf.ecore.EObject parent)
Check existance ofHelp
object in parent object- Parameters:
parent
- object with help- Returns:
- true if object contains
Help
object or null if parent object can't contains help.
-
getHelp
public static Help getHelp(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EStructuralFeature feature)
Get or create newHelp
object in parent object- Parameters:
parent
- object with helpfeature
- theEStructuralFeature
to Help object in parent object- Returns:
- contain
Help
object
-
checkHelpExists
public static boolean checkHelpExists(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EStructuralFeature feature)
Check existance ofHelp
object in parent object- Parameters:
parent
- object with helpfeature
- theEStructuralFeature
to Help object in parent object- Returns:
- true if object contains
Help
object
-
getHelpPage
public static HelpPage getHelpPage(Help help, String languageCode)
Get or create newHelpPage
object with languageCode- Parameters:
help
- the parent HelplanguageCode
- the language code of help page- Returns:
- the instance of
HelpPage
-
getHelpPage
public static HelpPage getHelpPage(Help help, String languageCode, IBmTransaction transaction)
Get or create newHelpPage
object with languageCode in the given transaction.- Parameters:
help
- the parent HelplanguageCode
- the language code of help pagetransaction
- the transaction- Returns:
- the instance of
HelpPage
-
createHelpPage
public static HelpPage createHelpPage(Help help, String languageCode)
Creates help page.- Parameters:
help
- the help object to create page in, may not benull
.languageCode
- the page language code, may not benull
.- Returns:
- the created help page, not
null
.
-
selectHelpPage
public static HelpPage selectHelpPage(Help help, String languageCode)
Selects the help page with the given language code.- Parameters:
help
- the help to select page from, may not benull
.languageCode
- the language code, may not benull
.- Returns:
- the selected page if found or
null
.
-
checkHelpPageExists
public static boolean checkHelpPageExists(Help help, String languageCode)
Check existance ofHelpPage
object with languageCode- Parameters:
help
- the parent HelplanguageCode
- the language code of help page- Returns:
- true if
HelpPage
exists
-
findHelpFeature
public static org.eclipse.emf.ecore.EReference findHelpFeature(org.eclipse.emf.ecore.EClass eClass)
Find first feature of eClass type HELP- Parameters:
eClass
- the contextEClass
- Returns:
EReference
or null
-
findEObjectByUuid
public static MdObject findEObjectByUuid(String uuid, org.eclipse.emf.ecore.EObject context)
FindMdObject
from index with uuid- Parameters:
uuid
- the MdObject uuidcontext
- the context object from BM to get index and resolve IEObjectDescription- Returns:
- fined
MdObject
or null
-
templateNewHelp
public static String templateNewHelp(String lineSeparator, String defaultCSSHref)
New help content of empty template- Parameters:
lineSeparator
- specified line separator, cannot benull
defaultCSSHref
- specified css href link, can benull
if no need any css in new template- Returns:
- text of new help content template, never
null
-
templateHelpNotExist
public static String templateHelpNotExist()
The help content is not exist template- Returns:
- text of help content is not exist template
-
-