Class PreferenceBasedApplicationSettigsStore
java.lang.Object
com.e1c.g5.dt.internal.applications.PreferenceBasedApplicationSettigsStore
The store that saves and loads application defaults: default applications and URL accesses for projects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultApplication
(org.eclipse.core.resources.IProject project) Returns the default registered project application.getDefaultUrlAccess
(IApplication application) Returns the default URL access instance for the provided application.void
initialize
(com.e1c.g5.dt.internal.applications.PreferenceBasedApplicationSettigsStore.IApplicationProvider applicationProvider) Initializes the store.setDefaultApplication
(org.eclipse.core.resources.IProject project, IApplication application) Stores the default registered project application.setDefaultUrlAccess
(IApplication application, IUrlAccess newUrlAccess) Stores the default URL access instance for the provided application.
-
Constructor Details
-
PreferenceBasedApplicationSettigsStore
public PreferenceBasedApplicationSettigsStore()
-
-
Method Details
-
initialize
public void initialize(com.e1c.g5.dt.internal.applications.PreferenceBasedApplicationSettigsStore.IApplicationProvider applicationProvider) throws ApplicationException Initializes the store.- Parameters:
applicationProvider
- the application provider, cannot benull
- Throws:
ApplicationException
- if initialization failed with some reason
-
getDefaultApplication
public Optional<IApplication> getDefaultApplication(org.eclipse.core.resources.IProject project) throws ApplicationException Returns the default registered project application.- Parameters:
project
- the project to get default application for, cannot benull
- Returns:
- the optional default registered project application
- Throws:
ApplicationException
- if method call failed with some reason
-
getDefaultUrlAccess
public Optional<IUrlAccess> getDefaultUrlAccess(IApplication application) throws ApplicationException Returns the default URL access instance for the provided application.- Parameters:
application
- the application, cannot benull
- Returns:
- the optional default URL access instance for the provided application
- Throws:
ApplicationException
- if method call failed with some reason
-
setDefaultApplication
public Optional<IApplication> setDefaultApplication(org.eclipse.core.resources.IProject project, IApplication application) throws ApplicationException Stores the default registered project application.- Parameters:
project
- the project to get application for, cannot benull
the
- default project application to register for the project ornull
to reset- Returns:
- the previous default value if present
- Throws:
ApplicationException
- if method call failed with some reason
-
setDefaultUrlAccess
public Optional<IUrlAccess> setDefaultUrlAccess(IApplication application, IUrlAccess newUrlAccess) throws ApplicationException Stores the default URL access instance for the provided application.- Parameters:
application
- the application, cannot benull
newUrlAccess
- the default URL access instance to register for the provided application ornull
to reset- Returns:
- the previous default value if present
- Throws:
ApplicationException
- if method call failed with some reason
-