Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to access the ProjectionViewer of a JavaEditor ...
How to access the ProjectionViewer of a JavaEditor ... [message #500940] Mon, 30 November 2009 11:59 Go to next message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ran
Messages: 45
Registered: July 2009
Member
.... without using the internal class JavaEditor ?

The following code

JavaEditor javaEditor = (JavaEditor)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();
ProjectionViewer projectionViewer = (ProjectionViewer)
javaEditor.getViewer();

raises a warning I would like to get rid of.

Thanks in advance for any help.
Re: How to access the ProjectionViewer of a JavaEditor ... [message #501110 is a reply to message #500940] Tue, 01 December 2009 04:46 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
Loïc Quéran wrote:
> .... without using the internal class JavaEditor ?
>
> The following code
>
> JavaEditor javaEditor = (JavaEditor)
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();
>
> ProjectionViewer projectionViewer = (ProjectionViewer)
> javaEditor.getViewer();
>
> raises a warning I would like to get rid of.
>
> Thanks in advance for any help.
>

cc-ing to the jdt news group. You might find answers there.


- Prakash
Platform UI Team, IBM

Blog <http://blog.eclipse-tips.com>
Twitter <http://www.twitter.com/Eclipse_Tips>
Re: How to access the ProjectionViewer of a JavaEditor ... [message #501125 is a reply to message #501110] Tue, 01 December 2009 08:11 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Prakash G.R. wrote:
> Loïc Quéran wrote:
>> .... without using the internal class JavaEditor ?
>>
>> The following code
>>
>> JavaEditor javaEditor = (JavaEditor)
>> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();
>>
>> ProjectionViewer projectionViewer = (ProjectionViewer)
>> javaEditor.getViewer();
>>
>> raises a warning I would like to get rid of.
The viewer is internal to the editor and by design not accessible. The
warning tells you that you live on dangerous grounds ;-)
What do you try to achieve?

Dani
>>
>> Thanks in advance for any help.
>>
>
> cc-ing to the jdt news group. You might find answers there.
>
>
> - Prakash
> Platform UI Team, IBM
>
> Blog <http://blog.eclipse-tips.com>
> Twitter <http://www.twitter.com/Eclipse_Tips>
Previous Topic:problem with platform filters
Next Topic:AssertionFailedException in EditorAreaDropAdapter
Goto Forum:
  


Current Time: Thu Oct 02 12:28:58 GMT 2014

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

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