Tabnine Logo
DefaultCodeFormatterConstants.getWrappingStyle
Code IndexAdd Tabnine to your IDE (free)

How to use
getWrappingStyle
method
in
org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants

Best Java code snippets using org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants.getWrappingStyle (Showing top 4 results out of 315)

origin: org.eclipse/org.eclipse.jdt.ui

private void insertIntoMap(Map wrappingMap, Map indentMap, Map forceMap, Category category) {
  final String value= (String)fWorkingValues.get(category.key);
  Integer wrappingStyle;
  Integer indentStyle;
  Boolean forceWrapping;
  
  try {
    wrappingStyle= new Integer(DefaultCodeFormatterConstants.getWrappingStyle(value));
    indentStyle= new Integer(DefaultCodeFormatterConstants.getIndentStyle(value));
    forceWrapping= new Boolean(DefaultCodeFormatterConstants.getForceWrapping(value));
  } catch (IllegalArgumentException e) {
    forceWrapping= new Boolean(false);
    indentStyle= new Integer(DefaultCodeFormatterConstants.INDENT_DEFAULT);
    wrappingStyle= new Integer(DefaultCodeFormatterConstants.WRAP_NO_SPLIT);
  } 
  
  increaseMapEntry(wrappingMap, wrappingStyle);
  increaseMapEntry(indentMap, indentStyle);
  increaseMapEntry(forceMap, forceWrapping);
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void insertIntoMap(Map<Object, Integer> wrappingMap, Map<Object, Integer> indentMap, Map<Object, Integer> forceMap, Category category) {
  final String value= fWorkingValues.get(category.key);
  Integer wrappingStyle;
  Integer indentStyle;
  Boolean forceWrapping;
  try {
    wrappingStyle= new Integer(DefaultCodeFormatterConstants.getWrappingStyle(value));
    indentStyle= new Integer(DefaultCodeFormatterConstants.getIndentStyle(value));
    forceWrapping= Boolean.valueOf(DefaultCodeFormatterConstants.getForceWrapping(value));
  } catch (IllegalArgumentException e) {
    forceWrapping= Boolean.FALSE;
    indentStyle= new Integer(DefaultCodeFormatterConstants.INDENT_DEFAULT);
    wrappingStyle= new Integer(DefaultCodeFormatterConstants.WRAP_NO_SPLIT);
  }
  increaseMapEntry(wrappingMap, wrappingStyle);
  increaseMapEntry(indentMap, indentStyle);
  increaseMapEntry(forceMap, forceWrapping);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected boolean valueMatches(StringMatcher matcher) {
  String value= getPreferences().get(getKey());
  int wrappingStyle= DefaultCodeFormatterConstants.getWrappingStyle(value);
  MenuItem wrapStyleItem= updateMenuItem(fWrapStyleItems, wrappingStyle);
  if (matcher.match(wrapStyleItem.getText()))
    return true;
  if (wrappingStyle == DefaultCodeFormatterConstants.WRAP_NO_SPLIT)
    return false;
  boolean forceWrapping= DefaultCodeFormatterConstants.getForceWrapping(value);
  if (forceWrapping && matcher.match(fForceSplitItem.getToolTipText()))
    return true;
  MenuItem indentStyleItem= updateMenuItem(fIndentationItems, DefaultCodeFormatterConstants.getIndentStyle(value));
  if (matcher.match(indentStyleItem.getText()))
    return true;
  if (fWrapBeforeKey != null) {
    int wrapBeforeAfterValue= WRAP_BEFORE_PREF_VALUES.indexOf(getPreferences().get(fWrapBeforeKey));
    MenuItem wrapBeforeAfterItem= updateMenuItem(fWrapBeforeAfterItems, wrapBeforeAfterValue);
    if (matcher.match(wrapBeforeAfterItem.getText()))
      return true;
  }
  return false;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected void updateWidget() {
  String value= getPreferences().get(getKey());
  int wrappingStyle= DefaultCodeFormatterConstants.getWrappingStyle(value);
  boolean wrapEnabled= wrappingStyle != DefaultCodeFormatterConstants.WRAP_NO_SPLIT;
  MenuItem wrapStyleItem= updateMenuItem(fWrapStyleItems, wrappingStyle);
  fWrapStyleDropDown.setToolTipText(FormatterMessages.FormatterModifyDialog_lineWrap_wrapping_policy_label + wrapStyleItem.getText());
  fWrapStyleDropDown.setImage(wrapStyleItem.getImage());
  boolean forceWrapping= DefaultCodeFormatterConstants.getForceWrapping(value);
  fForceSplitItem.setSelection(forceWrapping);
  fForceSplitItem.setEnabled(wrapEnabled);
  MenuItem indentStyleItem= updateMenuItem(fIndentationItems, DefaultCodeFormatterConstants.getIndentStyle(value));
  fIndentationDropDown.setToolTipText(FormatterMessages.FormatterModifyDialog_lineWrap_indentation_policy_label + indentStyleItem.getText());
  fIndentationDropDown.setImage(indentStyleItem.getImage());
  fIndentationDropDown.setDisabledImage((Image) indentStyleItem.getData(DATA_IMAGE_DISABLED));
  fIndentationDropDown.setEnabled(wrapEnabled);
  if (fWrapBeforeKey != null) {
    int wrapBeforeAfterValue= WRAP_BEFORE_PREF_VALUES.indexOf(getPreferences().get(fWrapBeforeKey));
    MenuItem wrapBeforeAfterItem= updateMenuItem(fWrapBeforeAfterItems, wrapBeforeAfterValue);
    fWrapBeforeAfterDropDown.setToolTipText(wrapBeforeAfterItem.getText());
    fWrapBeforeAfterDropDown.setImage(wrapBeforeAfterItem.getImage());
    fWrapBeforeAfterDropDown.setDisabledImage((Image) wrapBeforeAfterItem.getData(DATA_IMAGE_DISABLED));
    fWrapBeforeAfterDropDown.setEnabled(wrapEnabled);
  }
}
org.eclipse.jdt.core.formatterDefaultCodeFormatterConstantsgetWrappingStyle

Javadoc

Return the wrapping style of the given alignment value. The given alignment value should be created using the createAlignmentValue(boolean, int, int) API.

Popular methods of DefaultCodeFormatterConstants

  • createAlignmentValue
    Create a new alignment value according to the given values. This must be used to set up the alignmen
  • getEclipseDefaultSettings
    Returns the default Eclipse formatter settings
  • getEclipse21Settings
    Returns the formatter settings that most closely approximate the default formatter settings of Eclip
  • getJavaConventionsSettings
    Returns the settings according to the Java conventions.
  • getForceWrapping
    Return the force value of the given alignment value. The given alignment value should be created usi
  • getIndentStyle
    Return the indentation style of the given alignment value. The given alignment value should be creat
  • setForceWrapping
    Set the force value of the given alignment value and return the new value. The given alignment value
  • setIndentStyle
    Set the indentation style of the given alignment value and return the new value. The given value sho
  • setWrappingStyle
    Set the wrapping style of the given alignment value and return the new value. The given value should

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now