private void rebuildView() { removeAll(); isEdited = _cgFile.isEdited(); _header = new ViewHeader(); add(_header, BorderLayout.NORTH); generationStatus = _cgFile.getGenerationStatus(); _codeDisplayer = null; if (_cgFile.getGenerationStatus() == GenerationStatus.CodeGenerationNotAvailable) { add( new JLabel( FlexoLocalization.localizedForKey( "sorry_code_generator_not_available_int_this_version"), SwingConstants.CENTER), BorderLayout.CENTER); return; } GenerationAvailableFileResource resource = (GenerationAvailableFileResource) _cgFile.getResource(); _codeDisplayer = new CodeDisplayer(resource, _contentSource, _controller); add(_codeDisplayer.getComponent()); }