Exception for missing editor descriptor

556 views
Skip to first unread message

Lars Vogel

unread,
Jun 16, 2017, 3:59:09 AM6/16/17
to SonarLint
Hi,

In Eclipse we do not close the view or editor if the user deinstalls a
plug-in. SonarLint should handle a missing editor ID without
exception.

To reproduce:

1.) Install "SWT Designer" into your Eclipse
2.) Open a view / editor in SWT Designer via Open-With context menu
3.) Uninstall SWT Designer and restart Eclipse

In the editor area you see "No editor descriptor for id
org.eclipse.wb.core.guiEditor".

SonarLint gives an exception, see below. IMHO SonarLint should handle
this without exception.

could not get editor content
org.eclipse.ui.PartInitException: Factory
org.eclipse.jdt.ui.ClassFileEditorInputFactory returned null from
createElement for editor id=org.eclipse.jdt.ui.ClassFileEditorNoSource
name=null
at org.eclipse.ui.internal.EditorReference.getEditorInput(EditorReference.java:310)
at org.sonarlint.eclipse.ui.internal.server.actions.JobUtils.collectOpenedFiles(JobUtils.java:90)
at org.sonarlint.eclipse.ui.internal.server.actions.JobUtils.collectOpenedFiles(JobUtils.java:81)
at org.sonarlint.eclipse.ui.internal.server.actions.JobUtils.scheduleAnalysisOfOpenFiles(JobUtils.java:66)
at org.sonarlint.eclipse.ui.internal.SonarLintUiPlugin$AnalyzeOpenedFilesJob.run(SonarLintUiPlugin.java:189)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

I'm using SonarLint without server connection and I'm using latest and
greatest build from source.

Best regards, Lars

--
Eclipse Platform UI and e4 project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars....@vogella.com, Web: http://www.vogella.com

Julien HENRY

unread,
Jun 16, 2017, 4:39:54 AM6/16/17
to Lars Vogel, SonarLint
Nice catch Lars, I have created a ticket, fix should be easy:

Thanks,

Julien Henry | SonarSource

Developer

http://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/CACA4a_HJquBweSwAd_PqbB7fdLGFgStHjgFmch91XTimdy_pLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages