Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonas2014-10-19 11:00:20 +0000
committerjonas2014-10-19 11:00:20 +0000
commitfbc2f2e3b52afb1f2282e757f00ea7d19858a1a2 (patch)
treef674afee43f546c46f1d47a4195ae4a9d851272a /bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
parente9f7727486a37dd1c8e952e0a41f021de2a6426e (diff)
downloadorg.eclipse.e4.tools-fbc2f2e3b52afb1f2282e757f00ea7d19858a1a2.tar.gz
org.eclipse.e4.tools-fbc2f2e3b52afb1f2282e757f00ea7d19858a1a2.tar.xz
org.eclipse.e4.tools-fbc2f2e3b52afb1f2282e757f00ea7d19858a1a2.zip
Bug 444340 - Externalize Strings - Added Message classes to editor3xI20141019-2200
Diffstat (limited to 'bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java')
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
index 4052b79b..9ec1db74 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
@@ -15,7 +15,7 @@ public class EditUIUtil {
Class<?> fileClass = null;
try {
fileClass = IFile.class;
- } catch (Exception exception) {
+ } catch (final Exception exception) {
// Ignore any exceptions and assume the class isn't available.
}
FILE_CLASS = fileClass;
@@ -26,15 +26,15 @@ public class EditUIUtil {
static {
Class<?> fileRevisionClass = null;
Method fileRevisionGetURIMethod = null;
- Bundle bundle = Platform.getBundle("org.eclipse.team.core");
+ final Bundle bundle = Platform.getBundle("org.eclipse.team.core"); //$NON-NLS-1$
if (bundle != null
- && (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0) {
+ && (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0) {
try {
fileRevisionClass = bundle
- .loadClass("org.eclipse.team.core.history.IFileRevision");
+ .loadClass("org.eclipse.team.core.history.IFileRevision"); //$NON-NLS-1$
fileRevisionGetURIMethod = fileRevisionClass
- .getMethod("getURI");
- } catch (Exception exeption) {
+ .getMethod("getURI"); //$NON-NLS-1$
+ } catch (final Exception exeption) {
// Ignore any exceptions and assume the class isn't available.
}
}
@@ -47,7 +47,7 @@ public class EditUIUtil {
Class<?> uriEditorInputClass = null;
try {
uriEditorInputClass = IURIEditorInput.class;
- } catch (Exception exception) {
+ } catch (final Exception exception) {
// The class is not available.
}
URI_EDITOR_INPUT_CLASS = uriEditorInputClass;
@@ -56,20 +56,20 @@ public class EditUIUtil {
public static URI getURI(IEditorInput editorInput) {
if (FILE_CLASS != null) {
- IFile file = (IFile) editorInput.getAdapter(FILE_CLASS);
+ final IFile file = (IFile) editorInput.getAdapter(FILE_CLASS);
if (file != null) {
return URI.createPlatformResourceURI(file.getFullPath()
- .toString(), true);
+ .toString(), true);
}
}
if (FILE_REVISION_CLASS != null) {
- Object fileRevision = editorInput.getAdapter(FILE_REVISION_CLASS);
+ final Object fileRevision = editorInput.getAdapter(FILE_REVISION_CLASS);
if (fileRevision != null) {
try {
return URI
- .createURI(((java.net.URI) FILE_REVISION_GET_URI_METHOD
- .invoke(fileRevision)).toString());
- } catch (Exception exception) {
+ .createURI(((java.net.URI) FILE_REVISION_GET_URI_METHOD
+ .invoke(fileRevision)).toString());
+ } catch (final Exception exception) {
// TODO Log error
}
}
@@ -77,8 +77,8 @@ public class EditUIUtil {
if (URI_EDITOR_INPUT_CLASS != null) {
if (editorInput instanceof IURIEditorInput) {
return URI.createURI(
- ((IURIEditorInput) editorInput).getURI().toString())
- .trimFragment();
+ ((IURIEditorInput) editorInput).getURI().toString())
+ .trimFragment();
}
}

Back to the top