Package com._1c.g5.v8.dt.navigator.ui
Class EmptyWorkspaceHelper
java.lang.Object
com._1c.g5.v8.dt.navigator.ui.EmptyWorkspaceHelper
This class can be re-used by views that show the workspace's projects (like
e.g. the "1C Navigator" does). With the help of this class these views
can show explanatory text in cases where no project is in the workspace.
This class uses a stack layout to switch between the "original" composite of
the view and an additional composite given the user the explanatory text.
This text is displayed when no projects are in the workspace. Once projects
are created this class switches back to the "original" composite of the view.
The explanatory text explains the current situation that no projects are
available and provides a list of options to create projects. This list
contains links to:
- Project creation wizards specific to the current perspective
- The "New Project Wizard" to allow creation of project of any type
- Provided import wizards
-
Constructor Summary
ConstructorsConstructorDescriptionEmptyWorkspaceHelper
(List<String> importWizardIds) Empty workspace helper constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.widgets.Composite
getComposite
(org.eclipse.swt.widgets.Composite aParent) Call this method at the point in time when the view's controls are created.void
setNonEmptyControl
(org.eclipse.swt.widgets.Composite control) This method should be used to hand over the "original" control that is "normally" visible in the view.
-
Constructor Details
-
EmptyWorkspaceHelper
Empty workspace helper constructor.- Parameters:
importWizardIds
- identifiers of import wizards for creating links in navigator, notnull
-
-
Method Details
-
getComposite
public org.eclipse.swt.widgets.Composite getComposite(org.eclipse.swt.widgets.Composite aParent) Call this method at the point in time when the view's controls are created.- Parameters:
parent
- The composite where the explanatory text should be put into.- Returns:
- A new composite (a child of "parent") that has to be used by consumers as parent for their UI elements
-
setNonEmptyControl
public void setNonEmptyControl(org.eclipse.swt.widgets.Composite control) This method should be used to hand over the "original" control that is "normally" visible in the view.- Parameters:
control
- The "original" control of the view.
-