Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2016-01-15 18:56:55 -0500
committerBrian Vosburgh2016-01-15 18:56:55 -0500
commit3977cca9e847c9dbe3c3e2b9e54079ffe5242b0d (patch)
tree2394beb299216bff572de1de1bae1de69b433a7a
parent1299e5e061febdba053f82871f277a8ba0670e66 (diff)
downloadwebtools.dali-3977cca9e847c9dbe3c3e2b9e54079ffe5242b0d.tar.gz
webtools.dali-3977cca9e847c9dbe3c3e2b9e54079ffe5242b0d.tar.xz
webtools.dali-3977cca9e847c9dbe3c3e2b9e54079ffe5242b0d.zip
[460406][485375] fix NPE in Project Explorer (just about anything will
adapt to IProject)
-rw-r--r--common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/jface/ItemTreeStateProviderManager.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml11
2 files changed, 11 insertions, 8 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/jface/ItemTreeStateProviderManager.java b/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/jface/ItemTreeStateProviderManager.java
index e563fbaf6a..2236edc0da 100644
--- a/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/jface/ItemTreeStateProviderManager.java
+++ b/common/plugins/org.eclipse.jpt.common.ui/src/org/eclipse/jpt/common/ui/internal/jface/ItemTreeStateProviderManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2016 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -31,7 +31,7 @@ public class ItemTreeStateProviderManager
implements TreeStateProvider,
ItemTreeContentProvider.Manager
{
- private final HashMap<Object, ItemTreeContentProvider> itemContentProviders = new HashMap<Object, ItemTreeContentProvider>();
+ private final HashMap<Object, ItemTreeContentProvider> itemContentProviders = new HashMap<>();
public ItemTreeStateProviderManager(ItemTreeContentProvider.Factory itemContentProviderFactory, ResourceManager resourceManager) {
@@ -86,8 +86,8 @@ public class ItemTreeStateProviderManager
}
/**
- * <strong>NB:</strong> We have a bug if this method ever returns
- * <code>null</code> unexpectedly.
+ * <strong>NB:</strong> We have a bug (probably in our <code>plugin.xml</code>)
+ * if this method ever returns <code>null</code> unexpectedly.
*/
private ItemTreeContentProvider getItemContentProvider(Object item) {
return this.itemContentProviders.get(item);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml b/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml
index 707b64f8f0..1abe17c62e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<!--
- Copyright (c) 2007, 2013 Oracle. All rights reserved.
+ Copyright (c) 2007, 2016 Oracle. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0, which accompanies this distribution
and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -985,9 +985,12 @@
<triggerPoints>
<or>
<instanceof value="org.eclipse.jpt.jpa.core.context.JpaContextModel"/>
- <adapt type="org.eclipse.core.resources.IProject">
- <reference definitionId="org.eclipse.jpt.jpa.expression.hasJpaFacet"/>
- </adapt>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IProject"/>
+ <adapt type="org.eclipse.core.resources.IResource">
+ <reference definitionId="org.eclipse.jpt.jpa.expression.hasJpaFacet"/>
+ </adapt>
+ </and>
</or>
</triggerPoints>

Back to the top