org.eclipse.emf.emfstore.internal.client.ui.dialogs.merge.util
Class UIDecisionUtil

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.ui.dialogs.merge.util.UIDecisionUtil

public final class UIDecisionUtil
extends Object

Class offering common methods for the merge dialog.

Author:
wesendon

Method Summary
static String cutString(String str, int length, boolean addPoints)
          Cuts a text to certain length and adds "..." at the end if needed.
static org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider getAdapterFactory()
          Returns a label provider.
static ChangePackageVisualizationHelper getChangePackageVisualizationHelper(DecisionManager decisionManager)
          Returns the visualizationhelper.
static org.eclipse.jface.resource.FontRegistry getFontRegistry()
          Returns FontRegistry.
static org.eclipse.swt.graphics.Image getImage(String path)
          Fetches image by path.
static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String path)
          Fetches image descriptor by path.
static String stripNewLine(String text)
          Strips line breaking characters from text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getImage

public static org.eclipse.swt.graphics.Image getImage(String path)
Fetches image by path.

Parameters:
path - path
Returns:
image

getImageDescriptor

public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String path)
Fetches image descriptor by path.

Parameters:
path - path
Returns:
ImageDescriptor

cutString

public static String cutString(String str,
                               int length,
                               boolean addPoints)
Cuts a text to certain length and adds "..." at the end if needed.

Parameters:
str - text
length - length
addPoints - true, if ending dotts
Returns:
shortened string

stripNewLine

public static String stripNewLine(String text)
Strips line breaking characters from text.

Parameters:
text - text
Returns:
linf of text

getFontRegistry

public static org.eclipse.jface.resource.FontRegistry getFontRegistry()
Returns FontRegistry.

Returns:
fonts

getChangePackageVisualizationHelper

public static ChangePackageVisualizationHelper getChangePackageVisualizationHelper(DecisionManager decisionManager)
Returns the visualizationhelper.

Parameters:
decisionManager - instance of the decisionManager
Returns:
visualizationhelper

getAdapterFactory

public static org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider getAdapterFactory()
Returns a label provider.

Returns:
label provider


Copyright © 2015. All Rights Reserved.