Class OxygenEclipseUIComponentsFactory
java.lang.Object
com.oxygenxml.workspace.api.eclipse.OxygenEclipseUIComponentsFactory
Eclipse UI components factory.
- Since:
- 27.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidchangeContentType(org.eclipse.jface.text.source.SourceViewer viewer, String contentType) Change content type if ppossible.static org.eclipse.jface.text.source.SourceViewercreateSourceViewer(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 TreeModelgetTreeModel(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- Iftruecontent wil be wrapped.readOnly- Iftruethe ontent is read only.verticalScroll- Iftruevertical scroll is visible.horizontalScroll- Iftruehorizontal scroll is visible.border- Iftrueborder 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.
-