editor doesn't open on linux (ubuntu 10.10) [message #665989] |
Mon, 18 April 2011 13:50 |
Luiz E. Messages: 100 Registered: September 2010 |
Senior 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03740 seconds