Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » DLTK IDE Guide examples - missing getTextTools?
DLTK IDE Guide examples - missing getTextTools? [message #22099] Mon, 07 April 2008 19:55 Go to next message
Charles Doucette is currently offline Charles DoucetteFriend
Messages: 125
Registered: July 2009
Senior Member
I am trying to build the example source files that I downloaded to accompany
the DLTK IDE Guide.

Right now, when I try to build the part 3 project
(org.eclipse.dltk.examples.python.part3), I get the following errors:

Severity and Description Path Resource Location Creation Time Id
The method getTextTools() is undefined for the type ExamplePythonUI
org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
ExamplePythonContentAssistPreference.java line 20 1207595417216 100898
The method getTextTools() is undefined for the type ExamplePythonUI
org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
ExamplePythonDocumentSetupParticipant.java line 28 1207595417216 100897
The method getTextTools() is undefined for the type ExamplePythonUI
org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
ExamplePythonEditor.java line 37 1207595417216 100896

Each of these lines of code looks like this:

ExamplePythonUI.getDefault().getTextTools();

ExamplePythonUI has the implementation of getDefault:

/**

* Returns the shared instance

*

* @return the shared instance

*/

public static ExamplePythonUI getDefault() {

return plugin;

}

I'm not sure where this method should be defined.

Thanks,

Chuck
Re: DLTK IDE Guide examples - missing getTextTools? [message #22143 is a reply to message #22099] Tue, 08 April 2008 06:14 Go to previous messageGo to next message
Andrei Sobolev is currently offline Andrei SobolevFriend
Messages: 72
Registered: July 2009
Member
Hi Chuck,

I suppose you just skipped step to define this method it.

You should insert following code to ExamplePythonUI class.
////////
private ExamplePythonTextTools fPythonTextTools;

public synchronized ExamplePythonTextTools getTextTools() {
if (fPythonTextTools == null)
fPythonTextTools= new ExamplePythonTextTools(true);
return fPythonTextTools;
}
//////

Additional information in tutorial: http://wiki.eclipse.org/DLTK_IDE_Guide:Step_2._Towards_an_Ed itor#Source_configuration

Best regards,
Andrei Sobolev.

> I am trying to build the example source files that I downloaded to accompany
> the DLTK IDE Guide.
>
> Right now, when I try to build the part 3 project
> (org.eclipse.dltk.examples.python.part3), I get the following errors:
>
> Severity and Description Path Resource Location Creation Time Id
> The method getTextTools() is undefined for the type ExamplePythonUI
> org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
> ExamplePythonContentAssistPreference.java line 20 1207595417216 100898
> The method getTextTools() is undefined for the type ExamplePythonUI
> org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
> ExamplePythonDocumentSetupParticipant.java line 28 1207595417216 100897
> The method getTextTools() is undefined for the type ExamplePythonUI
> org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
> ExamplePythonEditor.java line 37 1207595417216 100896
>
> Each of these lines of code looks like this:
>
> ExamplePythonUI.getDefault().getTextTools();
>
> ExamplePythonUI has the implementation of getDefault:
>
> /**
>
> * Returns the shared instance
>
> *
>
> * @return the shared instance
>
> */
>
> public static ExamplePythonUI getDefault() {
>
> return plugin;
>
> }
>
> I'm not sure where this method should be defined.
>
> Thanks,
>
> Chuck
>
>
>
>
Re: DLTK IDE Guide examples - missing getTextTools? [message #22228 is a reply to message #22143] Thu, 10 April 2008 01:06 Go to previous message
Charles Doucette is currently offline Charles DoucetteFriend
Messages: 125
Registered: July 2009
Senior Member
Indeed - you are right - I missed that.
That's what happens when I:
a) start to follow the tutorial (which automatically creates the plugin
class)
b) attempt to short circuit the tutorial by copying the downloaded
finished code
(but everything except the default plugin class created
automatically)

Sorry for the false problem report, and thanks for the quick response.

Chuck

"Andrei Sobolev" <haiodo@xored.com> wrote in message
news:ftf2go$ll4$1@build.eclipse.org...
> Hi Chuck,
>
> I suppose you just skipped step to define this method it.
>
> You should insert following code to ExamplePythonUI class.
> ////////
> private ExamplePythonTextTools fPythonTextTools;
>
> public synchronized ExamplePythonTextTools getTextTools() {
> if (fPythonTextTools == null)
> fPythonTextTools= new ExamplePythonTextTools(true);
> return fPythonTextTools;
> }
> //////
>
> Additional information in tutorial:
> http://wiki.eclipse.org/DLTK_IDE_Guide:Step_2._Towards_an_Ed itor#Source_configuration
>
> Best regards,
> Andrei Sobolev.
>
>> I am trying to build the example source files that I downloaded to
>> accompany
>> the DLTK IDE Guide.
>>
>> Right now, when I try to build the part 3 project
>> (org.eclipse.dltk.examples.python.part3), I get the following errors:
>>
>> Severity and Description Path Resource Location Creation Time Id
>> The method getTextTools() is undefined for the type ExamplePythonUI
>> org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
>> ExamplePythonContentAssistPreference.java line 20 1207595417216 100898
>> The method getTextTools() is undefined for the type ExamplePythonUI
>> org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
>> ExamplePythonDocumentSetupParticipant.java line 28 1207595417216 100897
>> The method getTextTools() is undefined for the type ExamplePythonUI
>> org.eclipse.dltk.examples.python.part3/src/org/eclipse/dltk/ examples/python/internal/ui/editor
>> ExamplePythonEditor.java line 37 1207595417216 100896
>>
>> Each of these lines of code looks like this:
>>
>> ExamplePythonUI.getDefault().getTextTools();
>>
>> ExamplePythonUI has the implementation of getDefault:
>>
>> /**
>>
>> * Returns the shared instance
>>
>> *
>>
>> * @return the shared instance
>>
>> */
>>
>> public static ExamplePythonUI getDefault() {
>>
>> return plugin;
>>
>> }
>>
>> I'm not sure where this method should be defined.
>>
>> Thanks,
>>
>> Chuck
>>
>>
>>
>>
Previous Topic:Query regarding DLTK JRubySourceParser
Next Topic:Expanding dltk.tcl for java/ctl (jacl)
Goto Forum:
  


Current Time: Fri Dec 27 01:00:16 GMT 2024

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

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

Back to the top