Package com._1c.g5.v8.dt.moxel.ui.editor
Class MoxelEditor
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.EditorPart
-
- com._1c.g5.v8.dt.moxel.ui.editor.MoxelEditor
-
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.IEditorPart
,org.eclipse.ui.ISaveablePart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
MoxelDcsEditor
public class MoxelEditor extends org.eclipse.ui.part.EditorPart
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MoxelEditor.MoxelDragListener
Drag listener for moxel editor.static class
MoxelEditor.MoxelDropListener
Drop listener for moxel editor.
-
Field Summary
Fields Modifier and Type Field Description static Object
BM_TASK_SERVICE_ID
The ID is used to distinguish BM events caused by tasks executed inside moxel editor from others.protected IConfigurationProvider
configurationProvider
protected SpreadsheetDocument
document
protected IEditingContext
editingContext
protected static String
MENU_MANAGER
protected static String
MOXEL_CONTEXT_MENU
protected IRuntimeVersionSupport
runtimeVersionSupport
protected MoxelViewer
viewer
-
Constructor Summary
Constructors Constructor Description MoxelEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createContextMenu()
Создать контекстное меню.void
createPartControl(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.emf.ecore.resource.Resource
createResource(org.eclipse.emf.common.util.URI uri)
Create resource byURI
.void
dispose()
void
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
void
doSaveAs()
org.eclipse.jface.action.IAction
getAction(String actionID)
SpreadsheetDocument
getDocument()
Получить документMoxelEditorMode
getEditorMode()
Get curent editor mode.IExtensionHighlightComputer
getExtensionHighlighter()
Get extension highlight computer.MoxelViewer
getInternalViewer()
MoxelMenuDetectListener
getMenuDetectListener()
Get menu detect listener/MoxelControl
getMoxelControl()
Получить элемент управления.org.eclipse.core.commands.operations.IUndoContext
getUndoContext()
Получить контекст отката.void
init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
boolean
isCellsHighlightingEnabled()
Check if cells' highlighting is enabled.boolean
isDirty()
boolean
isSaveAsAllowed()
void
setFocus()
void
setNeedHighlighting(boolean value)
Set cells highlighting flag.void
setUpEditorMode(MoxelEditorMode mode)
Set up editor mode.protected void
updateLanguageSettings()
Updates document's language settings.-
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
-
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Field Detail
-
BM_TASK_SERVICE_ID
public static final Object BM_TASK_SERVICE_ID
The ID is used to distinguish BM events caused by tasks executed inside moxel editor from others.
-
MENU_MANAGER
protected static final String MENU_MANAGER
- See Also:
- Constant Field Values
-
MOXEL_CONTEXT_MENU
protected static final String MOXEL_CONTEXT_MENU
- See Also:
- Constant Field Values
-
viewer
protected MoxelViewer viewer
-
editingContext
protected IEditingContext editingContext
-
document
protected SpreadsheetDocument document
-
configurationProvider
@Inject protected IConfigurationProvider configurationProvider
-
runtimeVersionSupport
@Inject protected IRuntimeVersionSupport runtimeVersionSupport
-
-
Method Detail
-
setNeedHighlighting
public void setNeedHighlighting(boolean value)
Set cells highlighting flag.- Parameters:
value
- cells highlighting flag value.
-
isCellsHighlightingEnabled
public boolean isCellsHighlightingEnabled()
Check if cells' highlighting is enabled.- Returns:
true
if cells' highlighting is enabled,false
otherwise.
-
getExtensionHighlighter
public IExtensionHighlightComputer getExtensionHighlighter()
Get extension highlight computer.- Returns:
IExtensionHighlightComputer
, may benull
.
-
getMenuDetectListener
public MoxelMenuDetectListener getMenuDetectListener()
Get menu detect listener/- Returns:
MoxelMenuDetectListener
-
setUpEditorMode
public void setUpEditorMode(MoxelEditorMode mode)
Set up editor mode.- Parameters:
mode
-MoxelEditorMode
, must not benull
-
getEditorMode
public MoxelEditorMode getEditorMode()
Get curent editor mode.- Returns:
- current editor mode, never
null
-
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
doSave
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSave
in classorg.eclipse.ui.part.EditorPart
-
getInternalViewer
public MoxelViewer getInternalViewer()
- Returns:
- the viewer
-
doSaveAs
public void doSaveAs()
- Specified by:
doSaveAs
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSaveAs
in classorg.eclipse.ui.part.EditorPart
-
init
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException
- Specified by:
init
in interfaceorg.eclipse.ui.IEditorPart
- Specified by:
init
in classorg.eclipse.ui.part.EditorPart
- Throws:
org.eclipse.ui.PartInitException
-
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
isDirty
in classorg.eclipse.ui.part.EditorPart
-
isSaveAsAllowed
public boolean isSaveAsAllowed()
- Specified by:
isSaveAsAllowed
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
isSaveAsAllowed
in classorg.eclipse.ui.part.EditorPart
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in classorg.eclipse.ui.part.WorkbenchPart
-
setFocus
public void setFocus()
- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in classorg.eclipse.ui.part.WorkbenchPart
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classorg.eclipse.ui.part.WorkbenchPart
-
getDocument
public SpreadsheetDocument getDocument()
Получить документ
-
getMoxelControl
public MoxelControl getMoxelControl()
Получить элемент управления.
-
getUndoContext
public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
Получить контекст отката.
-
getAction
public org.eclipse.jface.action.IAction getAction(String actionID)
-
createContextMenu
protected void createContextMenu()
Создать контекстное меню.
-
createResource
protected org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri)
Create resource byURI
.- Parameters:
uri
-URI
- Returns:
Resource
-
updateLanguageSettings
protected void updateLanguageSettings()
Updates document's language settings.
-
-