Class OxygenEclipseUIComponentsFactory
java.lang.Object
com.oxygenxml.workspace.api.eclipse.OxygenEclipseUIComponentsFactory
Eclipse UI components factory.
- Since:
- 27.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
changeContentType
(org.eclipse.jface.text.source.SourceViewer viewer, String contentType) Change content type if ppossible.static org.eclipse.jface.text.source.SourceViewer
createSourceViewer
(org.eclipse.swt.widgets.Composite parent, String contentype, boolean wrap, boolean readOnly, boolean verticalScroll, boolean horizontalScroll, boolean border) Create a source viewer with a specified content type.static TreeModel
getTreeModel
(Object tree) Get the tree model.
-
Method Details
-
createSourceViewer
public static org.eclipse.jface.text.source.SourceViewer createSourceViewer(org.eclipse.swt.widgets.Composite parent, String contentype, boolean wrap, boolean readOnly, boolean verticalScroll, boolean horizontalScroll, boolean border) Create a source viewer with a specified content type.- Parameters:
parent
- The parent composite.contentype
- The content type.wrap
- Iftrue
content wil be wrapped.readOnly
- Iftrue
the ontent is read only.verticalScroll
- Iftrue
vertical scroll is visible.horizontalScroll
- Iftrue
horizontal scroll is visible.border
- Iftrue
border will be painted.- Returns:
- The source viewer.
-
changeContentType
public static void changeContentType(org.eclipse.jface.text.source.SourceViewer viewer, String contentType) Change content type if ppossible.- Parameters:
viewer
- The source viewer.contentType
- The new content type.
-
getTreeModel
Get the tree model.- Parameters:
tree
- The tree.- Returns:
- The model.
-