[
https://issues.jboss.org/browse/JBIDE-13076?page=com.atlassian.jira.plugi...
]
Alexey Kazakov updated JBIDE-13076:
-----------------------------------
Fix Version/s: 4.1.0.Alpha1
(was: 4.0.0.CR1)
This issue is a minor. Let's skip it to JBT 4.1.0
To risky to push it to JBT 4.0.0 CR1.
Marker Resolution Generators should check if IMarker exists
------------------------------------------------------------
Key: JBIDE-13076
URL:
https://issues.jboss.org/browse/JBIDE-13076
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: CDI, central, common/jst/core, JSF, Seam 2
Affects Versions: 4.0.0.Beta2
Environment: Ubuntu,
jbdevstudio-product-eap-universal-6.0.0.Beta2-v20121107-1854-B62.jar
Reporter: Daniel Azarov
Assignee: Daniel Azarov
Fix For: 4.1.0.Alpha1
When Marker Resolution Generator tries to find quick fixes for Problem Marker marker may
not be exist any more. In that case we can get follow Exception:
{code}
org.eclipse.core.internal.resources.ResourceException: Marker id 5 not found.
at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:57)
at org.eclipse.core.internal.resources.Marker.getType(Marker.java:195)
at
org.jboss.tools.common.ui.marker.ConfigureProblemSeverityResolutionGenerator.getProblemType(ConfigureProblemSeverityResolutionGenerator.java:140)
at
org.jboss.tools.common.ui.marker.ConfigureProblemSeverityResolutionGenerator.hasResolutions(ConfigureProblemSeverityResolutionGenerator.java:124)
at
org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry.hasResolution(MarkerHelpRegistry.java:191)
at
org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry.hasResolutions(MarkerHelpRegistry.java:160)
at org.eclipse.ui.views.markers.MarkerField.annotateImage(MarkerField.java:76)
at
org.eclipse.ui.internal.views.markers.MarkerProblemSeverityAndMessageField.update(MarkerProblemSeverityAndMessageField.java:86)
at
org.eclipse.ui.internal.views.markers.MarkerColumnLabelProvider.update(MarkerColumnLabelProvider.java:62)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
at
org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:953)
at
org.eclipse.ui.internal.views.markers.MarkersTreeViewer.doUpdateItem(MarkersTreeViewer.java:73)
at
org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:113)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1033)
at
org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
at
org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2753)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1923)
at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:721)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1930)
at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:721)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1898)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1855)
at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1535)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1533)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:548)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1490)
at
org.eclipse.ui.internal.views.markers.UIUpdateJob.runInUIThread(UIUpdateJob.java:108)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3529)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
{code}
I saw such exceptions only when I was working in Visual Page Editor.
May by this is WTP related issue.
So lets add check IMarker.exists() to hasResolutions(IMarker) methods to all our Marker
Resolution Generators which work with jsp, xhtml and xml files:
*jbosstools-javaee*
1. org.jboss.tools.cdi.ui.marker.CDIProblemMarkerResolutionGenerator
2. org.jboss.tools.seam.ui.marker.SeamProblemMarkerResolutionGenerator
3. org.jboss.tools.jsf.ui.marker.DisableFaceletHTMLValidatorResolutionGenerator
4. org.jboss.tools.jsf.web.validation.jsf2.action.JSF2ComponentResolutionGenerator
*jbosstools-jst*
1. org.jboss.tools.jst.web.ui.action.JSPProblemMarkerResolutionGenerator
*jbosstools-base*
1. org.jboss.tools.common.ui.marker.ConfigureProblemSeverityResolutionGenerator
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira