Discouraged access: The method getViewPartInput() [message #127569] |
Wed, 05 July 2006 01:00  |
Eclipse User |
|
|
|
Originally posted by: rashmi_h_r.rediffmail.com
Hi All,
I have started using Eclipse 3.2 and VE 1.2. In VE 1.1, I was using
the current active JavaVisualEditor for accessing the CompilationUnit ,
the visual editor is opened on.
The code used is as below.
javaVisualEditor = (JavaVisualEditorPart) activeEditor;
EditDomain ed = (EditDomain) ((EditPartViewer) javaVisualEditor
.getAdapter(EditPartViewer.class)).getEditDomain();
ICompilationUnit compilationUnit = (ICompilationUnit)
javaVisualEditor.getViewPartInput();
After tp comiple the same code in VE 1.2. I am getting a warning as below
Discouraged access: The method getViewPartInput() from the type JavaEditor
is not accessible due to restriction on required library
C:\Eclipse3.2\eclipse\plugins\org.eclipse.jdt.ui_3.2.0.v2006 0605-1400.jar myPath/mypackage MyClass.java line
262 1152010092181 31442
Can anybody please help me to solve this issue? And help me in accessing
the CompilationUnit of the active VisualEditor.
Thanks in advance.
regards,
RashmiH.R
|
|
|
|
|
Re: Discouraged access: The method getViewPartInput() [message #613451 is a reply to message #127569] |
Wed, 05 July 2006 09:50  |
Eclipse User |
|
|
|
Rashmi,
The JavaEditor class (which the JavaVisualEditorPart class extends) from
JDT is in an internal package. If you make any calls to methods on that
class will provide you with that warning, meaning you're using methods
that are not part of the Eclipse public API, and the API contracts are
not guaranteed between versions, etc. If you're ok with that, you can
just ignore the warning. You may also be able to turn that warning off
in the Java compiler options, but I'm not sure about that.
Hope this helps,
- Jeff
|
|
|
|
Powered by
FUDForum. Page generated in 0.04870 seconds