public ContributorInfo(TextMergeViewer viewer, Object element, char leg) { fViewer = viewer; fElement = element; fLeg = leg; if (fElement instanceof IEncodedStreamContentAccessor) { try { fEncoding = ((IEncodedStreamContentAccessor)fElement).getCharset(); } catch (CoreException e) { // silently ignored } } }
public ContributorInfo(TextMergeViewer viewer, Object element, char leg) { fViewer = viewer; fElement = element; fLeg = leg; if (fElement instanceof IEncodedStreamContentAccessor) { try { fEncoding = ((IEncodedStreamContentAccessor) fElement).getCharset(); } catch (CoreException e) { // silently ignored } } }
protected String getEncoding(Object element) { String encoding = ResourcesPlugin.getEncoding(); if (element instanceof IEncodedStreamContentAccessor) { try { encoding = ((IEncodedStreamContentAccessor) element).getCharset(); } catch (CoreException exception) { } } return encoding; }
private String internalGetEncoding() { if (fElement instanceof IEncodedStreamContentAccessor) { try { fEncoding = ((IEncodedStreamContentAccessor) fElement) .getCharset(); } catch (CoreException e) { // silently ignored } } if (fEncoding != null) { return fEncoding; } return ResourcesPlugin.getEncoding(); }
private String getCharset(Object input) { String charset = null; if (input instanceof IEncodedStreamContentAccessor) { try { charset = ((IEncodedStreamContentAccessor) input).getCharset(); } catch (Exception e) { // ignore, will use default } } if (charset != null) { return charset; } return ResourcesPlugin.getEncoding(); }
public static String readString(IStreamContentAccessor sa) throws CoreException { String encoding= null; if (sa instanceof IEncodedStreamContentAccessor) encoding= ((IEncodedStreamContentAccessor)sa).getCharset(); if (encoding == null) encoding= ResourcesPlugin.getEncoding(); return Utilities.readString(sa, encoding); }
public static String readString(IStreamContentAccessor sa) throws CoreException { String encoding= null; if (sa instanceof IEncodedStreamContentAccessor) encoding= ((IEncodedStreamContentAccessor)sa).getCharset(); if (encoding == null) encoding= ResourcesPlugin.getEncoding(); return Utilities.readString(sa, encoding); }
public static String readString(IStreamContentAccessor sa) throws CoreException { InputStream is= sa.getContents(); if (is != null) { String encoding= null; if (sa instanceof IEncodedStreamContentAccessor) { try { encoding= ((IEncodedStreamContentAccessor) sa).getCharset(); } catch (Exception e) { } } if (encoding == null) encoding= ResourcesPlugin.getEncoding(); return readString(is, encoding); } return null; }
public static String readString(IStreamContentAccessor sa) throws CoreException { InputStream is= sa.getContents(); if (is != null) { String encoding= null; if (sa instanceof IEncodedStreamContentAccessor) { try { encoding= ((IEncodedStreamContentAccessor) sa).getCharset(); } catch (Exception e) { } } if (encoding == null) encoding= ResourcesPlugin.getEncoding(); return readString(is, encoding); } return null; }
public static String readString(IStreamContentAccessor sa) throws CoreException { InputStream is = sa.getContents(); if (is != null) { String encoding = null; if (sa instanceof IEncodedStreamContentAccessor) { try { encoding = ((IEncodedStreamContentAccessor) sa).getCharset(); } catch (Exception e) { } } if (encoding == null) encoding = ResourcesPlugin.getEncoding(); return readString(is, encoding); } return null; }
public static String readString(IStreamContentAccessor sa) throws CoreException { InputStream is= sa.getContents(); if (is != null) { String encoding= null; if (sa instanceof IEncodedStreamContentAccessor) { try { encoding= ((IEncodedStreamContentAccessor) sa).getCharset(); } catch (Exception e) { } } if (encoding == null) encoding= ResourcesPlugin.getEncoding(); return readString(is, encoding); } return null; }
if (input instanceof IEncodedStreamContentAccessor) { try { encoding= ((IEncodedStreamContentAccessor)input).getCharset(); } catch (CoreException e1) {
if (input instanceof IEncodedStreamContentAccessor) { try { encoding= ((IEncodedStreamContentAccessor)input).getCharset(); } catch (CoreException e1) {