Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-12-05 15:34:27 +0000
committerNicolas FAUVERGUE2016-12-05 16:34:31 +0000
commitbb8bd38eb65f1c405ca4a8a70dcf4087d983894e (patch)
tree38155931196af6a2ec43ba27a1d9c0eedaf964d9
parentb070b1933c7e1f792730acbde937ff0f789cbc8a (diff)
downloadorg.eclipse.papyrus-bb8bd38eb65f1c405ca4a8a70dcf4087d983894e.tar.gz
org.eclipse.papyrus-bb8bd38eb65f1c405ca4a8a70dcf4087d983894e.tar.xz
org.eclipse.papyrus-bb8bd38eb65f1c405ca4a8a70dcf4087d983894e.zip
Bug 508678 - [Table][Internationalization] Click on table column header
open an exception https://bugs.eclipse.org/bugs/show_bug.cgi?id=508678 - NPE with uri management. Change-Id: I7c2bf6042f2e34f207827c46f480789be5721502 Signed-off-by: Nicolas FAUVERGUE <nicolasfauvergue@gmail.com>
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF
index d858787d465..6f180904b03 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF
@@ -7,7 +7,8 @@ Require-Bundle: org.eclipse.papyrus.infra.onefile;bundle-version="[2.0.0,3.0.0)"
org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)",
org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
- org.eclipse.pde.ui;bundle-version="[3.9.0,4.0.0)"
+ org.eclipse.pde.ui;bundle-version="[3.9.0,4.0.0)",
+ org.eclipse.papyrus.infra.internationalization;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 3.0.0.qualifier
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java
index a3db4d85c2e..f111cea8add 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/internal/ControlledResourceTracker.java
@@ -32,6 +32,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomainEvent;
import org.eclipse.emf.transaction.TransactionalEditingDomainListener;
import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.papyrus.infra.internationalization.utils.PropertiesFilesUtils;
import org.eclipse.pde.internal.ui.util.LocaleUtil;
import com.google.common.collect.ArrayListMultimap;
@@ -133,7 +134,7 @@ public class ControlledResourceTracker extends AdapterImpl implements Transactio
URI result = initialURI;
// If this is a properties file, check if a locale is available at the end of the URI
- if (uri.fileExtension().equals("properties")) { //$NON-NLS-1$
+ if (null != uri && null != uri.fileExtension() && uri.fileExtension().equals(PropertiesFilesUtils.PROPERTIES_FILE_EXTENSION)) { //$NON-NLS-1$
// Get the last segment
final String lastSegment = initialURI.lastSegment();
// Try to remove existing localization

Back to the top