protected String getEncoding() throws CoreException { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); }
/** * Creates a <code>SourceMapper</code> that locates source in the zip file * at the given location in the specified package fragment root. */ public SourceMapper(IPath sourcePath, String rootPath, Map options, String encoding) { this.areRootPathsComputed = false; this.options = options; this.encoding = encoding; try { this.defaultEncoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } if (rootPath != null) { this.rootPaths = new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath = sourcePath; this.sourceRanges = new HashMap(); this.parametersRanges = new HashMap(); this.parameterNames = new HashMap(); this.importsTable = new HashMap(); this.importsCounterTable = new HashMap(); }
/** * Creates a <code>SourceMapper</code> that locates source in the zip file * at the given location in the specified package fragment root. */ public SourceMapper(IPath sourcePath, String rootPath, Map options, String encoding) { this.areRootPathsComputed = false; this.options = options; this.encoding = encoding; try { this.defaultEncoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } if (rootPath != null) { this.rootPath = rootPath; this.rootPaths = new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath = sourcePath; this.sourceRanges = new HashMap(); this.parametersRanges = new HashMap(); this.parameterNames = new HashMap(); this.importsTable = new HashMap(); this.importsCounterTable = new HashMap(); }
/** * Creates a <code>SourceMapper</code> that locates source in the zip file * at the given location in the specified package fragment root. */ public SourceMapper(IPath sourcePath, String rootPath, Map options, String encoding) { this.areRootPathsComputed = false; this.options = options; this.encoding = encoding; try { this.defaultEncoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } if (rootPath != null) { this.rootPath = rootPath; this.rootPaths = new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath = sourcePath; this.sourceRanges = new HashMap(); this.parametersRanges = new HashMap(); this.parameterNames = new HashMap(); this.importsTable = new HashMap(); this.importsCounterTable = new HashMap(); }
/** * Creates a <code>SourceMapper</code> that locates source in the zip file * at the given location in the specified package fragment root. */ public SourceMapper(IPath sourcePath, String rootPath, Map options, String encoding) { this.areRootPathsComputed = false; this.options = options; this.encoding = encoding; try { this.defaultEncoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } if (rootPath != null) { this.rootPaths = new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath = sourcePath; this.sourceRanges = new HashMap(); this.parametersRanges = new HashMap(); this.parameterNames = new HashMap(); this.importsTable = new HashMap(); this.importsCounterTable = new HashMap(); }
/** * Creates a <code>SourceMapper</code> that locates source in the zip file * at the given location in the specified package fragment root. */ public SourceMapper(IPath sourcePath, String rootPath, Map options) { this.areRootPathsComputed = false; this.options = options; try { this.encoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } if (rootPath != null) { this.rootPaths = new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath = sourcePath; this.sourceRanges = new HashMap(); this.parametersRanges = new HashMap(); this.parameterNames = new HashMap(); this.importsTable = new HashMap(); this.importsCounterTable = new HashMap(); }
/** * Returns the workspace root default charset encoding. * * @return the name of the default charset encoding for workspace root. * @see IContainer#getDefaultCharset() * @see ResourcesPlugin#getEncoding() * @since 3.0 */ public static String getEncoding() { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (IllegalStateException ise) { // happen when there's no workspace (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216817) // or when it is shutting down (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=60687) return System.getProperty("file.encoding"); //$NON-NLS-1$ } catch (CoreException ce) { // fails silently and return plugin global encoding if core exception occurs } return ResourcesPlugin.getEncoding(); }
/** * Returns the workspace root default charset encoding. * * @return the name of the default charset encoding for workspace root. * @see IContainer#getDefaultCharset() * @see ResourcesPlugin#getEncoding() * @since 3.0 */ public static String getEncoding() { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (IllegalStateException ise) { // happen when there's no workspace (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216817) // or when it is shutting down (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=60687) return System.getProperty("file.encoding"); //$NON-NLS-1$ } catch (CoreException ce) { // fails silently and return plugin global encoding if core exception occurs } return ResourcesPlugin.getEncoding(); }
/** * Creates a <code>SourceMapper</code> that locates source in the zip file * at the given location in the specified package fragment root. */ public SourceMapper(IPath sourcePath, String rootPath, Map options, String encoding) { this.areRootPathsComputed = false; this.options = options; this.encoding = encoding; try { this.defaultEncoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } if (rootPath != null) { this.rootPaths = new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath = sourcePath; this.sourceRanges = new HashMap(); this.parametersRanges = new HashMap(); this.parameterNames = new HashMap(); this.importsTable = new HashMap(); this.importsCounterTable = new HashMap(); }
/** * Returns the workspace root default charset encoding. * * @return the name of the default charset encoding for workspace root. * @see IContainer#getDefaultCharset() * @see ResourcesPlugin#getEncoding() * @since 3.0 */ public static String getEncoding() { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (IllegalStateException ise) { // happen when there's no workspace (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216817) // or when it is shutting down (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=60687) return System.getProperty("file.encoding"); //$NON-NLS-1$ } catch (CoreException ce) { // fails silently and return plugin global encoding if core exception occurs } return ResourcesPlugin.getEncoding(); }
/** * Returns the workspace root default charset encoding. * * @return the name of the default charset encoding for workspace root. * @see IContainer#getDefaultCharset() * @see ResourcesPlugin#getEncoding() * @since 3.0 */ public static String getEncoding() { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (IllegalStateException ise) { // happen when there's no workspace (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216817) // or when it is shutting down (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=60687) return System.getProperty("file.encoding"); //$NON-NLS-1$ } catch (CoreException ce) { // fails silently and return plugin global encoding if core exception occurs } return ResourcesPlugin.getEncoding(); }
/** * Returns the workspace root default charset encoding. * * @return the name of the default charset encoding for workspace root. * @see IContainer#getDefaultCharset() * @see ResourcesPlugin#getEncoding() * @since 3.0 */ public static String getEncoding() { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (IllegalStateException ise) { // happen when there's no workspace (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216817) // or when it is shutting down (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=60687) return System.getProperty("file.encoding"); //$NON-NLS-1$ } catch (CoreException ce) { // fails silently and return plugin global encoding if core exception occurs } return ResourcesPlugin.getEncoding(); }
/** * Returns the workspace root default charset encoding. * * @return the name of the default charset encoding for workspace root. * @see IContainer#getDefaultCharset() * @see ResourcesPlugin#getEncoding() * @since 3.0 */ public static String getEncoding() { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (IllegalStateException ise) { // happen when there's no workspace (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216817) // or when it is shutting down (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=60687) return System.getProperty("file.encoding"); //$NON-NLS-1$ } catch (CoreException ce) { // fails silently and return plugin global encoding if core exception occurs } return ResourcesPlugin.getEncoding(); }
public String getEncoding() { // Return the encoding of the associated file IFile resource = getFile(); if (resource != null) { try { return resource.getCharset(); } catch(CoreException ce) { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } } } return null; } private IFile getFile() {
public String getEncoding() { // Return the encoding of the associated file IFile resource = getFile(); if (resource != null) { try { return resource.getCharset(); } catch(CoreException ce) { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } } } return null; } private IFile getFile() {
public String getEncoding() { // Return the encoding of the associated file IFile resource = getFile(); if (resource != null) { try { return resource.getCharset(); } catch(CoreException ce) { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } } } return null; } private IFile getFile() {
public String getEncoding() { // Return the encoding of the associated file IFile resource = getFile(); if (resource != null) { try { return resource.getCharset(); } catch(CoreException ce) { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } } } return null; } private IFile getFile() {
@Override public String getEncoding() { // Return the encoding of the associated file IFile resource = getFile(); if (resource != null) { try { return resource.getCharset(); } catch(CoreException ce) { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } } } return null; } private IFile getFile() {
public String getEncoding() { // Return the encoding of the associated file IFile resource = getFile(); if (resource != null) { try { return resource.getCharset(); } catch(CoreException ce) { try { return ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); } catch (CoreException e) { // use no encoding } } } return null; } private IFile getFile() {
String defaultEncoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(); fDefaultEncodingName= Messages.format(NewWizardMessages.SourceAttachmentBlock_encoding_default, defaultEncoding); } catch (CoreException e) {