Altova XMLSpy 2024 Enterprise Edition

Deklaration

GetUIModifications() als String

 

Beschreibung

Die GetUIModifications() Methode wird während der Initialisierung des Plug-In aufgerufen, um die XML-Konfigurationsdaten abzurufen, die die Änderungen an der Benutzeroberfläche von XMLSpy definieren. Die Methode wird beim ersten Laden des Plug-In und bei jedem Start von XMLSpy aufgerufen. Eine ausführliche Anleitung zum Ändern der Benutzeroberfläche finden Sie auch unter Konfigurations-XML.

 

Beispiel

Public Function IXMLSpyPlugIn_GetUIModifications() As String

  ' GetUIModifications() gets the XML file with the specified modifications of

  ' the UI from the config.xml file in the plug-in folder

  Dim strPath As String

  strPath = App.Path

 

  If Len(strPath) > 0 Then

     Dim fso As New FileSystemObject

     Dim file As file

     Set file = fso.GetFile(strPath & "\config.xml")

 

     If (Not (file Is Nothing)) Then

        Dim stream As TextStream

        Set stream = file.OpenAsTextStream(ForReading)

 

        ' this replaces the token '**path**' from the XML file with

        ' the actual installation path of the plug-in to get the image file

        Dim strMods As String

        strMods = stream.ReadAll

        strMods = Replace(strMods, "**path**", strPath)

 

        IXMLSpyPlugIn_GetUIModifications = strMods

     Else

        IXMLSpyPlugIn_GetUIModifications = ""

     End If

  End If

End Function

 

© 2017-2023 Altova GmbH