- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Problem extending scala.tools.eclipse.Editor
Sat, 2009-02-28, 20:02
hi,
i cannot find the scala ecipse plug-in to put as a dependancy for my
own scala-based eclipse plug-in. that is, i have a class
class ScalaSnippetEditor2 extends scala.tools.eclipse.Editor { }
that i want to assign in the extensions as editor for files ending
with .spage. problem is, when i launch my project as an eclipse
application, i get
java.lang.NoClassDefFoundError: scala/tools/eclipse/Editor
when trying to open the editor. in my plugin.xml, in dependancies ->
required plug-ins, i have
ch.epfl.lamp.sdt.core
scala.tools.nsc
scala.library
ch.epfl.lamp.sdt.aspects
(and the JDT stuff)
but the scala-plugin is missing... also nothing related is showing up
in the list when i press "Add...".
on the other hand, if i go to project properties -> java build path -
> libraries, in the "Plug-in Dependancies" i see
scala-plugin
scala
scala-library
scala-plugin-aspects
also the scala plug-in definitely is present in my eclipse app
because i can do new project -> scala project and all the wizards and
editors are there....
i was also thinking the problem might be related to the eclipse error
info:
"This usually indicates a missing no-arg constructor or that the
editor's class name was mistyped in plugin.xml." -- i remember that
at some point scalac was also complaining about a missing-no-arg-
constructor for Editor, but now it compiles fine.
thanks for help! ciao, -sciss-
Sat, 2009-02-28, 20:27
#2
Re: Problem extending scala.tools.eclipse.Editor
hi miles,
sorry for bothering you so much with my eclipse learning process, but
i swear, it's hard... so thanks for any of your hints. here is my
MANIFEST.MF (the Export-Package stuff i just added for testing, i
think that can be removed again). i also tried to run the eclipse
dependancy wizard to "Find unused dependancies" but that just works
and works and then ends up with a NullPointerException.
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tintantmare Plug-in
Bundle-SymbolicName: de.sciss.tint.eclipse;singleton:=true
Bundle-Version: 1.0.0
Require-Bundle:
org.eclipse.core.filesystem,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.debug.core,
org.eclipse.debug.ui,
org.eclipse.jface.text,
org.eclipse.ltk.core.refactoring,
org.eclipse.ltk.ui.refactoring,
org.eclipse.search,
org.eclipse.text,
org.eclipse.ui,
org.eclipse.ui.console,
org.eclipse.ui.editors,
org.eclipse.ui.forms,
org.eclipse.ui.ide,
org.eclipse.ui.navigator,
org.eclipse.ui.navigator.resources,
org.eclipse.ui.views,
org.eclipse.ui.workbench.texteditor,
org.eclipse.jdt.core;bundle-version="3.4.0",
ch.epfl.lamp.sdt.core;bundle-version="2.8.0",
scala.tools.nsc;bundle-version="2.8.0",
scala.library;bundle-version="2.8.0",
org.eclipse.jdt.ui;bundle-version="3.4.1",
org.eclipse.jdt.debug;bundle-version="3.4.0",
org.eclipse.jdt.debug.ui;bundle-version="3.3.1",
org.eclipse.jdt.launching;bundle-version="3.4.1",
com.ibm.icu;bundle-version="3.8.1",
ch.epfl.lamp.sdt.aspects;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
libraries/SwingOSC.jar,
libraries/miglayout-3.6-swing.jar,
libraries/selectivecps-library.jar,
libraries/Wolkenpumpe.jar
Bundle-Activator: de.sciss.tint.eclipse.TintPlugIn
Export-Package: de.sciss.tint.eclipse,
de.sciss.tint.eclipse.console,
de.sciss.tint.eclipse.editors,
de.sciss.tint.eclipse.properties,
de.sciss.tint.eclipse.resources,
de.sciss.tint.eclipse.ui,
de.sciss.tint.eclipse.views,
de.sciss.tint.eclipse.wizards,
de.sciss.tint.gui,
de.sciss.tint.sc
ciao, -sciss-
Am 28.02.2009 um 20:10 schrieb Miles Sabin:
> On Sat, Feb 28, 2009 at 7:02 PM, Sciss wrote:
>> when trying to open the editor. in my plugin.xml, in dependancies ->
>> required plug-ins, i have
>
> What does your MANIFEST.MF look like?
>
> Cheers,
>
>
> Miles
>
Sat, 2009-02-28, 20:37
#3
Re: Problem extending scala.tools.eclipse.Editor
On Sat, Feb 28, 2009 at 7:15 PM, Sciss wrote:
> hi miles,
>
> sorry for bothering you so much with my eclipse learning process, but i
> swear, it's hard... so thanks for any of your hints.
Not at all ... the more people who pitch in the better for everyone! :-)
> here is my MANIFEST.MF
OK, you have a Require-Bundle entry for ch.epfl.lamp.sdt.core so what
you're trying to do ought to work, but for the fact that I haven't
actually exported any packages from the Scala plugin itself.
I'll change that now. However, bear in mind that even if I make the
contents of the plugin public, it shouldn't be regarded as stable
public API, everything is subject to change without notice, YMMV,
demons might fly out of your nose, etc., etc. ...
Cheers,
Miles
> (the Export-Package stuff i just added for testing, i think that can be
> removed again). i also tried to run the eclipse dependancy wizard to "Find
> unused dependancies" but that just works and works and then ends up with a
> NullPointerException.
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Tintantmare Plug-in
> Bundle-SymbolicName: de.sciss.tint.eclipse;singleton:=true
> Bundle-Version: 1.0.0
> Require-Bundle:
> org.eclipse.core.filesystem,
> org.eclipse.core.resources,
> org.eclipse.core.runtime,
> org.eclipse.debug.core,
> org.eclipse.debug.ui,
> org.eclipse.jface.text,
> org.eclipse.ltk.core.refactoring,
> org.eclipse.ltk.ui.refactoring,
> org.eclipse.search,
> org.eclipse.text,
> org.eclipse.ui,
> org.eclipse.ui.console,
> org.eclipse.ui.editors,
> org.eclipse.ui.forms,
> org.eclipse.ui.ide,
> org.eclipse.ui.navigator,
> org.eclipse.ui.navigator.resources,
> org.eclipse.ui.views,
> org.eclipse.ui.workbench.texteditor,
> org.eclipse.jdt.core;bundle-version="3.4.0",
> ch.epfl.lamp.sdt.core;bundle-version="2.8.0",
> scala.tools.nsc;bundle-version="2.8.0",
> scala.library;bundle-version="2.8.0",
> org.eclipse.jdt.ui;bundle-version="3.4.1",
> org.eclipse.jdt.debug;bundle-version="3.4.0",
> org.eclipse.jdt.debug.ui;bundle-version="3.3.1",
> org.eclipse.jdt.launching;bundle-version="3.4.1",
> com.ibm.icu;bundle-version="3.8.1",
> ch.epfl.lamp.sdt.aspects;bundle-version="1.0.0"
> Bundle-ActivationPolicy: lazy
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Bundle-ClassPath: .,
> libraries/SwingOSC.jar,
> libraries/miglayout-3.6-swing.jar,
> libraries/selectivecps-library.jar,
> libraries/Wolkenpumpe.jar
> Bundle-Activator: de.sciss.tint.eclipse.TintPlugIn
> Export-Package: de.sciss.tint.eclipse,
> de.sciss.tint.eclipse.console,
> de.sciss.tint.eclipse.editors,
> de.sciss.tint.eclipse.properties,
> de.sciss.tint.eclipse.resources,
> de.sciss.tint.eclipse.ui,
> de.sciss.tint.eclipse.views,
> de.sciss.tint.eclipse.wizards,
> de.sciss.tint.gui,
> de.sciss.tint.sc
>
>
>
> ciao, -sciss-
>
>
> Am 28.02.2009 um 20:10 schrieb Miles Sabin:
>
>> On Sat, Feb 28, 2009 at 7:02 PM, Sciss wrote:
>>>
>>> when trying to open the editor. in my plugin.xml, in dependancies ->
>>> required plug-ins, i have
>>
>> What does your MANIFEST.MF look like?
>>
>> Cheers,
>>
>>
>> Miles
>>
>> --
>> Miles Sabin
>> tel: +44 (0)1273 720 779
>> mobile: +44 (0)7813 944 528
>> skype: milessabin
>
>
Sat, 2009-02-28, 20:47
#4
Re: Problem extending scala.tools.eclipse.Editor
ok, so the problem is that the scala-plugin needs to export its
packages, right?
i understand the API is subject to change. it's just that ATM for me
it's easier to put subclasses and extensions in my own project and
not create a private trunk in the scala-plugin project as that is
much bigger now and very slow to compile. i hope i can contribute
something back in a while.
ciao, -sciss-
Am 28.02.2009 um 20:26 schrieb Miles Sabin:
> On Sat, Feb 28, 2009 at 7:15 PM, Sciss wrote:
>> hi miles,
>>
>> sorry for bothering you so much with my eclipse learning process,
>> but i
>> swear, it's hard... so thanks for any of your hints.
>
> Not at all ... the more people who pitch in the better for
> everyone! :-)
>
>> here is my MANIFEST.MF
>
> OK, you have a Require-Bundle entry for ch.epfl.lamp.sdt.core so what
> you're trying to do ought to work, but for the fact that I haven't
> actually exported any packages from the Scala plugin itself.
>
> I'll change that now. However, bear in mind that even if I make the
> contents of the plugin public, it shouldn't be regarded as stable
> public API, everything is subject to change without notice, YMMV,
> demons might fly out of your nose, etc., etc. ...
>
> Cheers,
>
>
> Miles
>
>> (the Export-Package stuff i just added for testing, i think that
>> can be
>> removed again). i also tried to run the eclipse dependancy wizard
>> to "Find
>> unused dependancies" but that just works and works and then ends
>> up with a
>> NullPointerException.
>>
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: Tintantmare Plug-in
>> Bundle-SymbolicName: de.sciss.tint.eclipse;singleton:=true
>> Bundle-Version: 1.0.0
>> Require-Bundle:
>> org.eclipse.core.filesystem,
>> org.eclipse.core.resources,
>> org.eclipse.core.runtime,
>> org.eclipse.debug.core,
>> org.eclipse.debug.ui,
>> org.eclipse.jface.text,
>> org.eclipse.ltk.core.refactoring,
>> org.eclipse.ltk.ui.refactoring,
>> org.eclipse.search,
>> org.eclipse.text,
>> org.eclipse.ui,
>> org.eclipse.ui.console,
>> org.eclipse.ui.editors,
>> org.eclipse.ui.forms,
>> org.eclipse.ui.ide,
>> org.eclipse.ui.navigator,
>> org.eclipse.ui.navigator.resources,
>> org.eclipse.ui.views,
>> org.eclipse.ui.workbench.texteditor,
>> org.eclipse.jdt.core;bundle-version="3.4.0",
>> ch.epfl.lamp.sdt.core;bundle-version="2.8.0",
>> scala.tools.nsc;bundle-version="2.8.0",
>> scala.library;bundle-version="2.8.0",
>> org.eclipse.jdt.ui;bundle-version="3.4.1",
>> org.eclipse.jdt.debug;bundle-version="3.4.0",
>> org.eclipse.jdt.debug.ui;bundle-version="3.3.1",
>> org.eclipse.jdt.launching;bundle-version="3.4.1",
>> com.ibm.icu;bundle-version="3.8.1",
>> ch.epfl.lamp.sdt.aspects;bundle-version="1.0.0"
>> Bundle-ActivationPolicy: lazy
>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>> Bundle-ClassPath: .,
>> libraries/SwingOSC.jar,
>> libraries/miglayout-3.6-swing.jar,
>> libraries/selectivecps-library.jar,
>> libraries/Wolkenpumpe.jar
>> Bundle-Activator: de.sciss.tint.eclipse.TintPlugIn
>> Export-Package: de.sciss.tint.eclipse,
>> de.sciss.tint.eclipse.console,
>> de.sciss.tint.eclipse.editors,
>> de.sciss.tint.eclipse.properties,
>> de.sciss.tint.eclipse.resources,
>> de.sciss.tint.eclipse.ui,
>> de.sciss.tint.eclipse.views,
>> de.sciss.tint.eclipse.wizards,
>> de.sciss.tint.gui,
>> de.sciss.tint.sc
>>
>>
>>
>> ciao, -sciss-
>>
>>
>> Am 28.02.2009 um 20:10 schrieb Miles Sabin:
>>
>>> On Sat, Feb 28, 2009 at 7:02 PM, Sciss wrote:
>>>>
>>>> when trying to open the editor. in my plugin.xml, in
>>>> dependancies ->
>>>> required plug-ins, i have
>>>
>>> What does your MANIFEST.MF look like?
>>>
>>> Cheers,
>>>
>>>
>>> Miles
>>>
>>> --
>>> Miles Sabin
>>> tel: +44 (0)1273 720 779
>>> mobile: +44 (0)7813 944 528
>>> skype: milessabin
>>
>>
>
>
>
Sat, 2009-02-28, 20:57
#5
Re: Problem extending scala.tools.eclipse.Editor
On Sat, Feb 28, 2009 at 7:32 PM, Sciss wrote:
> ok, so the problem is that the scala-plugin needs to export its packages,
> right?
Yup, fixed just now. Nb. I haven't exported lampion.* or
scala.tools.editor because they'll be gone by the end of next week.
Cheers,
Miles
On Sat, Feb 28, 2009 at 7:02 PM, Sciss wrote:
> when trying to open the editor. in my plugin.xml, in dependancies ->
> required plug-ins, i have
What does your MANIFEST.MF look like?
Cheers,
Miles