facebook

Navigating to jsp fragment doesn’t work

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #215822 Reply

    henk
    Member

    I’m using Eclipse 3.0, My Eclipse 3.8.1 and SDK 1.4.2_03 on Windows XP Sp2. Recently I have performed a fresh install of Eclipse 3.0 and myeclipse 3.8.1.

    When I try to navigate to a statically included JSP fragment using CTRL + left mousebutton in the editor where the fragment is included, an error messages appears in the status-bar saying: “current text selection does not resolve to a file”.

    Odly, the JSP validator can resolve the link. When I make some error in the included fragment it is picked up and displayed in the jsp where I include this fragment. Also, when I deploy to several different application servers (orion, sun application server 8) the page just works.

    I’m using the following tag:

    <%@ include file=”includes/test.jspf” %>

    I have also tried:

    <%@ include file=”includes/test1.jsp” %>

    But both give the same result. The includes directory is in the same directory as where the jsp file lives that included the fragment, and both test.jspf and test1.jsp exist. I also tried cleaning and rebuilding the project (this solved another strange error that said I had a duplicate variable in my fragment which really wasn’t true, but that’s another bug I think)

    Things get really weird when I change the include to:

    <%@ include file=”WEB-INF/includes/test.jspf” %>

    When I try to navigate to the fragment, a dialog is displayed saying:

    Unable to creat part:

    After clicking ok, in the editor pane a tab is opened without a name and a message saying: An error has occured when creating this editor. In the log the following entry is created:

    !ENTRY org.eclipse.ui 4 4 Sep 23, 2004 16:02:37.46
    !MESSAGE Unhandled event loop exception

    !ENTRY org.eclipse.ui 4 0 Sep 23, 2004 16:02:37.46
    !MESSAGE java.lang.NullPointerException
    !STACK 0
    java.lang.NullPointerException
    at org.eclipse.jface.text.DefaultPositionUpdater.update(DefaultPositionUpdater.java:227)
    at org.eclipse.jface.text.AbstractDocument.updatePositions(AbstractDocument.java:1028)
    at org.eclipse.jface.text.AbstractDocument.updateDocumentStructures(AbstractDocument.java:616)
    at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:704)
    at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:998)
    at com.ibm.sse.model.internal.text.BasicStructuredDocument.updateParentDocument(Unknown Source)
    at com.ibm.sse.model.jsp.parser.JSPReParser.reparse(Unknown Source)
    at com.ibm.sse.model.internal.text.StructuredDocumentReParser.reparse(Unknown Source)
    at com.ibm.sse.model.internal.text.BasicStructuredDocument.updateModel(Unknown Source)
    at com.ibm.sse.model.internal.text.BasicStructuredDocument.replaceText(Unknown Source)
    at com.ibm.sse.editor.StructuredDocumentToTextAdapter.replaceTextRange(Unknown Source)
    at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5601)
    at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6441)
    at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2536)
    at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:4979)
    at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5002)
    at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4747)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
    at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1734)
    at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1730)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3067)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:2970)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1467)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2429)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
    at org.eclipse.core.launcher.Main.run(Main.java:644)
    at org.eclipse.core.launcher.Main.main(Main.java:628)

    !ENTRY org.eclipse.core.runtime 4 2 Sep 23, 2004 16:02:48.781
    !MESSAGE Problems occurred when invoking code from plug-in: “org.eclipse.core.runtime”.
    !STACK 0
    An error has occurred when initializing the input for the the editor’s source page.
    at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.createPages(Unknown Source)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:187)
    at org.eclipse.ui.internal.PartPane$2.run(PartPane.java:137)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:133)
    at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:205)
    at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:939)
    at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:921)
    at org.eclipse.ui.internal.EditorStack.setVisibleEditor(EditorStack.java:170)
    at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:338)
    at org.eclipse.ui.internal.EditorAreaHelper.openEditor(EditorAreaHelper.java:268)
    at org.eclipse.ui.internal.EditorManager$4.run(EditorManager.java:697)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:686)
    at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:782)
    at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:585)
    at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:573)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2201)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2134)
    at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2126)
    at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2113)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2108)
    at com.ibm.sse.editor.openon.AbstractOpenOn.openExternalFile(Unknown Source)
    at com.ibm.sse.editor.openon.AbstractOpenOn.openFileInEditor(Unknown Source)
    at com.ibm.sse.editor.xml.openon.DefaultOpenOnXML.doOpenOn(Unknown Source)
    at com.ibm.sse.editor.jsp.openon.JSPDirectiveOpenOnJSP.doOpenOn(Unknown Source)
    at com.ibm.sse.editor.openon.AbstractOpenOn.openOn(Unknown Source)
    at com.ibm.sse.editor.internal.openon.OpenFileHyperlinkTracker.mouseUp(Unknown Source)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
    at org.eclipse.core.launcher.Main.run(Main.java:644)
    at org.eclipse.core.launcher.Main.main(Main.java:628)

    #215838

    Riyad Kalla
    Member

    henk is this a Java project by chance? If so all files are resolved from the project root, we originally didn’t want to have to support web editing in normal Java proejcts, but there was such a big demand for it that we added as much as we could easily. If this is a web project, the file should be resolved from the webroot…

    Please let me know what kind of project this is, and what your dir structure is (project root, webroot, etc.) so I can file a bug to see if we can support relative resolution of file paths if that is infact what is screwing you up here.

    #215839

    henk
    Member

    It’s definately not a java project, but a J2EE->Web Project.

    The project itself conforms to the standard directory layout for such projects. E.g. I used the structure as created by the wizard. Deployment and debugging all works fine. In the project I use java beans, servlets and jsp files.

    Although I think it’s a standard layout, I shall give the structure ( a – means one level below the entity with one – less)

    Project root:
    -.myeclipse
    -.classpath
    -.mymetadata
    -.project
    -Java source
    –(packages containing my source for the beans and servlets)
    -Web Root
    –css
    –images
    –includes
    —test.jsp
    —test1.jspf
    –scripts
    –META-INF
    –WEB-INF
    —classes
    —lib
    —web.xml
    –index.jsp
    –(bunch of other jsp files)

    The thing I forgot to mention in the previous post is that the referenced .jspf files in WEB-INF don’t exist. So, it -seems- as if the behaviour is exactly opposite:

    If the included fragment does exist at the relative location, myeclipse sais it doesn’t exist.

    If the included fragment indeed does not exist at the relative location, myeclipse tries to open it anyway resulting in an exception,

    The only thing I’m not really sure about is why the exception occurs in the context of an html editor. I don’t have any html files in my project, and even if I had, the exception came after CTRL + LEFT clicking on the filename in the include tag.

    #215840

    Riyad Kalla
    Member

    henk,
    I have spent the last hour creating all permeatations of includes that I can think of across all supported project types and I think we have some bugs on our end that we need to work on. You helped to set this in motion so I thank you for that, but for now if you can avoid using CTRl+Click until we 1) figure out what is going on, 2) get anything broken fixed?

    Sorry for the inconvenience, I know CTRL+Click is an extremely handy feature, we promise we’ll polish it as fast as we can. (not for 3.8.2 though, that is due out any day now and no major changes will likely go in at the last minute, we learned our lesson with that release paradigm 😉

    #215857

    henk
    Member

    I’m glad that you were at least able to recreate the (or a) problem relating to CTRL + click. I understand that it’s not wise to make major changes at the last moment. (as we’re all developpers here, I think everyone understands why that is 🙂 ).

    Although I miss the feature a lot, stability is more important for me and would be worth the wait for the version after 3.8.2.

    #215861

    Riyad Kalla
    Member

    I have confirmed that this has been tomprarily disabled in 3.8.2 until we can “make it work”. Thank you for hanging in there.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Navigating to jsp fragment doesn’t work

You must be logged in to post in the forum log in