facebook

the Swing/Matisse perspective doesn’t synchronize the files

  1. MyEclipse Archived
  2.  > 
  3. Matisse/Swing UI Development
Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #284648 Reply

    byb3
    Member

    I’ve had this same issue this week. I could only track it down to the .form file being corrupted somewhere along the line, as it was not storing the relevant information. Its size was around 2kb instead of the expected 17kb.

    This gave the impression that you were changing/editing the form with the form designer but when you went to run it it would bring up an old version of your java file.

    At present I have no solution.

    #284662 Reply

    Loyal Water
    Member

    byb3,
    Does switching to a new workspace and working with a new form resolve this issue for you ?

    #284664 Reply

    byb3
    Member

    Yes. If I make a new workspace and start work on a new Matisse form from scratch then everything is updated and works as usual. There isn’t even any need to switch workspace. If you create a new form in the package that you are working with, then it also works fine.

    The error only affects the form/java combination on which you are working. On further testing i’m certain it is something to do with the .form file not generating the .java file correctly. For example I create a jMenuItem in the .form, which I can see perfectly in the designer and on the outline on the left. I can change its properties etc. However when I save and look in the .java file, this jMenuItem is not mentioned at all. So when I run the application it isn’t showing what I am designing in the form designer.

    I tried some unorthodox methods such as wiping the initComponents() to see if it would be re-generated but nothing happened. Is there anyway to force myEclipse to generate the .java file from the information stored in the .form file (I assume the form file is how it stores the form design data)? This seems to be the underlying issue, as it is forgetting in this case.

    #284670 Reply

    Loyal Water
    Member

    byb3,
    Can you list out the exact steps to reproduce this issue at my end because what ever synchronizing I tried worked fine.

    #284674 Reply

    byb3
    Member

    Hi,

    I actually don’t know how to reproduce this bug yet, but it has occured on 3 separate computers. I think it is a matisse bug, not a myEclipse bug as it has also occured on NetBeans.

    I can only send you a combination of the files with the error.

    So there is no way to generate the initComponents() from the .form file? I am sure there must be someway.

    #284676 Reply

    byb3
    Member

    Ok I have managed to find a solution to the problem. I believe at one point the.java code was edited independently of the .form. (ie somebody loaded the.java up, but not through the .form source method).

    The solution is to edit your .java file without going in the .form file. Make sure that it includes all of the tags the Matisse editor expects. This refers to the GEN-EDIT tags before and after the initComponents and variable declaration sections. You may need to make a subtle change in your design (ie change a textfield) so that it detects a change and then generates the .java file correctly. You will notice straight away when the .form file picks up the .java file again because the save takes a lot longer.

    I think this is likely to occur if people edit the .java file outside the .form design/source. I know it says do not modify quite clearly but unfortunately thats still not enough for some people!!

    Thanks for the help and I hope this solves any future problems.

Viewing 6 posts - 16 through 21 (of 21 total)
Reply To: the Swing/Matisse perspective doesn’t synchronize the files

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