Author: vrubezhny
Date: 2007-08-08 07:32:55 -0400 (Wed, 08 Aug 2007)
New Revision: 2955
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-670 xhtml code completion does not update it's
list of completions
Side effects appeared as NullPointerExceptions - fixed
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java 2007-08-08
11:19:21 UTC (rev 2954)
+++
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java 2007-08-08
11:32:55 UTC (rev 2955)
@@ -61,10 +61,12 @@
StructuredTextEditor sse = getStructuredTextEditor(getTextEditor());
if (sse != null && sse instanceof IOccurrencePreferenceProvider) {
fOccurrencePreferenceProvider = (IOccurrencePreferenceProvider)sse;
- fEditorId =
fOccurrencePreferenceProvider.getOccurrencePreferenceProvider().getEditorId();
- fKey = PreferenceKeyGenerator.generateKey(
- OccurrencePreferenceConstants.EDITOR_MARK_OCCURRENCES,
- fEditorId);
+ if (fOccurrencePreferenceProvider != null) {
+ fEditorId =
fOccurrencePreferenceProvider.getOccurrencePreferenceProvider().getEditorId();
+ fKey = PreferenceKeyGenerator.generateKey(
+ OccurrencePreferenceConstants.EDITOR_MARK_OCCURRENCES,
+ fEditorId);
+ }
}
} catch (Exception x) {
XmlEditorPlugin.getPluginLog().logError(x);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-08-08
11:19:21 UTC (rev 2954)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-08-08
11:32:55 UTC (rev 2955)
@@ -196,7 +196,7 @@
}
public void dispose() {
- if (!selBar.isDisposed()) {
+ if (selBar != null && (!selBar.isDisposed())) {
for (int i =0; i < selBar.getItemCount(); i++) {
if (!selBar.getItem(i).isDisposed()) {
selBar.getItem(i).removeSelectionListener(this);