0

I'm new to Eclipse 4 RCP and just learning the basics. I created a part and gave it a class URI. For some reason the class's constructor isn't being called. What could be the reason?

Package Explorer

Application.e4xmi

PlaygroundPart code:

package com.example.e4.rcp.todo.parts;

public class PlaygroundPart {
    public PlaygroundPart() {
        System.out.print("Example");
    }
}

Nothing is printed in the console.

dlvhdr
  • 482
  • 4
  • 19
  • 1
    Do you have '-clearPersistedState' set in the Program Arguments in the Run Configuration for the app? – greg-449 Apr 13 '15 at 13:33
  • I do. http://prntscr.com/6t7nvb It's in the Launching tab of todo.product – dlvhdr Apr 13 '15 at 13:42
  • This is OK for the product but what about the Run Configuration you are using for testing. Is the part actually showing in the UI? – greg-449 Apr 13 '15 at 13:43
  • What do you mean by 'using for testing'? The part does show: http://prntscr.com/6t7qwb – dlvhdr Apr 13 '15 at 13:49
  • You might want to use 'println' rather than 'print' to ensure the message is being flushed to the console. However I can't reproduce this at all, a very similar app works as expected. – greg-449 Apr 13 '15 at 14:03

0 Answers0