Class AbstractDtImportWizardPage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.wizard.WizardPage
-
- com._1c.g5.v8.dt.import_.ui.wizards.AbstractDtImportWizardPage
-
- All Implemented Interfaces:
IImportWizardPage
,org.eclipse.jface.dialogs.IDialogPage
,org.eclipse.jface.dialogs.IMessageProvider
,org.eclipse.jface.wizard.IWizardPage
public abstract class AbstractDtImportWizardPage extends org.eclipse.jface.wizard.WizardPage implements IImportWizardPage
Abstract impmenetation of DT project import page. Allows to configure source folder and project name.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.swt.widgets.Button
browseSourceButton
protected com.google.inject.Provider<IImportServiceRegistry>
importServiceRegistryProvider
protected String
previouslyBrowsedDirectory
protected String
projectName
protected org.eclipse.swt.widgets.Text
projectNameText
protected String
sourcePath
protected org.eclipse.swt.widgets.Combo
sourcePathCombo
protected com.google.inject.Provider<IV8ProjectManager>
v8projectManagerProvider
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDtImportWizardPage(String pageName)
Creates a new wizard page with the given name, and with no title or image.AbstractDtImportWizardPage(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
Creates a new wizard page with the given name, title, and image.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
bindPageArea()
Binds page area controls.protected ComboViewer
createBaseProjectComponents(org.eclipse.swt.widgets.Composite parent)
Create combobox control for select base projectvoid
createControl(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Composite
createPageArea(org.eclipse.swt.widgets.Composite parent)
Creates page area controls.protected org.eclipse.swt.widgets.Combo
createSourcePathCombo(org.eclipse.swt.widgets.Composite parent)
Create combobox control for select path to import sourceprotected org.eclipse.swt.widgets.Text
createTargetProjectNameText(org.eclipse.swt.widgets.Composite parent)
Create text control for enter project name.protected ComboViewer
createVersionComboViewer(org.eclipse.swt.widgets.Composite parent)
Create combobox control for select 1C Runtime version.protected abstract org.eclipse.core.runtime.IStatus
executeImport(String projectName)
Execute configured import operation.org.eclipse.core.runtime.IStatus
finish()
Execute configured import operation.protected String
getCreatingProjectName()
Returns the name of the project to create ornull
if not set.protected void
openErrorDialog(String message)
Opens error dialog with the provided message content.protected void
openErrorDialog(Throwable exception)
Opens error dialog with the provided exception content.protected boolean
openQuestionDialog(String message)
Opens question dialog with the provided message content.protected String
openSourceBrowseDialog()
Opens source browse dialog.protected boolean
removeExistProject()
Delete exist project if it already existsprotected void
sourceDirectoryPostSelected(String selectedDirectory)
Method to update ui controls after selection a new source path in browse dialog.protected boolean
validatePage()
Validates import page.-
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
-
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
v8projectManagerProvider
@Inject protected com.google.inject.Provider<IV8ProjectManager> v8projectManagerProvider
-
importServiceRegistryProvider
@Inject protected com.google.inject.Provider<IImportServiceRegistry> importServiceRegistryProvider
-
previouslyBrowsedDirectory
protected String previouslyBrowsedDirectory
-
projectName
protected String projectName
-
sourcePath
protected String sourcePath
-
sourcePathCombo
protected org.eclipse.swt.widgets.Combo sourcePathCombo
-
browseSourceButton
protected org.eclipse.swt.widgets.Button browseSourceButton
-
projectNameText
protected org.eclipse.swt.widgets.Text projectNameText
-
-
Constructor Detail
-
AbstractDtImportWizardPage
protected AbstractDtImportWizardPage(String pageName)
Creates a new wizard page with the given name, and with no title or image.- Parameters:
pageName
- the name of the page, cannot benull
-
AbstractDtImportWizardPage
public AbstractDtImportWizardPage(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
Creates a new wizard page with the given name, title, and image.- Parameters:
pageName
- the name of the page, cannot benull
title
- the title for this wizard page, ornull
if nonetitleImage
- the image descriptor for the title of this wizard page, ornull
if none
-
-
Method Detail
-
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createControl
in interfaceorg.eclipse.jface.dialogs.IDialogPage
-
finish
public org.eclipse.core.runtime.IStatus finish()
Description copied from interface:IImportWizardPage
Execute configured import operation. Returns import execution status:OK
status if import was successful.CANCEL
status if import was cancelled.ERROR
status with exception and error description if an error was occurred.
- Specified by:
finish
in interfaceIImportWizardPage
- Returns:
- the status of execution, never
null
-
executeImport
protected abstract org.eclipse.core.runtime.IStatus executeImport(String projectName)
Execute configured import operation. Returns import execution status:OK
status if import was successful.CANCEL
status if import was cancelled.ERROR
status with exception and error description if an error was occurred.
- Parameters:
projectName
- the configured project name, cannot benull
- Returns:
- returns executed import status, never
null
-
removeExistProject
protected boolean removeExistProject()
Delete exist project if it already exists- Returns:
true
the project will be removed,false
not.
-
getCreatingProjectName
protected String getCreatingProjectName()
Returns the name of the project to create ornull
if not set.- Returns:
- the name of the project to create or
null
if not set
-
createPageArea
protected org.eclipse.swt.widgets.Composite createPageArea(org.eclipse.swt.widgets.Composite parent)
Creates page area controls.- Parameters:
parent
- the parent composite, cannot benull
-
createSourcePathCombo
protected org.eclipse.swt.widgets.Combo createSourcePathCombo(org.eclipse.swt.widgets.Composite parent)
Create combobox control for select path to import source- Parameters:
parent
- the parent composite, cannot benull
- Returns:
- instance of new
Combo
control, nevernull
-
createTargetProjectNameText
protected org.eclipse.swt.widgets.Text createTargetProjectNameText(org.eclipse.swt.widgets.Composite parent)
Create text control for enter project name.- Parameters:
parent
- the parent composite, cannot benull
- Returns:
- instance of new
Text
control, nevernull
-
createVersionComboViewer
protected ComboViewer createVersionComboViewer(org.eclipse.swt.widgets.Composite parent)
Create combobox control for select 1C Runtime version.- Parameters:
parent
- the parent composite, cannot benull
- Returns:
- instance of new
ComboViewer
, nevernull
-
createBaseProjectComponents
protected ComboViewer createBaseProjectComponents(org.eclipse.swt.widgets.Composite parent)
Create combobox control for select base project- Parameters:
parent
- the parent composite, cannot benull
- Returns:
- instance of new
ComboViewer
, nevernull
-
bindPageArea
protected void bindPageArea()
Binds page area controls. Method is executed after page area controls creation.
-
validatePage
protected boolean validatePage()
Validates import page. Returns whether the page is valid and import may be performed.- Returns:
- whether the page is valid and import may be performed
-
openSourceBrowseDialog
protected String openSourceBrowseDialog()
Opens source browse dialog. Returns selected directory.- Returns:
- the selected directory path as
String
ornull
if none
-
sourceDirectoryPostSelected
protected void sourceDirectoryPostSelected(String selectedDirectory)
Method to update ui controls after selection a new source path in browse dialog.- Parameters:
selectedDirectory
- a new selected directory path, cannot benull
-
openErrorDialog
protected void openErrorDialog(String message)
Opens error dialog with the provided message content.- Parameters:
message
- the error message, cannot benull
-
openErrorDialog
protected void openErrorDialog(Throwable exception)
Opens error dialog with the provided exception content.- Parameters:
exception
- the error, cannot benull
-
openQuestionDialog
protected boolean openQuestionDialog(String message)
Opens question dialog with the provided message content. Returns user answer result.- Parameters:
message
- the question message, cannot benull
- Returns:
- user answer result
-
-