[JBoss JIRA] (JBIDE-12990) Weird XML validation errors for JSF facelet template
by Daniel Azarov (JIRA)
[ https://issues.jboss.org/browse/JBIDE-12990?page=com.atlassian.jira.plugi... ]
Daniel Azarov commented on JBIDE-12990:
---------------------------------------
Reported in bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=406703
> Weird XML validation errors for JSF facelet template
> ----------------------------------------------------
>
> Key: JBIDE-12990
> URL: https://issues.jboss.org/browse/JBIDE-12990
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: upstream
> Affects Versions: 4.0.0.Beta1
> Environment: JBoss Developer Studio 6.0.0.Beta1
> Reporter: Marek Novotny
> Assignee: Viacheslav Kabanovich
> Fix For: LATER
>
>
> Importing http://anonsvn.jboss.org/repos/seam/branches/community/Seam_2_3/examples/...
> ends with a few weird errors for blog-web project.
> {noformat}
> Description Resource Path Location Type
> Referenced file contains errors (file:/home/mnovotny/apps/jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/html_basic.taglib.xml). For more information, right click on the message in the Problems View and select "Show Details..." index.xml /blog-web/target/m2e-wtp/web-resources line 1 XML Problem
> Referenced file contains errors (file:/home/mnovotny/apps/jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/html_basic.taglib.xml). For more information, right click on the message in the Problems View and select "Show Details..." index.xml /blog-web/src/main/webapp line 1 XML Problem
> cvc-elt.1: Cannot find the declaration of element 'f:view'. index.xml /blog-web/target/m2e-wtp/web-resources line 7 XML Problem
> Referenced file contains errors (file:/home/mnovotny/apps/jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/facelets_jsf_core.taglib.xml). For more information, right click on the message in the Problems View and select "Show Details..." index.xml /blog-web/target/m2e-wtp/web-resources line 1 XML Problem
> Referenced file contains errors (file:/home/mnovotny/apps/jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/facelets_jsf_core.taglib.xml). For more information, right click on the message in the Problems View and select "Show Details..." index.xml /blog-web/target/blog-web line 1 XML Problem
> cvc-elt.1: Cannot find the declaration of element 'f:view'. index.xml /blog-web/src/main/webapp line 7 XML Problem
> Referenced file contains errors (file:/home/mnovotny/apps/jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/facelets_jsf_core.taglib.xml). For more information, right click on the message in the Problems View and select "Show Details..." index.xml /blog-web/src/main/webapp line 1 XML Problem
> cvc-elt.1: Cannot find the declaration of element 'f:view'. index.xml /blog-web/target/blog-web line 7 XML Problem
> Referenced file contains errors (file:/home/mnovotny/apps/jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/html_basic.taglib.xml). For more information, right click on the message in the Problems View and select "Show Details..." index.xml /blog-web/target/blog-web line 1 XML Problem
> {noformat}
> Basically there are 3 types of error:
> 1. it say f:view tag definition cannot be found
> 2. definition of jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/facelets_jsf_core.taglib.xml is not valid
> 3. definition of jbdevstudio6/studio/plugins/org.jboss.tools.jst.web.kb_3.4.0.Beta1-v20121018-0628-B39/taglibs/tld/html_basic.taglib.xml is not valid
--
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
13 years
[JBoss JIRA] (JBIDE-14327) org.jboss.tools.project.examples does not compile
by Alexey Kazakov (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14327?page=com.atlassian.jira.plugi... ]
Alexey Kazakov updated JBIDE-14327:
-----------------------------------
Component/s: central
> org.jboss.tools.project.examples does not compile
> -------------------------------------------------
>
> Key: JBIDE-14327
> URL: https://issues.jboss.org/browse/JBIDE-14327
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: central, common/jst/core, project-examples, server
> Affects Versions: 4.1.0.Beta1
> Reporter: Alexey Kazakov
> Priority: Blocker
> Fix For: 4.1.0.Beta1
>
>
> {code}
> [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.17.0:compile (default-compile) on project org.jboss.tools.project.examples: Compilation failure: Compilation failure:
> [ERROR] /home/igels/Projects/jbt-4.0/requests/jbosstools-central/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java:[836,0]
> [ERROR] return ECFTransport.getInstance();
> [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^
> [ERROR] Type mismatch: cannot convert from org.jboss.tools.common.core.ecf.ECFTransport to org.jboss.tools.runtime.core.util.ECFTransport
> [ERROR] 1 problem (1 error)
> [ERROR] -> [Help 1]
> [ERROR]
> {code}
> It seems that this PR https://github.com/jbosstools/jbosstools-base/pull/93 pushed to master broke the build.
--
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
13 years
[JBoss JIRA] (JBIDE-14327) org.jboss.tools.project.examples does not compile
by Alexey Kazakov (JIRA)
Alexey Kazakov created JBIDE-14327:
--------------------------------------
Summary: org.jboss.tools.project.examples does not compile
Key: JBIDE-14327
URL: https://issues.jboss.org/browse/JBIDE-14327
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: common/jst/core, project-examples, server
Affects Versions: 4.1.0.Beta1
Reporter: Alexey Kazakov
Priority: Blocker
Fix For: 4.1.0.Beta1
{code}
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.17.0:compile (default-compile) on project org.jboss.tools.project.examples: Compilation failure: Compilation failure:
[ERROR] /home/igels/Projects/jbt-4.0/requests/jbosstools-central/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java:[836,0]
[ERROR] return ECFTransport.getInstance();
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from org.jboss.tools.common.core.ecf.ECFTransport to org.jboss.tools.runtime.core.util.ECFTransport
[ERROR] 1 problem (1 error)
[ERROR] -> [Help 1]
[ERROR]
{code}
It seems that this PR https://github.com/jbosstools/jbosstools-base/pull/93 pushed to master broke the build.
--
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
13 years
[JBoss JIRA] (JBIDE-14320) JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
by Victor Rubezhny (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14320?page=com.atlassian.jira.plugi... ]
Victor Rubezhny resolved JBIDE-14320.
-------------------------------------
Resolution: Rejected
It's not a bug and here is nothing to fix in JSPMultiPageEditor. It works as expected.
> JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
> ------------------------------------------------------------------------
>
> Key: JBIDE-14320
> URL: https://issues.jboss.org/browse/JBIDE-14320
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim, jsp/jsf/xml/html source editing
> Affects Versions: 4.1.0.Beta1
> Reporter: Yahor Radtsevich
> Assignee: Victor Rubezhny
> Fix For: 4.1.0.Beta1
>
>
> In BrowserSim we [use|https://github.com/jbosstools/jbosstools-vpe/blob/master/plugins/org....] the following code to view the source code of currently opened page.
> This code opens a default html editor with given {{content}}.
> Everything is working fine, unless {{JSPMultiPageEditor}} is the default html editor.
> In the case with {{JSPMultiPageEditor}}, the method {{JSPMultiPageEditor.getDocumentProvider().getDocument(input)}} returns {{null}} and blanck editor is shown.
> {code}
> private void openInMemoryHtmlEditor(String content, String name, String toolTip) {
> IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
> IWorkbenchPage page = window != null ? window.getActivePage() : null;
> if (page != null) {
> try {
> IEditorDescriptor editorDescriptor = PlatformUI.getWorkbench()
> .getEditorRegistry().getDefaultEditor("view-source.html"); // get default editor for .html //$NON-NLS-1$
> String editorId;
> if (editorDescriptor != null && editorDescriptor.isInternal()) {
> editorId = editorDescriptor.getId();
> } else {
> editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
> }
> IStorage storage = new StringStorage("", // see the long comment below to know why an empty storage is created //$NON-NLS-1$
> "view-source.html"); // .html extension is needed to enable code highlighting in the WTP HTML editor //$NON-NLS-1$
> IStorageEditorInput input = new StringInput(storage, name, toolTip);
> IEditorPart editor = page.openEditor(input, editorId);
>
> /* We change content of the editor AFTER the editor is created
> * as a workaround for the following WTP bug.
> * The essence of the bug is that if given HTML page contains a link
> * to an external DTD, then WTP HTML editor tries to access this DTD before the editor
> * is created and freezes UI.
> * See http://www.eclipse.org/forums/index.php/m/639937/
> */
> IDocument doc = null;
> ITextEditor textEditor = null;
> if (editor instanceof ITextEditor) {
> textEditor = (ITextEditor) editor;
> } else {
> textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
> }
>
> if (textEditor != null) {
> doc = textEditor.getDocumentProvider().getDocument(input);// <<<<----- THE PROBLEM APPEARS HERE
> }
> if (doc != null) {
> doc.set(content);
> editor.doSave(null); // reset resource-changed marker
> }
> } catch (PartInitException e) {
> Activator.logError(e.getMessage(), e);
> }
> } else {
> Activator.logError("Cannot obtain workbench page", null);
> }
> }
> {code}
--
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
13 years
[JBoss JIRA] (JBIDE-13654) org.eclipse.core.internal.resources.ResourceException performing Quick Fix from Teiid Designer tooling
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/JBIDE-13654?page=com.atlassian.jira.plugi... ]
Barry LaFond commented on JBIDE-13654:
--------------------------------------
Daniel,
We're not set-up to build/test with JBT code-base. From what I understand looking at your code, if no "type" was set it would have been an issue.
I also tried to reproduce the set-up so I could create a project zip for you to test with but I can't reproduce the exception.
Your FIX seems to make sense, so hopefully it'll prevent this from happening in the future. I'd go ahead and pull the fix and resolve this issue.
Barry
> org.eclipse.core.internal.resources.ResourceException performing Quick Fix from Teiid Designer tooling
> ------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-13654
> URL: https://issues.jboss.org/browse/JBIDE-13654
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: common/jst/core
> Reporter: Barry LaFond
> Assignee: Daniel Azarov
> Fix For: 4.1.0.Beta1
>
>
> Developing a Quick Fix (org.eclipse.ui.ide.markerResolution extension point) for upcoming Teiid Designer 8.1 release.
> After performing Quick fix successfully, the following exception is thrown from org.jboss.tools.common.ui.Marker class as the wizard is tearing down (deactivating).
> org.eclipse.core.internal.resources.ResourceException: Marker id 89 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.internal.views.markers.QuickFixPropertyTester.test(QuickFixPropertyTester.java:39)
> at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
> at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
> at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
> at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
> at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
> at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
> at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:93)
> at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:130)
> at org.eclipse.ui.internal.services.EvaluationReference.changed(EvaluationReference.java:124)
> at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:110)
> at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:318)
> at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:332)
> at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:630)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$3.run(ShellActivationListener.java:153)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.deactivate(ShellActivationListener.java:145)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.access$0(ShellActivationListener.java:131)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$4.widgetDisposed(ShellActivationListener.java:197)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:123)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1281)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:1098)
> at org.eclipse.swt.widgets.Control.release(Control.java:3529)
> at org.eclipse.swt.widgets.Widget.dispose(Widget.java:476)
> at org.eclipse.swt.widgets.Shell.dispose(Shell.java:2307)
> at org.eclipse.jface.window.Window.close(Window.java:335)
> at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:979)
> at org.eclipse.jface.wizard.WizardDialog.hardClose(WizardDialog.java:892)
> at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:835)
> at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
> at org.eclipse.jface.window.Window.open(Window.java:801)
> at org.eclipse.ui.internal.views.markers.QuickFixHandler.execute(QuickFixHandler.java:165)
> at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
> at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
> 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:616)
> at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
> at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
> at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:814)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:707)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:691)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:630)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
> 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:616)
> 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)
--
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
13 years
[JBoss JIRA] (JBIDE-13654) org.eclipse.core.internal.resources.ResourceException performing Quick Fix from Teiid Designer tooling
by Daniel Azarov (JIRA)
[ https://issues.jboss.org/browse/JBIDE-13654?page=com.atlassian.jira.plugi... ]
Daniel Azarov commented on JBIDE-13654:
---------------------------------------
Burry, please try my pull request that limits ConfigureProblemSeverityResolutionGenerator to work with only org.jboss.tools.common.validation.JBTValidationProblem. I think it could help.
> org.eclipse.core.internal.resources.ResourceException performing Quick Fix from Teiid Designer tooling
> ------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-13654
> URL: https://issues.jboss.org/browse/JBIDE-13654
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: common/jst/core
> Reporter: Barry LaFond
> Assignee: Daniel Azarov
> Fix For: 4.1.0.Beta1
>
>
> Developing a Quick Fix (org.eclipse.ui.ide.markerResolution extension point) for upcoming Teiid Designer 8.1 release.
> After performing Quick fix successfully, the following exception is thrown from org.jboss.tools.common.ui.Marker class as the wizard is tearing down (deactivating).
> org.eclipse.core.internal.resources.ResourceException: Marker id 89 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.internal.views.markers.QuickFixPropertyTester.test(QuickFixPropertyTester.java:39)
> at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
> at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
> at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
> at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
> at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
> at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
> at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:93)
> at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:130)
> at org.eclipse.ui.internal.services.EvaluationReference.changed(EvaluationReference.java:124)
> at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:110)
> at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:318)
> at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:332)
> at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:630)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$3.run(ShellActivationListener.java:153)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.deactivate(ShellActivationListener.java:145)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.access$0(ShellActivationListener.java:131)
> at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$4.widgetDisposed(ShellActivationListener.java:197)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:123)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1281)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:1098)
> at org.eclipse.swt.widgets.Control.release(Control.java:3529)
> at org.eclipse.swt.widgets.Widget.dispose(Widget.java:476)
> at org.eclipse.swt.widgets.Shell.dispose(Shell.java:2307)
> at org.eclipse.jface.window.Window.close(Window.java:335)
> at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:979)
> at org.eclipse.jface.wizard.WizardDialog.hardClose(WizardDialog.java:892)
> at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:835)
> at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
> at org.eclipse.jface.window.Window.open(Window.java:801)
> at org.eclipse.ui.internal.views.markers.QuickFixHandler.execute(QuickFixHandler.java:165)
> at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
> at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
> 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:616)
> at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
> at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
> at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:814)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:707)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:691)
> at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:630)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
> 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:616)
> 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)
--
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
13 years
[JBoss JIRA] (JBIDE-14320) JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
by Victor Rubezhny (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14320?page=com.atlassian.jira.plugi... ]
Victor Rubezhny commented on JBIDE-14320:
-----------------------------------------
There is no way to get the Document from a Document Adapter by the original Editor Input provided.
There is a fix for issue [JBIDE-1809 (VPE doesn't shows anything when we open file from local edition history)|https://issues.jboss.org/browse/JBIDE-1809] that replaces the original Editor Input in the editor by another one. So, you'll never get the Document back from the Document Adapter by an original Editor Input provided. See the code below:
{code:title=VpeEditorPart.createPartControl(Composite) line: 520}
IEditorInput input = getEditorInput();
if (!( input instanceof IModelObjectEditorInput) && input instanceof IStorageEditorInput) {
input = new StorageRevisionEditorInputAdapter((IStorageEditorInput) input);
}
{code}
In other cases (even if fix for JBIDE-1809 is removed) the same thing (replacing the original Editor Input by a new one) may happen in JSPMultiPageEditor itself depending on the type of Editor Input provided.
So, the most correct way to get the Document is to ask Editor's Viewer for its Document or call getAdapter(IDocument.class) method of ITextEditor instance.
> JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
> ------------------------------------------------------------------------
>
> Key: JBIDE-14320
> URL: https://issues.jboss.org/browse/JBIDE-14320
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim, jsp/jsf/xml/html source editing
> Affects Versions: 4.1.0.Beta1
> Reporter: Yahor Radtsevich
> Assignee: Victor Rubezhny
> Fix For: 4.1.0.Beta1
>
>
> In BrowserSim we [use|https://github.com/jbosstools/jbosstools-vpe/blob/master/plugins/org....] the following code to view the source code of currently opened page.
> This code opens a default html editor with given {{content}}.
> Everything is working fine, unless {{JSPMultiPageEditor}} is the default html editor.
> In the case with {{JSPMultiPageEditor}}, the method {{JSPMultiPageEditor.getDocumentProvider().getDocument(input)}} returns {{null}} and blanck editor is shown.
> {code}
> private void openInMemoryHtmlEditor(String content, String name, String toolTip) {
> IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
> IWorkbenchPage page = window != null ? window.getActivePage() : null;
> if (page != null) {
> try {
> IEditorDescriptor editorDescriptor = PlatformUI.getWorkbench()
> .getEditorRegistry().getDefaultEditor("view-source.html"); // get default editor for .html //$NON-NLS-1$
> String editorId;
> if (editorDescriptor != null && editorDescriptor.isInternal()) {
> editorId = editorDescriptor.getId();
> } else {
> editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
> }
> IStorage storage = new StringStorage("", // see the long comment below to know why an empty storage is created //$NON-NLS-1$
> "view-source.html"); // .html extension is needed to enable code highlighting in the WTP HTML editor //$NON-NLS-1$
> IStorageEditorInput input = new StringInput(storage, name, toolTip);
> IEditorPart editor = page.openEditor(input, editorId);
>
> /* We change content of the editor AFTER the editor is created
> * as a workaround for the following WTP bug.
> * The essence of the bug is that if given HTML page contains a link
> * to an external DTD, then WTP HTML editor tries to access this DTD before the editor
> * is created and freezes UI.
> * See http://www.eclipse.org/forums/index.php/m/639937/
> */
> IDocument doc = null;
> ITextEditor textEditor = null;
> if (editor instanceof ITextEditor) {
> textEditor = (ITextEditor) editor;
> } else {
> textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
> }
>
> if (textEditor != null) {
> doc = textEditor.getDocumentProvider().getDocument(input);// <<<<----- THE PROBLEM APPEARS HERE
> }
> if (doc != null) {
> doc.set(content);
> editor.doSave(null); // reset resource-changed marker
> }
> } catch (PartInitException e) {
> Activator.logError(e.getMessage(), e);
> }
> } else {
> Activator.logError("Cannot obtain workbench page", null);
> }
> }
> {code}
--
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
13 years