Class Settings


  • public class Settings
    extends java.lang.Object
    The editor settings.
    • Field Detail

      • SETTINGS_FILE_NAME

        protected static final java.lang.String SETTINGS_FILE_NAME
        The settings file name.
        See Also:
        Constant Field Values
      • CLASS_CACHE_FILE_NAME

        protected static final java.lang.String CLASS_CACHE_FILE_NAME
        The class cache file name.
        See Also:
        Constant Field Values
      • propertypanelfactory

        protected PropertyPanelFactory propertypanelfactory
        The property panel factory
      • imageprovider

        protected ImageProvider imageprovider
        The image provider.
      • lastfile

        protected java.io.File lastfile
        The last file opened or saved.
      • openedfiles

        protected java.io.File[] openedfiles
        Files that were opened when editor was closed.
      • toolbariconsize

        protected int toolbariconsize
        The last file opened or saved.
      • lfname

        protected java.lang.String lfname
        The name of the look and feel
      • sequenceedges

        protected boolean sequenceedges
        Sequence edge enabled flag.
      • dataedges

        protected boolean dataedges
        Data edge enabled flag.
      • nametypedataautoconnect

        protected boolean nametypedataautoconnect
        Flag if simple name/type data edge auto-connect is enabled.
      • directsequenceautoconnect

        protected boolean directsequenceautoconnect
        Flag if simple direct sequence edge auto-connect is enabled.
      • savesettingsonexit

        protected boolean savesettingsonexit
        Flag if save settings on exit is enabled.
      • jadexextensions

        protected boolean jadexextensions
        Flag if Jadex extensions are enabled.
      • smoothzoom

        protected boolean smoothzoom
        Smooth zoom flag.
      • selectedsheet

        protected java.lang.String selectedsheet
        The selected style sheet
      • libentries

        protected java.io.File[] libentries
        The library class loader entries.
      • libclassloader

        protected java.lang.ClassLoader libclassloader
        The library class loader.
      • globaltaskclasses

        protected java.util.List<ClassInfo> globaltaskclasses
        Global task classes
      • globalinterfaces

        protected java.util.List<ClassInfo> globalinterfaces
        Global interfaces
      • globalexceptions

        protected java.util.List<ClassInfo> globalexceptions
        Global exceptions.
      • globalallclasses

        protected java.util.List<ClassInfo> globalallclasses
        Global allclasses
      • scanning

        protected boolean scanning
        Flag if a scan is in progress
    • Constructor Detail

      • Settings

        public Settings()
    • Method Detail

      • getProgressBar

        public BackgroundProgressBar getProgressBar()
        Gets the progress bar.
        Returns:
        The progress bar.
      • setProgressBar

        public void setProgressBar​(BackgroundProgressBar progressbar)
        Sets the progress bar.
        Parameters:
        bgprogressbar - The progress bar.
      • getImageProvider

        public ImageProvider getImageProvider()
        Returns the image provider.
        Returns:
        The image provider.
      • getSelectedSheet

        public java.lang.String getSelectedSheet()
        Gets the selected style sheet.
        Returns:
        The selected sheet.
      • setSelectedSheet

        public void setSelectedSheet​(java.lang.String selectedsheet)
        Sets the selected style sheet.
        Parameters:
        selectedsheet - The selected sheet.
      • getOpenedFiles

        public java.io.File[] getOpenedFiles()
        Gets the opened files.
        Returns:
        The opened files.
      • setOpenedFiles

        public void setOpenedFiles​(java.io.File[] openedfiles)
        Sets the opened files.
        Parameters:
        openedfiles - The opened files.
      • getLfName

        public java.lang.String getLfName()
        Gets the look and feel name.
        Returns:
        The name.
      • setLfName

        public void setLfName​(java.lang.String lfname)
        Sets the look and feel name.
        Parameters:
        lfname - The name.
      • getToolbarIconSize

        public int getToolbarIconSize()
        Returns:
      • setToolbarIconSize

        public void setToolbarIconSize​(int toolbariconsize)
        Parameters:
        toolbariconsize -
      • isSmoothZoom

        public boolean isSmoothZoom()
      • setSmoothZoom

        public void setSmoothZoom​(boolean smoothzoom)
      • isJadexExtensions

        public boolean isJadexExtensions()
      • setJadexExtensions

        public void setJadexExtensions​(boolean jadexextensions)
      • isSequenceEdges

        public boolean isSequenceEdges()
        Gets the sequenceedges.
        Returns:
        The sequenceedges.
      • setSequenceEdges

        public void setSequenceEdges​(boolean sequenceedges)
        Sets the sequenceedges.
        Parameters:
        sequenceedges - The sequenceedges.
      • isDataEdges

        public boolean isDataEdges()
        Gets the dataedges.
        Returns:
        The dataedges.
      • setDataEdges

        public void setDataEdges​(boolean dataedges)
        Sets the dataedges.
        Parameters:
        dataedges - The dataedges.
      • isNameTypeDataAutoConnect

        public boolean isNameTypeDataAutoConnect()
        Gets the nametypedataautoconnect.
        Returns:
        The nametypedataautoconnect.
      • setNameTypeDataAutoConnect

        public void setNameTypeDataAutoConnect​(boolean nametypedataautoconnect)
        Sets the nametypedataautoconnect.
        Parameters:
        nametypedataautoconnect - The nametypedataautoconnect.
      • isDirectSequenceAutoConnect

        public boolean isDirectSequenceAutoConnect()
        Gets the directsequenceautoconnect.
        Returns:
        The directsequenceautoconnect.
      • setDirectSequenceAutoConnect

        public void setDirectSequenceAutoConnect​(boolean directsequenceautoconnect)
        Sets the directsequenceautoconnect.
        Parameters:
        directsequenceautoconnect - The directsequenceautoconnect.
      • getLastFile

        public java.io.File getLastFile()
        Gets the last file.
        Returns:
        The last file.
      • setLastFile

        public void setLastFile​(java.io.File lastfile)
        Sets the last file.
        Parameters:
        lastfile - The last file.
      • getLibraryEntries

        public java.io.File[] getLibraryEntries()
        Sets the library entries.
        Parameters:
        entries - The entries.
      • scanForClasses

        public IFuture<java.lang.Void> scanForClasses()
        Scans for the global classes.
      • setLibraryEntries

        public void setLibraryEntries​(java.util.Collection<java.io.File> entries)
        Sets the library entries.
        Parameters:
        entries - The entries.
      • getGlobalTaskClasses

        public java.util.List<ClassInfo> getGlobalTaskClasses()
        Get the globaltaskclasses.
        Returns:
        The globaltaskclasses.
      • setGlobalTaskClasses

        public void setGlobalTaskClasses​(java.util.List<ClassInfo> globaltaskclasses)
        Set the globaltaskclasses.
        Parameters:
        globaltaskclasses - The globaltaskclasses to set.
      • getGlobalInterfaces

        public java.util.List<ClassInfo> getGlobalInterfaces()
        Get the globalinterfaces.
        Returns:
        The globalinterfaces.
      • setGlobalInterfaces

        public void setGlobalInterfaces​(java.util.List<ClassInfo> globalinterfaces)
        Set the globalinterfaces.
        Parameters:
        globalinterfaces - The globalinterfaces to set.
      • getGlobalExceptions

        public java.util.List<ClassInfo> getGlobalExceptions()
        Gets the globalexceptions.
        Returns:
        The globalexceptions.
      • setGlobalExceptions

        public void setGlobalExceptions​(java.util.List<ClassInfo> globalexceptions)
        Sets the globalexceptions.
        Parameters:
        globalexceptions - The globalexceptions.
      • getGlobalAllClasses

        public java.util.List<ClassInfo> getGlobalAllClasses()
        Get the allclasses.
        Returns:
        The allclasses.
      • setGlobalAllClasses

        public void setGlobalAllClasses​(java.util.List<ClassInfo> allclasses)
        Set all classes.
        Parameters:
        allclasses - The classes to set.
      • isSaveSettingsOnExit

        public boolean isSaveSettingsOnExit()
        Gets the save settings on exit setting.
        Returns:
        The save settings on exit setting.
      • setSaveSettingsOnExit

        public void setSaveSettingsOnExit​(boolean savesettingsonexit)
        Sets the save settings on exit setting.
        Parameters:
        savesettingsonexit - The save settings on exit setting.
      • getLibraryClassLoader

        public java.lang.ClassLoader getLibraryClassLoader()
        Gets the library class loader.
        Returns:
        The library class loader.
      • getPropertyPanelFactory

        public PropertyPanelFactory getPropertyPanelFactory()
        Gets the property panel factory.
        Returns:
        The property panel factory.
      • setPropertyPanelFactory

        public void setPropertyPanelFactory​(PropertyPanelFactory propertypanelfactory)
        Sets the property panel factory.
        Parameters:
        propertypanelfactory - The property panel factory.
      • save

        public void save()
                  throws java.io.IOException
        Save the settings.
        Throws:
        java.io.IOException
      • load

        public static final Settings load()
        Loads the settings.
        Returns:
        The settings.
      • scanForClasses

        protected static final IFuture<java.lang.Void> scanForClasses​(Settings settings,
                                                                      java.lang.ClassLoader cl,
                                                                      IFilter<java.lang.Object> filefilter,
                                                                      IFilter<java.lang.Class<?>> classfilter,
                                                                      boolean includeboot)
        Scan for task classes.
      • scanForClasses

        protected static final IFuture<java.lang.Void> scanForClasses​(Settings settings,
                                                                      java.net.URL[] urls,
                                                                      IFilter<java.lang.Object> filefilter,
                                                                      IFilter<java.lang.Class<?>> classfilter,
                                                                      boolean includeboot)
        Scan for task classes. Note: This uses ASM for inspecting classes for the following reason: Generally, if a class is loaded through a classloader and the classloader is garbage-collected at a later point, the class will be unloaded as well. However, some Java base classes are loaded through some sort of implicit classloader, even if the parent of the classloader is null. Since that classloader cannot be unloaded, the classes are permanently stored in memory once loaded. Since we potentially scan all classes here, even Java system classes, this results in a huge baggage in memory after scanning which cannot be unloaded. Therefore we have to use an arms-length approach for touching classes, i.e. inspect them without loading them, which is what ASM provides here.
      • getSuperClasses

        protected static final java.util.Set<java.lang.String> getSuperClasses​(java.lang.String cname,
                                                                               java.net.URLClassLoader rcl)
      • getInterfaces

        protected static final java.util.Set<java.lang.String> getInterfaces​(java.lang.String cname,
                                                                             java.net.URLClassLoader rcl,
                                                                             java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> cache)