congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MapCleanUpOptions.getMap
Code IndexAdd Tabnine to your IDE (free)

How to use
getMap
method
in
org.eclipse.jdt.internal.ui.fix.MapCleanUpOptions

Best Java code snippets using org.eclipse.jdt.internal.ui.fix.MapCleanUpOptions.getMap (Showing top 16 results out of 315)

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

/**
 * @param options the options to add to this options
 */
public void addAll(CleanUpOptions options) {
  if (options instanceof MapCleanUpOptions) {
    fOptions.putAll(((MapCleanUpOptions)options).getMap());
  } else {
    Set<String> keys= options.getKeys();
    for (Iterator<String> iterator= keys.iterator(); iterator.hasNext();) {
      String key= iterator.next();
      fOptions.put(key, options.getValue(key));
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * @param options the options to add to this options
 */
public void addAll(CleanUpOptions options) {
  if (options instanceof MapCleanUpOptions) {
    fOptions.putAll(((MapCleanUpOptions)options).getMap());
  } else {
    Set<String> keys= options.getKeys();
    for (Iterator<String> iterator= keys.iterator(); iterator.hasNext();) {
      String key= iterator.next();
      fOptions.put(key, options.getValue(key));
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private Map<String, String> updateAndComplete(Map<String, String> oldSettings, int version) {
  final Map<String, String> newSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
  switch (version) {
    case VERSION_1:
      updateFrom1To2(oldSettings);
      //$FALL-THROUGH$
    default:
      for (final Iterator<String> iter= oldSettings.keySet().iterator(); iter.hasNext();) {
        final String key= iter.next();
        if (!newSettings.containsKey(key))
          continue;
        final String value= oldSettings.get(key);
        if (value != null) {
          newSettings.put(key, value);
        }
      }
  }
  return newSettings;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private Map<String, String> updateAndComplete(Map<String, String> oldSettings, int version) {
  final Map<String, String> newSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
  switch (version) {
    case VERSION_1:
      updateFrom1To2(oldSettings);
      //$FALL-THROUGH$
    default:
      for (final Iterator<String> iter= oldSettings.keySet().iterator(); iter.hasNext();) {
        final String key= iter.next();
        if (!newSettings.containsKey(key))
          continue;
        final String value= oldSettings.get(key);
        if (value != null) {
          newSettings.put(key, value);
        }
      }
  }
  return newSettings;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * Returns a list of built in clean up profiles
 * @return the list of built in profiles, not null
 * @since 3.3
 */
public static List<Profile> getBuiltInProfiles() {
  ArrayList<Profile> result= new ArrayList<>();
  Map<String, String> settings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
  final Profile eclipseProfile= new BuiltInProfile(CleanUpConstants.ECLIPSE_PROFILE, CleanUpMessages.CleanUpProfileManager_ProfileName_EclipseBuildIn, settings, 2, CleanUpProfileVersioner.CURRENT_VERSION, CleanUpProfileVersioner.PROFILE_KIND);
  result.add(eclipseProfile);
  return result;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Returns a list of built in clean up profiles
 * @return the list of built in profiles, not null
 * @since 3.3
 */
public static List<Profile> getBuiltInProfiles() {
  ArrayList<Profile> result= new ArrayList<>();
  Map<String, String> settings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
  final Profile eclipseProfile= new BuiltInProfile(CleanUpConstants.ECLIPSE_PROFILE, CleanUpMessages.CleanUpProfileManager_ProfileName_EclipseBuildIn, settings, 2, CleanUpProfileVersioner.CURRENT_VERSION, CleanUpProfileVersioner.PROFILE_KIND);
  result.add(eclipseProfile);
  return result;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public Map<String, String> decodeSettings(String settings) throws CoreException {
  byte[] bytes;
  try {
    bytes= settings.getBytes(ENCODING);
  } catch (UnsupportedEncodingException e) {
    bytes= settings.getBytes();
  }
  InputStream is= new ByteArrayInputStream(bytes);
  try {
    List<Profile> res= ProfileStore.readProfilesFromStream(new InputSource(is));
    if (res == null || res.size() == 0)
      return JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
    CustomProfile profile= (CustomProfile)res.get(0);
    new CleanUpProfileVersioner().update(profile);
    return profile.getSettings();
  } finally {
    try { is.close(); } catch (IOException e) { /* ignore */ }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public Map<String, String> decodeSettings(String settings) throws CoreException {
  byte[] bytes;
  try {
    bytes= settings.getBytes(ENCODING);
  } catch (UnsupportedEncodingException e) {
    bytes= settings.getBytes();
  }
  InputStream is= new ByteArrayInputStream(bytes);
  try {
    List<Profile> res= ProfileStore.readProfilesFromStream(new InputSource(is));
    if (res == null || res.size() == 0)
      return JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
    CustomProfile profile= (CustomProfile)res.get(0);
    new CleanUpProfileVersioner().update(profile);
    return profile.getSettings();
  } finally {
    try { is.close(); } catch (IOException e) { /* ignore */ }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static Map<String, String> loadSaveParticipantOptions(IScopeContext context) {
  IEclipsePreferences node;
  if (hasSettingsInScope(context)) {
    node= context.getNode(JavaUI.ID_PLUGIN);
  } else {
    IScopeContext instanceScope= InstanceScope.INSTANCE;
    if (hasSettingsInScope(instanceScope)) {
      node= instanceScope.getNode(JavaUI.ID_PLUGIN);
    } else {
      return JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getMap();
    }
  }
  Map<String, String> result= new HashMap<>();
  Set<String> keys= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getKeys();
  for (Iterator<String> iterator= keys.iterator(); iterator.hasNext();) {
    String key= iterator.next();
    result.put(key, node.get(SAVE_PARTICIPANT_KEY_PREFIX + key, CleanUpOptions.FALSE));
  }
  return result;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public static Map<String, String> loadSaveParticipantOptions(IScopeContext context) {
  IEclipsePreferences node;
  if (hasSettingsInScope(context)) {
    node= context.getNode(JavaUI.ID_PLUGIN);
  } else {
    IScopeContext instanceScope= InstanceScope.INSTANCE;
    if (hasSettingsInScope(instanceScope)) {
      node= instanceScope.getNode(JavaUI.ID_PLUGIN);
    } else {
      return JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getMap();
    }
  }
  Map<String, String> result= new HashMap<>();
  Set<String> keys= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getKeys();
  for (Iterator<String> iterator= keys.iterator(); iterator.hasNext();) {
    String key= iterator.next();
    result.put(key, node.get(SAVE_PARTICIPANT_KEY_PREFIX + key, CleanUpOptions.FALSE));
  }
  return result;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void performDefaults() {
  if (ProjectScope.SCOPE.equals(fContext.getName()) && !hasSettingsInScope(fContext))
    return;
  enabled(true);
  if (ProjectScope.SCOPE.equals(fContext.getName())) {
    fSettings= CleanUpPreferenceUtil.loadSaveParticipantOptions(InstanceScope.INSTANCE);
  } else {
    fSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getMap();
  }
  settingsChanged();
  super.performDefaults();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void performDefaults() {
  if (ProjectScope.SCOPE.equals(fContext.getName()) && !hasSettingsInScope(fContext))
    return;
  enabled(true);
  if (ProjectScope.SCOPE.equals(fContext.getName())) {
    fSettings= CleanUpPreferenceUtil.loadSaveParticipantOptions(InstanceScope.INSTANCE);
  } else {
    fSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getMap();
  }
  settingsChanged();
  super.performDefaults();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

return JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getMap();
origin: org.eclipse.jdt/org.eclipse.jdt.ui

return JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getMap();
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  fCustomSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
} else {
  try {
  } catch (CoreException e) {
    JavaPlugin.log(e);
    fCustomSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  fCustomSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
} else {
  try {
  } catch (CoreException e) {
    JavaPlugin.log(e);
    fCustomSettings= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS).getMap();
org.eclipse.jdt.internal.ui.fixMapCleanUpOptionsgetMap

Popular methods of MapCleanUpOptions

  • <init>
    Create new CleanUpOptions instance. options maps named clean ups keys to CleanUpOptions#TRUE, CleanU
  • addAll
  • getKeys

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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