facebook

Editing xml and xsd files

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #233360 Reply

    Leeboz
    Member

    Hi. I have a question with the myeclipse 4.0 xml/xsd editors. I don’t understand why when I edit a file in the editor it does reflect the changes to the actual file? I edited a xsd schema (then i saved) and when I open it using emacs it still doesn’t relect the change? Is it a setting I could to do that?

    Thanks for any insight.
    Charlie

    #233361 Reply

    Leeboz
    Member

    My system env are as follows:
    OS: FC3
    Eclipse: vr.3.1
    myEclipse:Version 4 milestone 2

    Thanks 🙂

    #233380 Reply

    Riyad Kalla
    Member

    Charlie,
    Do me a favor, close all your editors and restart MyEclipse. Then open the Properties View (Window > Show View > Other… > Basic > Properties), now move the properties view someplace where it is ALWAYS visible. Now edit your XML and XSD files, and save them. Do they work now? (NOTE: Make sure that the properties view is visible at all times)

    #233396 Reply

    Leeboz
    Member

    Nope it hasn’t worked. The strange thing is that I edit the file saved and closed that editor. I checked in emacs that the file didn’t change and closed that. When i re-open the file in ME the edits i made are saved. Of course then when i checked it in emacs the files remain unedited. Seems like the editor keeps a buffer somwhere?

    Thanks for any insight!
    Charlie

    #233402 Reply

    Riyad Kalla
    Member

    Open up your log file <workspace dir>\.metadata\.log and paste the exceptions near the bottom here, do you see one about DocumentListener?

    #233428 Reply

    Leeboz
    Member

    I done’ see that but this is the last exception in the log file:

    !ENTRY org.eclipse.ui 4 0 2005-07-21 17:55:59.203
    !MESSAGE java.lang.NullPointerException
    !STACK 0
    java.lang.NullPointerException
    at org.eclipse.jface.text.reconciler.AbstractReconciler$Listener.documentChanged(AbstractReconciler.java:236)
    at com.ibm.sse.model.internal.text.BasicStructuredDocument._fireDocumentChanged(BasicStructuredDocument.java:264)
    at com.ibm.sse.model.internal.text.BasicStructuredDocument.fireStructuredDocumentEvent(BasicStructuredDocument.java:948)
    at com.ibm.sse.model.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:1694)
    at com.ibm.sse.editor.StructuredDocumentToTextAdapter.replaceTextRange(StructuredDocumentToTextAdapter.java:952)
    at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5787)
    at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6625)
    at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2592)
    at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5098)
    at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5124)
    at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4857)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1045)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1030)
    at org.eclipse.swt.widgets.Widget.sendIMKeyEvent(Widget.java:1107)
    at org.eclipse.swt.widgets.Control.gtk_commit(Control.java:1851)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1355)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:3442)
    at org.eclipse.swt.internal.gtk.OS._gtk_im_context_filter_keypress(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_im_context_filter_keypress(OS.java:4327)
    at org.eclipse.swt.widgets.Control.filterKey(Control.java:1428)
    at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:1957)
    at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:560)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1365)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:3442)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:4777)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1067)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1158)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2570)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
    at org.eclipse.core.launcher.Main.run(Main.java:973)
    at org.eclipse.core.launcher.Main.main(Main.java:948)

    #233442 Reply

    Riyad Kalla
    Member

    Thank you, we will look into this ASAP.

    #233477 Reply

    Brian Fernandes
    Moderator

    Leeboz,

    Can you try opening the file only once per eclipse session?

    By that, I mean – start eclipse, open the file and keep it open for the entire session. As far as we know, the problem will occur only the second and subsequent times you open the file for editing, but not the first time. So as long as you want to edit the file, keep it open, and don’t close and re-open it.

    We are investigating this issue now, it hasn’t been reported for the XML and XSD editors recently. A recent fix in a related area did not make our 4.0M2 release due to an oversight.

    Please let us know if the above suggesiton helps you with your issue.

    Sorry for the inconvenience,
    Brian

    #233492 Reply

    Leeboz
    Member

    Thanks your suggestion is working. Althought not an ideal solution as editing many XML files is routein for me.

    Also it seems like the problem is only in the XML editor only as I use the ME xsd editor for my xsd it seems to save and edit fine.

    Do you have an idea when this fix will be release?

    Thanks
    Charlie

    #233493 Reply

    Brian Fernandes
    Moderator

    Charlie,

    Glad to hear that it’s working; but you’re absolutely right, it isn’t an ideal solution by any standards and we’re working on fixing it for the upcoming ME 4.0 M3 release.

    To help us isolate the issue, can you tell me if you’re currently using XML / XSD validation?

    1) Is Project > Build Automatically checked?
    2) Window > Preferences > MyEclipse > Validation
    is XML and XSD validation turned on?

    Can you turn off the following in the above preference page
    a) Run validation when you manually build a project
    b) Run validaiton automatically when you save changes to a resource
    c) XML Schema Validator
    d) XML Validatior

    Turn off Project > Build Automatically as well, just to be sure.

    After this, restart eclipse and try editing your xml files, close and re-open them and see if the original issue remains.

    It is difficult for us to reproduce this particular issue locally, since you see the problem frequently your findings will help isolate the cause.

    We appreciate your patience and assistance,
    Best,
    Brian.

    #233497 Reply

    Leeboz
    Member

    1) Is Project > Build Automatically checked?

    Yes

    2) Window > Preferences > MyEclipse > Validation
    is XML and XSD validation turned on?

    Yes

    I have turned off everthing as you have asked and it seems to be working well now. I guess the only other observation that I can make is when you edit files in normal mode a little ‘ * ‘ is next to the file name so I know the file need saving. However when i have the problem with the xml files the ‘ * ‘ never appears even after i edited it.

    No problem glad to be of help.
    Charlie

    #233498 Reply

    Brian Fernandes
    Moderator

    Charlie,

    This is very interesting.

    Let me clarify: If you turn off XML validation (you can turn on everything to how it was before, just leave XML Validation unchecked) you are able to edit your XML files and save them at will, even after closing and re-opening them?
    It is odd that you are able to save the file if you do not see the ‘*’. We’ll investigate that as well.

    If it isn’t too much trouble, can you turn on XML Validation and see the if the problem reappears? (Be sure to restart eclipse for a clean test).

    If you confirm this then we can be sure that XML Validation is at fault, and we’ll go about hunting the issue down there.

    Thanks again,
    Brian.

    #233519 Reply

    Leeboz
    Member

    Hi,

    I have done what you said and xml editing is working fine now.

    Thanks for your help and looking forward to the next release
    Charlie

    #233520 Reply

    Brian Fernandes
    Moderator

    Charlie,

    Sorry, I’m not entirely sure what you meant above.

    Have you turned XML Validation back on and everything is working as expected? Or do you have to keep it off for your editing to work?

    Thanks,
    Brian.

    #233521 Reply

    Leeboz
    Member

    Sorry. I made a mistake of what you said. I turned XML validation back on now (before i just turned back on everything else apart form xml validation) but strangly the xml editing is fine again. hmm not sure what is going on now.

    But again thanks for looking into it.
    Charlie

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: Editing xml and xsd files

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