Tabnine Logo
JavaElementLabelComposer$PackageNameAbbreviation
Code IndexAdd Tabnine to your IDE (free)

How to use
JavaElementLabelComposer$PackageNameAbbreviation
in
org.eclipse.jdt.internal.ui.viewsupport

Best Java code snippets using org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer$PackageNameAbbreviation (Showing top 6 results out of 315)

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

public static PackageNameAbbreviation[] parseAbbreviationPattern(String pattern) {
  String[] parts= pattern.split("\\s*(?:\r\n?|\n)\\s*"); //$NON-NLS-1$
  ArrayList<PackageNameAbbreviation> result= new ArrayList<>();
  for (int i= 0; i < parts.length; i++) {
    String part= parts[i].trim();
    if (part.length() == 0)
      continue;
    String[] parts2= part.split("\\s*=\\s*", 2); //$NON-NLS-1$
    if (parts2.length != 2)
      return null;
    String prefix= parts2[0].trim();
    String abbr= parts2[1].trim();
    if (prefix.startsWith("#")) //$NON-NLS-1$
      continue;
    PackageNameAbbreviation pkgAbbr= new PackageNameAbbreviation(prefix, abbr);
    result.add(pkgAbbr);
  }
  Collections.sort(result, new Comparator<PackageNameAbbreviation>() {
    @Override
    public int compare(PackageNameAbbreviation a1, PackageNameAbbreviation a2) {
      return a2.getPackagePrefix().length() - a1.getPackagePrefix().length();
    }
  });
  return result.toArray(new PackageNameAbbreviation[0]);
}

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

  @Override
  public int compare(PackageNameAbbreviation a1, PackageNameAbbreviation a2) {
    return a2.getPackagePrefix().length() - a1.getPackagePrefix().length();
  }
});
origin: org.eclipse.jdt/org.eclipse.jdt.ui

PackageNameAbbreviation abbr= fgPkgNameAbbreviation[i];
String abbrPrefix= abbr.getPackagePrefix();
if (pkgName.startsWith(abbrPrefix)) {
  int abbrPrefixLength= abbrPrefix.length();
    continue;
  fBuffer.append(abbr.getAbbreviation());
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

PackageNameAbbreviation abbr= fgPkgNameAbbreviation[i];
String abbrPrefix= abbr.getPackagePrefix();
if (pkgName.startsWith(abbrPrefix)) {
  int abbrPrefixLength= abbrPrefix.length();
    continue;
  fBuffer.append(abbr.getAbbreviation());
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static PackageNameAbbreviation[] parseAbbreviationPattern(String pattern) {
  String[] parts= pattern.split("\\s*(?:\r\n?|\n)\\s*"); //$NON-NLS-1$
  ArrayList<PackageNameAbbreviation> result= new ArrayList<>();
  for (int i= 0; i < parts.length; i++) {
    String part= parts[i].trim();
    if (part.length() == 0)
      continue;
    String[] parts2= part.split("\\s*=\\s*", 2); //$NON-NLS-1$
    if (parts2.length != 2)
      return null;
    String prefix= parts2[0].trim();
    String abbr= parts2[1].trim();
    if (prefix.startsWith("#")) //$NON-NLS-1$
      continue;
    PackageNameAbbreviation pkgAbbr= new PackageNameAbbreviation(prefix, abbr);
    result.add(pkgAbbr);
  }
  Collections.sort(result, new Comparator<PackageNameAbbreviation>() {
    @Override
    public int compare(PackageNameAbbreviation a1, PackageNameAbbreviation a2) {
      return a2.getPackagePrefix().length() - a1.getPackagePrefix().length();
    }
  });
  return result.toArray(new PackageNameAbbreviation[0]);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  @Override
  public int compare(PackageNameAbbreviation a1, PackageNameAbbreviation a2) {
    return a2.getPackagePrefix().length() - a1.getPackagePrefix().length();
  }
});
org.eclipse.jdt.internal.ui.viewsupportJavaElementLabelComposer$PackageNameAbbreviation

Most used methods

  • <init>
  • getAbbreviation
  • getPackagePrefix

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • 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
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for WebStorm
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