Author: scabanovich
Date: 2012-01-24 18:04:10 -0500 (Tue, 24 Jan 2012)
New Revision: 38126
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/CDISeamCorePlugin.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
Log:
JBIDE-10703
https://issues.jboss.org/browse/JBIDE-10703
CDISeamCorePlugin is modified to follow the common pattern.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/CDISeamCorePlugin.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/CDISeamCorePlugin.java 2012-01-24
23:00:07 UTC (rev 38125)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/CDISeamCorePlugin.java 2012-01-24
23:04:10 UTC (rev 38126)
@@ -11,7 +11,6 @@
package org.jboss.tools.cdi.seam.core;
import org.jboss.tools.common.log.BaseUIPlugin;
-import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
@@ -33,28 +32,9 @@
* The constructor
*/
public CDISeamCorePlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
plugin = this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
/**
* Returns the shared instance
*
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2012-01-24
23:00:07 UTC (rev 38125)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2012-01-24
23:04:10 UTC (rev 38126)
@@ -25,6 +25,7 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.CDIImages;
import org.jboss.tools.cdi.seam.core.CDISeamCorePlugin;
@@ -159,7 +160,9 @@
if (project == null)
return null;
- if (!CDICorePlugin.getCDI(project,
true).getExtensionManager().isCDIExtensionAvailable(CDISeamCorePlugin.CDI_INTERNATIONAL_RUNTIME_EXTENTION))
+ CDICoreNature n = CDICorePlugin.getCDI(project, true);
+
+ if (n == null ||
!n.getExtensionManager().isCDIExtensionAvailable(CDISeamCorePlugin.CDI_INTERNATIONAL_RUNTIME_EXTENTION))
return null;
IBundleModel bundleModel =
BundleModelFactory.getBundleModel(context.getResource().getProject());