Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » editor doesn't open on linux (ubuntu 10.10)
editor doesn't open on linux (ubuntu 10.10) [message #665989] Mon, 18 April 2011 13:50 Go to next message
Luiz E. is currently offline Luiz E.
Messages: 97
Registered: September 2010
Member
hi everyone!
i have a view with a table, and when the table is doubleclicked, it opens a editor. like this:
this.empresas_table_viewer.addDoubleClickListener(new IDoubleClickListener() {
			public void doubleClick(DoubleClickEvent event) {
				try {
					IStructuredSelection selecao = (IStructuredSelection) event.getSelection();
					Empresa selecionada = (Empresa) selecao.getFirstElement();
					System.err.println("Empresa: "+selecionada);
					
					System.err.println("opening...");
					EmpresaEditorInput input = new EmpresaEditorInput(selecionada);
					getSite().getPage().openEditor(input, "empresaEditor");
					System.err.println("Abriu");
				} catch (PartInitException e) {
					ErrorDialog.openError(ShellUtils.getShell(), "Erro", "Ocorreu um erro durante a criação da tela", 
							StatusUtils.createErrorStatus(e.getMessage()));
				}
			}
		});


on windows, this snippet works fine, but on ubuntu, the last thing that happens is the system.err.println saying opening, and the editor doesn't open
the init method from editor:
try {
			EmpresaEditorInput empresaEditorInput = (EmpresaEditorInput) input;
			Empresa e = empresaEditorInput.getEmpresa();
			todosEstados = new EstadoDAO().findAllBrasil();
			todasNaturezasJuridias = new NaturezaJuridicaDAO().findAllByModel(NaturezaJuridica.class);
			todosSindicatos = new SindicatoDAO().findAllByModel(Sindicato.class);
			todasSituacoes = new SituacaoEspecialDAO().findAllByModel(SituacaoEspecial.class);
			todosContabilistas = new ContabilistaDAO().findAllByModel(Contabilista.class);
			
			empresaDAO = new EmpresaDAO();
			if(empresaEditorInput.getEmpresa() == null)
				setEmpresa(new Empresa());
			else {
				if(e.getEmpresas_id() != null)
					setEmpresa(empresaDAO.empresaById(empresaEditorInput.getEmpresa().getEmpresas_id()));
				else
					setEmpresa(e);
			}
			
			if(empresa.getGrupotelefone_id() == null)
				empresa.setGrupotelefone_id(new GrupoTelefone());
			
			empresa.buildEnderecoCompleto();
			
			setSite(site);
			setInput(empresaEditorInput);
			
		} catch (Exception e) {
			e.printStackTrace();
		}

the weirdest thins is that no exception is thrown. the app almost completely freezes!
so i click on exit, the app asks if i'm sure i want to exit, and exit, but it doesn't exit successful. the following log is created:

https://gist.github.com/925368
any ideas?
thanks in advice
ps: excuse my bad english Smile
Re: editor doesn't open on linux (ubuntu 10.10) [message #666157 is a reply to message #665989] Tue, 19 April 2011 11:22 Go to previous messageGo to next message
Luiz E. is currently offline Luiz E.
Messages: 97
Registered: September 2010
Member
anyone?

edit: the editor opens with no problems when inside eclipse.

[Updated on: Tue, 19 April 2011 11:59]

Report message to a moderator

Re: editor doesn't open on linux (ubuntu 10.10) [message #666194 is a reply to message #665989] Tue, 19 April 2011 12:42 Go to previous message
Luiz E. is currently offline Luiz E.
Messages: 97
Registered: September 2010
Member
ok, got it
there was a method with an accent (adicionarSócio) that cause this mess
i've not seen because the encoding of workspace was ISO. so i changed to utf8 and the class was ALL wrong!
everything works now.
Previous Topic:Create Treeviewer inside table
Next Topic:DirectoryDialog initial directory
Goto Forum:
  


Current Time: Mon Sep 15 09:50:59 GMT 2014

Powered by FUDForum. Page generated in 0.02806 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software